/* ===================================================
   MARCHANT UNION BANK — Main Stylesheet
   Design: Deep navy & gold, Inter + Playfair Display
   =================================================== */

:root {
    --navy:        #3a0b0b;
    --navy-mid:    #122847;
    --navy-light:  #591a1a;
    --gold:        #C9A84C;
    --gold-light:  #E2C272;
    --gold-pale:   #F8F1DE;
    --surface:     #F5F7FA;
    --white:       #FFFFFF;
    --text-main:   #1A2235;
    --text-mute:   #6B7A99;
    --border:      #E2E8F0;
    --success:     #1A7D4A;
    --success-bg:  #E8F7EF;
    --danger:      #C53030;
    --danger-bg:   #FEF2F2;
    --warning:     #B7791F;
    --warning-bg:  #FFFBEB;
    --info:        #1D6FA4;
    --info-bg:     #EFF8FF;
    --sidebar-w:   260px;
    --topbar-h:    64px;
    --radius:      10px;
    --radius-lg:   16px;
    --shadow-sm:   0 1px 3px rgba(11,31,58,.08), 0 1px 2px rgba(11,31,58,.06);
    --shadow-md:   0 4px 16px rgba(11,31,58,.10), 0 2px 6px rgba(11,31,58,.07);
    --shadow-lg:   0 12px 40px rgba(11,31,58,.14);
    --transition:  all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background: var(--surface);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.brand-logo {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
    font-size: 18px;
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: #fff; }
.brand-sub  { font-size: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 8px 10px 4px;
    margin-bottom: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.65);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(201,168,76,.18), rgba(201,168,76,.08)); color: var(--gold-light); border-left: 3px solid var(--gold); }
.nav-item.nav-item-danger:hover { background: rgba(197,48,48,.15); color: #FC8181; }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    padding: 8px 10px;
}

.user-avatar-sm {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: var(--navy);
    flex-shrink: 0;
}

.user-info-sm { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.user-name-sm { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status  { font-size: 10px; color: #68D391; }

/* ── MAIN WRAPPER ────────────────────────────────── */
.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s ease;
}

/* ── TOPBAR ──────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0; z-index: 900;
    box-shadow: var(--shadow-sm);
}

.topbar-left  { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }

.sidebar-toggle {
    background: none; border: none;
    width: 36px; height: 36px;
    border-radius: 8px;
    display: none; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-mute);
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--surface); color: var(--text-main); }

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.topbar-date {
    font-size: 12.5px;
    color: var(--text-mute);
    background: var(--surface);
    padding: 5px 10px;
    border-radius: 6px;
}

.user-avatar-top {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: var(--gold);
}

.btn-user-menu {
    display: flex; align-items: center;
    background: none; border: 1px solid var(--border);
    border-radius: 8px; padding: 4px 10px;
    cursor: pointer; transition: var(--transition);
    font-size: 12px; color: var(--text-mute);
}
.btn-user-menu:hover { border-color: var(--navy); }

/* ── PAGE CONTENT ────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 28px 28px;
}

.page-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-mute);
    background: var(--white);
    text-align: center;
}

/* ── FLASH MESSAGES ──────────────────────────────── */
.flash-container { padding: 16px 28px 0; }
.flash-alert { border-radius: var(--radius); font-size: 13.5px; border: none; }

/* ── STAT CARDS ──────────────────────────────────── */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-card-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border: none;
    color: #fff;
}
.stat-card-hero::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: rgba(201,168,76,.12);
    border-radius: 50%;
}

.stat-label {
    font-size: 11px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-mute); margin-bottom: 8px;
}
.stat-card-hero .stat-label { color: rgba(255,255,255,.55); }

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 26px; font-weight: 700; color: var(--text-main);
    line-height: 1.1; margin-bottom: 6px;
}
.stat-card-hero .stat-value { color: #fff; font-size: 30px; }

.stat-sub {
    font-size: 12px; color: var(--text-mute);
}
.stat-card-hero .stat-sub { color: rgba(255,255,255,.55); }

.stat-icon {
    position: absolute; top: 20px; right: 20px;
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

.stat-icon-gold   { background: var(--gold-pale); color: var(--gold); }
.stat-icon-green  { background: var(--success-bg); color: var(--success); }
.stat-icon-blue   { background: var(--info-bg); color: var(--info); }
.stat-icon-navy   { background: rgba(255,255,255,.12); color: var(--gold); }

/* ── ACCOUNT CARDS ───────────────────────────────── */
.account-card {
    border-radius: var(--radius-lg);
    padding: 28px;
    color: #fff;
    position: relative; overflow: hidden;
    min-height: 160px;
    box-shadow: var(--shadow-md);
}
.account-card-checking {
    background: linear-gradient(135deg, #0B1F3A 0%, #1A3559 100%);
}
.account-card-savings {
    background: linear-gradient(135deg, #1A4731 0%, #2D6A4F 100%);
}
.account-card-balance {
    background: linear-gradient(135deg, #4A1942 0%, #7B2D6A 100%);
}

.account-card::before {
    content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.account-card::after {
    content: '';
    position: absolute;
    bottom: 20px; right: 60px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}

.account-card-type { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .6; margin-bottom: 6px; }
.account-card-balance-val { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 20px; }
.account-card-num  { font-size: 13px; letter-spacing: .15em; opacity: .7; font-family: 'Courier New', monospace; }
.account-card-chip { width: 36px; height: 28px; background: var(--gold); border-radius: 5px; margin-bottom: 16px; opacity: .9; }

/* ── TRANSACTIONS TABLE ──────────────────────────── */
.txn-table-wrap {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

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

.txn-table-title { font-size: 15px; font-weight: 600; color: var(--text-main); }

.table-responsive { overflow-x: auto; }

.txn-table {
    width: 100%; border-collapse: collapse;
}

.txn-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-mute);
    background: #FAFBFC;
    border-bottom: 1px solid var(--border);
}

.txn-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 13.5px;
}

.txn-table tr:last-child td { border-bottom: none; }
.txn-table tr:hover td { background: #FAFBFF; }

.txn-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; margin-right: 10px;
    flex-shrink: 0;
}
.txn-icon-credit { background: var(--success-bg); color: var(--success); }
.txn-icon-debit  { background: var(--danger-bg);  color: var(--danger); }
.txn-icon-transfer { background: var(--info-bg);  color: var(--info); }

.txn-desc { font-weight: 500; color: var(--text-main); }
.txn-ref  { font-size: 11.5px; color: var(--text-mute); font-family: monospace; }

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

.badge-status {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-pending   { background: var(--warning-bg); color: var(--warning); }
.badge-failed    { background: var(--danger-bg);  color: var(--danger); }

/* ── CARDS / PANELS ──────────────────────────────── */
.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 15px; font-weight: 600;
}

.panel-body { padding: 24px; }

/* ── FORM ELEMENTS ───────────────────────────────── */
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }

.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13.5px; color: var(--text-main);
    background: var(--white);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(11,31,58,.08);
    outline: none;
}

.form-control::placeholder { color: #B0BAD0; }

.input-group-text {
    background: var(--surface); border: 1.5px solid var(--border);
    color: var(--text-mute); border-radius: 8px 0 0 8px; padding: 10px 14px;
}

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary-bank {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary-bank:hover { background: linear-gradient(135deg, #0d2444, #1e3d66); box-shadow: var(--shadow-md); transform: translateY(-1px); color: #fff; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
    border: none;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 13.5px; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-gold:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-outline-bank {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--border);
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13.5px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-bank:hover { border-color: var(--navy); background: var(--surface); }

/* ── AUTH PAGES ──────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, #1a3559 60%, #0f2540 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 440px;
    padding: 44px 40px;
}

.auth-logo {
    text-align: center; margin-bottom: 32px;
}
.auth-logo-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--navy); font-size: 24px; margin-bottom: 14px;
}
.auth-logo-name { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--text-main); }
.auth-logo-sub  { font-size: 12px; color: var(--text-mute); }

.auth-title    { font-size: 22px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-mute); margin-bottom: 28px; }

.auth-divider {
    text-align: center; position: relative; margin: 20px 0;
    color: var(--text-mute); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%; width: 42%;
    height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-mute); }
.auth-switch a { color: var(--navy); font-weight: 600; }
.auth-switch a:hover { color: var(--gold); }

.auth-bg-pattern {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}
.auth-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(201,168,76,.06);
}

/* ── QUICK ACTION BUTTONS ────────────────────────── */
.quick-actions {
    display: flex; gap: 12px; flex-wrap: wrap;
}

.quick-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    cursor: pointer; transition: var(--transition);
    min-width: 90px; flex: 1;
    text-align: center;
}
.quick-btn:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.quick-btn:hover .quick-btn-icon { background: rgba(255,255,255,.12); color: var(--gold); }
.quick-btn:hover .quick-btn-label { color: #fff; }

.quick-btn-icon {
    width: 44px; height: 44px;
    background: var(--surface); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: var(--navy); transition: var(--transition);
}

.quick-btn-label { font-size: 12px; font-weight: 600; color: var(--text-main); transition: var(--transition); }

/* ── TRANSFER PAGE ───────────────────────────────── */
.transfer-steps {
    display: flex; gap: 0; margin-bottom: 32px;
    position: relative;
}
.transfer-steps::before {
    content: '';
    position: absolute; top: 18px; left: 0; right: 0;
    height: 2px; background: var(--border); z-index: 0;
}
.step-item {
    flex: 1; text-align: center; position: relative; z-index: 1;
}
.step-circle {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--border); color: var(--text-mute);
    font-size: 13px; font-weight: 700; margin-bottom: 6px;
    transition: var(--transition);
}
.step-item.active .step-circle   { background: var(--navy); color: #fff; }
.step-item.complete .step-circle { background: var(--success); color: #fff; }
.step-label { font-size: 11.5px; font-weight: 600; color: var(--text-mute); }
.step-item.active .step-label   { color: var(--navy); }
.step-item.complete .step-label { color: var(--success); }

/* ── PROFILE ─────────────────────────────────────── */
.profile-hero {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 24px; color: #fff;
}
.profile-avatar-lg {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 28px; font-weight: 700; color: var(--navy);
    flex-shrink: 0;
}
.profile-name  { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; }
.profile-email { font-size: 13px; opacity: .65; margin-top: 2px; }
.profile-since { font-size: 12px; opacity: .5; margin-top: 4px; }

/* ── OVERLAY ─────────────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed;
    inset: 0; background: rgba(0,0,0,.4);
    z-index: 999;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open { display: block; }
    .main-wrapper { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .page-content { padding: 20px 16px; }
    .auth-card { padding: 32px 24px; }
}

@media (max-width: 576px) {
    .stat-value { font-size: 22px; }
    .stat-card-hero .stat-value { font-size: 26px; }
    .quick-btn { padding: 14px 12px; }
    .quick-btn-label { font-size: 11px; }
}

/* ── MISC UTILITIES ──────────────────────────────── */
.section-title { font-size: 15px; font-weight: 600; color: var(--text-main); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-mute); }
.empty-state i { font-size: 40px; margin-bottom: 14px; opacity: .3; }
.empty-state p { font-size: 14px; }

.pin-dots { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.pin-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border); transition: var(--transition); }
.pin-dot.filled { background: var(--navy); }

/* Number input no spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.text-gold { color: var(--gold) !important; }
.bg-navy   { background: var(--navy) !important; }
