:root { --ink:#172033; --muted:#667085; --line:#e6eaf0; --panel:#ffffff; --bg:#f5f7fb; --accent:#1464f4; --good:#14a46c; --bad:#c43d3d; }
html, body { min-height:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.app-shell { display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.sidebar { background:#101828; color:#fff; padding:24px 18px; }
.brand { display:block; color:#fff; text-decoration:none; font-weight:800; font-size:1.2rem; margin-bottom:28px; letter-spacing:.04em; }
.brand span { color:#8bb7ff; }
.brand small { display:block; margin-top:4px; color:#98a6ba; font-size:.68rem; letter-spacing:0; text-transform:none; }
.sidebar nav { display:grid; gap:6px; }
.sidebar nav a { color:#d7deea; text-decoration:none; padding:10px 12px; border-radius:8px; font-weight:600; }
.sidebar nav a:hover { background:#1d2939; color:#fff; }
.sidebar-contact { margin-top:28px; padding:14px; border:1px solid rgba(255,255,255,.12); border-radius:8px; background:#172536; }
.sidebar-contact strong, .sidebar-contact span, .sidebar-contact a { display:block; }
.sidebar-contact strong { color:#fff; font-size:.9rem; }
.sidebar-contact span { margin-top:6px; color:#aab7c8; font-size:.78rem; line-height:1.4; }
.sidebar-contact a { margin-top:10px; color:#8bb7ff; font-weight:900; text-decoration:none; }
.sidebar-start-link { display:flex; min-height:36px; align-items:center; justify-content:center; margin:18px 0 22px; border:1px solid rgba(139,183,255,.34); border-radius:8px; color:#dce9ff; background:rgba(20,100,244,.14); text-decoration:none; font-size:.88rem; font-weight:900; }
.sidebar-start-link:hover { color:#fff; background:rgba(20,100,244,.24); }
main { min-width:0; }
.topbar { min-height:68px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; padding:0 28px; gap:16px; }
.content { padding:28px; }
.kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:16px; }
.kpi, .panel, .station-card { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:18px; box-shadow:0 8px 24px rgba(16,24,40,.04); }
.kpi label { color:var(--muted); font-size:.84rem; font-weight:700; text-transform:uppercase; }
.kpi strong { display:block; font-size:2rem; margin-top:6px; }
.grid-2 { display:grid; grid-template-columns:2fr 1fr; gap:18px; }
.station-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.badge-soft { background:#eef4ff; color:#175cd3; border-radius:999px; padding:4px 10px; font-weight:700; font-size:.78rem; }
.badge-good { background:#ecfdf3; color:#027a48; }
.badge-bad { background:#fff1f3; color:#b42318; }
.status-dot { width:10px; height:10px; display:inline-block; border-radius:999px; background:var(--good); }
.table-card { background:#fff; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.form-card { max-width:860px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:22px; }
.platform-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.platform-intro h5 { margin-bottom:6px; }
.platform-intro p { margin:0; color:var(--muted); max-width:820px; }
.platform-intro a, .custom-cta a { white-space:nowrap; color:#fff; background:#1464f4; border-radius:8px; padding:10px 14px; text-decoration:none; font-weight:900; }
.custom-cta { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px; border:1px solid #c7d7fe; border-radius:8px; background:#eef4ff; }
.custom-cta strong, .custom-cta span { display:block; }
.custom-cta span { margin-top:5px; color:#475467; }
.app-footer { padding:18px 0 0; color:#98a2b3; font-size:.88rem; font-weight:800; text-align:center; }
.login-body {
  min-height:100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(20,100,244,.18), transparent 32%),
    linear-gradient(135deg, #07111f 0%, #0f1f2f 42%, #f4f7fb 42.1%, #eef3f8 100%);
  color:#eef6ff;
  overflow-x:hidden;
}
.login-shell {
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(420px,1.08fr) minmax(380px,.92fr);
  align-items:stretch;
}
.login-visual {
  position:relative;
  padding:44px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:32px;
}
.login-visual::before {
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size:42px 42px;
  mask-image:linear-gradient(90deg, #000 0%, rgba(0,0,0,.72) 74%, transparent 100%);
  pointer-events:none;
}
.login-brand,
.camera-stage,
.login-insights {
  position:relative;
  z-index:1;
}
.login-brand {
  display:flex;
  align-items:center;
  gap:14px;
}
.brand-mark {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#f8fbff;
  color:#0a1626;
  font-weight:900;
  box-shadow:0 18px 38px rgba(0,0,0,.28);
}
.login-brand strong {
  display:block;
  font-size:1.1rem;
  line-height:1.1;
}
.login-brand span:last-child {
  display:block;
  margin-top:3px;
  color:#9fb2c8;
  font-size:.88rem;
}
.login-story {
  position:relative;
  z-index:1;
  width:min(720px, 100%);
}
.login-story span {
  display:inline-flex;
  min-height:28px;
  align-items:center;
  padding:0 10px;
  border:1px solid rgba(139,183,255,.34);
  border-radius:999px;
  color:#9cc8ff;
  background:rgba(20,100,244,.12);
  font-size:.78rem;
  font-weight:900;
}
.login-story h2 {
  margin:16px 0 10px;
  max-width:680px;
  color:#fff;
  font-size:2.5rem;
  line-height:1.08;
  font-weight:950;
}
.login-story p {
  margin:0;
  max-width:620px;
  color:#b8c6d8;
  font-size:1.02rem;
  line-height:1.65;
}
.camera-stage {
  width:min(720px, 100%);
  border:1px solid rgba(196,224,255,.22);
  border-radius:8px;
  background:rgba(8,20,36,.74);
  box-shadow:0 30px 80px rgba(0,0,0,.38);
  overflow:hidden;
  backdrop-filter:blur(18px);
}
.camera-topbar {
  height:48px;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid rgba(196,224,255,.14);
  color:#b8c6d8;
  font-size:.82rem;
}
.live-pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#e9f7ff;
  font-weight:700;
}
.live-pill span,
.insight-dot {
  width:9px;
  height:9px;
  border-radius:999px;
  display:inline-block;
}
.live-pill span,
.insight-dot.good {
  background:#28d482;
  box-shadow:0 0 0 6px rgba(40,212,130,.12);
}
.insight-dot.warn {
  background:#ffc857;
  box-shadow:0 0 0 6px rgba(255,200,87,.12);
}
.camera-feed {
  position:relative;
  min-height:360px;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(10,22,38,.24), rgba(10,22,38,.76)),
    repeating-linear-gradient(90deg, transparent 0 82px, rgba(255,255,255,.045) 83px 84px),
    linear-gradient(135deg, #283d52, #172638 48%, #102331 100%);
}
.camera-feed::before {
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(120deg, transparent 0 28%, rgba(87,197,255,.11) 28.5% 29.5%, transparent 30%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px);
  opacity:.9;
}
.scan-line {
  position:absolute;
  left:0;
  right:0;
  top:34%;
  height:2px;
  background:linear-gradient(90deg, transparent, #5be7ff, transparent);
  box-shadow:0 0 24px rgba(91,231,255,.78);
}
.lane {
  position:absolute;
  bottom:-42px;
  width:2px;
  height:360px;
  background:linear-gradient(180deg, transparent, rgba(255,255,255,.42));
  transform:rotate(18deg);
}
.lane-one { left:30%; }
.lane-two { right:28%; }
.vehicle-box {
  position:absolute;
  border:2px solid #54e2ff;
  box-shadow:0 0 28px rgba(84,226,255,.24), inset 0 0 28px rgba(84,226,255,.08);
  border-radius:6px;
}
.vehicle-box span {
  position:absolute;
  top:-30px;
  left:-2px;
  padding:4px 8px;
  border-radius:6px;
  background:#54e2ff;
  color:#062034;
  font-size:.72rem;
  font-weight:900;
}
.vehicle-box-main {
  width:180px;
  height:94px;
  left:18%;
  bottom:74px;
}
.vehicle-box-side {
  width:132px;
  height:72px;
  right:16%;
  bottom:122px;
  border-color:#9dffb5;
}
.vehicle-box-side span {
  background:#9dffb5;
}
.zone {
  position:absolute;
  right:11%;
  bottom:42px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.32);
  border-radius:6px;
  color:#dcecff;
  background:rgba(11,27,45,.7);
  font-size:.78rem;
  font-weight:800;
}
.feed-corner {
  position:absolute;
  width:28px;
  height:28px;
  border-color:rgba(255,255,255,.8);
}
.corner-tl { top:18px; left:18px; border-top:2px solid; border-left:2px solid; }
.corner-tr { top:18px; right:18px; border-top:2px solid; border-right:2px solid; }
.corner-bl { bottom:18px; left:18px; border-bottom:2px solid; border-left:2px solid; }
.corner-br { bottom:18px; right:18px; border-bottom:2px solid; border-right:2px solid; }
.camera-metrics {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-top:1px solid rgba(196,224,255,.14);
}
.camera-metrics div {
  padding:16px 18px;
  border-right:1px solid rgba(196,224,255,.12);
}
.camera-metrics div:last-child {
  border-right:0;
}
.camera-metrics span {
  display:block;
  color:#8ea1b7;
  font-size:.76rem;
  font-weight:800;
  text-transform:uppercase;
}
.camera-metrics strong {
  display:block;
  margin-top:4px;
  color:#fff;
  font-size:1.22rem;
}
.login-insights {
  display:grid;
  grid-template-columns:repeat(2,minmax(180px,1fr));
  gap:14px;
  width:min(720px,100%);
}
.login-insights div {
  min-height:92px;
  padding:18px;
  border:1px solid rgba(196,224,255,.16);
  border-radius:8px;
  background:rgba(8,20,36,.56);
  backdrop-filter:blur(14px);
}
.login-insights strong,
.login-insights small {
  display:block;
}
.login-insights strong {
  margin-top:12px;
  color:#fff;
}
.login-insights small {
  margin-top:4px;
  color:#9fb2c8;
}
.login-panel {
  display:grid;
  place-items:center;
  padding:44px;
  color:#152033;
}
.login-card {
  width:min(440px, 100%);
  padding:30px;
  border:1px solid rgba(18,38,63,.08);
  border-radius:8px;
  background:rgba(255,255,255,.92);
  box-shadow:0 24px 70px rgba(15,30,50,.14);
  backdrop-filter:blur(18px);
}
.login-card-header {
  margin-bottom:24px;
}
.login-flow {
  display:grid;
  gap:10px;
  margin:-4px 0 20px;
}
.login-flow div {
  display:grid;
  grid-template-columns:30px 1fr;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid #e6eaf0;
  border-radius:8px;
  background:#f8fbff;
}
.login-flow strong {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#1464f4;
  color:#fff;
  font-size:.86rem;
}
.login-flow span {
  color:#475467;
  font-size:.88rem;
  font-weight:800;
}
.secure-badge {
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#eaf6f1;
  color:#087443;
  font-size:.78rem;
  font-weight:900;
}
.login-card h1 {
  margin:16px 0 6px;
  font-size:2rem;
  font-weight:900;
  color:#101828;
}
.login-card p {
  margin:0;
  color:#667085;
}
.login-form {
  display:grid;
  gap:16px;
}
.login-form label span {
  display:block;
  margin-bottom:7px;
  color:#344054;
  font-size:.88rem;
  font-weight:800;
}
.login-form .form-control {
  height:48px;
  border-color:#d6deea;
  border-radius:8px;
  color:#172033;
  font-weight:600;
  box-shadow:none;
}
.login-form .form-control:focus {
  border-color:#1464f4;
  box-shadow:0 0 0 4px rgba(20,100,244,.12);
}
.login-options {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:#667085;
  font-size:.9rem;
}
.login-options .form-check {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
}
.login-options .form-check-label {
  margin:0;
}
.login-submit {
  min-height:50px;
  border-radius:8px;
  font-weight:900;
  background:#1464f4;
  border-color:#1464f4;
  box-shadow:0 14px 30px rgba(20,100,244,.24);
}
.login-submit:hover {
  background:#0f55d7;
  border-color:#0f55d7;
}
.auth-switch {
  margin:2px 0 0;
  color:#667085;
  font-size:.92rem;
  text-align:center;
}
.auth-switch a {
  color:#1464f4;
  font-weight:900;
  text-decoration:none;
}
.auth-inline-link {
  color:#1464f4;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}
.auth-switch a:hover {
  text-decoration:underline;
}
.auth-inline-link:hover {
  text-decoration:underline;
}
.setup-grid {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
  gap:22px;
  align-items:start;
}
.setup-form {
  display:block;
}
.business-template-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.template-option {
  display:grid;
  grid-template-columns:20px 1fr;
  gap:8px 10px;
  min-height:112px;
  padding:14px;
  border:1px solid #dbe3ef;
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}
.template-option input {
  margin-top:3px;
}
.template-option strong,
.template-option span {
  grid-column:2;
}
.template-option strong {
  color:#152033;
}
.template-option span {
  color:#667085;
  font-size:.86rem;
  line-height:1.45;
}
.template-option:has(input:checked) {
  border-color:#1464f4;
  box-shadow:0 0 0 4px rgba(20,100,244,.1);
}
.analytics-check-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.analytics-check {
  min-height:44px;
  align-items:center;
  padding:10px 12px;
  border:1px solid #e3e8f0;
  border-radius:8px;
  background:#f8fbff;
}
.setup-template-name {
  margin:12px 0 8px;
  color:#101828;
  font-size:1.25rem;
  font-weight:900;
}
.setup-code {
  max-height:220px;
  overflow:auto;
  padding:12px;
  border:1px solid #e3e8f0;
  border-radius:8px;
  background:#f8fafc;
  font-size:.82rem;
}
.setup-contact {
  margin-top:18px;
  padding:14px;
  border:1px solid #dbe8ff;
  border-radius:8px;
  background:#f4f8ff;
}
.setup-contact strong,
.setup-contact span,
.setup-contact a {
  display:block;
}
.setup-contact span {
  margin-top:6px;
  color:#667085;
  font-size:.86rem;
}
.setup-contact a {
  margin-top:10px;
  color:#1464f4;
  font-weight:900;
  text-decoration:none;
}
.zone-designer {
  display:grid;
  grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr);
  gap:18px;
  align-items:start;
}
.zone-preview {
  position:relative;
  min-height:300px;
  border:1px solid #dbe3ef;
  border-radius:8px;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(10,22,38,.18), rgba(10,22,38,.68)),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(255,255,255,.08) 59px 60px),
    linear-gradient(135deg, #32475d, #132537);
}
.zone-preview::before {
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size:34px 34px;
}
.zone-preview-shape {
  position:absolute;
  border:2px solid #54e2ff;
  border-radius:6px;
  background:rgba(84,226,255,.14);
  color:#082033;
  font-size:.72rem;
  font-weight:900;
  box-shadow:0 0 24px rgba(84,226,255,.16);
}
.zone-preview-shape span {
  position:absolute;
  left:-2px;
  top:-28px;
  padding:4px 8px;
  border-radius:6px;
  background:#54e2ff;
}
.zone-preview-error {
  position:absolute;
  left:14px;
  right:14px;
  top:14px;
  padding:10px 12px;
  border-radius:8px;
  background:#fff1f3;
  color:#b42318;
  font-weight:800;
}
.zone-preset-buttons {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.camera-zone-editor {
  min-height:150px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.camera-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.camera-template-row td {
  background:#f8fbff;
  border-top:0;
}
.auth-owner {
  color:#98a2b3;
  font-weight:900;
}
.ai-toggle-row {
  min-height:58px;
  display:flex;
  align-items:end;
  gap:18px;
  flex-wrap:wrap;
  padding-bottom:4px;
}
.ai-toggle-row .form-check {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  font-weight:800;
  color:#344054;
}
.camera-zone-editor {
  min-height:132px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:.9rem;
}
@media (max-width:980px) { .app-shell { grid-template-columns:1fr; } .kpi-grid, .grid-2, .setup-grid, .zone-designer { grid-template-columns:1fr; } .topbar { flex-wrap:wrap; padding:16px; } .content { padding:18px; } .platform-intro, .custom-cta { align-items:flex-start; flex-direction:column; } .sidebar-contact { display:none; } }
@media (max-width:760px) { .business-template-grid, .analytics-check-grid { grid-template-columns:1fr; } }
@media (max-width:980px) {
  .login-shell { grid-template-columns:1fr; }
  .login-visual { min-height:540px; padding:28px; }
  .login-story h2 { font-size:2rem; }
  .login-panel { padding:28px; background:#eef3f8; }
}
@media (max-width:640px) {
  .login-body { background:#eef3f8; }
  .login-visual { display:none; }
  .login-panel { min-height:100vh; padding:18px; }
  .login-card { padding:22px; }
  .login-card h1 { font-size:1.7rem; }
  .login-options { align-items:flex-start; flex-direction:column; gap:10px; }
}
