/* Fonts: system stack for offline use (no Google Fonts CDN) */
:root {
    --gold: #d4a017;
    --gold-deep: #b8860b;
    --gold-rich: #d4a017;
    --navy: #1e3a5f;
    --navy-mid: #2d5280;
    --navy-light: #3d6a9e;
    --corp-blue: #2563eb;
    --corp-teal: #0d9488;
    --corp-purple: #7c3aed;
    --corp-rose: #e11d48;
    --corp-orange: #ea580c;
    --corp-cyan: #0891b2;
    --corp-emerald: #059669;
    --corp-indigo: #4f46e5;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-w: 280px;
    --header-h: 72px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
    --shadow-md: 0 12px 32px rgba(15,23,42,.1);
    --shadow-lg: 0 24px 64px rgba(15,23,42,.14);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface-2);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── Background mesh ───────────────────────────────────── */
.app-main {
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(59,130,246,.05) 0%, transparent 50%),
        var(--surface-2);
}

/* ─── Sidebar — corporate navy + gold stripe ────────────── */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-w);
    background: #ffffff;
    color: #4a4540;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    border-right: 1px solid #ebe6dc;
    box-shadow: 2px 0 16px rgba(80, 60, 20, 0.04);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.app-sidebar::before {
    display: none;
}

.sidebar-brand {
    padding: 1.5rem 1.35rem 1.35rem 1.5rem;
    border-bottom: 1px solid #ebe6dc;
    display: flex;
    align-items: center;
    gap: .85rem;
    background: linear-gradient(135deg, #fffdf8 0%, #fff 100%);
}

.sidebar-brand-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #e8c547, #c9a227);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.25);
}

.sidebar-brand h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -.02em;
    color: #2c2c2c;
}

.sidebar-brand small {
    font-size: .68rem;
    color: #8a8378;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem .85rem 1rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}

.nav-section-label {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--gold);
    padding: 1rem .75rem .4rem;
    opacity: .85;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .9rem;
    color: #4a4540;
    text-decoration: none;
    border-radius: 12px;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 3px;
    transition: all .2s ease;
    position: relative;
}

.sidebar-link i {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    background: #faf9f7;
    color: #c9a227;
    transition: all .2s ease;
}

.sidebar-link:hover {
    background: #faf6ee;
    color: #2c2c2c;
    transform: none;
}

.sidebar-link:hover i {
    background: #f3ead8;
    color: #a67c00;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(59,130,246,.12) 0%, rgba(59,130,246,.04) 100%);
    color: #1e3a5f;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.15);
}

.sidebar-link.active i {
    background: linear-gradient(135deg, #2d5280, #1e3a5f);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30,58,95,.3);
}

.sidebar-link.active::after {
    content: '';
    position: absolute;
    right: .75rem;
    width: 6px; height: 6px;
    background: var(--gold-rich);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-rich);
}

.sidebar-footer {
    padding: 1.15rem 1.25rem;
    border-top: 1px solid #ebe6dc;
    background: #faf9f7;
}

.sidebar-user { display: flex; align-items: center; gap: .85rem; }

.sidebar-avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--corp-purple), var(--corp-indigo));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    border: 2px solid rgba(255,255,255,.15);
    box-shadow: 0 4px 16px rgba(124,58,237,.4);
}

.sidebar-user-info .name {
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: .75rem;
    padding: .6rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(225,29,72,.2), rgba(225,29,72,.08));
    color: #fb7185 !important;
    border: 1px solid rgba(225,29,72,.25);
    font-weight: 600;
    font-size: .84rem;
}

.sidebar-logout:hover {
    background: linear-gradient(135deg, rgba(225,29,72,.35), rgba(225,29,72,.15));
    color: #fff !important;
}

/* ─── Header — corporate white bar ──────────────────────── */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    height: var(--header-h);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-rich), var(--gold), var(--gold-deep));
}

.header-left { display: flex; align-items: center; gap: 1.15rem; }

.sidebar-toggle {
    display: none;
    background: linear-gradient(135deg, var(--corp-blue), var(--corp-indigo));
    border: none;
    border-radius: 10px;
    padding: .5rem .65rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}

.header-title h2 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--navy);
    letter-spacing: -.02em;
}

.header-title .breadcrumb-text {
    font-size: .78rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.header-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    font-weight: 600;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.header-chip.live {
    background: linear-gradient(135deg, rgba(5,150,105,.12), rgba(5,150,105,.06));
    color: var(--corp-emerald);
    border-color: rgba(5,150,105,.25);
}

.header-chip.gold-rate {
    background: linear-gradient(135deg, rgba(232,185,35,.15), rgba(232,185,35,.05));
    color: var(--gold-deep);
    border-color: rgba(232,185,35,.3);
}

.live-dot {
    width: 8px; height: 8px;
    background: var(--corp-emerald);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--corp-emerald);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(.8); }
}

.header-datetime {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: .45rem .85rem;
    background: var(--surface-2);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.app-content { padding: 1.75rem 2rem 2.5rem; flex: 1; }

/* ─── Corporate hero banner ─────────────────────────────── */
.corp-hero {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1e3a5f;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.corp-hero::before,
.corp-hero::after {
    display: none;
}

.corp-hero h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .35rem;
    letter-spacing: -.03em;
}

.corp-hero h1 span {
    color: #d4a017;
    background: none;
    -webkit-text-fill-color: #d4a017;
}

.corp-hero p {
    color: #64748b;
    margin: 0;
    font-size: .92rem;
}

.corp-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.corp-hero-badges {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
}

.corp-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .95rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.corp-pill.gold { background: rgba(232,185,35,.2); color: var(--gold-rich); border: 1px solid rgba(232,185,35,.35); }
.corp-pill.blue { background: rgba(37,99,235,.25); color: #93c5fd; border: 1px solid rgba(37,99,235,.35); }
.corp-pill.teal { background: rgba(13,148,136,.25); color: #5eead4; border: 1px solid rgba(13,148,136,.35); }

/* ─── Page header ───────────────────────────────────────── */
.page-header { margin-bottom: 1.75rem; }

.page-header h4, .page-header h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0 0 .3rem;
    color: var(--navy);
}

.page-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: .92rem;
}

.section-title {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .65rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--gold-rich), var(--gold-deep));
}

/* ─── Colorful KPI cards ────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-md);
    transition: transform .25s ease, box-shadow .25s ease;
    color: #fff;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: -30px; left: -10px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.stat-card.clickable { cursor: pointer; }

/* Vibrant gradient variants */
.stat-card.kpi-gold    { background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%); }
.stat-card.kpi-indigo  { background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #818cf8 100%); }
.stat-card.kpi-emerald { background: linear-gradient(135deg, #047857 0%, #059669 50%, #34d399 100%); }
.stat-card.kpi-cyan    { background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #22d3ee 100%); }
.stat-card.kpi-orange  { background: linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #fb923c 100%); }
.stat-card.kpi-purple  { background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #a78bfa 100%); }
.stat-card.kpi-rose    { background: linear-gradient(135deg, #be123c 0%, #e11d48 50%, #fb7185 100%); }
.stat-card.kpi-navy    { background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 50%, #2563eb 100%); }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .9;
    margin-bottom: .4rem;
}

.stat-value {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.stat-sub {
    font-size: .82rem;
    margin-top: .5rem;
    opacity: .92;
    font-weight: 500;
}

.stat-icon-wrap {
    width: 52px; height: 52px;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.stat-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: .3rem .65rem;
    border-radius: 8px;
    margin-top: .55rem;
    background: rgba(255,255,255,.25);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.3);
}

/* ─── Panels ────────────────────────────────────────────── */
.panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel-header {
    padding: 1.15rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.panel-header.gradient-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
    border-bottom-color: #bfdbfe;
}

.panel-header.gradient-gold {
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
    border-bottom-color: #fde68a;
}

.panel-header.gradient-teal {
    background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
    border-bottom-color: #99f6e4;
}

.panel-header h5 {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: .55rem;
}

.panel-header h5 i {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
}

.panel-header.gradient-blue h5 i { background: #dbeafe; color: var(--corp-blue); }
.panel-header.gradient-gold h5 i { background: #fef3c7; color: #d97706; }
.panel-header.gradient-teal h5 i { background: #ccfbf1; color: var(--corp-teal); }

.panel-body { padding: 1.35rem 1.5rem; }
.panel-body.flush { padding: 0; }

/* ─── Quick actions — colorful grid ─────────────────────── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .95rem 1.1rem;
    border-radius: 14px;
    text-decoration: none;
    font-size: .84rem;
    font-weight: 700;
    color: var(--navy);
    border: 1px solid var(--border);
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .2s;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--navy);
}

.quick-action-btn i {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.quick-action-btn span { position: relative; z-index: 1; }

.qa-kacha i    { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 4px 12px rgba(217,119,6,.35); }
.qa-ftbuy i    { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 4px 12px rgba(5,150,105,.35); }
.qa-ftsell i   { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 4px 12px rgba(220,38,38,.35); }
.qa-credit i   { background: linear-gradient(135deg, #4f46e5, #818cf8); box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.qa-exchange i { background: linear-gradient(135deg, #0891b2, #22d3ee); box-shadow: 0 4px 12px rgba(8,145,178,.35); }
.qa-refinery i { background: linear-gradient(135deg, #ea580c, #fb923c); box-shadow: 0 4px 12px rgba(234,88,12,.35); }

.qa-kacha:hover    { background: linear-gradient(135deg, #fffbeb, #fff); border-color: #fbbf24; }
.qa-ftbuy:hover    { background: linear-gradient(135deg, #ecfdf5, #fff); border-color: #34d399; }
.qa-ftsell:hover   { background: linear-gradient(135deg, #fef2f2, #fff); border-color: #f87171; }
.qa-credit:hover   { background: linear-gradient(135deg, #eef2ff, #fff); border-color: #818cf8; }
.qa-exchange:hover { background: linear-gradient(135deg, #ecfeff, #fff); border-color: #22d3ee; }
.qa-refinery:hover { background: linear-gradient(135deg, #fff7ed, #fff); border-color: #fb923c; }

/* ─── Tables ────────────────────────────────────────────── */
.table-premium { margin: 0; font-size: .875rem; }

.table-premium thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding: 1rem 1.35rem;
}

.table-premium tbody td {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-premium tbody tr:hover { background: linear-gradient(90deg, rgba(37,99,235,.04), transparent); }

.txn-type-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: .35rem .7rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.table-gold thead {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #fff;
}

.table-gold thead th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .95rem 1.1rem;
    border: none;
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.85rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-rich), var(--corp-blue), var(--corp-teal));
}

.form-section h6 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: .55rem;
}

.form-label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .45rem;
}

.form-control, .form-select {
    border-radius: 11px;
    border: 1.5px solid var(--border);
    padding: .65rem .95rem;
    font-size: .9rem;
    transition: all .2s ease;
    background: #fafbfc;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold-rich);
    box-shadow: 0 0 0 4px rgba(212,175,55,.12);
    background: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-rich) 0%, var(--gold-deep) 100%);
    color: #0d0d0d;
    border: none;
    font-weight: 800;
    padding: .7rem 1.65rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(232,185,35,.4);
    transition: all .2s ease;
    letter-spacing: .02em;
}

.btn-gold:hover {
    color: #0d0d0d;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(212,175,55,.45);
}

.btn-corp {
    background: linear-gradient(135deg, var(--corp-blue), var(--corp-indigo));
    color: #fff;
    border: none;
    font-weight: 700;
    padding: .7rem 1.65rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(37,99,235,.35);
}

.btn-corp:hover { color: #fff; transform: translateY(-2px); }

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold-deep);
    font-weight: 700;
    border-radius: 12px;
    background: transparent;
}

.btn-outline-gold:hover {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: var(--gold-deep);
    border-color: var(--gold-rich);
}

.page-title {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--navy);
}

/* ─── Alerts ────────────────────────────────────────────── */
.alert-premium {
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.alert-success.alert-premium { border-left-color: var(--corp-emerald); background: linear-gradient(90deg, #ecfdf5, #fff); }
.alert-danger.alert-premium  { border-left-color: var(--corp-rose); background: linear-gradient(90deg, #fff1f2, #fff); }

/* ─── Role badges ───────────────────────────────────────── */
.badge-role-owner   { background: linear-gradient(135deg, var(--gold-rich), var(--gold-deep)); color: var(--navy); font-weight: 800; }
.badge-role-manager { background: linear-gradient(135deg, var(--corp-blue), var(--corp-indigo)); color: #fff; font-weight: 700; }
.badge-role-staff   { background: linear-gradient(135deg, #64748b, #475569); color: #fff; font-weight: 700; }

/* ─── Report cards ──────────────────────────────────────── */
.report-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.85rem 1.5rem;
    text-decoration: none;
    color: var(--navy);
    transition: all .25s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--report-accent, linear-gradient(90deg, var(--gold-rich), var(--corp-blue)));
    transform: scaleX(0);
    transition: transform .25s ease;
}

.report-card:hover::before { transform: scaleX(1); }

.report-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    color: var(--navy);
}

.report-card i {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto .85rem;
    color: #fff;
}

.report-card.rc-purchase i { background: linear-gradient(135deg, #059669, #34d399); }
.report-card.rc-sales i    { background: linear-gradient(135deg, #dc2626, #f87171); }
.report-card.rc-stock i    { background: linear-gradient(135deg, #d97706, #fbbf24); }
.report-card.rc-cash i     { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.report-card.rc-profit i   { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.report-card.rc-credit i   { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.report-card.rc-audit i    { background: linear-gradient(135deg, #2563eb, #60a5fa); }

.report-card h5 { font-size: .92rem; font-weight: 700; margin: 0; }

/* ─── Tabs ──────────────────────────────────────────────── */
.nav-tabs-premium {
    border: none;
    gap: .5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.nav-tabs-premium .nav-link {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: .84rem;
    padding: .6rem 1.25rem;
    transition: all .2s ease;
}

.nav-tabs-premium .nav-link:hover {
    border-color: var(--corp-blue);
    color: var(--corp-blue);
    background: #eff6ff;
}

.nav-tabs-premium .nav-link.active {
    background: linear-gradient(135deg, var(--corp-blue), var(--corp-indigo));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
}

/* ─── Login — corporate fintech ─────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--navy);
}

.login-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, rgba(232,185,35,.2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(37,99,235,.25) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 60% 20%, rgba(13,148,136,.15) 0%, transparent 50%);
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-rich), var(--corp-blue), var(--corp-teal), var(--corp-purple));
}

.login-hero { position: relative; z-index: 1; }

.login-hero h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 1.15rem;
}

.login-hero h1 span {
    background: linear-gradient(90deg, var(--gold-rich), #fef08a, var(--gold-rich));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-hero p {
    color: rgba(255,255,255,.6);
    font-size: 1.05rem;
    max-width: 440px;
    line-height: 1.65;
}

.login-features {
    margin-top: 2.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.15rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    color: rgba(255,255,255,.85);
    font-size: .86rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    transition: all .2s ease;
}

.login-feature:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(232,185,35,.3);
    transform: translateY(-2px);
}

.login-feature i {
    width: 40px; height: 40px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.login-feature:nth-child(1) i { background: linear-gradient(135deg, #d97706, #fbbf24); color: #fff; }
.login-feature:nth-child(2) i { background: linear-gradient(135deg, #2563eb, #60a5fa); color: #fff; }
.login-feature:nth-child(3) i { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.login-feature:nth-child(4) i { background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; }

.login-right {
    width: 500px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: -24px 0 80px rgba(0,0,0,.35);
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gold-rich), var(--corp-blue), var(--corp-teal));
}

.login-form-wrap { width: 100%; max-width: 380px; }

.login-form-wrap h2 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .35rem;
}

.login-form-wrap .subtitle { color: var(--text-muted); font-size: .92rem; margin-bottom: 2rem; }

.login-demo {
    margin-top: 1.75rem;
    padding: 1.15rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-radius: 14px;
    font-size: .82rem;
    color: #92400e;
    text-align: center;
    border: 1px solid #fde68a;
}

.login-demo code {
    background: rgba(217,119,6,.15);
    color: #b45309;
    padding: .2rem .5rem;
    border-radius: 6px;
    font-weight: 700;
}

/* ─── Modal ─────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #fff;
    border: none;
    padding: 1.35rem 1.65rem;
}

.modal-header .modal-title { font-weight: 700; color: #fff; }
.modal-header .btn-close { filter: invert(1); }

.breakdown-table td { padding: .85rem 0; border: none; color: var(--text-muted); }
.breakdown-table tr.total td {
    font-weight: 800;
    font-size: 1.15rem;
    border-top: 3px solid var(--gold-rich);
    padding-top: 1.15rem;
    color: var(--navy);
}

/* ─── Legacy compat ─────────────────────────────────────── */
.widget-card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.widget-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.widget-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.live-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: linear-gradient(135deg, rgba(5,150,105,.12), rgba(5,150,105,.06));
    color: var(--corp-emerald); font-size: .75rem; font-weight: 700;
    padding: .45rem .9rem; border-radius: 999px;
    border: 1px solid rgba(5,150,105,.25);
}

.stat-icon { /* legacy */ }
.stat-icon.gold, .stat-icon.green, .stat-icon.blue, .stat-icon.red, .stat-icon.purple, .stat-icon.orange { display: none; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 992px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .sidebar-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,.55);
        backdrop-filter: blur(4px);
        z-index: 1035;
    }
    .sidebar-overlay.show { display: block; }
    .login-left { display: none; }
    .login-right { width: 100%; }
    .login-features { grid-template-columns: 1fr; }
    .app-content { padding: 1.25rem; }
}

@media (max-width: 576px) {
    .corp-hero h1 { font-size: 1.35rem; }
    .header-datetime { display: none; }
}
