/* ═══════════════════════════════════════════════════
   SOS Vũng Tàu — Design System
   Emergency Red + White + Gradient
   Typography: Poppins + Open Sans
   ═══════════════════════════════════════════════════ */

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

/* ── CSS Variables ── */
:root {
    --primary: #DC2626;
    --primary-dark: #991B1B;
    --primary-darker: #7F1D1D;
    --primary-light: #FEE2E2;
    --primary-50: #FEF2F2;

    --gradient-hero: linear-gradient(135deg, #DC2626 0%, #B91C1C 40%, #991B1B 100%);
    --gradient-hero-radial: radial-gradient(ellipse at 30% 50%, rgba(239,68,68,0.3) 0%, transparent 70%);
    --gradient-card: linear-gradient(180deg, #FFFFFF 0%, #FEF2F2 100%);
    --gradient-cta: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #B91C1C 100%);
    --gradient-dark: linear-gradient(180deg, #1F2937 0%, #111827 100%);

    --white: #FFFFFF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #FEF2F2;
    --bg-tertiary: #F9FAFB;
    --bg-dark: #111827;
    --bg-card: #FFFFFF;

    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --text-on-primary: #FFFFFF;

    --border: #E5E7EB;
    --border-light: #F3F4F6;

    --status-pending: #F59E0B;
    --status-pending-bg: #FEF3C7;
    --status-active: #DC2626;
    --status-active-bg: #FEE2E2;
    --status-found: #10B981;
    --status-found-bg: #D1FAE5;
    --status-closed: #6B7280;
    --status-closed-bg: #F3F4F6;
    --status-match: #3B82F6;
    --status-match-bg: #DBEAFE;

    --marker-case: #DC2626;
    --marker-sighting: #F59E0B;
    --marker-found: #10B981;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 10px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 50px -5px rgba(0,0,0,0.12), 0 10px 20px -5px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 40px rgba(220,38,38,0.15);
    --shadow-glow-strong: 0 0 60px rgba(220,38,38,0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
    --font-body: 'Open Sans', system-ui, -apple-system, sans-serif;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 500;
    --z-toast: 900;
    --z-tooltip: 1000;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-tertiary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container { padding: 0 24px; }
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.navbar__brand-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-cta);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}

.navbar__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar__link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

.navbar__link:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.navbar__link--active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar__menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .navbar__menu-btn { display: flex; }
    .navbar__nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .navbar__nav.open { display: flex; }
    .navbar__link { width: 100%; padding: 12px 16px; }
}

/* ── Hero Section ── */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: pulse-subtle 3s ease-in-out infinite;
}

.hero__title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.hero__stat {
    text-align: center;
}

.hero__stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    display: block;
}

.hero__stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
    background: var(--gradient-cta);
    color: white;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
}

.btn--primary:hover {
    box-shadow: 0 6px 20px rgba(220,38,38,0.4);
    transform: translateY(-1px);
    color: white;
}

.btn--white {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn--white:hover {
    background: var(--primary-50);
    color: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn--outline:hover {
    background: var(--primary);
    color: white;
}

.btn--hero {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn--hero-white {
    background: white;
    color: var(--primary-dark);
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn--hero-white:hover {
    background: var(--primary-50);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn--hero-outline {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.btn--hero-outline:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
    color: white;
}

.btn--sm { padding: 8px 16px; font-size: 0.8rem; }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--block { width: 100%; }

.btn--success { background: var(--status-found); color: white; }
.btn--success:hover { background: #059669; color: white; }
.btn--warning { background: var(--status-pending); color: white; }
.btn--danger { background: var(--primary); color: white; }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-tertiary); }

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

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

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card--case {
    border-left: 4px solid var(--primary);
    cursor: pointer;
}

.card--case.status-found {
    border-left-color: var(--status-found);
    opacity: 0.7;
}

.card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.card__body { padding: 16px; }

.card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.card__meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card__description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Status Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge--pending { background: var(--status-pending-bg); color: #92400E; }
.badge--active { background: var(--status-active-bg); color: var(--primary-dark); }
.badge--found { background: var(--status-found-bg); color: #065F46; }
.badge--closed { background: var(--status-closed-bg); color: var(--status-closed); }
.badge--match { background: var(--status-match-bg); color: #1E40AF; }

.badge--pulse {
    position: relative;
}

.badge--pulse::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Map ── */
.map-section {
    position: relative;
    margin-top: -20px;
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 3px solid white;
}

@media (max-width: 768px) {
    .map-container { height: 350px; border-radius: var(--radius-md); }
}

.map-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 16px;
    flex-wrap: wrap;
}

.map-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.map-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow-xs);
}

/* ── TrackAsia Map Markers ── */
.map-marker {
    cursor: pointer;
}

.map-marker__dot {
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.map-marker__dot--case {
    width: 20px;
    height: 20px;
    background: #DC2626;
    animation: pulse-subtle 2s ease-in-out infinite;
}

.map-marker__dot--sighting {
    width: 14px;
    height: 14px;
    background: #F59E0B;
    border-width: 2px;
}

.map-marker__dot--match {
    width: 16px;
    height: 16px;
    background: #3B82F6;
    border-width: 2px;
}

/* TrackAsia popup styling */
.trackasiagl-popup-content {
    padding: 12px !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-body) !important;
    font-size: 0.85rem !important;
    box-shadow: var(--shadow-lg) !important;
}

.trackasiagl-popup-close-button {
    font-size: 16px !important;
    padding: 4px 8px !important;
}

/* ── Cases Grid ── */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    .cases-grid { grid-template-columns: 1fr; }
}

/* ── Section ── */
.section {
    padding: 48px 0;
}

.section__header {
    text-align: center;
    margin-bottom: 36px;
}

.section__title {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.section__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ── Form ── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--primary);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

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

.form-error {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 4px;
}

/* ── Upload Area ── */
.upload-area {
    border: 2px dashed rgba(220, 38, 38, 0.3); /* Subtle primary color dash */
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(220,38,38,0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.08);
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-area__icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-area__icon {
    transform: scale(1.1) translateY(-2px);
}

.upload-area__text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.upload-area__hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.upload-preview__item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-preview__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.upload-preview__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.upload-preview__remove:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* ── Voice Recorder ── */
.recorder {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.recorder__btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: white;
    color: var(--primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.recorder__btn:hover {
    background: var(--primary-50);
}

.recorder__btn.recording {
    background: var(--primary);
    color: white;
    animation: pulse-record 1.5s ease-in-out infinite;
    border-color: var(--primary-dark);
}

.recorder__time {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 12px 0 4px;
}

.recorder__hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recorder__waveform {
    height: 40px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.recorder__waveform-bar {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    transition: height 100ms ease;
}

.recorder__playback {
    margin-top: 16px;
}

.recorder__playback audio {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 300ms ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toast--success {
    background: var(--status-found);
    color: white;
}

.toast--error {
    background: var(--primary);
    color: white;
}

.toast--info {
    background: var(--status-match);
    color: white;
}

.toast--warning {
    background: var(--status-pending);
    color: white;
}

/* ── Flash Messages ── */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 300ms ease-out;
}

.flash--success { background: var(--status-found-bg); color: #065F46; border: 1px solid #A7F3D0; }
.flash--error { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #FECACA; }

/* ── Detail Page ── */
.detail-hero {
    background: var(--gradient-hero);
    color: white;
    padding: 84px 0 40px;
}

.detail-hero__status {
    margin-bottom: 16px;
}

.detail-content {
    margin-top: -40px;
    position: relative;
    z-index: 1;
}

.detail-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.detail-card__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 16px;
}

.detail-card__gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.detail-card__gallery img:hover { transform: scale(1.05); }

.detail-info {
    padding: 24px;
}

.detail-info__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-info__item {
    display: flex;
    gap: 12px;
}

.detail-info__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary-50);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-info__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-info__value {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ── Admin Layout ── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--gradient-dark);
    color: white;
    padding: 24px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: var(--z-sticky);
}

.admin-sidebar__brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.admin-sidebar__brand a {
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar__nav { list-style: none; }

.admin-sidebar__item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.admin-sidebar__item a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
    border-left-color: rgba(255,255,255,0.3);
}

.admin-sidebar__item a.active {
    color: white;
    background: rgba(220,38,38,0.2);
    border-left-color: var(--primary);
}

.admin-sidebar__badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header__title {
    font-size: 1.5rem;
}

/* Admin stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-card__icon--red { background: var(--primary-light); color: var(--primary); }
.stat-card__icon--green { background: var(--status-found-bg); color: var(--status-found); }
.stat-card__icon--yellow { background: var(--status-pending-bg); color: var(--status-pending); }
.stat-card__icon--blue { background: var(--status-match-bg); color: var(--status-match); }

.stat-card__value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Admin table */
.table-wrapper {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--primary-50);
}

.data-table__thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

@media (max-width: 1024px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
}

/* ── Auth Pages ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: 24px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.auth-card__title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-card__subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.open { display: flex; }

.modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 250ms ease-out;
}

.modal__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal__title { font-size: 1.15rem; }

.modal__close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.modal__body { padding: 24px; }
.modal__footer { padding: 16px 24px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; }

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* ── Sound Toggle ── */
.sound-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-cta);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: var(--z-dropdown);
    transition: all var(--transition-fast);
}

.sound-toggle:hover { transform: scale(1.1); }
.sound-toggle.muted { background: var(--status-closed); }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state__icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state__text { font-size: 1rem; }

/* ── Animations ── */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 0 20px rgba(220,38,38,0); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes modalIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--status-found); }
.font-heading { font-family: var(--font-heading); }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── GPS Warning ── */
.gps-warning {
    background: var(--status-pending-bg);
    border: 1px solid #FCD34D;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #92400E;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Print ── */
@media print {
    .navbar, .hero, .sound-toggle, .toast-container { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ── Footer ── */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 24px;
    margin-top: 48px;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer__brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 8px;
}

.footer__text {
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 400px;
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer__links a:hover { color: white; }

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 24px;
    padding-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
