/* Base Styles */
:root {
    --primary-color: #011053;
    --primary-dark: #f8cb00;
    --primary-light: #f39c12;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --text-light: #777;
    --background-color: #f8f9fa;
    --card-color: #fff;
    --border-color: #e1e1e1;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --info-color: #3498db;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 15px;
    width: 100%;
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
}

/* Layout */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background-color: var(--card-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.page-title h1 {
    font-size: 20px;
    color: var(--text-color);
}

.back-button a {
    color: var(--text-color);
    font-size: 20px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.notification-btn, .add-btn, .filter-btn, .edit-btn {
    position: relative;
    font-size: 20px;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-btn:hover, .add-btn:hover, .filter-btn:hover, .edit-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for mobile nav */
}

.mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--card-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 auto;
    height: 70px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    padding: 10px;
    transition: var(--transition);
    width: 20%;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Cards and Sections */
section {
    margin-bottom: 25px;
}

section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.balance-card {
    background-color: var(--primary-color);
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.balance-card h2 {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.balance-amount {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.balance-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.action-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--border-radius);
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.action-btn i {
    font-size: 20px;
    margin-bottom: 5px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-color);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.action-card i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.view-all {
    font-size: 14px;
    color: var(--primary-color);
}

/* Transactions */
.transaction-list {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: white;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--text-color);
}

.transaction-icon.deposit {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.transaction-icon.withdraw {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.transaction-icon.transfer {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.transaction-details {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-light);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.deposit {
    color: var(--success-color);
}

.transaction-amount.withdraw {
    color: var(--danger-color);
}

/* Date Groups */
.transaction-date-group {
    margin-bottom: 20px;
}

.date-header {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-left: 10px;
}

/* Account Cards */
.account-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-card.primary {
    border-left: 4px solid var(--primary-color);
}

.account-card.savings {
    border-left: 4px solid var(--info-color);
}

.account-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.account-number {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.account-balance {
    font-size: 20px;
    font-weight: 600;
}

.account-actions {
    display: flex;
    gap: 10px;
}

.account-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: var(--transition);
}

.account-action-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.stat-icon.income {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.stat-icon.expense {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.stat-title {
    font-size: 14px;
    color: var(--text-light);
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
}

/* Virtual Card */
.virtual-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-chip {
    position: absolute;
    top: 25px;
    left: 25px;
    font-size: 24px;
}

.card-number {
    position: absolute;
    top: 80px;
    left: 25px;
    font-size: 20px;
    letter-spacing: 2px;
}

.card-details {
    position: absolute;
    bottom: 25px;
    left: 25px;
    display: flex;
    gap: 30px;
}

.card-holder, .card-expiry {
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
}

.value {
    font-size: 14px;
    font-weight: 500;
}

.card-type {
    position: absolute;
    bottom: 25px;
    right: 25px;
    font-size: 30px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.card-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    flex: 1;
    padding: 10px;
    transition: var(--transition);
}

.card-action-btn i {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.card-action-btn.freeze i {
    color: var(--info-color);
}

/* Transaction Actions */
.transaction-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.transaction-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 15px;
    flex: 1;
    margin: 0 5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.transaction-action-btn i {
    font-size: 24px;
    margin-bottom: 10px;
}

.transaction-action-btn.deposit i {
    color: var(--success-color);
}

.transaction-action-btn.withdraw i {
    color: var(--danger-color);
}

.transaction-action-btn.transfer i {
    color: var(--info-color);
}

.transaction-action-btn:hover {
    transform: translateY(-5px);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.filter-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background-color: transparent;
    color: var(--text-light);
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.filter-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Profile */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.profile-avatar {
    position: relative;
    margin-bottom: 15px;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-color);
    box-shadow: var(--shadow);
}

.change-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-email {
    color: var(--text-light);
}

.profile-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 25px;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.profile-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.info-value {
    font-weight: 500;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.profile-action-btn i {
    font-size: 20px;
    margin-right: 15px;
    color: var(--primary-color);
    width: 24px;
}

.profile-action-btn.logout i {
    color: var(--danger-color);
}

/* Auth Pages */
.auth-page {
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 32px;
    color: var(--primary-color);
}

.auth-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.auth-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.input-with-icon input, .input-with-icon select {
    padding-left: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot-password {
    color: var(--primary-color);
}

.btn {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-block {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.register-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.close-modal {
    font-size: 24px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.card-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.card-detail-item:last-child {
    border-bottom: none;
}

.show-cvv-btn {
    color: var(--primary-color);
    margin-left: 10px;
}

.status-active {
    color: var(--success-color);
}

/* Media Queries */
@media (min-width: 768px) {
    .app-container {
        max-width: 768px;
        border-radius: 20px;
        margin: 20px auto;
        min-height: calc(100vh - 40px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .mobile-nav {
        position: sticky;
        max-width: 768px;
        border-radius: 0 0 20px 20px;
    }

    .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .balance-actions {
        max-width: 80%;
        margin: 0 auto;
    }
}

/* Show Modal Animation */
.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Styles pour les formulaires standards */
.form-section {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.standard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(230, 126, 34, 0.1);
}