/* ================================================================
   VeriTerminali  Ultra Premium Light Analytics Theme
   Clean whites + vivid accents + soft shadows
   Didivor Teknoloji San. Tic. Ltd. Sti.
   ================================================================ */

:root {
    --primary: #0066ff;
    --primary-light: rgba(0,102,255,0.08);
    --primary-10: rgba(0,102,255,0.10);
    --primary-20: rgba(0,102,255,0.20);
    --primary-hover: #0052cc;
    --accent-gold: #f59e0b;
    --accent-gold-light: rgba(245,158,11,0.10);
    --accent-green: #10b981;
    --accent-green-light: rgba(16,185,129,0.10);
    --accent-red: #ef4444;
    --accent-red-light: rgba(239,68,68,0.10);
    --accent-purple: #8b5cf6;
    --accent-purple-light: rgba(139,92,246,0.10);
    --accent-blue: #3b82f6;
    --accent-blue-light: rgba(59,130,246,0.10);
    --accent-cyan: #06b6d4;
    --bg-body: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f8fafc;
    --bg-input: #ffffff;
    --bg-hover: rgba(0,102,255,0.04);
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-accent: rgba(0,102,255,0.25);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-bright: #0f172a;
    --text-accent: var(--primary);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-elevated: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.10);
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-full: 9999px;
    --top-h: 56px;
    --bottom-h: 64px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --bs-body-bg: var(--bg-body);
    --bs-body-color: var(--text-primary);
}

*, *::before, *::after { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

body {
    background: var(--bg-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
}

::selection { background: var(--primary-20); color: var(--text-bright); }

@media (display-mode: standalone) {
    body { padding-top: env(safe-area-inset-top); }
    .mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    height: var(--top-h);
    background: rgba(255,255,255,0.92);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    backdrop-filter: blur(20px) saturate(200%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
}
.app-topbar .app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-bright);
}
.brand-icon {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: -0.2px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-page {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.topbar-actions { display: flex; gap: 4px; }
.topbar-export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: all 0.2s var(--ease);
}
.topbar-export-btn i { font-size: 0.85rem; }
.topbar-export-btn span { display: none; }
@media (min-width: 380px) { .topbar-export-btn span { display: inline; } }
.topbar-export-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,102,255,0.2);
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    z-index: 1040;
    height: var(--bottom-h);
    background: rgba(255,255,255,0.90);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 6px 0;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.25s var(--ease);
    position: relative;
}
.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: all 0.25s var(--ease);
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active i { transform: scale(1.1); }
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%; right: 25%;
    height: 2px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}

.app-footer-fixed {
    position: fixed;
    bottom: var(--bottom-h);
    left: 0; right: 0;
    z-index: 1039;
    text-align: center;
    padding: 6px 16px;
    background: rgba(255,255,255,0.90);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.main-content {
    padding: 16px;
    padding-top: 12px;
    margin-bottom: calc(var(--bottom-h) + 40px);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { border-color: var(--border-light); box-shadow: var(--shadow-card); }
.card-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.card-header i { color: var(--primary); }
.card-body { padding: 16px; }

.stat-card {
    border: 1px solid var(--border-light) !important;
    border-radius: var(--r-lg) !important;
    overflow: hidden;
    position: relative;
    transition: all 0.3s var(--ease);
    background: var(--bg-card) !important;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card.stat-cyan::before { background: linear-gradient(90deg, var(--primary), var(--accent-cyan)); }
.stat-card.stat-gold::before { background: linear-gradient(90deg, var(--accent-gold), #fbbf24); }
.stat-card.stat-green::before { background: linear-gradient(90deg, var(--accent-green), #34d399); }
.stat-card.stat-red::before { background: linear-gradient(90deg, var(--accent-red), #f87171); }
.stat-card.stat-purple::before { background: linear-gradient(90deg, var(--accent-purple), #a78bfa); }
.stat-card.stat-blue::before { background: linear-gradient(90deg, var(--accent-blue), #60a5fa); }
.stat-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
    border-color: var(--border-light) !important;
}
.stat-card .card-body {
    position: relative;
    z-index: 1;
    padding: 14px 8px;
    text-align: center;
}
.stat-card .stat-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
    display: block;
}
.stat-card.stat-cyan .stat-icon { color: var(--primary); }
.stat-card.stat-gold .stat-icon { color: var(--accent-gold); }
.stat-card.stat-green .stat-icon { color: var(--accent-green); }
.stat-card.stat-red .stat-icon { color: var(--accent-red); }
.stat-card.stat-purple .stat-icon { color: var(--accent-purple); }
.stat-card.stat-blue .stat-icon { color: var(--accent-blue); }
.stat-card h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 2px 0;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    color: var(--text-bright);
}
.stat-card small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.btn {
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    transition: all 0.2s var(--ease);
}
.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(0,102,255,0.25);
    color: #ffffff;
}
.btn-success {
    background: var(--accent-green);
    border: 1px solid var(--accent-green);
    color: #ffffff;
}
.btn-success:hover {
    background: #059669;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16,185,129,0.25);
    color: #ffffff;
}
.btn-danger {
    background: var(--accent-red);
    border: 1px solid var(--accent-red);
    color: #ffffff;
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
    color: #ffffff;
}
.btn-warning {
    background: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    color: #ffffff;
}
.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(245,158,11,0.25);
    color: #ffffff;
}
.btn-info {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
}
.btn-info:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(0,102,255,0.25);
    color: #ffffff;
}
.btn-dark {
    background: var(--text-bright);
    border: 1px solid var(--text-bright);
    color: #ffffff;
}
.btn-dark:hover {
    background: #334155;
    border-color: #334155;
    color: #ffffff;
}
.btn-light {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}
.btn-light:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    color: var(--text-bright);
}
.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline-secondary {
    border-color: var(--border-medium);
    color: var(--text-secondary);
    background: transparent;
}
.btn-outline-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.btn-outline-success {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: transparent;
}
.btn-outline-success:hover {
    background: var(--accent-green-light);
    border-color: var(--accent-green);
    color: #059669;
}
.btn-outline-danger {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: transparent;
}
.btn-outline-danger:hover {
    background: var(--accent-red-light);
    border-color: var(--accent-red);
    color: #dc2626;
}
.btn-outline-warning {
    border-color: var(--accent-gold);
    color: #b45309;
    background: transparent;
}
.btn-outline-warning:hover {
    background: var(--accent-gold-light);
    border-color: var(--accent-gold);
    color: #92400e;
}
.btn-outline-info {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-info:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
}
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.btn-group .btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-sm { font-size: 0.75rem; padding: 4px 10px; }
.btn-lg { padding: 14px 20px; font-size: 0.92rem; border-radius: var(--r-md); }

.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
    transition: all 0.2s var(--ease);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-input);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-10);
    color: var(--text-bright);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.form-check-input {
    background-color: var(--bg-input);
    border-color: var(--border-medium);
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
.form-check-input:focus { box-shadow: 0 0 0 3px var(--primary-10); }

.badge {
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
    padding: 4px 8px;
    border-radius: var(--r-full);
}
.badge.bg-success {
    background: var(--accent-green-light) !important;
    color: #059669;
    border: 1px solid rgba(16,185,129,0.25);
}
.badge.bg-warning {
    background: var(--accent-gold-light) !important;
    color: #92400e;
    border: 1px solid rgba(245,158,11,0.25);
}
.badge.bg-danger {
    background: var(--accent-red-light) !important;
    color: #dc2626;
    border: 1px solid rgba(239,68,68,0.25);
}
.badge.bg-secondary {
    background: rgba(100,116,139,0.10) !important;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.badge.bg-info {
    background: var(--primary-light) !important;
    color: var(--primary);
    border: 1px solid var(--border-accent);
}
.badge.bg-primary {
    background: var(--primary-light) !important;
    color: var(--primary);
    border: 1px solid var(--border-accent);
}

.table {
    color: var(--text-primary);
    --bs-table-bg: transparent;
    font-size: 0.82rem;
}
.table thead { border-bottom: 2px solid var(--border-light); }
.table thead th {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 12px;
    border: none;
    white-space: nowrap;
}
.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.table tbody tr:hover { background: var(--bg-hover); }
.table td {
    padding: 10px 12px;
    vertical-align: middle;
    border: none;
}
.table code {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.progress {
    background: var(--bg-elevated);
    border-radius: var(--r-full);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.progress-bar { transition: width 0.4s var(--ease); }
.progress-bar.bg-success { background: var(--accent-green) !important; }
.progress-bar.bg-warning { background: var(--accent-gold) !important; }
.progress-bar.bg-danger { background: var(--accent-red) !important; }
.progress-bar.bg-info, .progress-bar.progress-bar-animated { background: var(--primary) !important; }

.alert {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: 0.85rem;
}
.alert-success { border-color: rgba(16,185,129,0.3); background: var(--accent-green-light); }
.alert-warning { border-color: rgba(245,158,11,0.3); background: var(--accent-gold-light); }
.alert-danger { border-color: rgba(239,68,68,0.3); background: var(--accent-red-light); }
.alert-info { border-color: var(--border-accent); background: var(--primary-light); }

.list-group-item {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 0.82rem;
}
.list-group-item:hover { background: var(--bg-hover); }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
}
.modal-header .modal-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
}
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--border-light); padding: 12px 20px; }
.btn-close { opacity: 0.5; }
.btn-close:hover { opacity: 0.8; }

/* Bottom Sheet */
.offcanvas-bottom {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    height: auto !important;
    max-height: 90vh;
    background: var(--bg-card);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    margin: 0 15px 15px;
    border-radius: 20px;
}
.offcanvas-bottom::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border-medium);
    border-radius: 2px;
    margin: 10px auto 0;
}
.offcanvas-header {
    border-bottom: 1px solid var(--border-light);
    padding: 12px 20px;
}
.offcanvas-title { font-size: 0.9rem; color: var(--primary); }
.offcanvas-body { padding: 20px 22px 26px; overflow-y: auto; }
.offcanvas .form-control {
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
}
.offcanvas .form-control:focus {
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.offcanvas .form-label { margin-bottom: 4px; font-size: 0.7rem; }
.offcanvas .btn { padding: 12px 20px; font-size: 0.88rem; border-radius: var(--r-md); }

.pagination { gap: 4px; }
.page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: var(--r-sm) !important;
    font-size: 0.8rem;
    padding: 6px 12px;
    transition: all 0.2s;
}
.page-link:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.pagination-nav { margin-top: 16px; }
.pagination-info {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-footer {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}
.mb-mobile-footer { margin-bottom: 20px; }
.text-gold { color: var(--accent-gold) !important; }
.text-brand { color: var(--primary) !important; font-weight: 600; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}
.section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title i { color: var(--primary); font-size: 0.9rem; }
.section-badge {
    font-size: 0.65rem;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border-accent);
    padding: 2px 8px;
    border-radius: var(--r-full);
    font-weight: 600;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border: 1px dashed var(--border-medium);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    text-decoration: none;
}
.quick-action-btn:hover, .quick-action-btn:active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,102,255,0.12);
    transform: translateY(-2px);
}
.quick-action-btn i.display-5 { color: var(--primary); }

.drop-zone {
    border: 2px dashed var(--border-medium);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    background: var(--bg-elevated);
    color: var(--text-muted);
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.drop-zone i { color: var(--text-muted); }
.drop-zone:hover i { color: var(--primary); }

#cameraSection { display: none; }
.camera-wrapper {
    position: relative;
    background: #000;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    border-radius: var(--r-lg);
}
.camera-wrapper video { width: 100%; display: block; }
.camera-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.camera-frame {
    width: 85%;
    height: 60%;
    border: 2px solid var(--primary);
    border-radius: var(--r-lg);
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.4);
}
.camera-controls {
    position: absolute;
    bottom: 16px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
.camera-btn {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.camera-capture {
    width: 64px; height: 64px;
    border: 3px solid white !important;
}

.records-header { margin-bottom: 12px; }
.search-bar { display: flex; gap: 8px; align-items: center; }
.search-bar .position-relative { flex: 1; }
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.search-input {
    padding-left: 36px !important;
    border-radius: var(--r-full) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    font-size: 0.82rem !important;
    height: 38px;
    width: 100%;
}
.search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-10) !important;
}
.search-input::placeholder { color: var(--text-muted) !important; }
.search-btn {
    border-radius: var(--r-full) !important;
    width: 38px; height: 38px;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.record-list { display: flex; flex-direction: column; gap: 4px; }
.record-card {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border: none;
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all 0.2s var(--ease);
}
.record-card:hover {
    border-color: transparent;
    box-shadow: none;
}
.record-card-body {
    flex: 1;
    padding: 10px 14px;
    cursor: pointer;
    min-width: 0;
}
.record-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    gap: 8px;
}
.record-avatar { font-size: 0.95rem; color: var(--text-muted); line-height: 1; flex-shrink: 0; }
.record-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.record-card-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 16px; }
.record-info-item { display: flex; align-items: center; gap: 4px; }
.info-label { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; min-width: 80px; }
.info-label i { font-size: 0.62rem; margin-right: 1px; }
.info-value { font-size: 0.68rem; color: var(--text-muted); font-weight: 400; }
.record-card-actions {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-light);
}
.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.action-btn + .action-btn { border-top: 1px solid var(--border-light); }
.action-verify:hover { background: var(--accent-green-light); color: var(--accent-green); }
.action-delete:hover { background: var(--accent-red-light); color: var(--accent-red); }

.bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--accent-red-light);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--r-md);
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--accent-red);
}

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; display: block; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 0.85rem; }

.edit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.form-group-full { grid-column: 1 / -1; }

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 3px;
    max-height: 500px;
    overflow-y: auto;
    padding: 8px;
}
.page-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: default;
    font-variant-numeric: tabular-nums;
    transition: all 0.15s;
}
.page-cell.missing {
    background: var(--accent-red-light);
    color: #dc2626;
    border: 1px solid rgba(239,68,68,0.2);
}
.page-cell.scanned {
    background: var(--accent-gold-light);
    color: #92400e;
    border: 1px solid rgba(245,158,11,0.2);
}
.page-cell.processed {
    background: var(--accent-green-light);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.2);
}
.page-cell.error {
    background: var(--accent-purple-light);
    color: #7c3aed;
    border: 1px solid rgba(139,92,246,0.2);
}
.page-cell:hover { transform: scale(1.1); z-index: 1; }

.table-responsive { border-radius: var(--r-md); overflow: hidden; }

.text-muted { color: var(--text-muted) !important; }
.text-gold { color: var(--accent-gold) !important; }
.text-success { color: var(--accent-green) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-warning { color: #b45309 !important; }
.text-primary { color: var(--primary) !important; }
.text-info { color: var(--primary) !important; }
.text-white { color: #ffffff !important; }
.text-dark { color: var(--text-bright) !important; }
.bg-light { background: var(--bg-elevated) !important; }
.bg-dark { background: var(--text-bright) !important; }
.border { border-color: var(--border-light) !important; }

a { color: var(--primary); transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
small { color: var(--text-secondary); }
.select-all-label { color: var(--text-muted) !important; font-size: 0.75rem !important; }
.spinner-border { border-color: var(--primary); border-right-color: transparent; }
h3, .fs-4 { font-variant-numeric: tabular-nums; }

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    margin-bottom: 4px;
    font-size: 0.82rem;
    color: var(--text-primary);
}
.file-item i { color: var(--primary); margin-right: 8px; }

.page-title { color: var(--text-bright); }
.page-title .badge { vertical-align: middle; }

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
}
.stats-item:nth-child(3n) { border-right: none; }
.stats-item:nth-last-child(-n+3) { border-bottom: none; }
.stats-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-top: 2px;
}
.stats-divider { display: none; }

@media (max-width: 768px) {
    .main-content { padding: 10px; }
    .stat-card h3 { font-size: 1.3rem; }
    .stat-card .stat-icon { font-size: 1.1rem; }
    .modal-fullscreen-sm-down .modal-content { border-radius: 0; border: none; }
    .table thead { font-size: 0.65rem; }
    .table td { font-size: 0.78rem; padding: 8px; }
}

@media (min-width: 769px) {
    .main-content { padding: 20px 24px; }
    .mobile-bottom-nav {
        left: 50%;
        transform: translateX(-50%);
        max-width: 500px;
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        border-left: 1px solid var(--border-light);
        border-right: 1px solid var(--border-light);
    }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-scale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,102,255,0.15); }
    50% { box-shadow: 0 6px 20px rgba(0,102,255,0.35); }
}
@keyframes progress-fill {
    from { width: 0%; }
}
@keyframes counter-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Staggered card entrance */
.dash-card { animation: fade-in-up 0.5s var(--ease) backwards; }
.dash-card:nth-child(1) { animation-delay: 0s; }
.dash-card:nth-child(2) { animation-delay: 0.08s; }
.dash-card:nth-child(3) { animation-delay: 0.16s; }
.dash-card:nth-child(4) { animation-delay: 0.24s; }

/* Stats item animations */
.stats-item {
    text-align: center;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    transition: all 0.3s var(--ease);
    animation: fade-in-scale 0.4s var(--ease) backwards;
}
.stats-item:nth-child(1) { animation-delay: 0.05s; }
.stats-item:nth-child(2) { animation-delay: 0.1s; }
.stats-item:nth-child(3) { animation-delay: 0.15s; }
.stats-item:nth-child(4) { animation-delay: 0.2s; }
.stats-item:nth-child(5) { animation-delay: 0.25s; }
.stats-item:nth-child(6) { animation-delay: 0.3s; }
.stats-item:hover {
    background: transparent;
    transform: none;
    z-index: auto;
    border-radius: 0;
}
.stats-item:hover .stats-value { transform: none; }
.stats-value {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    transition: transform 0.3s var(--ease);
}

/* CTA Button pulse */
.btn-cta-pulse {
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2.5s ease-in-out infinite;
}
.btn-cta-pulse::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}
.btn-cta-pulse:hover { animation: none; box-shadow: 0 6px 24px rgba(0,102,255,0.35); transform: translateY(-1px); }
.btn-cta-pulse:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(0,102,255,0.2); }

/* Progress bar animated fill */
.progress-bar-animate { animation: progress-fill 1.2s var(--ease) backwards; animation-delay: 0.3s; }

/* Table row stagger */
.table-stagger tbody tr {
    animation: slide-in-right 0.35s var(--ease) backwards;
}
.table-stagger tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table-stagger tbody tr:nth-child(2) { animation-delay: 0.08s; }
.table-stagger tbody tr:nth-child(3) { animation-delay: 0.11s; }
.table-stagger tbody tr:nth-child(4) { animation-delay: 0.14s; }
.table-stagger tbody tr:nth-child(5) { animation-delay: 0.17s; }
.table-stagger tbody tr:nth-child(6) { animation-delay: 0.20s; }
.table-stagger tbody tr:nth-child(7) { animation-delay: 0.23s; }
.table-stagger tbody tr:nth-child(8) { animation-delay: 0.26s; }
.table-stagger tbody tr:nth-child(9) { animation-delay: 0.29s; }
.table-stagger tbody tr:nth-child(10) { animation-delay: 0.32s; }
.table-stagger tbody tr:nth-child(11) { animation-delay: 0.35s; }
.table-stagger tbody tr:nth-child(12) { animation-delay: 0.38s; }
.table-stagger tbody tr:nth-child(13) { animation-delay: 0.41s; }
.table-stagger tbody tr:nth-child(14) { animation-delay: 0.44s; }
.table-stagger tbody tr:nth-child(15) { animation-delay: 0.47s; }

/* Log item stagger */
.log-stagger .list-group-item {
    animation: fade-in 0.3s var(--ease) backwards;
}
.log-stagger .list-group-item:nth-child(1) { animation-delay: 0.05s; }
.log-stagger .list-group-item:nth-child(2) { animation-delay: 0.1s; }
.log-stagger .list-group-item:nth-child(3) { animation-delay: 0.15s; }
.log-stagger .list-group-item:nth-child(4) { animation-delay: 0.2s; }
.log-stagger .list-group-item:nth-child(5) { animation-delay: 0.25s; }
.log-stagger .list-group-item:nth-child(6) { animation-delay: 0.3s; }
.log-stagger .list-group-item:nth-child(7) { animation-delay: 0.35s; }
.log-stagger .list-group-item:nth-child(8) { animation-delay: 0.4s; }
.log-stagger .list-group-item:nth-child(9) { animation-delay: 0.45s; }
.log-stagger .list-group-item:nth-child(10) { animation-delay: 0.5s; }

/* Card interactive lift */
.card-lift { }

/* Empty state animation */
.empty-state-animated i {
    animation: counter-pop 2s ease-in-out infinite;
    display: inline-block;
}

.record-card, .stat-card { animation: fade-in 0.3s var(--ease) backwards; }
.record-list .record-card:nth-child(1) { animation-delay: 0.02s; }
.record-list .record-card:nth-child(2) { animation-delay: 0.04s; }
.record-list .record-card:nth-child(3) { animation-delay: 0.06s; }
.record-list .record-card:nth-child(4) { animation-delay: 0.08s; }
.record-list .record-card:nth-child(5) { animation-delay: 0.10s; }
.record-list .record-card:nth-child(6) { animation-delay: 0.12s; }
.record-list .record-card:nth-child(7) { animation-delay: 0.14s; }
.record-list .record-card:nth-child(8) { animation-delay: 0.16s; }
.record-list .record-card:nth-child(9) { animation-delay: 0.18s; }
.record-list .record-card:nth-child(10) { animation-delay: 0.20s; }
