/* nueye.ai theme — ported from the design prototype
   (~/dev/nueye .../NuEye Dashboard.dc.html). Single stylesheet shared by the
   dashboard, landing page, and login. No second framework, no marketing CSS. */

:root {
  --navy: #1A2B4C;
  --navy-2: #2c4775;
  --navy-3: #5d79a8;
  --navy-4: #aebfd6;
  --orange: #F47B20;
  --orange-2: #ffa45c;
  --orange-wash: #fff0e6;
  --bg: #ECEEF1;
  --card: #ffffff;
  --border: #e6e9ee;
  --border-2: #eef1f5;
  --muted: #6B7280;
  --muted-2: #9aa3b0;
  --muted-3: #cbd2db;
  --green: #34d07f;
  --green-2: #34a96a;
  --green-wash: #e7f7ee;
  --red: #e0483d;
  --red-wash: #fdeaea;
  --blue: #58a6ff;
  --blue-wash: #eaf0fb;

  --r-lg: 26px;
  --r-card: 22px;
  --r-md: 14px;
  --r-sm: 11px;
  --shadow-card: 0 6px 24px rgba(26, 43, 76, .07);
  --shadow-banner: 0 14px 40px rgba(26, 43, 76, .18);
  --shadow-orange: 0 6px 16px rgba(244, 123, 32, .32);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

@keyframes nuPulse { 0%,100% { opacity:1; transform:scale(1);} 50% { opacity:.35; transform:scale(.7);} }

.nu-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.nu-scroll::-webkit-scrollbar-thumb { background: var(--muted-3); border-radius: 8px; }
.nu-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  flex: none; width: var(--sidebar-w);
  background: #fff; border-inline-end: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 22px; }
.brand img { width: 42px; height: 42px; border-radius: 11px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(26,43,76,.12); flex: none; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand .name { font-weight: 700; font-size: 18px; letter-spacing: -.3px; }
.brand .name .dot { color: var(--orange); }
.brand .tag { font-size: 10.5px; color: var(--muted-2); font-weight: 500;
  margin-top: 3px; letter-spacing: .4px; }

.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 13px; width: 100%;
  font-size: 14px; font-weight: 600; padding: 12px 13px; border-radius: var(--r-md);
  color: var(--muted); transition: all .15s;
}
.nav a:hover { background: #f5f7f9; }
.nav a.active { background: var(--orange); color: #fff; box-shadow: var(--shadow-orange); }
.nav a svg { flex: none; }

.usercard { margin-top: auto; padding-top: 16px; border-top: 1px solid #eef0f3; }
.usercard .inner { display: flex; align-items: center; gap: 10px;
  background: #f5f7f9; border-radius: var(--r-md); padding: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--navy), #34507f); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.usercard .meta { line-height: 1.25; overflow: hidden; }
.usercard .meta .nm { font-weight: 600; font-size: 13px; white-space: nowrap; }
.usercard .meta .rl { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

.main { flex: 1; min-width: 0; height: 100vh; overflow-y: auto; padding: 18px 22px 40px; }

/* ---------- Header banner ---------- */
.banner {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(158deg, var(--navy) 0%, var(--navy-2) 42%, var(--navy-3) 72%, var(--navy-4) 100%);
  padding: 18px 24px 26px; box-shadow: var(--shadow-banner); color: #fff;
}
.banner .topbar { display: flex; align-items: center; gap: 14px; }
.iconbtn { width: 38px; height: 38px; border: none; border-radius: 12px;
  background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer; flex: none; backdrop-filter: blur(4px); }
.iconbtn:hover { background: rgba(255,255,255,.28); }
.searchbox { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.16); border-radius: 13px; padding: 9px 14px; backdrop-filter: blur(4px); }
.searchbox input { border: none; background: transparent; outline: none; color: #fff;
  font-size: 14px; font-family: inherit; width: 100%; }
.searchbox input::placeholder { color: rgba(255,255,255,.75); }
.topbar-right { margin-inline-start: auto; display: flex; align-items: center; gap: 11px; }
.langtoggle { display: flex; background: rgba(255,255,255,.16); border-radius: 13px;
  padding: 3px; backdrop-filter: blur(4px); }
.langtoggle button { border: none; cursor: pointer; font-family: inherit; font-size: 12px;
  font-weight: 700; padding: 5px 12px; border-radius: 10px; background: transparent;
  color: rgba(255,255,255,.85); }
.langtoggle button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.banner h1 { margin: 0; color: #fff; font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.banner .sub { margin: 6px 0 0; color: rgba(255,255,255,.78); font-size: 13.5px; font-weight: 500; }
.title-row { margin-top: 20px; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; }
.status-pill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16);
  border-radius: 30px; padding: 8px 15px; backdrop-filter: blur(4px); color: #fff;
  font-size: 12.5px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.green { background: var(--green); box-shadow: 0 0 0 4px rgba(52,208,127,.25); animation: nuPulse 2s infinite; }

/* ---------- Cards & primitives ---------- */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.kpi .ic { width: 46px; height: 46px; border-radius: var(--r-md); display: flex;
  align-items: center; justify-content: center; }
.kpi .row { display: flex; align-items: center; justify-content: space-between; }
.kpi .val { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; }
.chip.green { color: var(--green-2); background: var(--green-wash); }
.chip.red { color: var(--red); background: var(--red-wash); }
.ic.blue { background: var(--blue-wash); color: var(--navy-2); }
.ic.orange { background: var(--orange-wash); color: var(--orange); }
.ic.red { background: var(--red-wash); color: var(--red); }

.btn { border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 11px 18px; border-radius: 12px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-orange); }
.btn-primary:hover { background: #e06f17; }
.btn-ghost { background: #f5f7f9; color: var(--navy); }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }

.section-title { margin: 0; font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); }

@media (max-width: 880px) {
  .sidebar { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Public landing + login (same tokens, no second stylesheet) ---------- */
.pub { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.pub-header { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; }
.pub-header .brand { padding: 0; }
.pub-actions { display: flex; align-items: center; gap: 12px; }

.hero { border-radius: var(--r-lg); overflow: hidden; color: #fff; margin-top: 6px;
  background: linear-gradient(158deg, var(--navy) 0%, var(--navy-2) 42%, var(--navy-3) 78%, var(--navy-4) 100%);
  box-shadow: var(--shadow-banner); padding: 64px 48px; }
.hero h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.6px; max-width: 18ch; }
.hero p { margin: 18px 0 0; font-size: 16px; color: rgba(255,255,255,.82); max-width: 60ch; line-height: 1.6; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

.section { margin-top: 56px; }
.section > h2 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 22px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tiles.sectors { grid-template-columns: repeat(3, 1fr); }
.tile { padding: 22px; }
.tile .ic { width: 46px; height: 46px; border-radius: var(--r-md); display: flex;
  align-items: center; justify-content: center; margin-bottom: 14px; }
.tile h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.tile p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.privacy { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center;
  padding: 36px; }
.privacy ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.privacy li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.privacy li .tick { width: 22px; height: 22px; border-radius: 7px; background: var(--green-wash);
  color: var(--green-2); display: flex; align-items: center; justify-content: center; flex: none; }
/* Feature list: two responsive columns instead of one tall column. */
.privacy .featurelist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
@media (max-width: 720px) { .privacy .featurelist { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 24px; }
.step .n { width: 34px; height: 34px; border-radius: 11px; background: var(--orange-wash);
  color: var(--orange); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 700; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.pub-footer { margin: 56px 0 30px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pub-footer .muted { font-size: 13px; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; padding: 32px; }
.login-card .brand { padding: 0 0 20px; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field input { font-family: inherit; font-size: 14px; color: var(--navy); background: #f5f7f9;
  border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 11px 13px; outline: none; }
.field input:focus { border-color: var(--orange); }
.formerror { color: var(--red); font-size: 13px; margin-bottom: 12px; }

@media (max-width: 880px) {
  .tiles, .tiles.sectors, .steps { grid-template-columns: 1fr; }
  .privacy { grid-template-columns: 1fr; }
  .hero { padding: 40px 26px; } .hero h1 { font-size: 30px; }
}

/* ---------- Forms, toggles, enrollment ---------- */
.two-col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
/* equal-height cards in a row (shared bottom edge); content stays top-aligned */
.two-col--stretch { align-items: stretch; }
.card-pad { padding: 22px; }
.select, select.select { width: 100%; font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--navy); background: #f5f7f9; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; outline: none; }
.select:focus { border-color: var(--orange); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 44px; height: 25px; border-radius: 14px; background: #d3d8e0;
  position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: inset-inline-start .15s; }
.switch input:checked + .track { background: var(--orange); }
.switch input:checked + .track::after { inset-inline-start: 22px; }

.video-frame { width: 100%; aspect-ratio: 4/3; background: #0f1722; border-radius: var(--r-md);
  object-fit: cover; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.shots .shot { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 2px solid var(--border); position: relative; }
.shots .empty { font-size: 12.5px; color: var(--muted-2); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.notice { font-size: 12.5px; border-radius: var(--r-sm); padding: 10px 12px; margin-top: 12px; }
.notice.ok { background: var(--green-wash); color: var(--green-2); }
.notice.err { background: var(--red-wash); color: var(--red); }
.notice.hint { background: var(--blue-wash); color: var(--navy-2); }

.person-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px;
  border-bottom: 1px solid var(--border-2); }
.person-row:last-child { border-bottom: none; }
.person-row .nm { font-weight: 600; font-size: 14px; }
.person-row .sub { font-size: 11.5px; color: var(--muted-2); }
.tag-pill { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.tag-pill.live { background: var(--green-wash); color: var(--green-2); }
.tag-pill.nolive { background: #f0f2f5; color: var(--muted); }
.icon-x { border: none; cursor: pointer; background: var(--red-wash); color: var(--red);
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }

@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Live camera grid ---------- */
.cam-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cam-tile { position: relative; background: #0f1722; border-radius: var(--r-md); overflow: hidden;
  aspect-ratio: 4/3; }
.cam-tile video, .cam-tile img.out { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-tile video { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.cam-badge { position: absolute; top: 9px; inset-inline-start: 9px; display: flex; align-items: center;
  gap: 4px; background: rgba(224,72,61,.92); color: #fff; font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; z-index: 3; }
.cam-badge .dot { width: 5px; height: 5px; background: #fff; animation: nuPulse 1.4s infinite; }
.cam-foot { position: absolute; bottom: 9px; inset-inline-start: 9px; inset-inline-end: 9px; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; color: #fff; }
.cam-foot .nm { font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.cam-rm { border: none; cursor: pointer; background: rgba(0,0,0,.5); color: #fff; width: 26px; height: 26px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; z-index: 3; }
.id-chip { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--border-2); }
.id-chip:last-child { border-bottom: none; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.cam-tile-wrap { display: flex; flex-direction: column; }
.tile-actions { margin-top: 8px; }
.btn-sm { font-size: 12px; padding: 7px 12px; border-radius: 9px; }
.tag-pill.err-pill { background: var(--red-wash); color: var(--red); }
.desc-wrap { margin-top: 8px; background: #fff; border: 1px solid var(--border-2); border-radius: var(--r-md);
  padding: 10px 12px; }
.desc-head { display: flex; align-items: center; justify-content: flex-end; min-height: 14px; }
.desc-head .desc-state { font-size: 11px; font-weight: 700; color: var(--muted-2); }
.desc-head .desc-state.is-describing { color: var(--orange); }
.desc-head .desc-state.is-queued { color: var(--blue); }
.desc-head .desc-state.is-error { color: var(--red); }
.desc-timeline { max-height: 132px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px;
  font-size: 12.5px; line-height: 1.5; color: var(--navy); }
.desc-timeline:empty::before { content: ""; }
.desc-entry { display: flex; gap: 8px; }
.desc-entry .desc-ts { flex: none; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.desc-entry .desc-text { white-space: pre-wrap; }
.src-tab.active { background: var(--navy); color: #fff; }
.eval-row { padding: 10px 4px; border-bottom: 1px solid var(--border-2); }
.eval-row:last-child { border-bottom: none; }
.eval-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eval-name { font-weight: 600; font-size: 13.5px; }
.eval-cost { font-size: 11.5px; font-weight: 700; color: var(--navy-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eval-sub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.eval-stars { display: grid; grid-template-columns: 64px auto; gap: 2px 10px;
  align-items: center; margin-top: 7px; font-size: 11px; color: var(--muted); }
.eval-stars .st { color: var(--orange); letter-spacing: 2px; font-size: 12px; }
.llm-preview { margin-top: auto; }
.llm-preview:not(:empty) { border-top: 1px dashed var(--border); padding-top: 14px; }
.llm-preview .eval-top { margin-bottom: 4px; }
.prog { height: 8px; background: var(--border-2); border-radius: 6px; overflow: hidden; }
.prog-bar { height: 100%; width: 0; background: var(--orange); transition: width .4s; }
.vid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vid-label { font-size: 11.5px; font-weight: 700; color: var(--muted-2); margin-bottom: 5px; }
.va-media { width: 100%; aspect-ratio: 16/9; background: #0f1722; border-radius: var(--r-md); object-fit: contain; display: block; }
@media (max-width: 880px) { .vid-grid { grid-template-columns: 1fr; } }
.src-label { font-size: 12px; font-weight: 700; color: var(--navy); margin: 4px 0 8px;
  letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.merge-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border-2); }
.merge-row:last-child { border-bottom: none; }
.merge-row input[type=number] { width: 64px; }
@media (max-width: 880px) { .cam-grid { grid-template-columns: 1fr; } }
