:root {
    --primary: #4f46e5;      /* Indigo */
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --secondary: #10b981;    /* Emerald */
    --accent: #f59e0b;       /* Amber */
    --dark: #0f172a;         /* Slate 900 */
    --light-bg: #f8fafc;     /* Slate 50 */
    --white: #ffffff;
    --text-main: #1e293b;    /* Slate 800 */
    --text-muted: #64748b;   /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    
    --sidebar-width: 260px;
    --navbar-height: 70px;
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #34d399;
    --accent: #fbbf24;
    --dark: #f8fafc;
    --light-bg: #000414;
    --white: #020617;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
}

body {
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
}

/* ========================================================================= */
/* Typography                                                                */
/* ========================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.025em;
}

/* ========================================================================= */
/* Buttons                                                                   */
/* ========================================================================= */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
}

.btn-check:checked + .btn, 
.btn.active, 
.btn.show, 
.btn:first-child:active, 
:not(.btn-check) + .btn:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}

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

/* ========================================================================= */
/* Forms                                                                     */
/* ========================================================================= */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.input-group-text {
    background-color: #f1f5f9;
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* ========================================================================= */
/* Cards & Containers                                                        */
/* ========================================================================= */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* ========================================================================= */
/* Auth Split Layout (Quantum Fiscal Bridge Design)                          */
/* ========================================================================= */
.bank-auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background: var(--white);
    overflow-x: hidden;
}

.bank-auth-sidebar {
    flex: 1;
    display: none; /* Hidden by default, shown on lg */
    flex-direction: column;
    justify-content: center;
    padding: 80px;
    background: #000414; /* Deep Navy from Angular */
    color: white;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .bank-auth-sidebar {
        display: flex;
    }
}

.sidebar-glow {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
}

.bank-auth-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: var(--white);
}

@media (max-width: 991px) {
    .bank-auth-form {
        width: 100%;
        align-items: center;
    }
}

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

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.premium-input {
    height: 52px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--light-bg);
}

.premium-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.05);
    outline: none;
}

.btn-premium {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-premium:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* Utilities */
.x-small { font-size: 11px; }
.fw-800 { font-weight: 800; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.animate-fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================================================= */
/* Main Dashboard Layout                                                     */
/* ========================================================================= */
.user-wrapper {
    display: flex;
    min-height: 100vh;
}

.user-sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    z-index: 1030;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .user-sidebar {
        transform: translateX(-100%);
    }
    .user-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    }
}


.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: var(--primary);
}

.sidebar-nav {
    padding: 1.5rem 1rem;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.nav-link:hover {
    color: var(--primary);
    background-color: var(--light-bg);
}

.nav-link.active {
    color: var(--primary);
    background-color: rgba(79, 70, 229, 0.1);
}

.user-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

@media (max-width: 991px) {
    .user-main {
        margin-left: 0;
    }
    .user-topbar {
        padding: 0 1rem;
    }
}


.user-topbar {
    height: var(--navbar-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.user-content {
    padding: 2rem;
    flex: 1;
}

/* ========================================================================= */
/* Dashboard Specific                                                        */
/* ========================================================================= */
.stat-widget {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.25rem;
}

.stat-icon.primary { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--accent); }

.stat-content h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.stat-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Table styling */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom-width: 1px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.badge {
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-weight: 500;
}
