/* ========== SentryWear App Styles ========== */
/* Design tokens from landing page */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ink: #0a0a0f;
    --chalk: #fafaf9;
    --pulse: #00d4aa;
    --pulse-dim: #00d4aa22;
    --pulse-mid: #00d4aa44;
    --pulse-bright: #00f0c0;
    --warm: #f5f0eb;
    --grey-600: #6b6b76;
    --grey-400: #9d9daa;
    --grey-800: #1a1a24;
    --grey-900: #12121a;

    /* Entity colors */
    --person-color: #4ecdc4;
    --vehicle-color: #ff6b6b;
    --animal-color: #ffe66d;

    /* Functional */
    --danger: #ff4444;
    --danger-dim: #ff444422;
    --warning: #ffaa00;
    --success: #00d4aa;

    /* Spacing */
    --header-h: 56px;
    --nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ink);
    color: var(--chalk);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

.hidden { display: none !important; }

/* ========== Loading Screen ========== */

#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.loading-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.loading-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--pulse);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loading-ring.delay {
    inset: 8px;
    border-top-color: var(--pulse-mid);
    animation-duration: 1.8s;
    animation-direction: reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-eye {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--pulse);
}

.loading-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--grey-400);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: var(--grey-800);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--pulse);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========== Onboarding ========== */

#onboarding {
    position: fixed;
    inset: 0;
    background: var(--ink);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.onboarding-content {
    max-width: 420px;
    text-align: center;
}

.onboarding-icon {
    font-size: 3rem;
    color: var(--pulse);
    margin-bottom: 1.5rem;
}

.onboarding-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.onboarding-content > p {
    color: var(--grey-400);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.onboarding-features {
    text-align: left;
    margin-bottom: 2rem;
}

.ob-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ob-feature:last-child { border-bottom: none; }

.ob-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pulse-dim);
    border-radius: 10px;
}

.ob-feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.ob-feature small {
    color: var(--grey-400);
    font-size: 0.82rem;
}

.ob-note {
    color: var(--grey-600);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

/* ========== Camera Denied ========== */

#camera-denied {
    position: fixed;
    inset: 0;
    background: var(--ink);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.denied-content {
    max-width: 400px;
    text-align: center;
}

.denied-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.denied-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.75rem;
}

.denied-content p {
    color: var(--grey-400);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ========== Buttons ========== */

.btn-primary {
    background: var(--pulse);
    color: var(--ink);
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary:hover { background: var(--pulse-bright); }
.btn-primary:active { transform: scale(0.98); }

.btn-large { padding: 16px 32px; font-size: 1.1rem; }

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    animation: sos-pulse 1.5s ease-in-out infinite;
}

@keyframes sos-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255, 68, 68, 0); }
}

.btn-secondary {
    background: transparent;
    color: var(--pulse);
    border: 1px solid var(--pulse-mid);
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--grey-400);
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
}

.btn-small {
    background: var(--pulse-dim);
    color: var(--pulse);
    border: 1px solid var(--pulse-mid);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* ========== App Header ========== */

#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.logo-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--chalk);
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--chalk);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--pulse-mid);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pulse);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pulse);
    animation: blink 2s ease-in-out infinite;
}

.status-badge.paused { background: rgba(255,170,0,0.1); border-color: rgba(255,170,0,0.3); color: var(--warning); }
.status-badge.paused .status-dot { background: var(--warning); animation: none; }
.status-badge.error { background: var(--danger-dim); border-color: rgba(255,68,68,0.3); color: var(--danger); }
.status-badge.error .status-dot { background: var(--danger); animation: none; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========== Screens ========== */

.screen {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: calc(var(--nav-h) + var(--safe-bottom));
}

.screen.active { display: flex; flex-direction: column; }

.screen-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.screen-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--grey-400);
    margin: 1.5rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

/* ========== Camera / Detection ========== */

#screen-detect {
    flex-direction: column;
}

.camera-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
}

#camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#detection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Detection HUD */
#detection-hud {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
}

.entity-count {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 6px 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.entity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.person-dot { background: var(--person-color); }
.vehicle-dot { background: var(--vehicle-color); }
.animal-dot { background: var(--animal-color); }

/* Alert banner */
#alert-banner {
    position: absolute;
    top: 60px;
    left: 12px;
    right: 12px;
    background: rgba(255, 68, 68, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
    z-index: 10;
}

#alert-banner.warning {
    background: rgba(255, 170, 0, 0.9);
}

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

/* Mode indicators */
#mode-indicators {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mode-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.15);
    color: var(--grey-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.mode-btn.active {
    border-color: var(--pulse);
    color: var(--pulse);
    background: rgba(0, 212, 170, 0.15);
}

/* Detection feed */
#detection-feed {
    background: var(--grey-900);
    border-top: 1px solid rgba(255,255,255,0.06);
    max-height: 140px;
    overflow-y: auto;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: sticky;
    top: 0;
    background: var(--grey-900);
}

.fps {
    font-family: 'Space Grotesk', monospace;
    color: var(--pulse);
}

#feed-list {
    padding: 4px 0;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    animation: fadeIn 0.2s ease;
}

.feed-item .feed-type {
    font-weight: 600;
    min-width: 60px;
}

.feed-item .feed-class {
    color: var(--grey-400);
    flex: 1;
}

.feed-item .feed-proximity {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.feed-item .feed-proximity.near { background: rgba(255,68,68,0.2); color: var(--danger); }
.feed-item .feed-proximity.close { background: rgba(255,170,0,0.2); color: var(--warning); }
.feed-item .feed-proximity.medium { background: rgba(0,212,170,0.2); color: var(--pulse); }
.feed-item .feed-proximity.far { background: rgba(255,255,255,0.06); color: var(--grey-400); }

.feed-item.person .feed-type { color: var(--person-color); }
.feed-item.vehicle .feed-type { color: var(--vehicle-color); }
.feed-item.animal .feed-type { color: var(--animal-color); }

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

/* ========== SOS Button ========== */

.sos-button {
    position: fixed;
    bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
    left: 16px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
    transition: all 0.2s;
}

.sos-button:active {
    transform: scale(0.9);
}

/* ========== Bottom Nav ========== */

#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--grey-600);
    cursor: pointer;
    padding: 8px 20px;
    transition: color 0.2s;
}

.nav-item.active { color: var(--pulse); }

.nav-icon { font-size: 1.3rem; }

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ========== Stats Grid ========== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-card:first-child {
    grid-column: 1 / -1;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pulse);
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--grey-400);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card.person-accent .stat-value { color: var(--person-color); }
.stat-card.vehicle-accent .stat-value { color: var(--vehicle-color); }
.stat-card.animal-accent .stat-value { color: var(--animal-color); }

/* ========== Photo Gallery ========== */

#photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.photo-thumb {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--grey-800);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .photo-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.7);
    text-transform: uppercase;
}

.photo-thumb .photo-badge.person { color: var(--person-color); }
.photo-thumb .photo-badge.vehicle { color: var(--vehicle-color); }
.photo-thumb .photo-badge.animal { color: var(--animal-color); }

.photo-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--grey-600);
    font-size: 0.9rem;
}

/* ========== History List ========== */

#history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-info .h-type {
    font-weight: 600;
    font-size: 0.9rem;
}

.history-info .h-meta {
    font-size: 0.75rem;
    color: var(--grey-400);
}

.history-time {
    font-size: 0.72rem;
    color: var(--grey-600);
    font-family: 'Space Grotesk', monospace;
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: var(--grey-600);
    font-size: 0.9rem;
}

/* ========== Settings ========== */

.settings-section {
    margin-bottom: 1.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.settings-section h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.section-header h3 { margin-bottom: 0; }

.setting-group {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    font-size: 0.92rem;
}

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

.setting-row span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Toggle switch */
.toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    background: var(--grey-800);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--chalk);
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle:checked {
    background: var(--pulse);
}

.toggle:checked::after {
    transform: translateX(20px);
}

/* Slider */
.slider {
    appearance: none;
    -webkit-appearance: none;
    width: 120px;
    height: 4px;
    background: var(--grey-800);
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--pulse);
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--pulse);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Contacts list */
#contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pulse-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--pulse);
    font-family: 'Space Grotesk', sans-serif;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.contact-phone {
    font-size: 0.8rem;
    color: var(--grey-400);
}

.contact-delete {
    background: none;
    border: none;
    color: var(--grey-600);
    cursor: pointer;
    padding: 8px;
    font-size: 1.1rem;
}

.contact-delete:hover { color: var(--danger); }

.empty-state {
    text-align: center;
    padding: 1.5rem;
    color: var(--grey-600);
    font-size: 0.9rem;
}

.about-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.text-muted { color: var(--grey-600); font-size: 0.82rem !important; }

code {
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
}

/* ========== Modals ========== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--grey-900);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px 20px 0 0;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* SOS Modal */
.sos-modal-content {
    text-align: center;
}

.sos-modal-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.sos-instruction {
    color: var(--grey-400);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

#sos-location {
    color: var(--grey-400);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* Photo viewer */
.photo-viewer {
    text-align: center;
}

.photo-viewer img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

#photo-viewer-info {
    font-size: 0.85rem;
    color: var(--grey-400);
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--grey-400);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--chalk);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--pulse);
}

.form-group input::placeholder {
    color: var(--grey-600);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.form-actions .btn-ghost { flex: 0 0 auto; width: auto; }
.form-actions .btn-primary { flex: 1; }

/* ========== Responsive ========== */

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stats-grid .stat-card:first-child {
        grid-column: auto;
    }
    #photo-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    .modal-content {
        border-radius: 20px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 360px) {
    .entity-count {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    .mode-btn {
        width: 38px;
        height: 38px;
    }
    .sos-button {
        width: 52px;
        height: 52px;
        font-size: 0.85rem;
    }
}
