:root {
  --ink: #17201e;
  --muted: #68716e;
  --line: #dfe3df;
  --soft-line: #eaede9;
  --paper: #f5f6f2;
  --card: #ffffff;
  --green-950: #0b201c;
  --green-900: #102b25;
  --green-800: #173a32;
  --green-700: #205346;
  --green-500: #2d7863;
  --lime: #c6f36b;
  --online: #2f9c6a;
  --offline: #d95a4d;
  --warning: #d59a32;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(10, 35, 29, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }
svg { display: block; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 84px 24px 70px;
  color: #f5f7f4;
  background:
    radial-gradient(circle at 78% 20%, rgba(198, 243, 107, .1), transparent 25%),
    linear-gradient(135deg, #071a17 0%, #102d27 58%, #0b211d 100%);
  position: relative;
  overflow: hidden;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
  pointer-events: none;
}
.login-shell::before { left: -190px; bottom: -170px; }
.login-shell::after { right: -250px; top: -160px; width: 560px; height: 560px; }
.login-brand { position: absolute; top: 32px; left: 40px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 800; letter-spacing: .14em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--lime); color: var(--green-950); }
.brand-mark svg { width: 23px; fill: currentColor; }
.brand-mark--large { width: 42px; height: 42px; }

.login-card {
  width: min(100%, 430px);
  position: relative;
  z-index: 1;
  padding: 40px;
  color: var(--ink);
  background: rgba(255, 255, 255, .98);
  border-radius: 20px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .3);
}
.eyebrow { margin: 0 0 8px; color: var(--green-500); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.login-card h1 { margin: 0; font: 700 37px/1.07 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.login-copy { color: var(--muted); line-height: 1.55; margin: 16px 0 28px; }
.login-card form { display: grid; gap: 16px; }
label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 750; color: #46504d; }
input, select, textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7dcd8;
  border-radius: 9px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input, select { height: 43px; padding: 0 13px; }
textarea { min-height: 120px; padding: 12px 13px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(45, 120, 99, .12); }
.form-error { min-height: 18px; margin: -4px 0 -4px; color: #b64439; font-size: 12px; }
.secure-note { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--soft-line); color: var(--muted); font-size: 11px; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 4px rgba(47, 156, 106, .12); }
.login-footer { position: absolute; bottom: 24px; margin: 0; color: rgba(255, 255, 255, .48); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .15s, background .15s, border-color .15s, opacity .15s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button--primary { color: #f7fff1; background: var(--green-700); }
.button--primary:hover { background: var(--green-800); }
.button--wide { width: 100%; min-height: 47px; }
.button--ghost { color: #47514e; background: #fff; border-color: var(--line); }
.button--ghost:hover { border-color: #bbc4bf; }
.button--danger { color: #a43831; background: #fff7f5; border-color: #ecc8c3; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 25px 17px 18px;
  color: #e8efec;
  background: var(--green-950);
}
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 34px; font-size: 15px; letter-spacing: .08em; }
.brand strong { font-weight: 850; }
.brand span { color: var(--lime); font-weight: 600; }
.nav { display: grid; gap: 5px; }
.nav-item {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #aebeb9;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-item.active { color: #f6fff1; background: rgba(198, 243, 107, .1); box-shadow: inset 3px 0 var(--lime); }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { margin-top: auto; }
.system-state { display: flex; align-items: flex-start; gap: 11px; margin: 0 8px 15px; padding: 14px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.system-state strong, .system-state small { display: block; }
.system-state strong { color: #dfe9e5; font-size: 11px; }
.system-state small { color: #778b84; margin-top: 3px; font-size: 10px; }
.pulse { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(198, 243, 107, .09); }
.nav-item--muted { color: #7e918b; }

.main { min-width: 0; }
.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 34px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.topbar h1 { margin: 0; font: 700 28px/1 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.topbar .eyebrow { margin-bottom: 7px; font-size: 9px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.date-label { color: var(--muted); font-size: 12px; margin-right: 8px; }
.user-chip { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--green-900); background: #e6eee8; font-size: 13px; font-weight: 800; }

.content { padding: 27px 34px 50px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card {
  min-height: 121px;
  padding: 20px 21px;
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.stat-card::after { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: #adb9b4; }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin: 6px 0 4px; font: 700 30px/1 Georgia, serif; }
.stat-card small { display: flex; align-items: center; gap: 5px; }
.stat-card small i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stat-card--online::after { background: var(--online); }
.stat-card--online small { color: var(--online); }
.stat-card--offline::after { background: var(--offline); }
.stat-card--offline small { color: var(--offline); }
.stat-card--ptz::after { background: var(--warning); }

.toolbar { display: flex; align-items: center; gap: 9px; margin-top: 21px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.search-field { min-width: 280px; flex: 1; position: relative; }
.search-field svg { width: 18px; position: absolute; left: 12px; top: 12px; fill: none; stroke: #88938f; stroke-width: 1.8; }
.search-field input { padding-left: 39px; padding-right: 50px; background: #f8f9f7; border-color: transparent; }
.search-field kbd { position: absolute; right: 11px; top: 11px; padding: 3px 6px; color: #8a9490; background: #fff; border: 1px solid #dce1dd; border-radius: 4px; font: 10px ui-monospace, monospace; }
.toolbar select { width: auto; min-width: 150px; background: #fff; font-size: 12px; font-weight: 600; }
.toggle-filter { height: 43px; display: flex; align-items: center; gap: 7px; padding: 0 10px; position: relative; color: #5b6562; font-size: 12px; font-weight: 700; cursor: pointer; }
.toggle-filter input { width: 1px; height: 1px; position: absolute; opacity: 0; pointer-events: none; }
.toggle-filter span { width: 31px; height: 18px; margin: 0; position: relative; border-radius: 20px; background: #d7dcd8; transition: background .2s; }
.toggle-filter span::after { content: ""; position: absolute; width: 12px; height: 12px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle-filter input:checked + span { background: var(--green-500); }
.toggle-filter input:checked + span::after { transform: translateX(13px); }
.layout-switch { display: flex; padding-left: 7px; border-left: 1px solid var(--line); }
.layout-switch button { width: 36px; height: 38px; display: grid; place-items: center; color: #9ba49f; background: transparent; border: 0; border-radius: 6px; }
.layout-switch button.active { color: var(--green-700); background: #edf3ef; }
.layout-switch svg { width: 17px; fill: currentColor; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 27px 0 13px; }
.section-heading > div { display: flex; align-items: baseline; gap: 10px; }
.section-heading h2 { margin: 0; font: 700 21px Georgia, serif; }
.section-heading span { color: var(--muted); font-size: 11px; }
.section-heading .button { min-height: 34px; font-size: 11px; }

.camera-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.camera-grid.layout-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.camera-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 11px; transition: box-shadow .2s, transform .2s; }
.camera-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.camera-view { aspect-ratio: 16/9; position: relative; overflow: hidden; display: grid; place-items: center; background: #13211e; }
.camera-view::before { content: ""; position: absolute; inset: 0; opacity: .24; 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: 32px 32px; }
.camera-view video, .camera-view .snapshot { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; background: #101816; }
.camera-placeholder { display: grid; justify-items: center; gap: 9px; z-index: 1; color: #72827d; }
.camera-placeholder svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.camera-placeholder span { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.view-status { position: absolute; z-index: 3; top: 10px; left: 10px; height: 23px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: #e8efec; background: rgba(6, 14, 12, .7); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; font-size: 9px; font-weight: 800; text-transform: uppercase; backdrop-filter: blur(5px); }
.view-status i { width: 6px; height: 6px; border-radius: 50%; background: #85918d; }
.view-status.online i { background: #62df96; box-shadow: 0 0 0 3px rgba(98,223,150,.13); }
.view-status.offline i { background: #f0786c; }
.view-status.unknown i { background: #d6a54c; }
.view-actions { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(8, 17, 15, .28); transition: opacity .18s; }
.camera-view:hover .view-actions, .camera-view:focus-within .view-actions { opacity: 1; }
.play-button { width: 47px; height: 47px; display: grid; place-items: center; color: var(--green-950); background: rgba(211, 250, 135, .94); border: 0; border-radius: 50%; box-shadow: 0 8px 25px rgba(0,0,0,.25); }
.play-button svg { width: 19px; fill: currentColor; }
.play-button.loading svg { animation: spin 1s linear infinite; fill: none; stroke: currentColor; stroke-width: 2; }
.stream-error { position: absolute; inset: auto 12px 12px; z-index: 4; padding: 8px 10px; color: #ffeae7; background: rgba(143, 44, 35, .9); border-radius: 6px; font-size: 10px; line-height: 1.35; }
.live-label { position: absolute; z-index: 3; top: 10px; right: 10px; padding: 5px 8px; color: white; background: rgba(201,52,42,.85); border-radius: 4px; font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.card-body { padding: 15px 16px 14px; }
.card-title-row { display: flex; align-items: flex-start; gap: 10px; }
.card-title { min-width: 0; flex: 1; }
.card-title h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.card-title p { margin: 5px 0 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: #66716d; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.icon-button:hover { color: var(--green-700); border-color: #b8c5bf; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--soft-line); }
.card-meta div { min-width: 0; }
.card-meta span, .detail-item span { display: block; margin-bottom: 3px; color: #939c98; font-size: 8px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.card-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #46504d; font-size: 10px; font-weight: 650; }
.tag { display: inline-flex; align-items: center; margin-top: 11px; padding: 4px 7px; color: var(--green-700); background: #edf4ef; border-radius: 4px; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tag--ptz { margin-left: 4px; color: #9b6414; background: #fff4df; }
.camera-grid.layout-4 .card-body { padding: 12px; }
.camera-grid.layout-4 .card-meta { display: none; }

.empty-state { min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; background: #fff; border: 1px dashed #cbd2cd; border-radius: 12px; }
.empty-state > * { max-width: 410px; }
.empty-visual { width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 14px; color: var(--green-500); background: #edf4ef; border-radius: 50%; }
.empty-visual svg { width: 37px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.empty-state h2 { margin: 0; font: 700 24px Georgia, serif; }
.empty-state p { margin: 10px 20px 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(5, 17, 14, .68); backdrop-filter: blur(5px); }
.modal { width: min(100%, 720px); max-height: calc(100vh - 48px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 30px 100px rgba(0,0,0,.32); }
.modal--wide { width: min(100%, 920px); }
.modal-header { display: flex; align-items: flex-start; gap: 18px; padding: 24px 26px 20px; border-bottom: 1px solid var(--soft-line); }
.modal-header > div { min-width: 0; flex: 1; }
.modal-header h2 { margin: 0; font: 700 25px Georgia, serif; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; color: #66706d; background: #f3f5f2; border: 0; border-radius: 50%; font-size: 20px; }
.modal-body { padding: 24px 26px 27px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 26px; background: #f7f8f5; border-top: 1px solid var(--soft-line); border-radius: 0 0 16px 16px; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; background: #f0f2ef; border-radius: 8px; }
.tab { flex: 1; height: 37px; color: #69736f; background: transparent; border: 0; border-radius: 6px; font-size: 12px; font-weight: 750; }
.tab.active { color: var(--green-800); background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.07); }
.paste-area { min-height: 220px; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.import-hint { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 11px; color: var(--muted); font-size: 10px; }
.text-link { padding: 0; color: var(--green-500); background: none; border: 0; font-weight: 750; text-decoration: none; }
.drop-zone { min-height: 240px; display: grid; place-items: center; align-content: center; padding: 28px; text-align: center; border: 1px dashed #b9c5bf; border-radius: 10px; background: #fafbf9; transition: border-color .2s, background .2s; cursor: pointer; }
.drop-zone.dragover { border-color: var(--green-500); background: #f1f8f3; }
.drop-zone svg { width: 44px; margin-bottom: 13px; fill: none; stroke: var(--green-500); stroke-width: 1.3; }
.drop-zone strong { font-size: 14px; }
.drop-zone p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.selected-file { margin-top: 10px; color: var(--green-700); font-size: 11px; font-weight: 700; }
.import-result { margin-top: 16px; padding: 14px; background: #edf7f0; border: 1px solid #c9e5d2; border-radius: 8px; color: #286344; font-size: 12px; line-height: 1.5; }
.import-result.error { color: #9c3d34; background: #fff2f0; border-color: #efcbc6; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox-field { min-height: 43px; display: flex; align-items: center; gap: 9px; margin-top: 22px; color: #46504d; font-size: 12px; font-weight: 700; }
.checkbox-field input { width: 17px; height: 17px; accent-color: var(--green-600); }
.detail-preview { aspect-ratio: 16/8; position: relative; overflow: hidden; display: grid; place-items: center; margin: -24px -26px 24px; color: #778883; background: #12231f; }
.detail-preview::after { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 40px 40px; }
.detail-preview img { width: 100%; height: 100%; position: absolute; z-index: 1; object-fit: contain; background: #111b19; }
.detail-preview .button { z-index: 2; }
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px 20px; }
.detail-item { min-width: 0; }
.detail-item strong, .detail-item a { color: #35413d; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.detail-item a { color: var(--green-500); }
.detail-item.span-2 { grid-column: span 2; }
.detail-item.span-3 { grid-column: span 3; }
.ptz-panel { display: flex; align-items: center; gap: 18px; margin-top: 24px; padding: 17px; background: #f4f7f4; border-radius: 10px; }
.ptz-panel > div:first-child { flex: 1; }
.ptz-panel h3 { margin: 0 0 5px; font-size: 12px; }
.ptz-panel p { margin: 0; color: var(--muted); font-size: 10px; }
.ptz-controls { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.ptz-controls button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green-700); background: #fff; border: 1px solid #d9e0db; border-radius: 6px; font-size: 14px; }
.ptz-controls button:active { background: var(--green-700); color: #fff; }
.ptz-controls .blank { visibility: hidden; }
.detail-actions { display: flex; gap: 8px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--soft-line); }

.toast-stack { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 420px; padding: 13px 15px; color: #f5fff9; background: #173c32; border-radius: 9px; box-shadow: 0 15px 40px rgba(0,0,0,.22); font-size: 12px; animation: toast-in .25s ease-out; }
.toast.error { background: #913f36; }
.mobile-only { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .camera-grid, .camera-grid.layout-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { flex-wrap: wrap; }
  .search-field { min-width: calc(100% - 2px); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { width: 235px; position: fixed; z-index: 40; left: 0; transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .mobile-only { display: grid; }
  .topbar { height: 76px; padding: 0 17px; }
  .topbar h1 { font-size: 23px; }
  .topbar .eyebrow, .date-label, .user-chip { display: none; }
  .topbar-actions .button { padding: 0 11px; font-size: 0; }
  .topbar-actions .button svg { margin: 0; }
  .content { padding: 18px 16px 35px; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 103px; padding: 16px; }
  .stat-card strong { font-size: 25px; }
  .toolbar select { flex: 1; min-width: 135px; }
  .layout-switch { display: none; }
  .camera-grid, .camera-grid.layout-4 { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal-header, .modal-body { padding-left: 18px; padding-right: 18px; }
  .form-grid, .details-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .detail-item.span-2, .detail-item.span-3 { grid-column: span 1; }
  .detail-preview { margin-left: -18px; margin-right: -18px; }
  .ptz-panel { align-items: flex-start; flex-direction: column; }
  .login-card { padding: 30px 24px; }
  .login-brand { left: 24px; }
}
