:root {
  --ink: #13201c;
  --muted: #6e7a75;
  --soft: #f2f5f3;
  --paper: #f7f9f7;
  --white: #fff;
  --line: #e1e8e4;
  --dark: #0b211b;
  --dark-2: #12342a;
  --green: #166549;
  --mint: #8ce4bd;
  --blue: #5e91e6;
  --amber: #d98935;
  --danger: #c44c4c;
  --shadow: 0 18px 50px rgba(20, 46, 36, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(440px, .8fr); background: var(--dark); }
.auth-brand { min-height: 100vh; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(34px, 5vw, 70px); color: #d9e8e2; background:
  radial-gradient(circle at 72% 34%, rgba(85, 193, 146, .2), transparent 34%),
  radial-gradient(circle at 5% 90%, rgba(72, 117, 160, .15), transparent 30%),
  linear-gradient(145deg, #081a15, #0e2b22 62%, #0c211b);
}
.auth-brand::before { content: ""; position: absolute; width: 620px; height: 620px; right: -280px; top: 50%; transform: translateY(-50%) rotate(45deg); border: 1px solid rgba(143, 227, 190, .14); border-radius: 80px; box-shadow: 0 0 0 90px rgba(128, 228, 185, .025), 0 0 0 180px rgba(128, 228, 185, .018); }
.auth-brand::after { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(to right, #000, transparent 82%); }
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-lockup > span:last-child { display: flex; flex-direction: column; letter-spacing: .2em; }
.brand-lockup b { font-size: 15px; line-height: 1; }
.brand-lockup small { margin-top: 5px; color: #82a99a; font-size: 7px; font-weight: 700; letter-spacing: .32em; }
.brand-lockup--large b { font-size: 18px; }
.brand-lockup--large small { font-size: 8px; }
.brand-symbol { width: 36px; height: 36px; position: relative; display: block; border: 1px solid rgba(140, 228, 189, .75); border-radius: 10px; transform: rotate(45deg); }
.brand-symbol::before, .brand-symbol::after, .brand-symbol i { content: ""; position: absolute; width: 5px; border-radius: 2px; background: var(--mint); }
.brand-symbol::before { height: 19px; top: 8px; left: 8px; }
.brand-symbol::after { height: 13px; right: 8px; bottom: 8px; }
.brand-symbol i { height: 8px; left: 15px; top: 8px; }
.auth-copy { position: relative; z-index: 1; max-width: 680px; margin: auto 0; padding: 90px 0; }
.kicker { margin: 0 0 11px; color: #708078; font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .18em; }
.auth-copy .kicker { color: #7ecba9; }
.auth-copy h1 { max-width: 650px; margin: 0 0 28px; color: #f4fbf8; font-size: clamp(46px, 6vw, 80px); line-height: .98; letter-spacing: -.055em; font-weight: 650; }
.auth-copy > p:last-child { max-width: 540px; margin: 0; color: #91aaa0; font-size: 16px; line-height: 1.75; }
.trust-row { position: relative; z-index: 1; display: flex; gap: 24px; color: #78978b; font-size: 11px; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row i { width: 6px; height: 6px; border-radius: 50%; background: #63d9a5; box-shadow: 0 0 0 4px rgba(99, 217, 165, .1); }
.auth-card { display: grid; place-items: center; padding: 48px; background: #f8faf8; }
.auth-card__content { width: min(430px, 100%); }
.auth-card h2 { margin: 0 0 12px; font-size: 31px; letter-spacing: -.035em; }
.auth-card .muted { margin: 0 0 34px; font-size: 13px; line-height: 1.7; }
.auth-card form { display: flex; flex-direction: column; }
.auth-card label, .form-grid label { color: #53625b; font-size: 11px; font-weight: 700; }
.ticket-field { height: 50px; display: flex; align-items: center; margin: 9px 0 14px; padding: 0 6px 0 15px; border: 1px solid #dbe4df; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.ticket-field:focus-within { border-color: #5ab48e; box-shadow: 0 0 0 4px rgba(70, 166, 125, .1); }
.ticket-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #718079; cursor: pointer; font-size: 18px; }
.icon-button:hover { background: #eff4f1; color: var(--ink); }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 750; transition: transform .15s ease, background .15s ease, opacity .15s ease; }
.button:not(:disabled):active { transform: translateY(1px); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button--primary { color: #f4fff9; background: var(--green); box-shadow: 0 5px 14px rgba(21, 95, 68, .16); }
.button--primary:hover:not(:disabled) { background: #10583f; }
.button--secondary { border-color: #dce5e0; background: #fff; color: #3c5047; }
.button--secondary:hover:not(:disabled), .button--quiet:hover:not(:disabled) { background: #edf3f0; }
.button--quiet { border-color: transparent; background: transparent; color: #63726b; }
.button--wide { width: 100%; min-height: 49px; justify-content: space-between; padding: 0 17px; }
.button--light { min-height: 44px; padding: 0 19px; background: #d7f5e7; color: #164936; }
.form-message { min-height: 19px; margin: 9px 0 0; color: var(--danger); font-size: 11px; line-height: 1.5; }
.auth-help { display: flex; gap: 13px; margin-top: 28px; padding: 17px; border: 1px solid #e1e9e4; border-radius: 11px; background: #f3f6f4; }
.auth-help > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: #277556; background: #dcefe6; }
.auth-help p { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #78847f; font-size: 10px; line-height: 1.5; }
.auth-help b { color: #3c4f46; font-size: 11px; }

.app-shell { min-height: 100vh; display: flex; background: var(--paper); }
.sidebar { width: 236px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 26px 17px 18px; color: #a8bdb5; background: var(--dark); border-right: 1px solid rgba(255,255,255,.05); }
.sidebar .brand-lockup { padding: 0 9px 29px; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar nav > p { margin: 8px 12px 3px; color: #58766a; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.sidebar nav > p:not(:first-child) { margin-top: 21px; }
.nav-item { height: 41px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border: 0; border-radius: 9px; color: #91a89f; background: transparent; cursor: pointer; text-align: left; font-size: 12px; }
.nav-item > span { width: 18px; color: #769188; text-align: center; font-size: 15px; }
.nav-item em { margin-left: auto; color: #66847a; font-style: normal; font-size: 9px; }
.nav-item:hover { color: #eaf5f1; background: rgba(255,255,255,.045); }
.nav-item.is-active { color: #c2f3dd; background: rgba(107, 218, 169, .11); box-shadow: inset 2px 0 #70dbae; }
.nav-item.is-active > span { color: #8ce4bd; }
.edge-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid rgba(255,255,255,.06); border-radius: 11px; background: rgba(255,255,255,.035); }
.edge-card .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5bdaa1; box-shadow: 0 0 0 4px rgba(91, 218, 161, .09); }
.edge-card > div { display: flex; flex-direction: column; gap: 3px; }
.edge-card b { color: #c6d9d2; font-size: 9px; }
.edge-card small { color: #66857a; font-size: 8px; }
.workspace { width: calc(100% - 236px); min-width: 0; margin-left: 236px; }
.topbar { height: 68px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 22px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(15px); }
.search-field { width: min(430px, 42vw); height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #e0e7e3; border-radius: 9px; background: #f5f7f5; }
.search-field > span { color: #74817b; font-size: 18px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.system-state { display: flex; align-items: center; gap: 7px; color: #66736d; font-size: 9px; }
.system-state i { width: 6px; height: 6px; border-radius: 50%; background: #2cab71; box-shadow: 0 0 0 3px #e0f3e9; }
.identity { display: flex; align-items: center; gap: 9px; padding-left: 13px; border-left: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #dcefe6; color: #15543d; font-size: 9px; font-weight: 800; }
.identity > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.identity b { color: #34453e; font-size: 9px; }
.identity small { color: #8b9691; font-size: 8px; }
.content { max-width: 1560px; margin: 0 auto; padding: 34px 32px 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 27px; }
.page-heading h1 { margin: 0 0 7px; font-size: 29px; letter-spacing: -.035em; font-weight: 690; }
.page-heading > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.last-update { margin-right: 6px; color: #8a9690; font-size: 9px; }
.last-update time { color: #51635a; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 14px; }
.metric-card { min-height: 105px; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(27,53,43,.035); }
.metric-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; font-size: 13px; }
.metric-icon--mint { color: #178458; background: #e1f4eb; }
.metric-icon--blue { color: #3f71c6; background: #e4edfb; }
.metric-icon--violet { color: #7759b6; background: #eee8f8; }
.metric-icon--amber { color: #a96824; background: #f8eddc; }
.metric-card div { display: flex; flex-direction: column; gap: 6px; }
.metric-card small { color: #89948f; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.metric-card strong { font-size: 25px; letter-spacing: -.04em; }
.metric-note { grid-column: 2; margin-top: -14px; color: #7f8c86; font-size: 8px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); gap: 14px; margin-bottom: 14px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 6px 22px rgba(29,55,45,.035); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 21px 16px; }
.panel-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.panel-actions { display: flex; gap: 8px; }
.kicker--live { color: #2e9670; }
.kicker--live i { width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #2dad76; }
.text-button { border: 0; background: transparent; color: #487765; cursor: pointer; font-size: 9px; font-weight: 700; }
.camera-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 20px 20px; }
.camera-card { min-height: 170px; position: relative; overflow: hidden; padding: 0; border: 0; border-radius: 10px; color: white; background:
  linear-gradient(to top, rgba(5,16,13,.88), transparent 60%),
  radial-gradient(circle at 64% 24%, #5b746b, transparent 24%),
  linear-gradient(135deg, #22362f, #4b5c56 55%, #182b25); cursor: pointer; text-align: left; }
.camera-card::before { content: ""; position: absolute; inset: 0; opacity: .2; background: repeating-linear-gradient(90deg, transparent 0 52px, rgba(255,255,255,.15) 53px 54px), repeating-linear-gradient(0deg, transparent 0 45px, rgba(255,255,255,.1) 46px 47px); }
.camera-card__top, .camera-card__bottom { position: absolute; left: 12px; right: 12px; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.camera-card__top { top: 11px; }
.camera-card__bottom { bottom: 11px; align-items: flex-end; }
.camera-card__bottom > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.camera-card b { font-size: 11px; }
.camera-card small { color: #c0cec9; font-size: 8px; }
.live-badge, .codec-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; color: #eef8f4; background: rgba(8,24,19,.54); backdrop-filter: blur(8px); font-size: 7px; font-weight: 800; letter-spacing: .07em; }
.live-badge i { width: 5px; height: 5px; border-radius: 50%; background: #55d9a0; }
.camera-card__status { color: #d8e5e0; font-size: 8px; }
.activity-list { padding: 0 20px 20px; }
.activity-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1ef; }
.activity-item:last-child { border-bottom: 0; }
.activity-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #327659; background: #e3f1ea; font-size: 12px; }
.activity-item > div { display: flex; flex-direction: column; gap: 3px; }
.activity-item b { font-size: 9px; }
.activity-item small, .activity-item time { color: #8a9690; font-size: 8px; }
.archive-banner { min-height: 190px; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 31px 35px; color: #dbeae4; background:
  radial-gradient(circle at 76% 20%, rgba(110,217,170,.2), transparent 28%),
  linear-gradient(135deg, #102c23, #0c211b); }
.archive-banner h2 { margin: 0 0 11px; color: white; font-size: 26px; line-height: 1.08; letter-spacing: -.04em; }
.archive-banner > div > p:last-child { max-width: 620px; margin: 0; color: #88a499; font-size: 10px; line-height: 1.65; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; }
.player-stage { aspect-ratio: 16/9; position: relative; overflow: hidden; border-radius: 12px 12px 0 0; background:
  radial-gradient(circle at 60% 38%, #364d45, transparent 25%),
  linear-gradient(135deg, #142b23, #07120f); }
.player-stage video { width: 100%; height: 100%; display: none; object-fit: contain; background: #050a08; }
.player-stage.has-video video { display: block; }
.player-stage.has-video .player-placeholder { display: none; }
.player-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; color: #9db1aa; }
.player-placeholder > span { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid rgba(140,228,189,.25); border-radius: 18px; color: #8ce4bd; background: rgba(140,228,189,.06); font-size: 22px; }
.player-placeholder h2 { margin: 0 0 8px; color: #e7f2ee; font-size: 19px; }
.player-placeholder p { max-width: 430px; margin: 0; font-size: 10px; line-height: 1.6; }
.player-badges { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; pointer-events: none; }
.player-footer { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 18px; }
.player-footer > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.player-footer b { font-size: 12px; }
.player-footer small { color: #7e8a84; font-size: 9px; }
.player-actions { display: flex; gap: 8px; }
.camera-list { display: flex; flex-direction: column; gap: 5px; padding: 0 14px 16px; }
.camera-list__item { display: grid; grid-template-columns: 46px 1fr 8px; gap: 10px; align-items: center; min-height: 58px; padding: 7px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; }
.camera-list__item:hover { background: #f5f8f6; }
.camera-list__item.is-selected { border-color: #cfe6dc; background: #edf6f2; }
.camera-thumb { width: 46px; height: 42px; border-radius: 7px; background: linear-gradient(135deg, #243b33, #60746d); }
.camera-list__item > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.camera-list__item b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.camera-list__item small { color: #84908b; font-size: 8px; }
.camera-list__item > i { width: 6px; height: 6px; border-radius: 50%; background: #aab5b0; }
.camera-list__item > i.is-online { background: #30ad74; }
.coming-panel { min-height: 420px; display: grid; place-content: center; justify-items: center; padding: 60px; text-align: center; }
.coming-icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 18px; color: #266d51; background: #e0f1e9; font-size: 25px; }
.coming-panel h2 { margin: 0 0 11px; font-size: 25px; letter-spacing: -.035em; }
.coming-panel > p:last-child { max-width: 590px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 20px; color: #84908a; background: #f7f9f8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; font-size: 8px; letter-spacing: .1em; }
td { padding: 15px 20px; border-bottom: 1px solid #edf1ef; color: #53635b; font-size: 9px; }
td b { display: block; margin-bottom: 4px; color: #293a32; font-size: 10px; }
td small { color: #8a9690; font-size: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; color: #287050; background: #e4f3eb; font-size: 8px; font-weight: 700; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #36a974; }
.status-pill--muted { color: #75674f; background: #f4eee2; }
.status-pill--muted::before { background: #c18b45; }
.empty-state { min-height: 235px; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.empty-state > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #2b7758; background: #e2f2ea; font-size: 18px; }
.empty-state h3 { margin: 13px 0 5px; font-size: 14px; }
.empty-state p { margin: 0 0 14px; color: var(--muted); font-size: 9px; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.asset-card { min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; }
.asset-card header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.asset-card header > div { display: flex; flex-direction: column; gap: 5px; }
.asset-card h3 { margin: 0; font-size: 12px; }
.asset-card small { color: #87938d; font-size: 8px; }
.asset-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 0; }
.asset-card dt { color: #8a9690; font-size: 7px; letter-spacing: .08em; }
.asset-card dd { margin: 4px 0 0; color: #3d4e46; font-size: 9px; }
.audit-timeline { padding: 0 22px 22px; }
.audit-row { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; gap: 13px; padding: 15px 0; border-bottom: 1px solid #edf1ef; }
.audit-row > i { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: #55bd8c; box-shadow: 0 0 0 4px #e6f4ed; }
.audit-row > div { display: flex; flex-direction: column; gap: 4px; }
.audit-row b { font-size: 10px; }
.audit-row small, .audit-row time { color: #87928d; font-size: 8px; }

dialog { width: min(650px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 100px rgba(7,31,22,.25); }
dialog::backdrop { background: rgba(6,23,17,.58); backdrop-filter: blur(4px); }
dialog form > header { display: flex; justify-content: space-between; align-items: center; padding: 21px 23px 17px; border-bottom: 1px solid var(--line); }
dialog h2 { margin: 0; font-size: 19px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 21px 23px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select { width: 100%; height: 40px; padding: 0 11px; outline: 0; border: 1px solid #dce5e0; border-radius: 8px; background: #fff; color: var(--ink); font-size: 10px; }
.form-grid input:focus, .form-grid select:focus { border-color: #5aae89; box-shadow: 0 0 0 3px rgba(67,165,123,.1); }
.form-grid .check-field { min-height: 40px; flex-direction: row; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #dce5e0; border-radius: 8px; }
.check-field input { width: 15px; height: 15px; padding: 0; accent-color: var(--green); }
.security-note { display: flex; gap: 12px; margin: 0 23px 13px; padding: 13px 15px; border: 1px solid #dce9e3; border-radius: 9px; background: #f2f7f4; }
.security-note > span { color: #287657; }
.security-note p { display: flex; flex-direction: column; gap: 3px; margin: 0; color: #7b8982; font-size: 9px; line-height: 1.5; }
.security-note b { color: #3a5046; font-size: 10px; }
dialog .form-message { padding: 0 23px; }
dialog form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 23px 21px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 380px; transform: translateY(24px); opacity: 0; pointer-events: none; padding: 13px 17px; border-radius: 10px; color: #edf8f3; background: #102d23; box-shadow: var(--shadow); font-size: 10px; transition: .2s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { background: #722f2f; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .activity-panel { display: none; }
  .live-layout { grid-template-columns: 1fr; }
  .camera-list-panel { max-height: 330px; overflow: auto; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-card { min-height: 100vh; padding: 28px; }
  .sidebar { width: 78px; padding-inline: 12px; }
  .sidebar .brand-lockup > span:last-child, .sidebar nav > p, .nav-item:not(.is-active)::after, .nav-item { font-size: 0; }
  .sidebar .brand-lockup { justify-content: center; padding-inline: 0; }
  .sidebar .brand-symbol { width: 32px; height: 32px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item > span { font-size: 16px; }
  .nav-item em, .edge-card > div { display: none; }
  .edge-card { justify-content: center; }
  .workspace { width: calc(100% - 78px); margin-left: 78px; }
  .topbar { padding: 0 18px; }
  .system-state, .identity > span:last-child { display: none; }
  .content { padding: 25px 18px 45px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .last-update { margin-right: auto; }
  .camera-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .search-field { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .archive-banner { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .player-footer { align-items: flex-start; flex-direction: column; }
  .player-actions { width: 100%; }
  .player-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
