/* ═══════════════════════════════════════════════════════════
   DS-260 Review — Custom CSS
   Brand: American Flag Colors
   Primary Navy: #002868 | Accent Red: #BF0A30 | White: #FFFFFF
═══════════════════════════════════════════════════════════ */

:root {
    --primary:       #002868;
    --primary-dark:  #001a4a;
    --primary-light: #0044b0;
    --accent:        #BF0A30;
    --accent-dark:   #960822;
    --bg:            #FFFFFF;
    --text:          #1A1A2E;
    --border:        #E8EDF5;
    --bg-light:      #F4F6FB;
    --success:       #2E7D32;
    --warning:       #F57F17;
    --error:         #C62828;
    --sidebar-w:     260px;
    --topbar-h:      60px;
}

* { box-sizing: border-box; }

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

.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* ─── Background ─────────────────────────────────────────── */
.bg-light-custom { background: var(--bg-light) !important; }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar-ds260 {
    background: var(--primary);
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(0,40,104,.25);
}

.navbar-ds260 .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    padding: 7px 14px !important;
    transition: all .2s;
}

.navbar-ds260 .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,.12);
}

.navbar-ds260 .navbar-toggler { border-color: rgba(255,255,255,.3); }
.navbar-ds260 .navbar-toggler-icon { filter: invert(1); }

.brand-shield {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px;
    flex-shrink: 0;
}

.brand-name {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -.3px;
}

.brand-tag {
    font-size: 10px;
    color: #B0C4DE;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-left: 6px;
}

.user-avatar-sm {
    width: 30px; height: 30px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px; font-weight: 700;
}

/* ─── Background Utilities ────────────────────────────────── */
.bg-primary-ds { background-color: var(--primary) !important; }
.bg-accent-ds  { background-color: var(--accent)  !important; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-primary-ds {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 22px;
    transition: background .2s, transform .1s, box-shadow .2s;
}
.btn-primary-ds:hover {
    background: var(--primary-light);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,40,104,.3);
}
.btn-primary-ds:active { transform: scale(.98); }

.btn-accent {
    background: var(--accent);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 22px;
    transition: background .2s, box-shadow .2s;
}
.btn-accent:hover {
    background: var(--accent-dark);
    color: #fff;
    box-shadow: 0 4px 15px rgba(191,10,48,.3);
}

.btn-primary-ds.btn-sm { padding: .25rem .6rem; font-size: .875rem; border-radius: 6px; }
.btn-accent.btn-sm     { padding: .25rem .6rem; font-size: .875rem; border-radius: 6px; }

/* ─── Auth Cards ─────────────────────────────────────────── */
.auth-card {
    border: none;
    border-radius: 16px;
    border-top: 4px solid var(--primary);
}

.auth-icon-wrap {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
}

/* ─── Form Controls ──────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--border);
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,40,104,.12);
}

.input-group-text {
    background: var(--bg-light);
    border-color: var(--border);
    color: var(--primary);
    border-radius: 8px 0 0 8px !important;
}

.form-label { font-size: 13px; color: #444; margin-bottom: 6px; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer-ds260 {
    background: var(--primary);
    color: rgba(255,255,255,.8);
    font-size: 13px;
}
.footer-ds260 a { color: #B0C4DE; text-decoration: none; }
.footer-ds260 a:hover { color: #fff; }

/* ─── Dashboard Welcome Banner ───────────────────────────── */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::after {
    content: '★';
    position: absolute;
    right: 20px; top: -20px;
    font-size: 120px;
    opacity: .05;
    color: #fff;
    pointer-events: none;
}

/* ─── Stat Mini Cards ────────────────────────────────────── */
.stat-mini-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid var(--border);
    transition: transform .2s;
}
.stat-mini-card:hover { transform: translateY(-2px); }
.stat-mini-card i { font-size: 1.8rem; }
.stat-mini-val { font-size: 1.6rem; font-weight: 800; color: var(--text); margin: 6px 0 2px; }
.stat-mini-label { font-size: 12px; color: #888; font-weight: 500; }

/* ─── How it Works Steps ────────────────────────────────── */
.how-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.step-num {
    width: 30px; height: 30px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ─── Admin Layout ───────────────────────────────────────── */
.admin-body { background: #f0f2f5; }

#admin-wrapper { min-height: 100vh; }

#admin-sidebar {
    width: var(--sidebar-w);
    background: var(--primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(0,0,0,.15);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-avatar {
    width: 38px; height: 38px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 15px;
    flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .2s;
    border-radius: 0;
}

.sidebar-nav li a:hover, .sidebar-nav li a.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.sidebar-nav li a.active {
    border-left: 3px solid var(--accent);
    background: rgba(191,10,48,.2);
}

.sidebar-nav li a.disabled-link {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.4);
    padding: 8px 18px 4px;
}

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

.sidebar-logout {
    color: rgba(255,255,255,.7) !important;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.sidebar-logout:hover { color: #fff !important; }

#admin-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.admin-page-content {
    padding: 28px;
    flex: 1;
}

/* ─── Admin Stat Cards ───────────────────────────────────── */
.admin-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s;
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    margin-top: 4px;
}

/* ─── Admin Login Page ───────────────────────────────────── */
.admin-auth-body {
    background: linear-gradient(135deg, #001a4a 0%, #002868 50%, #960822 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.admin-login-wrap {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

.admin-login-box {
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.admin-login-icon {
    width: 72px; height: 72px;
    background: var(--accent);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(191,10,48,.4);
}

.admin-input {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: #fff !important;
    border-radius: 0 8px 8px 0 !important;
}
.admin-input::placeholder { color: rgba(255,255,255,.4) !important; }
.admin-input:focus {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.4) !important;
    box-shadow: none !important;
}

.admin-input-icon {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: rgba(255,255,255,.7) !important;
}

.admin-eye-btn {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: rgba(255,255,255,.7) !important;
    border-radius: 0 8px 8px 0 !important;
}
.admin-eye-btn:hover { background: rgba(255,255,255,.15) !important; }

/* ─── Alert overrides ────────────────────────────────────── */
.alert { border-radius: 10px; font-size: 14px; }

/* ─── Table ──────────────────────────────────────────────── */
.table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #666; }
.table td { font-size: 13.5px; vertical-align: middle; }

/* ─── Cards ──────────────────────────────────────────────── */
.card { border-radius: 12px; }
.card-header { border-radius: 12px 12px 0 0 !important; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c5cfe0; border-radius: 3px; }

/* ─── Inline Drop Zone (per document card) ───────────────── */
.dz-inline {
    border: 2px dashed #c5cfe0;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #f8fafc;
    position: relative;
    font-size: .82rem;
    color: #6b7280;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dz-inline:hover,
.dz-inline.dragover {
    border-color: var(--primary);
    background: #eef2fb;
    color: var(--primary);
}
.dz-inline.has-file {
    border-color: #28a745;
    background: #f0fff4;
    color: #155724;
}
.dz-inline input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.dz-inline strong { color: var(--primary); }
.dz-inline.has-file strong { color: #155724; }
.dz-fname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-inline.dz-disabled {
    opacity: .6;
    cursor: default;
    pointer-events: none;
    background: #f3f4f6;
    border-style: solid;
    border-color: #d1d5db;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
    #admin-sidebar { display: none; }
    #admin-sidebar.show { display: flex; position: fixed; z-index: 1050; }
}

@media (max-width: 576px) {
    .admin-page-content { padding: 16px; }
    .admin-login-box { padding: 28px 22px; }
}

/* ─── AI Progress Bar pulse animation ───────────────────── */
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .7; }
}
#aiProgressBar {
    animation: progressPulse 2s ease-in-out infinite;
}
