/* ==========================================================================
   KYC ADMIN HUB STYLES - COMPACT MOBILE RESPONSIBLY EXPANDED PALETTE
   ========================================================================== */

:root {
    --bg-universe: #030712;
    --bg-nebula: radial-gradient(circle at 50% -20%, #0c152e 0%, #030712 70%);
    --bg-glass-card: rgba(15, 23, 42, 0.45);
    --bg-glass-input: rgba(3, 7, 18, 0.6);
    --border-glass: rgba(255, 255, 255, 0.06);

    --accent-primary: #06b6d4; 
    --accent-secondary: #3b82f6; 
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;

    --state-received: #64748b;
    --state-verification: #f59e0b;
    --state-verified: #06b6d4;
    --state-escalated: #ef4444;
    --state-resolved: #10b981;
    --state-rejected: #ef4444;
}

body.light-mode-active {
    --bg-universe: #f1f5f9;
    --bg-nebula: none;
    --bg-glass-card: #ffffff;
    --bg-glass-input: #f8fafc;
    --border-glass: #cbd5e1;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --accent-primary: #0284c7;
    --accent-secondary: #2563eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body.admin-body {
    background: var(--bg-universe);
    background-image: var(--bg-nebula);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Auth / Login Responsive Container */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(25px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 9999;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header span {
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: block;
    margin-top: 0.75rem;
}
.auth-error-msg {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

/* Master Portal Wrapper Layout */
.portal-wrapper {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Responsive Architecture */
.sidebar {
    width: 280px;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: background 0.3s ease;
}
.sidebar-brand {
    padding: 2rem;
    border-bottom: 1px solid var(--border-glass);
    text-align: center;
}

/* NEW NEW LOGO ARCHITECTURE CLASS DEFS */
.brand-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0.25rem;
}
.admin-brand-img {
    height: auto;
    max-height: 52px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.sidebar-brand span {
    font-size: 0.72rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-top: 0.5rem;
    font-weight: 700;
}

.sidebar-nav {
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: rgba(6, 182, 212, 0.1);
    border-left: 3px solid var(--accent-primary);
}
.nav-divider { border: 0; height: 1px; background: var(--border-glass); margin: 1rem 0; }
.logout-btn:hover { background: rgba(239, 68, 68, 0.15); border-left-color: #ef4444; color: #fca5a5; }

.mode-toggle-button {
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    margin-top: auto;
}
.mode-toggle-button i { color: #eab308; }
body.light-mode-active .mode-toggle-button i { color: #475569; }

body.light-mode-active .sidebar {
    background: #ffffff;
    border-right: 1px solid #cbd5e1;
}

/* Content Frame Dashboard Framework */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2.5rem;
    width: calc(100vw - 280px);
    transition: all 0.3s ease;
}
.view-header { margin-bottom: 2rem; }
.view-header h1 { font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 700; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Grid Structures */
.card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, border 0.3s ease;
}
body.light-mode-active .card { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); }

.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-glass); }
.card-body { padding: 1.5rem; }

.stats-ribbon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card { padding: 1.5rem; border-left: 4px solid var(--card-accent); }
.stat-card h3 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.stat-card h2 { font-size: 2rem; font-weight: 700; margin-top: 0.5rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
}

/* Fields & Custom Inputs */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; }
input, select, textarea {
    width: 100%; padding: 0.85rem 1.1rem;
    background: var(--bg-glass-input); border: 1px solid var(--border-glass);
    border-radius: 10px; color: var(--text-primary); font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-primary); }
body.light-mode-active input, body.light-mode-active select, body.light-mode-active textarea { color: #0f172a; border: 1px solid #cbd5e1; }

.input-with-btn { display: flex; gap: 0.5rem; }
.btn-submit {
    padding: 0.85rem 1.25rem; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-accent-sm { padding: 0.5rem 1rem; font-size: 0.85rem; white-space: nowrap; }

/* Filter Layout Bars */
.query-header {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.query-action-cluster { display: flex; gap: 0.5rem; flex: 1; justify-content: flex-end; min-width: 280px; }
.query-action-cluster input { padding: 0.5rem 0.75rem; font-size: 0.85rem; max-width: 220px; }
.query-action-cluster select { padding: 0.5rem 0.75rem; width: 140px; font-size: 0.85rem; }

/* Content Tables */
.table-card { margin-bottom: 2rem; }
.table-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.modern-table { width: 100%; border-collapse: collapse; text-align: left; min-width: 600px; }
.modern-table th { padding: 1rem 1.25rem; background: rgba(3, 7, 18, 0.4); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-glass); }
.modern-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-glass); font-size: 0.9rem; color: var(--text-primary); vertical-align: middle; }
body.light-mode-active .modern-table th { background: #f8fafc; color: #475569; }

.complaint-id-label { font-family: monospace; color: var(--accent-primary); }
.activity-date-text { color: var(--text-muted); }
.activity-id-text { font-family: monospace; font-weight: 700; color: #a7f3d0; }
body.light-mode-active .activity-id-text { color: #065f46; }

/* Status Labels */
.badge { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge.received { background: rgba(100, 116, 139, 0.15); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.3); }
.badge.verification { background: rgba(245, 158, 11, 0.15); color: #fef08a; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge.verified { background: rgba(6, 182, 212, 0.15); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge.escalated { background: rgba(239, 68, 68, 0.15); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge.resolved { background: rgba(16, 185, 129, 0.15); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge.rejected { background: rgba(239, 68, 68, 0.15); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.3); }

body.light-mode-active .badge.received { background: #e2e8f0; color: #475569; }
body.light-mode-active .badge.verification { background: #fef3c7; color: #b45309; }
body.light-mode-active .badge.verified { background: #ecfeff; color: #0369a1; }
body.light-mode-active .badge.escalated { background: #fee2e2; color: #b91c1c; }
body.light-mode-active .badge.resolved { background: #d1fae5; color: #047857; }
body.light-mode-active .badge.rejected { background: #fee2e2; color: #b91c1c; }

.btn-action-modify {
    background: rgba(6, 182, 212, 0.12); color: var(--accent-primary); border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.45rem 0.75rem; border-radius: 8px; font-weight: 600; font-size: 0.8rem; cursor: pointer; white-space: nowrap;
}
.btn-action-modify:hover { background: var(--accent-primary); color: #030712; }
body.light-mode-active .btn-action-modify:hover { color: #ffffff; }

.terminal-text p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.terminal-text code { background: #030712; padding: 0.2rem 0.4rem; border-radius: 4px; color: #f472b6; font-family: monospace; }
body.light-mode-active .terminal-text code { background: #f1f5f9; color: #db2777; }
.operation-feedback-msg { margin-top: 1rem; font-weight: 600; font-size: 0.9rem; }

.toast-notification {
    position: fixed; bottom: 1.5rem; right: -450px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6); color: #fff;
    padding: 1rem 1.25rem; border-radius: 12px; font-weight: 600; z-index: 10000;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   DYNAMIC MOBILE MEDIA QUERIES BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
    .sidebar { width: 70px; }
    .sidebar-brand, .nav-item span { display: none; }
    .sidebar-nav { padding: 1.5rem 0.5rem; align-items: center; }
    .nav-item { padding: 1rem; justify-content: center; width: 50px; height: 50px; }
    .main-content { margin-left: 70px; width: calc(100vw - 70px); padding: 2rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .portal-wrapper { flex-direction: column; }
    
    .sidebar {
        width: 100vw; height: auto; position: fixed; bottom: 0; top: auto;
        border-right: none; border-top: 1px solid var(--border-glass);
        flex-direction: row; background: rgba(3, 7, 18, 0.95); box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    }
    body.light-mode-active .sidebar { background: #ffffff; border-top: 1px solid #cbd5e1; }
    
    .sidebar-brand { display: none; }
    .sidebar-nav {
        flex-direction: row; justify-content: space-around; width: 100%;
        padding: 0.5rem 1rem; gap: 0; margin-top: 0;
    }
    .nav-item {
        padding: 0.75rem; border-radius: 10px; font-size: 1.2rem;
        height: auto; width: auto; flex: 1; justify-content: center;
    }
    .nav-item:hover, .nav-item.active { border-left: none; background: rgba(6, 182, 212, 0.15); color: var(--accent-primary); }
    .nav-divider, .logout-btn, .back-home { display: none; } 
    .mode-toggle-button { margin-top: 0; }

    .main-content { margin-left: 0; padding: 1.25rem; width: 100vw; padding-bottom: 85px; }
    .view-header h1 { font-size: 1.6rem; }
    
    .stats-ribbon-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .stat-card { padding: 1.25rem; }
    .query-header { flex-direction: column; align-items: flex-start; }
    .query-action-cluster { width: 100%; justify-content: space-between; }
    .query-action-cluster input { max-width: 55%; flex: 1; }
    .query-action-cluster select { max-width: 40%; }
}

@media (max-width: 480px) {
    .main-content { padding: 1rem; padding-bottom: 80px; }
    .card-header h2 { font-size: 1.1rem; }
    .btn-submit { width: 100%; }
    .input-with-btn { flex-direction: column; }
    .btn-accent-sm { width: 100%; text-align: center; }
}