:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  color: #f3f4f6;
  background: #0b0d12;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --red: #ed554b;
  --muted: #898e9a;
  --line: rgba(255,255,255,.075);
  --panel: #13161c;
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 74% -16%,rgba(127,53,43,.12),transparent 42%),#0b0d12; }
button,input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; display: flex; width: 246px; flex-direction: column; padding: 27px 17px 18px; border-right: 1px solid var(--line); background: rgba(13,15,19,.96); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 0 48px 6px; color: inherit; text-decoration: none; }
.brand-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#f35e51,#a72e30); box-shadow: 0 7px 22px #ef554529; }
.brand-icon svg { width: 20px; fill: none; stroke: white; stroke-width: 1.8; }
.brand-copy strong { display: block; font: 800 20px Manrope,sans-serif; letter-spacing: -.8px; line-height: 1.1; }
.brand-copy small { display: block; margin-top: 4px; color: #8d929c; font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.nav-caption { margin: 0 0 10px 11px; color: #676c77; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.nav-link { display: flex; align-items: center; gap: 11px; width: 100%; margin: 2px 0; padding: 11px 12px; border: 0; border-radius: 8px; color: #a7abb4; background: transparent; font-size: 12px; text-align: left; text-decoration: none; cursor: pointer; transition: background .18s,color .18s; }
.nav-link svg,.icon-button svg,.text-button svg,.secondary-button svg,.primary-button svg,.secure-note svg,.stat-icon svg,.control-icon svg,.empty-icon svg,.note-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover,.nav-link.active { color: #fff; background: #ed554b18; }
.nav-link.active svg { color: var(--red); }
.sidebar-bottom { margin-top: auto; }
.connection-card { display: flex; align-items: flex-start; gap: 10px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff05; }
.connection-dot,.online-pill i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #696e77; }
.connection-dot.connected,.online-pill.connected i { background: #69c598; box-shadow: 0 0 9px #69c59873; }
.connection-card strong,.connection-card span { display: block; }
.connection-card strong { font-size: 10px; font-weight: 600; }
.connection-card div>span { max-width: 184px; overflow: hidden; margin-top: 4px; color: #7d828d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom>p { padding: 12px 5px 0; color: #696e78; font-size: 9px; line-height: 1.5; }
.main { width: calc(100% - 246px); min-height: 100vh; margin-left: 246px; }
.topbar { display: flex; height: 65px; align-items: center; justify-content: space-between; padding: 0 4.1%; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #777c87; font-size: 10px; }
.breadcrumb span { margin: 0 8px; color: #454952; }
.breadcrumb strong { color: #d7d8dc; font-weight: 550; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.online-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; color: #989ca5; font-size: 8px; font-weight: 700; letter-spacing: .9px; white-space: nowrap; }
.online-pill i { width: 6px; height: 6px; margin: 0; }
.online-pill.connected { border-color: #69c59830; color: #a5d6bd; }
.icon-button,.text-button,.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; color: #c4c6cc; background: #15181e; cursor: pointer; transition: background .2s,border-color .2s; }
.icon-button { width: 33px; height: 33px; font-size: 19px; line-height: 1; }
.icon-button svg { width: 16px; height: 16px; }
.text-button,.secondary-button { padding: 8px 11px; font-size: 10px; }
.text-button svg,.secondary-button svg { width: 15px; height: 15px; }
.icon-button:hover,.text-button:hover,.secondary-button:hover { border-color: #ffffff33; background: #1d2027; }
.content { width: min(1110px,100%); margin: 0 auto; padding: 42px 4.1% 26px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #9599a2; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px #ed554b99; }
h1,h2,h3,p { overflow-wrap: anywhere; }
.page-heading h1 { margin: 0; font: 550 clamp(26px,3.1vw,36px) Manrope,sans-serif; letter-spacing: -1.6px; }
.page-heading h1 em { color: #f57569; font-style: normal; }
.page-heading>div>p,.muted { color: var(--muted); font-size: 11px; line-height: 1.7; }
.page-heading>div>p { margin: 9px 0 0; }
.connect-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(250px,.75fr); gap: 15px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg,#16191f,#111319); }
.connect-panel { padding: 25px 27px 21px; }
.card-eyebrow { display: flex; align-items: center; gap: 7px; color: #ee8880; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.card-eyebrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.connect-panel h2,.settings-dialog h2 { margin: 13px 0 8px; font: 600 20px Manrope,sans-serif; letter-spacing: -.5px; }
.connect-panel>.muted { max-width: 530px; margin: 0; }
.form { display: grid; gap: 9px; margin-top: 23px; }
.form label { margin-top: 6px; color: #d9dade; font-size: 10px; font-weight: 600; }
.form input { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid #ffffff19; border-radius: 7px; outline: 0; color: #f3f4f6; background: #0c0e12; font-size: 11px; transition: border-color .18s; }
.form input:focus { border-color: #ed554ba6; }
.form input::placeholder { color: #656a75; }
.form small { margin-top: -3px; color: #7b808a; font-size: 9px; font-weight: 400; line-height: 1.5; }
.primary-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; color: #fff; background: linear-gradient(105deg,#e84f45,#bf3936); font-size: 10px; font-weight: 650; cursor: pointer; transition: filter .2s,transform .2s; }
.primary-button:hover,.capture-button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.primary-button:disabled,.capture-button:disabled,.secondary-button:disabled,.icon-button:disabled,.outline-button:disabled,.toggle:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-button svg { width: 16px; height: 16px; }
.primary-button>span { margin-left: auto; font-size: 16px; }
.secure-note { display: flex; align-items: center; gap: 7px; margin-top: 15px; color: #7dc49f; font-size: 9px; }
.secure-note svg { width: 15px; height: 15px; }
.setup-panel { padding: 23px 21px 19px; background: linear-gradient(150deg,#1b1718,#131419); }
.help-icon,.empty-icon { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid #ed554b33; border-radius: 10px; color: #f17b71; background: #ed554b14; }
.help-icon { font: 600 18px Manrope,sans-serif; }
.setup-panel h3 { margin: 14px 0; font: 600 14px Manrope,sans-serif; }
.setup-panel ol { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.setup-panel li { display: flex; gap: 10px; color: #a3a6ae; font-size: 10px; line-height: 1.6; }
.setup-panel li i { padding-top: 1px; color: #e67b72; font-size: 8px; font-style: normal; font-weight: 700; }
.setup-panel li strong { color: #e2e3e5; }
.resources { display: grid; gap: 9px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.resources a,.empty-state>a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #e58077; font-size: 9px; text-decoration: none; }
.resources a:hover,.empty-state>a:hover { color: #ffaba2; }
.feedback { display: flex; align-items: center; gap: 10px; margin: -10px 0 19px; padding: 11px 12px; border: 1px solid #69c59838; border-radius: 9px; color: #a6d9bf; background: #69c5980d; font-size: 11px; }
.feedback.error { border-color: #ed554b40; color: #f2a59f; background: #ed554b10; }
.feedback-icon { flex: 0 0 15px; width: 15px; height: 15px; }
.feedback-icon::before { content: "✓"; }
.feedback.error .feedback-icon::before { content: "!"; display: inline-grid; width: 15px; height: 15px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }
.feedback #feedback-text { flex: 1; }
.feedback>button { width: 25px; height: 25px; border: 0; color: inherit; background: transparent; font-size: 19px; cursor: pointer; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 34px; }
.stat-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 11px; min-height: 82px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px; background: #14171c; }
.stat-icon { display: grid; grid-row: span 2; width: 33px; height: 33px; place-items: center; border: 1px solid #ed554b2e; border-radius: 9px; color: #ef766d; background: #ed554b12; }
.stat-icon.green { border-color: #69c5982b; color: #78c8a0; background: #69c59812; }
.stat-icon.amber { border-color: #d9a7532b; color: #d9aa5d; background: #d9a75312; }
.stat-card>div>small { display: block; color: #9296a0; font-size: 8px; font-weight: 650; letter-spacing: .55px; }
.stat-card>div>strong { display: block; margin-top: 6px; font: 550 20px Manrope,sans-serif; letter-spacing: -.5px; }
.stat-card>div>strong.stat-text { overflow: hidden; font-size: 12px; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.stat-sub { grid-column: 2; overflow: hidden; margin-top: 4px; color: #727782; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.section-heading>div { display: flex; align-items: flex-start; gap: 10px; }
.section-heading>div>i { width: 3px; height: 29px; margin-top: 2px; border-radius: 2px; background: var(--red); }
.section-heading strong,.section-heading small { display: block; }
.section-heading strong { font: 600 15px Manrope,sans-serif; }
.section-heading small { margin-top: 4px; color: #858a95; font-size: 9px; }
.count-label { color: #858a95; font-size: 8px; font-weight: 650; letter-spacing: 1px; }
.camera-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); gap: 13px; }
.camera-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg,#16191f,#111319); }
.camera-preview { position: relative; display: grid; min-height: 190px; aspect-ratio: 16/9; overflow: hidden; place-items: center; background: radial-gradient(ellipse at 45% 88%,#c6473422,transparent 45%),linear-gradient(150deg,#1b1e24,#0e1014 65%); }
.camera-preview>img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.preview-placeholder { display: grid; justify-items: center; gap: 10px; color: #626773; }
.preview-placeholder svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.preview-placeholder span { font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.preview-chip { position: absolute; top: 11px; left: 11px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #ffffff20; border-radius: 5px; color: #f1f1f2; background: #0a0b0eb3; font-size: 7px; font-weight: 700; letter-spacing: .8px; backdrop-filter: blur(7px); }
.preview-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px #ed554b99; }
.download-button { position: absolute; top: 10px; right: 10px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #ffffff2d; border-radius: 7px; color: #fff; background: #0a0b0eb3; text-decoration: none; backdrop-filter: blur(7px); }
.camera-info { padding: 14px; }
.camera-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.camera-type { color: #e77a72; font-size: 7px; font-weight: 700; letter-spacing: .9px; }
.camera-title h3 { margin: 5px 0 0; font: 600 12px Manrope,sans-serif; }
.state-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid #ffffff15; border-radius: 99px; color: #999da6; background: #ffffff06; font-size: 8px; text-transform: capitalize; }
.state-badge i { width: 5px; height: 5px; border-radius: 50%; background: #777b83; }
.state-badge.active { border-color: #71c89e24; color: #a0cdb5; }
.state-badge.active i { background: #71c89e; box-shadow: 0 0 7px #71c89e73; }
.camera-meta { display: flex; gap: 12px; margin-top: 12px; color: #858a95; font-size: 9px; }
.camera-meta span { display: inline-flex; align-items: center; gap: 5px; }
.camera-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.camera-footer code { overflow: hidden; color: #737782; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.capture-button { display: inline-flex; min-height: 31px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 9px; border: 0; border-radius: 7px; color: #fff; background: linear-gradient(105deg,#e84f45,#bf3936); font-size: 9px; font-weight: 650; cursor: pointer; transition: filter .2s,transform .2s; }
.capture-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state { display: grid; min-height: 220px; justify-items: center; align-content: center; padding: 24px; text-align: center; }
.empty-icon { width: 48px; height: 48px; }
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h3 { margin: 14px 0 6px; font: 600 13px Manrope,sans-serif; }
.empty-state p { max-width: 440px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.empty-state>a { justify-content: center; margin-top: 14px; }
.controls-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 22px; }
.control-card { padding: 16px; }
.control-title { display: flex; align-items: center; gap: 9px; }
.control-icon { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ed554b2e; border-radius: 8px; color: #e97970; background: #ed554b11; }
.control-icon svg { width: 17px; height: 17px; }
.control-title strong,.control-title small { display: block; }
.control-title strong { font: 600 11px Manrope,sans-serif; }
.control-title small { margin-top: 4px; color: #7f848e; font-size: 8px; }
.control-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.alarm-state { display: flex; align-items: center; gap: 8px; color: #b7bac1; font-size: 10px; }
.alarm-state i { width: 7px; height: 7px; border-radius: 50%; background: #777b83; }
.alarm-state i.armed { background: #e27a53; box-shadow: 0 0 7px #e27a5366; }
.outline-button { display: inline-flex; min-height: 31px; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 1px solid #ffffff20; border-radius: 7px; color: #c4c6cc; background: transparent; font-size: 9px; cursor: pointer; }
.outline-button:hover { background: #ffffff08; }
.small-primary { min-height: 31px; font-size: 9px; }
.motion-list { display: grid; gap: 8px; margin-top: 14px; }
.motion-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c0c2c8; font-size: 9px; }
.toggle { position: relative; width: 31px; height: 18px; padding: 0; border: 1px solid #ffffff1c; border-radius: 99px; background: #343840; cursor: pointer; transition: background .18s; }
.toggle>i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #d9dade; transition: transform .18s; }
.toggle.on { border-color: #b7413b; background: #c4443d; }
.toggle.on>i { transform: translateX(13px); background: #fff; }
.control-footnote { margin: 13px 0 0; color: #747984; font-size: 8px; line-height: 1.6; }
.live-note { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 12px 13px; border: 1px solid #ed554b25; border-radius: 8px; background: #ed554b09; }
.note-icon { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border-radius: 7px; color: #ef837a; background: #ed554b18; }
.note-icon svg { width: 17px; height: 17px; }
.live-note p { flex: 1; margin: 0; color: #a3a6ae; font-size: 9px; line-height: 1.6; }
.live-note p strong { color: #e7c2bf; font-weight: 600; }
.live-note>a { flex: 0 0 auto; color: #b8bbc2; font-size: 16px; text-decoration: none; }
.page-footer { margin-top: 18px; color: #6d727c; font-size: 8px; text-align: center; }
.page-footer i { margin: 0 6px; color: #474b54; font-style: normal; }
.settings-dialog { width: min(450px,calc(100% - 32px)); padding: 23px; border: 1px solid #ffffff1c; border-radius: 13px; color: #f3f4f6; background: #15171c; box-shadow: 0 24px 80px #0008; }
.settings-dialog::backdrop { background: #030406c7; backdrop-filter: blur(7px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.settings-dialog h2 { margin-top: 9px; }
.settings-dialog>.muted { margin: 0; }
.settings-dialog .form { margin-top: 18px; }
.settings-dialog .resources { grid-template-columns: 1fr; }
.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media(max-width:980px) {
  .sidebar { width: 210px; }
  .main { width: calc(100% - 210px); margin-left: 210px; }
  .connect-layout { grid-template-columns: 1fr; }
}
@media(max-width:700px) {
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0; }
  .brand-icon { width: 34px; height: 34px; }
  .nav-caption,.sidebar>.nav-link { display: none; }
  .sidebar-bottom { margin: 0; }
  .sidebar-bottom>p { display: none; }
  .connection-card { align-items: center; padding: 7px 4px; border: 0; background: transparent; }
  .connection-card strong,.connection-card div>span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .connection-card strong { font-size: 9px; }
  .connection-card div>span { margin-top: 2px; }
  .main { width: 100%; margin: 0; }
  .topbar { height: 52px; padding: 0 16px; }
  .breadcrumb { font-size: 9px; }
  .breadcrumb span { margin: 0 5px; }
  .top-actions { gap: 7px; }
  .text-button { padding: 7px; font-size: 0; }
  .text-button svg { width: 16px; height: 16px; }
  .content { padding: 27px 16px 24px; }
  .page-heading { align-items: flex-start; margin-bottom: 23px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading>div>p { max-width: 340px; font-size: 10px; }
  .secondary-button { padding: 7px; font-size: 0; }
  .secondary-button svg { width: 17px; height: 17px; }
  .connect-panel { padding: 20px 17px 17px; }
  .setup-panel { padding: 19px 17px; }
  .stats-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 27px; }
  .stat-card { min-height: 67px; }
  .controls-grid { grid-template-columns: 1fr; }
  .camera-preview { min-height: 170px; }
}
@media(max-width:390px) {
  .online-pill { padding: 6px 7px; font-size: 7px; }
  .page-heading h1 { font-size: 24px; }
  .camera-footer { align-items: flex-start; flex-direction: column; }
}
.hidden { display: none !important; }
