/* ============================================================
   Evidence Validator — Design System
   Light theme · Deep blue primary (#1a3a6b)
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary palette */
    --primary:          #1a3a6b;
    --primary-light:    #2a5298;
    --primary-lighter:  #3d6abf;
    --primary-bg:       #e8eef6;
    --primary-bg-hover: #dce5f2;

    /* Neutrals */
    --bg-body:          #f3f6fb;
    --bg-card:          #ffffff;
    --bg-muted:         #f7f9fc;
    --text-primary:     #1e293b;
    --text-secondary:   #64748b;
    --text-muted:       #94a3b8;
    --border-color:     #e2e8f0;

    /* Accents */
    --success:          #059669;
    --success-bg:       #ecfdf5;
    --warning:          #d97706;
    --warning-bg:       #fffbeb;
    --danger:           #dc2626;
    --danger-bg:        #fef2f2;
    --info:             #0284c7;
    --info-bg:          #f0f9ff;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(26, 58, 107, 0.06), 0 1px 2px rgba(26, 58, 107, 0.04);
    --shadow-md:  0 4px 12px rgba(26, 58, 107, 0.08), 0 2px 4px rgba(26, 58, 107, 0.04);
    --shadow-lg:  0 10px 30px rgba(26, 58, 107, 0.10), 0 4px 8px rgba(26, 58, 107, 0.04);

    /* Geometry */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-pill: 50px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

/* ---------- Global ---------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    padding: 0.65rem 0;
    box-shadow: var(--shadow-md);
    border: none;
}

.navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.35rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-pill);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0.15rem;
}

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

.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    border-bottom: none;
}

.navbar-nav .nav-link i {
    font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    overflow: hidden;
    background: var(--bg-card);
}

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

.card .card-body {
    padding: 1.5rem;
}

/* Section header inside card (replaces old colored card-header) */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--primary-bg);
}

.section-header i {
    font-size: 1.3rem;
    color: var(--primary);
    background: var(--primary-bg);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.section-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

/* ---------- Form Controls ---------- */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-select,
.form-control {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--bg-card);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select:focus,
.form-control:focus {
    border-color: var(--primary-lighter);
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.12);
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 2px 6px rgba(26, 58, 107, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 58, 107, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(26, 58, 107, 0.15);
}

.btn-primary:disabled {
    background: var(--text-muted);
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

/* ---------- Badges ---------- */
.badge {
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35em 0.75em;
    border-radius: var(--radius-pill);
    letter-spacing: 0.02em;
}

.badge.bg-success {
    background-color: var(--success) !important;
    color: #fff;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
    color: #fff !important;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
    color: #fff;
}

.badge.bg-primary {
    background: var(--primary) !important;
    color: #fff;
}

/* ---------- Result Row ---------- */
.result-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--primary-bg);
}

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

.result-row i {
    color: var(--primary);
    font-size: 0.95rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.result-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.result-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.result-value.description {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
    margin-top: 0.15rem;
}

/* ---------- Empty / Placeholder States ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    text-align: center;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.empty-state span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- Photo / Video Preview ---------- */
.media-preview {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    overflow: hidden;
    background: #000;
}

.media-preview img,
.media-preview video {
    width: 100%;
    display: block;
}

/* ---------- Loading Spinner ---------- */
.loading-area {
    text-align: center;
    padding: 2rem 1rem;
}

.loading-area .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary) !important;
    border-width: 3px;
}

.loading-area .loading-text {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}

/* ---------- Alerts ---------- */
.alert-danger {
    background: var(--danger-bg);
    border-color: #fecaca;
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-bg);
    border-color: #a7f3d0;
    color: var(--success);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ---------- Fullness / Occupancy Bars ---------- */
.fullness-bar-container {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    vertical-align: middle;
    margin-left: 6px;
}

.fullness-bar {
    width: 22px;
    height: 10px;
    border-radius: 3px;
    transition: background-color var(--transition-fast);
}

.fullness-bar-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.fullness-bar-yellow {
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.fullness-bar-empty {
    background: var(--border-color);
}

/* ---------- Extra Info Box ---------- */
.extra-info-box {
    background: var(--info-bg);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ---------- Divider ---------- */
.result-divider {
    border: none;
    border-top: 2px solid var(--primary-bg);
    margin: 0.75rem 0;
}

/* ---------- Category Chip ---------- */
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3em 0.85em;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.category-chip i {
    font-size: 1rem;
}

/* ---------- Content container ---------- */
main.container {
    max-width: 1200px;
}

/* ---------- Footer ---------- */
.app-footer {
    text-align: center;
    padding: 1.75rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2rem;
}

/* ---------- No-result text ---------- */
.no-result-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.no-result-text i {
    font-size: 1rem;
}

/* ---------- Status text ---------- */
.status-text {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease forwards;
}

/* ---------- Home Page — Hero ---------- */
.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 6px 20px rgba(26, 58, 107, 0.2);
}

.hero-title {
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 520px;
    margin: 0.25rem auto 0;
}

/* ---------- Home Page — Feature Cards ---------- */
.feature-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.feature-card {
    height: 100%;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-bg);
}

.feature-card .card-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.feature-icon-blue {
    background: var(--primary-bg);
    color: var(--primary);
}

.feature-icon-teal {
    background: #e0f7f1;
    color: #0d9488;
}

.feature-icon-amber {
    background: #fef3c7;
    color: #b45309;
}

.feature-icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.feature-icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.feature-icon-rose {
    background: #ffe4e6;
    color: #e11d48;
}

.feature-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.feature-cta {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap var(--transition-fast);
}

.feature-card:hover .feature-cta {
    gap: 0.55rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
    }
}

@media (max-width: 767.98px) {
    .card .card-body {
        padding: 1.15rem;
    }

    .section-header h5 {
        font-size: 0.95rem;
    }
}
