/* =====================================================
   FINGUARD Platform — Professional Banking CSS
   Design: SBI/HDFC Grade | RBI Compliant
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Roboto+Mono:wght@400;600&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
    --navy: #002D72;
    /* Primary Action Navy */
    --navy-mid: #00235A;
    --navy-dark: #001A50;
    --navy-light: #F0F7FF;
    --gold: #C5941A;
    --gold-bright: #E5B33A;
    --gold-light: #FFF8E1;
    --white: #FFFFFF;
    --surface: #F4F7FA;
    /* Slightly darker for contrast */
    --surface-alt: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.95);
    /* More opaque */
    --border: #CBD5E1;
    /* Darker border */
    --text-primary: #1E293B;
    --text-secondary: #334155;
    --text-muted: #64748B;

    /* Premium Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glassmorphism Utilities */
/* Glassmorphism Utilities (High Contrast) */
.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.glass-dark {
    background: rgba(0, 26, 80, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

h2 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

h3 {
    font-size: 1.05rem;
}

p {
    color: var(--text-secondary);
}

small {
    font-size: 0.8rem;
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: .3px;
}

/* ===== FRAUD AWARENESS STRIP ===== */
.fraud-strip {
    background: #7B1111;
    color: #FFF5F5;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 7px 20px;
    letter-spacing: .3px;
}

.fraud-strip span {
    opacity: .75;
}

/* ===== SECURITY TICKER ===== */
.security-ticker {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, .75);
    font-size: 11.5px;
    text-align: center;
    padding: 5px 16px;
    letter-spacing: .4px;
    border-bottom: 1px solid rgba(197, 148, 26, .3);
}

.security-ticker b {
    color: var(--gold);
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
    color: white;
    padding: 0 28px;
    border-bottom: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    box-shadow: var(--shadow-md);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo-icon {
    width: 46px;
    height: 46px;
    background: var(--gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--navy-dark);
}

.header-brand-text {
    line-height: 1.2;
}

.header-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    display: block;
}

.header-brand-sub {
    font-size: 10.5px;
    color: rgba(255, 255, 255, .85);
    letter-spacing: .5px;
    text-transform: uppercase;
}

.header-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hbadge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .3px;
    border: 1px solid rgba(255, 255, 255, .18);
    color: #FFFFFF;
}

.hbadge-rbi {
    background: rgba(197, 148, 26, .18);
    border-color: rgba(197, 148, 26, .4);
    color: #FDF4D6;
}

.hbadge-ssl {
    background: rgba(26, 122, 74, .2);
    border-color: rgba(26, 122, 74, .4);
    color: #90E8B8;
}

.hbadge-dicgc {
    background: rgba(255, 255, 255, .08);
}

/* ===== NAVIGATION / ROLE SWITCH ===== */
nav,
.role-switch {
    background: var(--navy-mid);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    min-height: 46px;
}

nav button,
.role-switch button {
    background: transparent;
    color: rgba(255, 255, 255, .75);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 6px;
    transition: all var(--transition);
    letter-spacing: .2px;
    margin: 0 2px;
}

nav button:hover,
.role-switch button:hover,
nav button.active-nav {
    background: rgba(255, 255, 255, .15);
    color: white;
}

/* ===== SECTIONS ===== */
section {
    display: none;
    padding: 28px;
    animation: fadeSlide 0.35s ease;
}

.active {
    display: block;
}

.customerSection {
    display: none;
}

.activeCustomer {
    display: block;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px #2e7d32;
    }

    50% {
        opacity: 0.4;
        box-shadow: 0 0 2px #2e7d32;
    }
}

@keyframes livePulseEng {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes feedSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ADMIN LAYOUT ===== */
.layout {
    display: flex;
    height: calc(100vh - 64px - 3px - 46px);
    margin-right: 360px;
    transition: margin-right var(--transition);
}

body.agent-minimized .layout {
    margin-right: 0;
}

/* ===== ADMIN SIDEBAR ===== */
.sidebar {
    width: 240px;
    background: var(--navy-dark);
    color: white;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .07);
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(197, 148, 26, .35);
}

.sidebar .logo h3 {
    color: white;
    font-size: 1rem;
}

.sidebar .logo p {
    color: rgba(255, 255, 255, .45);
    font-size: 10.5px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.sidebar .logo h2,
.sidebar .logo h3 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

.sidebar button {
    background: transparent;
    color: rgba(255, 255, 255, .85);
    border: none;
    border-radius: 8px;
    padding: 11px 14px;
    margin: 3px 0;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    text-align: left;
    transition: all var(--transition);
    width: 100%;
}

.sidebar button:hover {
    background: rgba(197, 148, 26, .15);
    color: white;
}

.sidebar button.sidebar-active {
    background: rgba(197, 148, 26, .2);
    color: var(--gold);
    font-weight: 700;
    border-left: 3px solid var(--gold);
}

/* ===== CONTENT AREA ===== */
.content {
    flex: 1;
    overflow-y: auto;
    background: var(--surface);
}

.topbar {
    background: var(--card-bg);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.topbar-clock {
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
}

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    padding: 22px 24px;
    margin: 18px auto;
    max-width: 560px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--navy);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* ===== CHAT BOX ===== */
.chat-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius);
    height: 250px;
    overflow-y: auto;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, .04);
}

.chat-box p {
    margin: 6px 0;
    animation: fadeSlide 0.4s ease;
    color: var(--text-secondary);
    font-size: 13.5px;
}

/* ===== FORM ELEMENTS ===== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--card-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
    margin-top: 5px;
    margin-bottom: 12px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 45, 114, .1);
}

/* Voice Recognition Styles */
.input-with-voice {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.input-with-voice .form-group {
    flex: 1;
    margin-bottom: 0;
}

.voice-btn {
    background: var(--navy-light) !important;
    color: var(--navy) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    margin-bottom: 12px; /* Sync with input margin */
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

.voice-btn:hover {
    background: var(--gold-light) !important;
    border-color: var(--gold) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.voice-btn.active {
    background: #FEE2E2 !important;
    border-color: #EF4444 !important;
    color: #B91C1C !important;
    animation: voicePulse 1.5s infinite;
}

@keyframes voicePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ===== BUTTONS ===== */
button {
    padding: 9px 18px;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    transition: all var(--transition);
}

button:not(nav button):not(.role-switch button):not(.sidebar button):not(.review-btn):not(.btn-approve):not(.btn-reject):not(.btn-handoff):not(.sec-btn-verified):not(.sec-btn-fraud):not(.sec-btn-freeze):not(.admin-login-btn):not(.admin-login-cancel) {
    background: var(--navy);
    color: white;
}

button:not(nav button):not(.role-switch button):not(.sidebar button):not(.review-btn):not(.btn-approve):not(.btn-reject):not(.btn-handoff):not(.sec-btn-verified):not(.sec-btn-fraud):not(.sec-btn-freeze):not(.admin-login-btn):not(.admin-login-cancel):hover {
    background: var(--gold);
    color: var(--navy-dark);
}

.primary-btn {
    background: var(--navy) !important;
    color: white !important;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    display: inline-block;
}

.primary-btn:hover {
    background: var(--navy-mid) !important;
    transform: translateY(-1px);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 7px;
    background: var(--border);
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy-mid), var(--gold));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-container {
    margin-top: 16px;
}

/* ===== NOTIFICATION TOAST ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 24px;
    background: var(--navy);
    color: white;
    padding: 13px 20px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    display: none;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--gold);
    animation: fadeSlide 0.4s ease;
    max-width: 420px;
}

/* ===== HIGHLIGHT ===== */
.highlight {
    color: var(--gold);
    font-weight: 700;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* ===== LOADER ===== */
.loader {
    border: 3px solid var(--border);
    border-top: 3px solid var(--navy);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    animation: spin 0.9s linear infinite;
    margin: 10px auto;
}

/* ===== METRICS PANEL ===== */
.metrics {
    background: var(--card-bg);
    padding: 20px;
    max-width: 480px;
    margin: 16px auto;
    border-left: 5px solid var(--navy);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* ===== AUDIT LOG ===== */
#auditLog {
    background: var(--card-bg);
    padding: 14px;
    max-width: 480px;
    margin: auto;
    border-radius: var(--radius);
    border-left: 5px solid var(--gold);
    border: 1px solid var(--border);
    font-size: 13.5px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 60px 40px;
    margin: 20px 0 40px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: white;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-section.glass {
    background: linear-gradient(135deg, rgba(0, 45, 114, 0.95) 0%, rgba(0, 26, 80, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gold);
    color: var(--navy);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-section h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 30px;
}

.hero-benefits {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.benefit-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(5px);
    color: #FFFFFF;
}

.hero-main-btn {
    padding: 16px 32px;
    font-size: 1.15rem;
    background: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(197, 148, 26, 0.4);
    border: none;
}

.hero-main-btn:hover {
    background: var(--gold-bright) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(197, 148, 26, 0.6);
}

.hero-stats {
    display: flex;
    flex-direction: column;
    padding: 25px;
    border-radius: var(--radius-lg);
    min-width: 140px;
    text-align: center;
}

.hero-stats.glass {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
}

.stat-item {
    padding: 10px 0;
}

.stat-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: 600;
}

.stat-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* ===== ACCESSIBILITY CONTROLS ===== */
.acc-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.acc-btn:hover {
    background: var(--navy);
    color: white;
}

/* PREMIUM DARK MODE */
body.high-contrast {
    background: #0f1219 !important;
    color: #e2e8f0 !important;
}

body.high-contrast .content,
body.high-contrast .topbar {
    background: #0f1219 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

body.high-contrast .card,
body.high-contrast .glass,
body.high-contrast .hero-section {
    background: #1a1f2b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    color: #e2e8f0 !important;
}

body.high-contrast .primary-btn,
body.high-contrast .hero-main-btn {
    background: linear-gradient(135deg, #d4af37, #f3e5ab) !important;
    color: #111 !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4) !important;
}

body.high-contrast button {
    color: #cbd5e1 !important;
}

body.high-contrast .acc-btn.glass {
    background: #2d3748 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
    background: #1a1f2b !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4 {
    color: #f8fafc !important;
}

body.high-contrast p,
body.high-contrast span,
body.high-contrast label,
body.high-contrast li,
body.high-contrast div {
    color: #cbd5e1 !important;
}

body.high-contrast .step-indicator .step {
    background: #2d3748 !important;
    color: #a0aec0 !important;
}
body.high-contrast .step-indicator .step.active {
    background: #d4af37 !important;
    color: #000 !important;
}

body.high-contrast .sidebar {
    background: #0a0d14 !important;
    border-right: 1px solid rgba(255,255,255,0.05) !important;
}

/* STATUS BADGES */
.status-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.status-badge.pending {
    background: #FFF8D6;
    color: #9A6E00;
    border: 1px solid #F0D060;
}

.status-badge.approved {
    background: #E5F5ED;
    color: #1A7A4A;
    border: 1px solid #8ECFAA;
}

.status-badge.rejected {
    background: #FDEBEB;
    color: #B22222;
    border: 1px solid #EF9A9A;
}

.status-badge.handed_off {
    background: #E4EDF8;
    color: #1A4F9A;
    border: 1px solid #90BAE8;
}

.status-badge.Flagged {
    background: #FFF8D6;
    color: #9A6E00;
    border: 1px solid #F0D060;
}

.status-badge.Escalated {
    background: #FDEBEB;
    color: #B22222;
    border: 1px solid #EF9A9A;
}

.status-badge.Dropped {
    background: #F0F0F5;
    color: #556;
    border: 1px solid #CCC;
}

/* ===== APPLICATION LIST ===== */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition), border-left var(--transition), box-shadow var(--transition);
}

.app-item:hover {
    background: var(--blue-light);
    box-shadow: var(--shadow-sm);
}

.app-item.selected {
    background: #EBF1FB;
    border-left: 3px solid var(--navy);
    box-shadow: var(--shadow-sm);
}

.app-item .app-name {
    font-weight: 700;
    color: var(--navy);
}

.app-item .app-ts {
    font-size: 11px;
    color: var(--text-muted);
}

.app-item .app-meta {
    flex: 1;
    min-width: 0;
}

.app-item .app-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.app-risk-col {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 8px;
    white-space: nowrap;
}

.handoff-reason {
    display: block;
    font-size: 10.5px;
    color: #B22222;
    font-weight: 600;
    margin-top: 2px;
}

/* ===== ACTION BUTTONS ===== */
.review-btn {
    padding: 5px 13px;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition);
    font-family: inherit;
}

.review-btn:hover {
    background: var(--navy-mid);
}

.btn-approve {
    background: #1A7A4A !important;
    color: white !important;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    transition: background var(--transition);
    font-family: inherit;
}

.btn-approve:hover {
    background: #115230 !important;
}

.btn-reject {
    background: #B22222 !important;
    color: white !important;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    transition: background var(--transition);
    font-family: inherit;
}

.btn-reject:hover {
    background: #8B0000 !important;
}

.btn-handoff {
    background: #0277BD !important;
    color: white !important;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    transition: background var(--transition);
    font-family: inherit;
}

.btn-handoff:hover {
    background: #01579B !important;
}

/* ===== DECISION DETAIL ===== */
.decision-detail {
    font-size: 13px;
}

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

.decision-detail td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-light);
}

.decision-detail td:first-child {
    color: var(--text-muted);
    width: 40%;
}

.decision-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* ===== PLACEHOLDER ===== */
.placeholder-text {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
    font-size: 13px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 60, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.25s ease;
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 440px;
    max-width: 94vw;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--navy);
}

.modal-box h3 {
    margin-bottom: 12px;
}

.modal-box textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin: 8px 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ===== RISK BREAKDOWN ===== */
.risk-breakdown {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    font-size: 13px;
}

.risk-breakdown li {
    padding: 7px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    animation: fadeSlide 0.3s ease;
}

.risk-breakdown li.breakdown-pass {
    background: #E5F5ED;
    border-left: 3px solid #1A7A4A;
    color: #1A7A4A;
}

.risk-breakdown li.breakdown-warning {
    background: var(--amber-light);
    border-left: 3px solid var(--gold);
    color: var(--amber);
}

.risk-breakdown li.breakdown-critical {
    background: #FDEBEB;
    border-left: 3px solid var(--red);
    color: var(--red);
    font-weight: 700;
}

/* ===== GAUGE ===== */
.gauge {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) 0deg, #DDD 0deg);
    margin: 20px auto;
    position: relative;
    transition: 1s ease;
}

.gauge-cover {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

/* ===== WORKFLOW GRID ===== */
.workflow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.wf-card {
    width: auto;
    margin: 0;
}

.wf-subheading {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    margin: 14px 0 6px;
    font-weight: 700;
}

/* ===== RISK GAUGE (WORKFLOW) ===== */
.risk-gauge-container {
    text-align: center;
    margin: 10px 0 14px;
}

.risk-gauge {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(#E0E0E0 0deg, #E0E0E0 360deg);
    margin: 0 auto;
    position: relative;
    transition: background 0.6s ease;
}

.risk-gauge-cover {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
}

.risk-label {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.risk-reasons {
    margin-top: 8px;
    font-size: 13px;
}

/* ===== AUDIT TRAIL ===== */
.audit-trail-container {
    max-height: 280px;
    overflow-y: auto;
    padding: 5px 0 5px 24px;
    position: relative;
}

.audit-timeline {
    list-style: none;
    position: relative;
}

.audit-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gold);
}

.audit-timeline li {
    position: relative;
    padding: 6px 0 6px 28px;
    font-size: 13px;
    animation: fadeSlide 0.35s ease;
}

.audit-timeline li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--gold);
}

.audit-timeline li .audit-time {
    font-weight: 700;
    color: var(--navy);
    font-size: 12px;
}

.audit-timeline li .audit-event {
    color: var(--text-secondary);
}

.audit-timeline li.admin-action::before {
    background: var(--navy);
    box-shadow: 0 0 0 2px var(--navy);
}

/* ===== CAMERA ===== */
#camera-stream {
    width: 100%;
    max-width: 320px;
    height: 240px;
    background: #000;
    border-radius: var(--radius);
    display: none;
    border: 2px solid var(--border);
}

#snap-canvas {
    display: none;
}

#video-container {
    text-align: center;
}

/* ===== FOOTER — RBI COMPLIANT ===== */
footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    padding: 0;
    border-top: 3px solid var(--gold);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 28px;
    padding: 28px 36px 20px;
}

.footer-col h4 {
    color: rgba(255, 255, 255, .9);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 12px;
}

.footer-col p,
.footer-col a {
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
    line-height: 1.8;
    text-decoration: none;
    display: block;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-rbi-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(197, 148, 26, .12);
    border: 1px solid rgba(197, 148, 26, .3);
    padding: 5px 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .2);
    padding: 12px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    margin-left: 14px;
    font-size: 11.5px;
}

.footer-bottom a:hover {
    color: var(--gold);
}

.footer-grievance {
    background: rgba(178, 34, 34, .12);
    border-top: 1px solid rgba(178, 34, 34, .3);
    padding: 10px 36px;
    font-size: 12px;
    color: rgba(255, 200, 200, .8);
}

.footer-grievance b {
    color: #FFAAAA;
}

/* ===== SESSION TIMER BANNER ===== */
.session-timeout-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #7B1111;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    z-index: 9000;
    box-shadow: var(--shadow-lg);
    display: none;
    text-align: center;
}

/* ================= COMPLIANCE & LEDGER ================= */
.compliance-layout {
    padding: 24px;
}

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

.ledger-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: var(--green-light);
    color: var(--green);
    border: 1px solid rgba(26, 122, 74, .2);
}

.ledger-table-wrap {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ledger-table th {
    background: var(--surface-alt);
    color: var(--text-primary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

.ledger-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.ledger-table tbody tr:nth-child(even) {
    background: var(--surface-alt);
}

.ledger-table tbody tr:hover {
    background: var(--blue-light);
}

.ledger-ts {
    font-family: 'Roboto Mono', monospace;
    font-size: 11.5px;
    white-space: nowrap;
}

.actor-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.actor-system {
    background: var(--blue-light);
    color: var(--navy);
}

.actor-admin {
    background: #FDEBEB;
    color: var(--red);
}

.actor-user {
    background: var(--amber-light);
    color: var(--amber);
}

/* ================= ANALYTICS & DASHBOARD ================= */
.analytics-dashboard {
    padding: 24px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    background: var(--blue-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.kpi-body {
    flex: 1;
}

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.kpi-trend {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    margin-top: 6px;
    display: inline-block;
}

.trend-up {
    background: var(--green-light);
    color: var(--green);
}

.trend-down {
    background: #FDEBEB;
    color: var(--red);
}

.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
}

.chart-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* ================= ENGAGEMENT & ACTIVITY ================= */
.eng-dashboard {
    padding: 24px;
}

.eng-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.eng-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.eng-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.eng-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E5F5ED;
    color: #1A7A4A;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.eng-feed-scroll {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eng-feed-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--surface-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    font-size: 13px;
    transition: background var(--transition);
    animation: feedSlideIn 0.3s ease;
}

.eng-feed-item:hover {
    background: var(--blue-light);
}

.eng-feed-icon {
    font-size: 18px;
}

.eng-feed-time {
    color: var(--text-muted);
    font-size: 11px;
}

/* ================= IDENTITY & SECURITY FORENSICS ================= */
.sec-dashboard {
    padding: 24px;
}

.sec-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.sec-kpi {
    background: var(--card-bg);
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.sec-kpi:hover {
    transform: scale(1.02);
}

.sec-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.sec-kpi-green {
    background: var(--green-light);
    color: var(--green);
}

.sec-kpi-red {
    background: #FDEBEB;
    color: var(--red);
}

.sec-kpi-amber {
    background: var(--amber-light);
    color: var(--amber);
}

.sec-main-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

.sec-panel {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.sec-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sec-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.sec-status-pass {
    background: var(--green-light);
    color: var(--green);
}

.sec-status-fail {
    background: #FDEBEB;
    color: var(--red);
}

.sec-img-placeholder {
    width: 160px;
    height: 120px;
    background: var(--surface-alt);
    border: 2.5px dashed var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
}

.sec-confidence-gauge {
    text-align: center;
}

.sec-gauge-ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 8px solid var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.sec-gauge-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
}

/* ================= ADMIN LOGIN PAGE ================= */
.admin-login-overlay {
    position: fixed;
    inset: 0;
    background: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    background-image: radial-gradient(circle at 20% 30%, rgba(197, 148, 26, .1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 75, 180, .12) 0%, transparent 50%);
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, .3);
    overflow: hidden;
    animation: loginSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-login-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: white;
    padding: 32px 30px;
    text-align: center;
}

.admin-login-header h2 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.5rem;
    letter-spacing: .5px;
}

.admin-login-body {
    padding: 30px;
}

.admin-login-body label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-login-body input {
    background: #FFFFFF !important;
    color: #1E293B !important;
    border: 1.5px solid var(--border) !important;
    margin-bottom: 20px !important;
}

.admin-login-body input::placeholder {
    color: #94A3B8;
}

.admin-login-btn {
    width: 100%;
    padding: 12px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 12px;
}

.admin-login-btn:hover {
    background: var(--navy-mid);
}

.admin-login-error {
    color: var(--red);
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    min-height: 20px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .layout {
        margin-right: 0;
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        flex-direction: row;
        overflow-x: auto;
        padding: 15px 20px;
        align-items: center;
    }

    .sidebar .logo {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        margin-right: 20px;
    }

    .sidebar button {
        margin: 0 5px;
        white-space: nowrap;
    }

    .charts-row,
    .sec-main-row,
    .eng-grid,
    .compliance-layout,
    .workflow-grid,
    .footer-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-badges {
        display: none;
        /* Hide badges on small screens to save space */
    }

    .card {
        padding: 18px 15px;
        margin: 15px 10px;
    }

    .progress-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .kpi-row,
    .sec-kpi-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom a {
        margin: 5px 10px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 12px 10px;
    }

    .header-brand-name {
        font-size: 20px;
    }

    .role-switch {
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
    }

    .card {
        margin: 10px 5px;
        padding: 15px 12px;
        border-radius: var(--radius);
    }

    /* Document upload file inputs - stack nicely */
    .form-group div[style*="display:flex"] {
        flex-direction: column;
    }

    .form-group div[style*="display:flex"] button {
        width: 100%;
        margin-top: 8px;
    }

    .kpi-row,
    .sec-kpi-row {
        grid-template-columns: 1fr;
    }

    #camera-stream {
        width: 100%;
        height: auto;
    }
}

/* ================= UI POLISH & MICRO-ANIMATIONS ================= */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 45, 114, 0.15);
    border-color: var(--navy);
    transform: translateY(-1px);
}

.primary-btn {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Form Validation Classes */
.input-valid {
    border-color: var(--green) !important;
    background-color: #f0fdf4 !important;
    box-shadow: 0 0 0 3px rgba(26, 122, 74, 0.1) !important;
}

.input-invalid {
    border-color: var(--red) !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1) !important;
}

/* Drag & Drop Zone Styles */
.drop-zone {
    border: 2px dashed var(--navy);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 10px;
}

.drop-zone.dragover {
    background: #e0f2fe;
    border-color: var(--blue-light);
    transform: scale(1.02);
}

.drop-zone-text {
    color: var(--navy);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.drop-zone-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

/* ===== CUSTOMER PORTAL SECTIONS ===== */
.activeCustomer {
    display: block;
}

.customerSection {
    display: none;
}