:root {
  color-scheme: light;
  --ink: #102a43;
  --ink-soft: #243b53;
  --muted: #627d98;
  --line: #d9e2ec;
  --paper: #f3f2ed;
  --card: rgba(255,255,255,.88);
  --accent: #0f766e;
  --accent-soft: #dff5ef;
  --danger: #b42318;
  --warning: #b54708;
  --blue: #2563eb;
  --violet: #7c3aed;
  --shadow: 0 20px 50px rgba(17,24,20,.10);
  --shadow-soft: 0 10px 28px rgba(17,24,20,.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 86% 3%,rgba(187,240,220,.48) 0,transparent 27%), linear-gradient(145deg,#f0efe9 0,#f7f6f2 54%,#ecebe5 100%); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #8de2d4; outline-offset: 2px; }
.shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 20px 0 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; margin-bottom: 24px; padding: 10px 12px 10px 14px; border: 1px solid rgba(17,24,20,.07); border-radius: 24px; background: rgba(255,255,255,.72); box-shadow: 0 12px 34px rgba(17,24,20,.07); backdrop-filter: blur(18px) saturate(1.35); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-button { padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 16px; background: #111814; color: #c8f7ee; font-size: 21px; box-shadow: 0 10px 24px rgba(17,24,20,.16); }
.user-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.user-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px; color: #effcf9; background: linear-gradient(145deg,#0f766e,#102a43); font-size: .76rem; font-weight: 850; letter-spacing: .03em; }
.topbar-icon-button { display: inline-flex; align-items: center; gap: 7px; }
.topbar-icon-button span { font-size: 1rem; }
.desktop-primary-nav { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid rgba(17,24,20,.06); border-radius: 16px; background: rgba(239,240,235,.8); }
.desktop-primary-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 0; border-radius: 13px; color: #68736c; background: transparent; font-size: .8rem; font-weight: 820; }
.desktop-primary-nav button span { color: #17806e; }
.desktop-primary-nav button.active { color: #e4fff4; background: #121a16; box-shadow: 0 8px 18px rgba(17,24,20,.14); }
.desktop-primary-nav button.active span { color: #8ce5ca; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); letter-spacing: -.04em; margin-bottom: 8px; }
h2 { letter-spacing: -.025em; margin-bottom: 6px; }
h3 { margin-bottom: 5px; }
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.muted { color: var(--muted); }
.card, .panel { background: var(--card); border: 1px solid rgba(17,24,20,.07); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; }
.panel { box-shadow: var(--shadow-soft); border-radius: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 20px; }
.camera-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.camera-card { display: block; min-height: 0; overflow: hidden; padding: 0; border: 0; background: #071923; box-shadow: 0 14px 32px rgba(7,25,35,.16); }
.camera-thumb-frame { position: relative; overflow: hidden; margin: 0; aspect-ratio: 16/10; background: linear-gradient(145deg,#102a43,#071923); isolation: isolate; }
.camera-thumb { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .94; }
.camera-image-shade { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(3,13,17,.24) 0,rgba(3,13,17,.03) 38%,rgba(3,13,17,.9) 100%); }
.camera-card-topline { position: absolute; z-index: 3; top: 14px; right: 14px; left: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.camera-card-topline > * { pointer-events: auto; }
.camera-state { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #fff; background: rgba(7,25,35,.6); backdrop-filter: blur(10px); font-size: .7rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.camera-state i { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.camera-state.is-live i { background: #5ff0ae; box-shadow: 0 0 0 4px rgba(95,240,174,.17); }
.camera-state.is-unavailable { color: #ffd5d0; background: rgba(103,24,20,.68); }
.camera-state.is-unavailable i { background: #ff8a80; }
.camera-card-overlay { position: absolute; z-index: 3; right: 16px; bottom: 15px; left: 16px; color: #fff; pointer-events: none; }
.camera-card-overlay > * { pointer-events: auto; }
.camera-group { display: block; margin-bottom: 3px; color: #b9e9df; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.camera-card-overlay h2 { max-width: calc(100% - 54px); margin: 0 0 12px; color: #fff; font-size: 1.22rem; letter-spacing: -.03em; }
.camera-watch-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 42px; padding: 9px 11px 9px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; color: #09231d; background: rgba(232,255,247,.94); font-size: .8rem; font-weight: 850; backdrop-filter: blur(10px); }
.camera-watch-button b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #e8fff7; background: #0f766e; font-size: 1rem; }
.camera-watch-button:disabled { color: #d0d5dd; background: rgba(30,41,45,.76); cursor: not-allowed; }
.camera-watch-button:disabled b { color: #98a2b3; background: #344054; }
.camera-expand-hint { position: absolute; z-index: 2; right: 17px; bottom: 72px; color: rgba(255,255,255,.75); font-size: .64rem; font-weight: 750; pointer-events: none; }
.camera-card .camera-error { max-width: 100%; margin: -6px 0 10px; overflow: hidden; color: #ffd5d0; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.camera-card .status.server-error { display: none; }
.camera-card-body { padding: 0 18px; }
.camera-title-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; min-height: 28px; }
.camera-title-action { margin-left: auto; }
.camera-favorite { width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.24); border-radius: 13px; color: #fff; background: rgba(7,25,35,.58); font-size: 1.22rem; line-height: 1; backdrop-filter: blur(10px); }
.camera-favorite:hover, .camera-favorite.is-favorite { color: #ffd37a; border-color: rgba(255,211,122,.5); background: rgba(70,48,10,.68); }
.camera-card .eyebrow { margin-bottom: 5px; }
.camera-card h2 { font-size: 1.18rem; }
.camera-error { margin: 10px 0 0; font-size: .82rem; }
.camera-card > .button { margin: 17px 18px 0; }
.camera-filter-bar { display: flex; gap: 8px; margin: 0 0 19px; overflow-x: auto; padding: 1px 0 5px; scrollbar-width: thin; }
.camera-filter-bar:not(.has-secondary) { display: none; }
.camera-filter-bar > [data-camera-filter="all"], .camera-filter-bar > [data-camera-filter="favorites"] { display: none; }
.camera-filter { flex: 0 0 auto; min-height: 41px; padding: 8px 14px; border: 1px solid rgba(17,24,20,.08); border-radius: 999px; color: #68736c; background: rgba(255,255,255,.72); font-size: .78rem; font-weight: 800; }
.camera-filter:hover { color: var(--ink); border-color: rgba(17,24,20,.18); background: #fff; }
.camera-filter.active { color: #e4fff4; border-color: #121a16; background: #121a16; }
.home-hero { position: relative; display: flex; min-height: 260px; align-items: end; justify-content: space-between; gap: 40px; overflow: hidden; margin-bottom: 30px; padding: 38px 42px; border-radius: 34px; color: #f4fff9; background: radial-gradient(circle at 82% 12%,rgba(104,226,190,.24) 0,transparent 24%),linear-gradient(135deg,#0a1712 0,#163c32 100%); box-shadow: 0 24px 60px rgba(17,24,20,.18); isolation: isolate; }
.home-hero::after { content: ""; position: absolute; z-index: -1; top: -120px; right: -70px; width: 360px; height: 360px; border: 1px solid rgba(192,255,232,.14); border-radius: 50%; box-shadow: 0 0 0 52px rgba(192,255,232,.035),0 0 0 104px rgba(192,255,232,.025); }
.home-heading { max-width: 700px; }
.home-heading .eyebrow { color: #83dfc4; }
.home-heading h1 { margin-bottom: 13px; color: #fff; font-size: clamp(2.8rem,5.2vw,4.7rem); line-height: .96; letter-spacing: -.065em; }
.home-heading .muted { max-width: 570px; margin-bottom: 0; color: #b9d5cb; font-size: .95rem; }
.camera-summary { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; min-width: 164px; padding: 15px 17px; border: 1px solid rgba(201,248,228,.16); border-radius: 19px; background: rgba(6,23,18,.42); box-shadow: none; backdrop-filter: blur(14px); }
.summary-live-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 5px #dcfae6; }
.camera-summary strong, .camera-summary small { display: block; }
.camera-summary strong { font-size: 1rem; }
.camera-summary small { margin-top: 2px; color: #a9c9be; font-size: .68rem; }
.camera-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 2px 12px; }
.camera-list-heading > div { display: grid; gap: 2px; }
.camera-list-heading span { color: #17221c; font-size: 1.08rem; font-weight: 850; }
.camera-list-heading small, .swipe-copy { color: var(--muted); font-size: .7rem; }
.swipe-copy { display: none; }
.mobile-tabbar { display: none; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #98a2b3; }
.status.on::before { background: #12b76a; box-shadow: 0 0 0 4px #dcfae6; }
.status.server-error { color: var(--danger); }
.status.server-error::before { background: var(--danger); }
.button { border: 0; border-radius: 13px; padding: 11px 15px; font-weight: 780; color: #e6fff5; background: #121a16; transition: transform .15s, opacity .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(16,42,67,.15); }
.button.secondary { border: 1px solid rgba(17,24,20,.06); background: #eff0eb; color: #26312b; }
.button.danger { background: #fff0ee; color: var(--danger); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button.compact { padding: 8px 10px; font-size: .78rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 9px; }
.page-actions { margin: 0 0 16px; }
.form { display: grid; gap: 14px; max-width: 460px; }
label { display: grid; gap: 6px; font-size: .85rem; font-weight: 750; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 3px solid #c7f0e8; border-color: var(--accent); }
.login { max-width: 500px; margin: 8vh auto 0; padding: 34px; border-radius: 32px; }
.login .brand { margin-bottom: 30px; }
body[data-view="login"], body[data-view="offline"] { background: radial-gradient(circle at 80% 0,rgba(77,178,148,.34) 0,transparent 31%),linear-gradient(145deg,#07130f,#12372d); }
body[data-view="login"] .login, body[data-view="offline"] .login { border-color: rgba(255,255,255,.58); background: rgba(252,252,249,.94); box-shadow: 0 34px 90px rgba(0,0,0,.3); }
body[data-view="login"] .login .button, body[data-view="offline"] .login .button { min-height: 48px; }
.alert { padding: 12px 14px; border-radius: 12px; background: #fff0ee; color: var(--danger); font-size: .9rem; }
.notice { padding: 12px 14px; border: 1px solid #b7e4dc; border-radius: 14px; background: #effbf8; color: #155e59; font-size: .88rem; line-height: 1.45; }
.empty, .empty-inline { padding: 35px 20px; text-align: center; color: var(--muted); }
.server-error { color: var(--danger) !important; }
.subheading { margin: 28px 0 12px; font-size: 1rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; vertical-align: middle; }
.admin-table th { font-size: .69rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table code, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.inline-form, .inline-password-form { display: flex; align-items: center; gap: 6px; min-width: 240px; }
.inline-form input, .inline-password-form input { min-width: 0; padding: 8px 9px; }
.camera-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0 0 18px; }
.activity-metrics > div { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfc; }
.activity-metrics strong, .activity-metrics span { display: block; }
.activity-metrics strong { overflow-wrap: anywhere; font-size: 1.15rem; letter-spacing: -.02em; }
.activity-metrics span { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.camera-screen { max-width: 1040px; margin: 0 auto; }
.camera-view-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.camera-view-header > div { min-width: 0; flex: 1; }
.camera-view-header span { display: block; color: var(--accent); font-size: .7rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.camera-view-header h1 { margin: 2px 0 0; overflow: hidden; font-size: clamp(1.45rem,4vw,2rem); text-overflow: ellipsis; white-space: nowrap; }
.round-action { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,.86); font-size: 1.1rem; box-shadow: var(--shadow-soft); }
.video-wrap { position: relative; overflow: hidden; background: #071923; border-radius: 24px; box-shadow: var(--shadow); }
video { display: block; width: 100%; aspect-ratio: 16/9; background: #071923; }
.video-top-meta { position: absolute; z-index: 2; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #fff; background: rgba(7,25,35,.62); backdrop-filter: blur(10px); font-size: .72rem; font-weight: 800; pointer-events: none; }
.video-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5ff0ae; box-shadow: 0 0 0 4px rgba(95,240,174,.17); }
.video-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; color: #d8e9ee; font-size: .85rem; }
.video-meta .server-error { color: #ffb4aa !important; font-weight: 750; }
.camera-view-controls { display: grid; gap: 12px; margin-top: 14px; }
.camera-position { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.camera-dots { display: flex; align-items: center; gap: 4px; max-width: 170px; overflow: hidden; }
.camera-dots i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: #cbd5df; }
.camera-dots i.active { width: 17px; border-radius: 999px; background: var(--accent); }
.camera-navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .8rem; }
.camera-navigation p { margin: 0; text-align: center; }
.camera-navigation p small { color: var(--muted); }
.camera-nav-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 10px; border: 0; color: var(--ink); background: transparent; font-size: .76rem; font-weight: 800; }
.camera-nav-button b { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.camera-nav-button:disabled { opacity: .32; cursor: not-allowed; }
.retry-stream-button { justify-self: center; display: inline-flex; align-items: center; gap: 8px; }
.camera-swipe-stage { touch-action: pan-y; }
.connection-modal[hidden] { display: none; }
.connection-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(7,25,35,.52); backdrop-filter: blur(8px); }
.connection-modal-card { display: grid; justify-items: center; width: min(390px,100%); padding: 34px 24px 30px; border: 1px solid rgba(255,255,255,.18); border-radius: 30px; color: #effcf9; background: linear-gradient(160deg,#071923 0,#103c34 100%); box-shadow: 0 34px 90px rgba(7,25,35,.46); text-align: center; animation: modal-in .24s ease-out; }
.connection-visual { position: relative; display: grid; place-items: center; width: 96px; height: 96px; }
.connection-visual b { position: relative; z-index: 2; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 19px; color: #0c3d32; background: #b9f6df; font-size: 1.6rem; box-shadow: 0 12px 30px rgba(95,240,174,.24); }
.connection-pulse { position: absolute; inset: 12px; border: 1px solid rgba(141,226,212,.48); border-radius: 50%; animation: connection-pulse 1.8s ease-out infinite; }
.connection-pulse.pulse-two { animation-delay: .9s; }
.connection-kicker { margin: 9px 0 5px; color: #8de2d4; font-size: .66rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.connection-modal-card strong { margin-top: 0; font-size: clamp(1.25rem,5vw,1.6rem); letter-spacing: -.02em; }
.connection-modal-card [data-connection-camera] { max-width: 100%; margin-top: 7px; overflow: hidden; color: #c8f7ee; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.connection-modal-card small { margin-top: 16px; color: #a8d9d1; font-size: .78rem; }
.connection-spinner { position: absolute; inset: 2px; border: 2px solid rgba(255,255,255,.08); border-top-color: #8de2d4; border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes connection-pulse { 0% { opacity: .8; transform: scale(.65); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
body.connection-open, body.lightbox-open { overflow: hidden; }
.camera-thumb-button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; text-align: inherit; }
.camera-thumb-button:hover .camera-thumb, .camera-thumb-button:focus-visible .camera-thumb { opacity: 1; transform: scale(1.04); }
.camera-thumb { transition: opacity .2s ease, transform .35s ease; }
.lightbox { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 20px; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(7,25,35,.82); backdrop-filter: blur(10px); }
.lightbox-dialog { position: relative; z-index: 1; display: grid; place-items: center; width: min(1100px,100%); max-height: calc(100vh - 40px); }
.lightbox-image { display: block; width: auto; max-width: 100%; max-height: calc(100vh - 40px); border: 2px solid rgba(255,255,255,.72); border-radius: 18px; object-fit: contain; box-shadow: 0 26px 70px rgba(0,0,0,.42); }
.lightbox-close { position: absolute; z-index: 2; top: -14px; right: -14px; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid rgba(255,255,255,.84); border-radius: 50%; color: var(--ink); background: #fff; font-size: 1.7rem; line-height: 1; box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.toast { position: fixed; left: 50%; bottom: 20px; max-width: calc(100% - 24px); transform: translate(-50%,20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; transition: .2s; z-index: 5; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.offline-card > .button { width: 100%; min-height: 44px; margin-top: 14px; }

/* Yönetim paneli */
.admin-layout { display: grid; grid-template-columns: 224px minmax(0,1fr); gap: 22px; align-items: start; }
.admin-sidebar { position: sticky; top: 18px; display: flex; flex-direction: column; min-width: 0; min-height: 570px; padding: 20px 12px; border-radius: 26px; color: #effcf9; background: radial-gradient(circle at 30% 0,rgba(107,223,190,.18) 0,transparent 28%),linear-gradient(165deg,#101813 0,#183b32 100%); box-shadow: 0 22px 48px rgba(17,24,20,.18); }
.admin-sidebar-heading { padding: 4px 10px 22px; }
.admin-sidebar-heading .eyebrow { display: block; color: #8de2d4; margin-bottom: 4px; }
.admin-sidebar-heading strong { font-size: 1.1rem; }
.admin-nav { display: grid; min-width: 0; gap: 5px; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; color: #c8f7ee; background: transparent; text-align: left; font-weight: 700; transition: .15s; }
.admin-nav-item span { width: 22px; color: #8de2d4; font-size: 1.15rem; text-align: center; }
.admin-nav-item:hover, .admin-nav-item.active { color: #11251e; background: #d7fae9; }
.admin-nav-item:hover span, .admin-nav-item.active span { color: var(--accent); }
.admin-sidebar-foot { display: grid; gap: 6px; margin-top: auto; padding: 16px 10px 4px; border-top: 1px solid rgba(255,255,255,.16); }
.admin-sidebar-foot .status { color: #d6f8ef; }
.admin-sidebar-foot small { color: #a8d9d1; }
.admin-content { min-width: 0; }
.admin-page-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; min-height: 108px; margin-bottom: 18px; }
.admin-page-header h1 { margin-bottom: 5px; }
.admin-page-header .muted { max-width: 680px; margin-bottom: 0; }
.page-header-actions { display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.select-control { min-width: 150px; font-size: .75rem; color: var(--muted); }
.select-control span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.select-control input, .select-control select { margin-top: 5px; padding: 10px 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { position: relative; min-height: 124px; overflow: hidden; padding: 17px 18px; border: 1px solid rgba(17,24,20,.07); border-radius: 21px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-soft); }
.stat-card::after { content: ""; position: absolute; right: -24px; bottom: -30px; width: 92px; height: 92px; border-radius: 50%; background: #e7eef5; opacity: .7; }
.stat-card.teal::after { background: #b9eee2; }
.stat-card.blue::after { background: #c7d7ff; }
.stat-card.violet::after { background: #ddd0ff; }
.stat-card.amber::after { background: #ffe1b3; }
.stat-label { display: block; color: var(--muted); font-size: .73rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; position: relative; z-index: 1; margin: 10px 0 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(1.35rem,3vw,2rem); letter-spacing: -.045em; }
.stat-card small { position: relative; z-index: 1; color: var(--muted); font-size: .75rem; }
.dashboard-grid, .report-grid, .detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.dashboard-grid > .panel, .report-grid > .panel, .admin-two-column > * { min-width: 0; }
.dashboard-grid .span-2, .report-grid .span-2, .detail-grid .span-2 { grid-column: span 2; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-heading h2 { font-size: 1.13rem; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.text-button { border: 0; padding: 4px 0; color: var(--accent); background: transparent; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.bar-chart { display: flex; align-items: end; gap: clamp(3px,1vw,9px); height: 218px; padding: 18px 4px 0; }
.bar-group { display: flex; align-items: center; flex: 1 1 0; flex-direction: column; justify-content: end; min-width: 0; height: 100%; }
.bar-value { min-height: 18px; color: var(--muted); font-size: .64rem; font-weight: 750; }
.bar-track { display: flex; align-items: end; width: 100%; max-width: 30px; height: 155px; border-radius: 8px 8px 3px 3px; background: #edf2f7; }
.bar-track i { display: block; width: 100%; min-height: 5px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg,#1a9b8d,#0f766e); }
.bar-group span { width: 100%; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: .63rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.empty-chart { display: grid; place-items: center; height: 180px; color: var(--muted); }
.ranked-list { display: grid; gap: 4px; }
.ranked-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 0; border-bottom: 1px solid #edf2f7; }
.ranked-row:last-child { border-bottom: 0; }
.rank { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: .72rem; font-weight: 850; }
.ranked-main { min-width: 0; flex: 1; }
.ranked-main strong, .ranked-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked-main strong { font-size: .87rem; }
.ranked-main small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.ranked-row b { font-size: .9rem; }
.mini-table { display: grid; gap: 4px; }
.mini-row { display: grid; grid-template-columns: 130px 1fr minmax(120px,.8fr); align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf2f7; }
.mini-row:last-child { border-bottom: 0; }
.mini-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.mini-row .status { font-size: .74rem; }
.event-type { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.admin-two-column { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 16px; align-items: start; }
.compact-form { max-width: none; }
.user-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.user-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdff; }
.user-card-top { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px; color: white; background: linear-gradient(145deg,#0f766e,#102a43); font-weight: 850; }
.user-card-title { min-width: 0; flex: 1; }
.user-card-title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.user-card-title span { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .73rem; }
.user-card-meta { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid #edf2f7; border-bottom: 1px solid #edf2f7; color: var(--muted); font-size: .75rem; }
.user-card-meta b { color: var(--ink); }
.user-card-actions { display: flex; gap: 8px; }
.user-card-actions .button { flex: 1; }
.pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.pill-success { color: #087443; background: #dcfae6; }
.pill-danger { color: var(--danger); background: #fff0ee; }
.pill-muted { color: var(--muted); background: #edf2f7; }
.permission-details { border-top: 1px solid #edf2f7; padding-top: 10px; }
.permission-details summary { cursor: pointer; color: var(--accent); font-size: .78rem; font-weight: 800; }
.permission-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.permission-chip { display: inline-flex; align-items: center; width: auto; gap: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: .72rem; font-weight: 650; }
.permission-chip input { width: 15px; height: 15px; }
.table-search { max-width: 190px; padding: 9px 11px; }
.camera-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.camera-admin-card { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdff; }
.camera-admin-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.camera-card-head-actions { display: flex; align-items: center; gap: 8px; }
.camera-select { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.camera-select input { accent-color: var(--accent); }
.camera-admin-card-head .eyebrow { margin-bottom: 4px; }
.camera-detail-list { display: grid; gap: 9px; margin-bottom: 15px; }
.camera-detail-list > div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid #edf2f7; font-size: .78rem; }
.camera-detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.camera-detail-list span { color: var(--muted); }
.camera-detail-list strong, .camera-detail-list code { max-width: 65%; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.health-healthy { color: #087443; }
.health-suspect { color: var(--warning); }
.health-offline { color: var(--danger); }
.security-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 16px; margin-bottom: 16px; }
.security-policy-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.security-policy-form label { min-width: 0; }
.security-policy-form label small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.security-policy-form button { grid-column: 1 / -1; justify-self: start; }
.security-principles { display: grid; gap: 12px; }
.security-principles > div { display: grid; gap: 4px; padding: 13px 14px; border: 1px solid #e5edf2; border-radius: 14px; background: #fbfdff; }
.security-principles b { font-size: .86rem; }
.security-principles span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.security-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.security-filters select { min-height: 38px; padding: 8px 10px; }
.security-result { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.security-result.is-success { color: #087443; background: #dcfae6; }
.security-result.is-failure { color: #9d351f; background: #fff0ee; }
.security-result.is-blocked { color: #60479a; background: #eee8ff; }
.security-attempts-panel details summary { cursor: pointer; color: var(--accent); font-size: .73rem; font-weight: 750; }
.security-attempts-panel details small { display: block; max-width: 320px; margin-top: 7px; color: var(--muted); line-height: 1.4; word-break: break-word; }
.camera-diagnostic-result, .camera-health-history { margin: 11px 0 0; padding: 10px 11px; border-radius: 11px; font-size: .76rem; line-height: 1.4; }
.camera-diagnostic-result.is-loading { color: var(--muted); background: #f5f7fa; }
.camera-diagnostic-result.is-success { color: #087443; background: #ecfdf3; }
.camera-diagnostic-result.is-error { color: var(--danger); background: #fff0ee; }
.camera-health-history { display: grid; gap: 8px; background: #f8fbfc; }
.health-history-row { display: grid; gap: 3px; padding-bottom: 7px; border-bottom: 1px solid #e7eef5; }
.health-history-row:last-child { padding-bottom: 0; border-bottom: 0; }
.health-history-row strong { color: var(--danger); font-size: .72rem; text-transform: uppercase; }
.health-history-row span, .health-history-row small { color: var(--muted); font-size: .72rem; }
.bulk-camera-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.bulk-camera-toolbar > strong { align-self: center; margin-right: auto; font-size: .8rem; }
.bulk-camera-toolbar select { width: auto; min-width: 135px; padding: 9px 10px; }
.bulk-duration { min-width: 90px; }
.camera-groups-admin { margin-top: 18px; padding-top: 14px; border-top: 1px solid #edf2f7; }
.camera-groups-admin summary { cursor: pointer; color: var(--accent); font-size: .78rem; font-weight: 800; }
.camera-group-list { display: grid; gap: 8px; margin-top: 12px; }
.camera-group-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; align-items: center; }
.camera-group-row input { min-width: 0; padding: 8px 9px; }
.camera-edit-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf2f7; }
.camera-edit-details summary { cursor: pointer; color: var(--accent); font-size: .78rem; font-weight: 800; }
.camera-edit-form { margin-top: 12px; gap: 10px; }
.camera-edit-form input { padding: 10px 11px; }
.camera-edit-form button { width: 100%; }
.privacy-panel { background: linear-gradient(145deg,#f9fffd,#f1faf8); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.report-grid .report-panel { grid-column: span 1; }
.detail-charts { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.detail-charts > div { min-width: 0; padding: 10px; border: 1px solid #edf2f7; border-radius: 14px; }
.detail-charts .bar-chart { height: 175px; gap: 3px; padding-top: 10px; }
.detail-charts .bar-track { height: 115px; max-width: 17px; }
.detail-charts .bar-value { font-size: .55rem; }
.chart-caption { display: block; margin-bottom: 4px; color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.detail-grid .panel { min-width: 0; }

@media (min-width: 1001px) {
  body[data-view="camera"] { background: radial-gradient(circle at 80% 5%,rgba(188,239,220,.5) 0,transparent 27%),#efeee9; }
  body[data-view="camera"] .shell { width: min(1380px,calc(100% - 48px)); }
  .camera-screen { display: grid; max-width: none; grid-template-columns: minmax(0,1fr) 312px; grid-template-areas: "header header" "stage controls"; gap: 18px; align-items: stretch; }
  .camera-view-header { grid-area: header; margin: 4px 0 0; padding: 0 4px; }
  .camera-view-header > div { padding-left: 2px; }
  .camera-swipe-stage { grid-area: stage; min-width: 0; }
  .video-wrap { height: clamp(480px,calc(100vh - 205px),680px); min-height: 0; border-radius: 30px; background: #060a08; box-shadow: 0 26px 64px rgba(17,24,20,.2); }
  .video-wrap video { height: 100%; min-height: 0; aspect-ratio: auto; object-fit: contain; }
  .video-top-meta { top: 20px; left: 20px; min-height: 36px; padding: 7px 13px; }
  .camera-view-controls { grid-area: controls; display: flex; height: clamp(480px,calc(100vh - 205px),680px); min-height: 0; flex-direction: column; gap: 20px; margin: 0; padding: 26px; border: 1px solid rgba(17,24,20,.07); border-radius: 30px; background: rgba(255,255,255,.82); box-shadow: var(--shadow); }
  .camera-position { justify-content: flex-start; padding-bottom: 18px; border-bottom: 1px solid rgba(17,24,20,.08); }
  .camera-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .camera-navigation p { grid-column: 1 / -1; order: -1; padding: 14px 12px; border-radius: 17px; color: #344039; background: #f0f1ec; line-height: 1.45; }
  .camera-nav-button { min-height: 82px; justify-content: center; flex-direction: column; gap: 7px; padding: 10px; border: 1px solid rgba(17,24,20,.07); border-radius: 19px; background: #fff; box-shadow: 0 9px 24px rgba(17,24,20,.06); }
  .camera-nav-button b { width: 37px; height: 37px; border: 0; color: #dff9ec; background: #16251f; }
  .camera-nav-button:disabled { background: #f1f2ee; box-shadow: none; }
  .retry-stream-button { width: 100%; min-height: 50px; margin-top: auto; border-radius: 16px; }
}
@media (min-width: 601px) and (max-width: 1050px) {
  .camera-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-heading h1 { font-size: clamp(2.7rem,7vw,4rem); }
}
@media (max-width: 1000px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; min-height: 0; padding: 12px; }
  .admin-sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 3px 8px 10px; }
  .admin-nav { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 2px; }
  .admin-nav-item { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .admin-sidebar-foot { display: none; }
}
@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid, .report-grid, .detail-grid, .admin-two-column { grid-template-columns: 1fr; }
  .dashboard-grid .span-2, .report-grid .span-2, .detail-grid .span-2 { grid-column: span 1; }
  .user-grid, .camera-admin-grid { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
  .security-policy-form { grid-template-columns: 1fr; }
  .security-policy-form button { grid-column: auto; }
  .detail-charts { grid-template-columns: 1fr; }
  .detail-charts .bar-chart { height: 150px; }
}
@media (max-width:600px) {
  :root { --mobile-paper: #f3f2ed; --mobile-ink: #111814; --mobile-accent: #167565; }
  body { background: var(--mobile-paper); }
  .shell { width: 100%; padding: calc(12px + env(safe-area-inset-top)) 14px calc(108px + env(safe-area-inset-bottom)); }
  .app-topbar { position: sticky; z-index: 40; top: 0; align-items: center; gap: 10px; margin: calc(-12px - env(safe-area-inset-top)) -14px 23px; padding: calc(11px + env(safe-area-inset-top)) 14px 11px; border-bottom: 1px solid rgba(16,42,67,.07); background: rgba(243,242,237,.88); backdrop-filter: blur(18px) saturate(1.4); }
  .brand { min-width: 0; flex: 1; }
  .brand-mark { width: 40px; height: 40px; border-radius: 14px; color: #c9f8e4; background: #111814; box-shadow: 0 8px 22px rgba(17,24,20,.14); font-size: 1.1rem; }
  .brand-copy strong { font-size: .92rem; letter-spacing: -.01em; }
  .brand-copy .muted { margin-top: 2px; color: #7b857f; font-size: .64rem; }
  .topbar-actions { display: flex; align-items: center; gap: 7px; }
  .user-account { order: 3; }
  .user-name { display: none; }
  .user-avatar { width: 40px; height: 40px; border-radius: 14px; color: #dff9ec; background: linear-gradient(145deg,#176f61,#111814); }
  .topbar-icon-button { display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid rgba(17,24,20,.08); border-radius: 14px; color: #344039; background: rgba(255,255,255,.68); box-shadow: none; }
  .topbar-icon-button span { font-size: .98rem; }
  .topbar-icon-button b { display: none; }
  .topbar #adminBtn { display: none; }
  .desktop-primary-nav { display: none; }
  h1 { font-size: clamp(2.05rem, 10.5vw, 2.75rem); }
  .home-hero { display: grid; min-height: 0; gap: 18px; overflow: visible; margin-bottom: 27px; padding: 0; border-radius: 0; color: inherit; background: transparent; box-shadow: none; isolation: auto; }
  .home-hero::after { display: none; }
  .home-heading .eyebrow { margin-bottom: 10px; color: var(--mobile-accent); font-size: .65rem; }
  .home-heading h1 { max-width: 330px; margin-bottom: 10px; color: var(--mobile-ink); line-height: .98; letter-spacing: -.055em; }
  .home-heading .muted { max-width: 320px; color: #737d77; font-size: .84rem; line-height: 1.5; }
  .camera-summary { width: max-content; min-width: 0; padding: 10px 13px; border-color: rgba(22,117,101,.12); border-radius: 15px; background: rgba(255,255,255,.66); box-shadow: none; }
  .camera-summary strong { font-size: .9rem; }
  .camera-summary small { font-size: .64rem; }
  .camera-list-heading { align-items: center; margin-bottom: 12px; padding: 0 2px; }
  .camera-list-heading > div { gap: 3px; }
  .camera-list-heading span { color: var(--mobile-ink); font-size: 1rem; letter-spacing: -.02em; }
  .camera-list-heading small { font-size: .62rem; }
  .swipe-copy { display: none; }
  .camera-filter-bar { margin-bottom: 13px; padding: 0 0 5px; scrollbar-width: none; }
  .camera-filter-bar::-webkit-scrollbar { display: none; }
  .camera-filter-bar:not(.has-groups) { display: none; }
  .camera-filter:not([data-camera-filter^="group-"]) { display: none; }
  .camera-filter { min-height: 38px; padding: 8px 13px; border-color: rgba(17,24,20,.09); color: #69736d; background: rgba(255,255,255,.66); font-size: .74rem; }
  .camera-filter.active { color: #dff9ec; border-color: #16251f; background: #16251f; }
  .grid, .camera-grid { grid-template-columns: 1fr; gap: 19px; }
  .card, .panel { border-radius: 22px; padding: 17px; }
  .camera-card { padding: 0; border-radius: 28px; box-shadow: 0 18px 40px rgba(18,33,26,.16); }
  .camera-thumb-frame { aspect-ratio: 4/3; border-radius: inherit; }
  .camera-thumb { opacity: .98; }
  .camera-card-topline { top: 15px; right: 15px; left: 15px; }
  .camera-state { min-height: 31px; padding: 6px 10px; font-size: .62rem; }
  .camera-favorite { width: 42px; height: 42px; border-radius: 15px; font-size: 1.26rem; }
  .camera-card-overlay { right: 16px; bottom: 16px; left: 16px; }
  .camera-group { margin-bottom: 4px; font-size: .62rem; }
  .camera-card-overlay h2 { margin-bottom: 12px; font-size: 1.45rem; line-height: 1.05; }
  .camera-watch-button { min-height: 49px; padding: 9px 10px 9px 15px; border-radius: 16px; font-size: .86rem; }
  .camera-watch-button b { width: 32px; height: 32px; border-radius: 11px; }
  .camera-expand-hint { right: 18px; bottom: 78px; font-size: .59rem; }
  .camera-card .camera-error { margin-bottom: 10px; font-size: .68rem; }
  .empty { padding: 44px 20px; border: 1px dashed rgba(17,24,20,.13); background: rgba(255,255,255,.52); box-shadow: none; }
  .mobile-tabbar { position: fixed; z-index: 60; right: 10px; bottom: calc(9px + env(safe-area-inset-bottom)); left: 10px; display: flex; align-items: center; justify-content: space-around; min-height: 70px; padding: 7px; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: rgba(252,252,249,.9); box-shadow: 0 16px 42px rgba(17,24,20,.2); backdrop-filter: blur(22px) saturate(1.5); }
  .mobile-tab { display: grid; place-items: center; flex: 1; min-width: 0; min-height: 55px; gap: 3px; padding: 6px 5px; border: 0; border-radius: 18px; color: #7c8780; background: transparent; }
  .mobile-tab span { font-size: 1.05rem; line-height: 1; }
  .mobile-tab b { font-size: .59rem; font-weight: 800; white-space: nowrap; }
  .mobile-tab.active { color: #d7fae9; background: #121a16; box-shadow: 0 8px 18px rgba(17,24,20,.18); }

  body[data-view="camera"] { color: #f4fff9; background: #060a08; }
  body[data-view="camera"] .shell { min-height: 100dvh; padding: 0; }
  body[data-view="camera"] .app-topbar { display: none; }
  body[data-view="camera"] .shell > section { min-height: 100dvh; }
  .camera-screen { display: flex; min-height: 100dvh; flex-direction: column; }
  .camera-view-header { min-height: calc(67px + env(safe-area-inset-top)); margin: 0; padding: calc(10px + env(safe-area-inset-top)) 13px 10px; color: #f4fff9; background: #060a08; }
  .camera-view-header span { color: #77d9bd; font-size: .58rem; }
  .camera-view-header h1 { margin-top: 3px; color: #fff; font-size: 1.15rem; letter-spacing: -.025em; }
  .round-action { width: 43px; height: 43px; border-color: rgba(255,255,255,.1); border-radius: 15px; color: #f4fff9; background: #121a16; box-shadow: none; }
  .camera-swipe-stage { background: #060a08; }
  .video-wrap { margin: 0; border-radius: 0; box-shadow: none; }
  video { min-height: 42vh; max-height: 55vh; aspect-ratio: auto; object-fit: contain; }
  .video-top-meta { top: 13px; left: 13px; min-height: 30px; font-size: .65rem; }
  .camera-view-controls { flex: 1; align-content: start; gap: 18px; margin: 0; padding: 22px 15px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; color: var(--mobile-ink); background: var(--mobile-paper); }
  .camera-position { color: #78827c; }
  .camera-dots i { background: #c3cac6; }
  .camera-dots i.active { background: var(--mobile-accent); }
  .camera-navigation { gap: 6px; color: var(--mobile-ink); }
  .camera-navigation p { flex: 1; color: #424c46; font-size: .72rem; line-height: 1.35; }
  .camera-navigation p small { color: #818b85; font-size: .6rem; }
  .camera-nav-button { min-width: 76px; justify-content: center; padding: 4px; color: var(--mobile-ink); }
  .camera-nav-button span { display: none; }
  .camera-nav-button b { width: 48px; height: 48px; border-color: rgba(17,24,20,.08); border-radius: 17px; background: #fff; box-shadow: 0 8px 20px rgba(17,24,20,.08); font-size: 1.15rem; }
  .retry-stream-button { width: 100%; min-height: 52px; border-radius: 17px; color: #dff9ec; background: #121a16; }

  body[data-view="login"], body[data-view="offline"] { color: #effcf9; background: radial-gradient(circle at 85% 0,#174f43 0,transparent 38%),#07130f; }
  body[data-view="login"] .shell, body[data-view="offline"] .shell { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .login { margin: 5vh auto 0; padding: 22px; border-color: rgba(255,255,255,.1); color: #effcf9; background: rgba(13,33,27,.82); box-shadow: 0 24px 60px rgba(0,0,0,.28); backdrop-filter: blur(14px); }
  .login .muted { color: #9fc5b9; }
  .login .brand-mark { color: #123b31; background: #b9f6df; }
  .login input { min-height: 49px; border-color: rgba(255,255,255,.1); color: #effcf9; background: rgba(255,255,255,.08); }
  .login .button { min-height: 50px; color: #123b31; background: #b9f6df; }

  body[data-view="admin"] .shell { padding-bottom: calc(35px + env(safe-area-inset-bottom)); }
  .admin-layout { gap: 17px; }
  .admin-sidebar { position: sticky; z-index: 35; top: 72px; margin: 0; padding: 8px; border-radius: 18px; background: #121a16; box-shadow: 0 14px 34px rgba(17,24,20,.15); }
  .admin-sidebar-heading { display: none; }
  .admin-nav { padding-bottom: 0; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav-item { min-height: 43px; padding: 9px 11px; border-radius: 13px; color: #b7c9bf; font-size: .72rem; }
  .admin-nav-item span { width: 17px; color: #77d9bd; font-size: .9rem; }
  .admin-nav-item:hover, .admin-nav-item.active { color: #11251e; background: #d7fae9; }
  .admin-page-header { display: block; min-height: 0; margin-bottom: 16px; padding: 5px 2px 0; }
  .admin-page-header h1 { margin-bottom: 5px; font-size: 2rem; }
  .admin-page-header .muted { font-size: .78rem; line-height: 1.5; }
  .page-header-actions { justify-content: flex-start; margin-top: 13px; }
  .page-header-actions .button, .page-header-actions .select-control { width: 100%; }
  .select-control input, .select-control select { width: 100%; }
  .panel { border-color: rgba(17,24,20,.08); background: rgba(255,255,255,.76); box-shadow: 0 10px 30px rgba(17,24,20,.06); }
  input, select { min-height: 47px; border-color: rgba(17,24,20,.11); border-radius: 14px; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 112px; padding: 14px; border-color: rgba(17,24,20,.08); border-radius: 19px; background: rgba(255,255,255,.72); }
  .stat-card strong { font-size: 1.35rem; }
  .bar-chart { height: 180px; gap: 3px; }
  .bar-track { height: 125px; max-width: 19px; }
  .bar-group span { font-size: .55rem; }
  .mini-row { grid-template-columns: 1fr; gap: 5px; }
  .mini-row .status { order: 0; }
  .mini-row strong { order: 1; }
  .mini-row small { order: 2; }
  .table-wrap .admin-table { min-width: 620px; }
  .admin-table .button { min-height:42px; }
  .activity-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .security-filters { width: 100%; }
  .security-filters input, .security-filters select { flex: 1 1 100%; max-width: none; width: 100%; }
  .user-card-actions { flex-direction: column; }
  .bulk-camera-toolbar { align-items: stretch; }
  .bulk-camera-toolbar > strong { flex: 1 1 100%; }
  .bulk-camera-toolbar select, .bulk-duration { flex: 1 1 calc(50% - 4px); width: auto; }
  .bulk-camera-toolbar > .button { flex: 1 1 calc(50% - 4px); min-height: 44px; }
  .camera-group-row { grid-template-columns: 1fr 1fr; }
  .camera-group-row .button { min-height: 42px; }
  .quick-actions { display: grid; grid-template-columns: 1fr; }
  .quick-actions .button { width: 100%; min-height: 44px; }
  .toast { width: calc(100% - 24px); text-align: center; bottom: calc(91px + env(safe-area-inset-bottom)); }
  body[data-view="camera"] .toast, body[data-view="admin"] .toast, body[data-view="login"] .toast { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .connection-modal { padding: 16px; background: rgba(3,10,7,.7); backdrop-filter: blur(14px); }
  .connection-modal-card { width: min(344px,100%); padding: 31px 20px 28px; border-radius: 30px; }
  .lightbox { padding: 12px; }
  .lightbox-image { max-height: calc(100vh - 24px); border-radius: 14px; }
  .lightbox-close { top: 8px; right: 8px; }
}
@media (max-width: 360px) {
  .camera-thumb-frame { aspect-ratio: 1/1; }
  .camera-card-overlay h2 { font-size: 1.3rem; }
  .mobile-tab b { font-size: .55rem; }
  .camera-navigation p { display: none; }
  .camera-nav-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
