/* --- Lumens Vision Analytics - Professional Dashboard Theme --- */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-base: #0f0f12;
    --bg-elevated: #18181b;
    --bg-card: #1c1c1f;
    --bg-input: #252529;
    --border: #27272a;
    --border-focus: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-muted: rgba(99, 102, 241, 0.15);
    --success: #22c55e;
    --success-muted: rgba(34, 197, 94, 0.15);
    --danger: #ef4444;
    --danger-muted: rgba(239, 68, 68, 0.15);
    --live: #f43f5e;
    --radius: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 24px 16px;
    line-height: 1.5;
    margin: 0;
}

.app-container {
    width: 100%;
    max-width: 680px;
    animation: fadeIn 0.5s ease-out;
}

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

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 28px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

/* --- Model Info Badge --- */
.model-info-note {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- Main Card --- */
.main-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Mode Switcher --- */
.mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-mode {
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.8125rem;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-mode:hover {
    border-color: var(--border-focus);
    color: var(--text-primary);
}

.btn-mode.active {
    border-color: var(--accent);
    background: var(--accent-muted);
    color: var(--accent);
}

/* --- Scroll Box (Classes) --- */
.scroll-box {
    background: var(--bg-input);
    height: 150px;
    overflow-y: auto;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.scroll-box::-webkit-scrollbar { width: 6px; }
.scroll-box::-webkit-scrollbar-track { background: transparent; }
.scroll-box::-webkit-scrollbar-thumb {
    background: var(--border-focus);
    border-radius: 3px;
}
.scroll-box::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.group-title,
.category-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 8px 0 4px 0;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.category-separator {
    background: transparent;
    margin: 12px 0 4px 0;
    padding: 6px 0;
}

.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.item-row:last-child { border-bottom: none; }

.item-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s;
}

.item-check:hover { color: var(--text-primary); }

.item-check.special {
    color: var(--accent);
    font-weight: 600;
}

/* --- Alert Toggle --- */
.alert-toggle {
    cursor: pointer;
    opacity: 0.35;
    transition: all 0.2s;
    font-size: 1rem;
    user-select: none;
}

.alert-toggle:hover { opacity: 0.6; }

.alert-active {
    opacity: 1 !important;
    filter: none;
}

/* --- Form Elements --- */
.main-select,
input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.main-select:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

input[type="file"] {
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    padding: 8px 12px;
    margin-right: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
}

/* --- Buttons --- */
button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover:not(:disabled) {
    background: var(--accent-hover);
}

button:disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-live {
    background: var(--live) !important;
}

.btn-live:hover {
    background: #e11d48 !important;
}

.btn-report {
    background: var(--success) !important;
    color: white !important;
}

.btn-report:hover {
    background: #16a34a !important;
}

/* --- Evidence Cards --- */
.evidence-card {
    display: flex;
    background: var(--bg-input);
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.evidence-card:hover {
    border-color: var(--accent);
}

.evidence-img {
    width: 160px;
    min-width: 160px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
}

.evidence-info {
    padding: 12px 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge-count {
    display: inline-block;
    background: var(--accent-muted);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    margin: 2px 4px 2px 0;
}

/* --- Loading State --- */
#loading {
    padding: 16px;
    background: var(--accent-muted);
    border: 1px solid var(--border);
    color: var(--accent);
    text-align: center;
    font-weight: 600;
    border-radius: var(--radius);
    font-size: 0.875rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* --- Live Badge --- */
.live-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--live);
}

/* --- Result Area --- */
.result-area {
    margin-top: 20px;
}

.result-area video,
.result-area img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.hidden { display: none !important; }

/* --- Live Container --- */
.live-container {
    background: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* --- Session Finish Card --- */
.session-finish-card {
    background: var(--bg-input);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--success);
}
