:root {
    /* Premium Light Theme Colors */
    --bg-main: #f3f6f9; 
    --bg-card: #ffffff; 
    --bg-header: #ffffff;
    --border-color: #e2e8f0;
    
    --primary-color: #2563eb; 
    --primary-hover: #1d4ed8;
    --primary-shadow: rgba(37, 99, 235, 0.25);
    
    --text-main: #0f172a; 
    --text-muted: #64748b; 
    
    --accent-success: #10b981; 
    --accent-bg: rgba(16, 185, 129, 0.1);
    
    --danger: #ef4444; 
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

/* Authentication Flow (Login Page) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.auth-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.logo-brand {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 35px;
    font-weight: 500;
}

/* App Layout Structure */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 250px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    top: 0;
    left: 0;
}

.sidebar-logo {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo .brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-links {
    padding: 20px 15px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.nav-item.active, .nav-item:hover {
    background: var(--bg-main);
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* Content Area */
.content-wrapper {
    flex: 1;
    margin-left: 250px;
    padding-bottom: 30px;
    overflow-y: auto;
}

.top-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 24px;
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.wallet-badge {
    display: inline-block;
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Mobile Bottom Nav */
.bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    
    .content-wrapper {
        margin-left: 0;
        padding-bottom: 80px; 
    }
    
    .top-header {
        justify-content: space-between;
    }
    .top-header .mobile-logo {
        display: block !important;
        font-weight: 800;
        color: var(--primary-color);
        font-size: 1.3rem;
    }

    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 600;
    }
    
    .bottom-nav-item svg { stroke-width: 2.5; }
    .bottom-nav-item.active { color: var(--primary-color); }
}

.mobile-logo { display: none; }

/* Components */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-shadow);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:hover { background: var(--primary-hover); }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-active { background: var(--accent-bg); color: var(--accent-success); }
.status-inactive { background: var(--danger-bg); color: var(--danger); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-active { background: var(--accent-success); }
.dot-inactive { background: var(--danger); }

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-card);
}
table { width: 100%; border-collapse: collapse; }
th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
td {
    padding: 18px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
.amount-in { color: var(--accent-success); font-weight: 700; }
.amount-out { color: var(--text-main); font-weight: 700; }

.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
}
.form-control:focus { border-color: var(--primary-color); }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.85rem; }
