:root {
    --primary-color: #0C1C40;
    --secondary-color: #1A3A7A;
    --accent-color: #3498db;
    --bg-color: #F4F7F6;
    --card-bg: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --success: #2ecc71;
    --danger: #e74c3c;
    --border-radius: 12px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

.hidden { display: none !important; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    max-width: 500px;
    width: 90%;
    animation: modalIn 0.3s ease;
}
 
 /* Tutorial */
 .tutorial-nav {
     display: flex;
     justify-content: center;
     gap: 10px;
     margin-top: 12px;
 }
 
 .photo-editor-preview {
     margin-bottom: 15px;
 }
 
 .btn-danger {
     background: var(--danger);
     color: #fff;
 }

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.content-section {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auth Screens (Login/Register) */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #050a1a 100%);
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.auth-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 15px;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.logo span { color: var(--accent-color); }

.auth-card h2 {
    margin: 15px 0 5px;
    font-weight: 600;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus { border-color: var(--accent-color); }

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

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

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

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

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
aside {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

aside .logo { color: white; margin-bottom: 50px; }

.nav-menu { list-style: none; }

.nav-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255,255,255,0.1);
}

.nav-item i { font-size: 1.2rem; }

.badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Card Improvements */
.bank-logo {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: contain;
    background: white;
    padding: 2px;
}

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

/* Main Content */
main { padding: 40px; }

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Dashboard Widgets */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat-label { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 10px; }

.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); }

.stat-change { margin-top: 10px; font-size: 0.85rem; font-weight: 500; }

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Charts & Lists */
.grid-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.card-detailed {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-list { list-style: none; }

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.transaction-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.transaction-info span { font-size: 0.8rem; color: var(--text-secondary); }

.transaction-amount { font-weight: 600; }
.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }

.avatar-container {
    position: relative;
    cursor: pointer;
    width: 45px;
    height: 45px;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: 0.3s;
}

.avatar-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Notification Popup */
.notif-popup {
    position: absolute;
    top: 45px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3000;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.notif-popup-header {
    padding: 15px;
    background: var(--bg-color);
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.notif-popup-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-popup-footer {
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-color);
    background: var(--bg-color);
    cursor: pointer;
    font-weight: 600;
}

/* Voice Assitant */
.voice-mic-btn {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.voice-mic-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.voice-container {
    text-align: center;
    position: relative;
}

.voice-mic-large {
    width: 100px;
    height: 100px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.voice-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: ripple 1.5s infinite;
    opacity: 0.5;
}

@keyframes ripple {
    from { width: 100px; height: 100px; opacity: 0.5; }
    to { width: 250px; height: 250px; opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    aside { 
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0 10px;
        z-index: 1000;
    }
    aside .logo { display: none; }
    .nav-menu { display: flex; width: 100%; justify-content: space-around; }
    .nav-item { flex-direction: column; font-size: 0.7rem; padding: 10px 5px; gap: 5px; margin: 0; }
    .nav-item i { font-size: 1rem; }
    main { padding-bottom: 80px; }
    .grid-details { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    main { 
        padding-top: 16px; 
        padding-bottom: 16px; 
        padding-left: calc(20px + env(safe-area-inset-left));
        padding-right: calc(20px + env(safe-area-inset-right));
    }
    header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .grid-stats { grid-template-columns: 1fr; gap: 14px; }
    .stat-card { padding: 18px; }
    .btn { width: 100%; }
}
