:root {
  --bg: #f5f7fb;
  --sidebar: #0f172a;
  --sidebar-2: #111827;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --accent: #f59e0b;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #e5e7eb;
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: 22px;
  margin-bottom: 26px;
}

.admin-brand-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .08em;
}

.admin-brand-subtitle {
  margin: 6px 0 0;
  color: #93c5fd;
  font-size: 14px;
}

.admin-nav-group {
  margin-bottom: 26px;
}

.admin-nav-heading {
  color: #93c5fd;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: 0 0 10px;
  font-weight: 800;
}

.admin-nav-link {
  display: block;
  padding: 10px 12px;
  color: #dbeafe;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: 4px;
}

.admin-nav-link:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
}

.admin-main {
  padding: 36px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.admin-kicker {
  margin: 0 0 8px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 900;
}

.admin-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: .98;
}

.admin-subtitle {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.admin-section {
  margin: 34px 0;
}

.admin-section-title {
  font-size: 24px;
  margin: 0 0 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.admin-card h3 {
  margin-top: 0;
  font-size: 20px;
}

.admin-card p {
  color: var(--muted);
  line-height: 1.55;
}

.admin-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--line);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-ghost {
  background: #fff;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 900;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline div {
  border-left: 4px solid var(--brand);
  background: var(--panel);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  .admin-main { padding: 24px; }
  .admin-topbar { flex-direction: column; }
}

/* KWE_PHASE2_LIVE_FACE_DRONE_STYLES_START */
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

.video-preview {
  max-width: 100%;
  border-radius: 14px;
  background: #111827;
  border: 1px solid var(--line);
}
/* KWE_PHASE2_LIVE_FACE_DRONE_STYLES_END */

/* KWE_UI_DIRECTION_V1_START */
:root {
  --kwe-bg: #0B1020;
  --kwe-bg-2: #111827;
  --kwe-panel: rgba(17, 24, 39, 0.78);
  --kwe-panel-strong: rgba(15, 23, 42, 0.94);
  --kwe-text: #F8FAFC;
  --kwe-muted: #94A3B8;
  --kwe-line: rgba(148, 163, 184, 0.18);
  --kwe-blue: #3B82F6;
  --kwe-cyan: #22D3EE;
  --kwe-violet: #8B5CF6;
  --kwe-green: #10B981;
  --kwe-amber: #F59E0B;
  --kwe-red: #EF4444;
  --kwe-radius: 22px;
  --kwe-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --kwe-glow: 0 0 34px rgba(34, 211, 238, 0.22);
}

html,
body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.20), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(139, 92, 246, 0.20), transparent 30%),
    linear-gradient(135deg, #070B16 0%, var(--kwe-bg) 48%, #050816 100%);
  color: var(--kwe-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.admin-shell {
  background: transparent;
}

.admin-sidebar {
  background: rgba(5, 8, 22, 0.84);
  border-right: 1px solid var(--kwe-line);
  backdrop-filter: blur(22px);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.25);
}

.admin-brand {
  border-bottom: 1px solid var(--kwe-line);
}

.admin-brand-title {
  letter-spacing: 0.18em;
  color: var(--kwe-text);
}

.admin-brand-subtitle,
.admin-nav-heading,
.muted,
.card p,
.metric-card p {
  color: var(--kwe-muted);
}

.admin-nav-link {
  color: var(--kwe-muted);
  border: 1px solid transparent;
  border-radius: 14px;
  transition: all 160ms ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus {
  color: var(--kwe-text);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.10);
}

.admin-nav-link.muted-link {
  opacity: 0.55;
}

.admin-main {
  background: transparent;
}

.hero,
.card,
.metric-card,
.ai-orb-card {
  background: var(--kwe-panel);
  border: 1px solid var(--kwe-line);
  border-radius: var(--kwe-radius);
  box-shadow: var(--kwe-shadow);
  backdrop-filter: blur(20px);
}

.hero {
  overflow: hidden;
  position: relative;
}

.hero:before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(120deg, rgba(59, 130, 246, 0.24), transparent 28%),
    linear-gradient(300deg, rgba(34, 211, 238, 0.18), transparent 24%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1,
.card h2,
.metric-card h2 {
  color: var(--kwe-text);
}

.eyebrow {
  color: var(--kwe-cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.btn {
  border-radius: 999px;
  border: 1px solid var(--kwe-line);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--kwe-blue), var(--kwe-cyan));
  color: #FFFFFF;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
}

.btn.secondary {
  background: rgba(148, 163, 184, 0.08);
  color: var(--kwe-text);
  border-color: var(--kwe-line);
}

.grid.three,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.metric-grid {
  margin: 22px 0;
}

.metric-card {
  padding: 22px;
}

.metric-label {
  color: var(--kwe-cyan);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.glow-card {
  position: relative;
}

.glow-card:after {
  content: "";
  position: absolute;
  inset: auto 20px -1px 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--kwe-cyan), transparent);
  opacity: 0.55;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.ai-orb-card {
  padding: 26px;
  text-align: center;
}

.ai-orb {
  width: 150px;
  height: 150px;
  margin: 8px auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #FFFFFF, transparent 12%),
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.56) 42%, rgba(139, 92, 246, 0.24) 70%, transparent 72%);
  box-shadow:
    0 0 38px rgba(34, 211, 238, 0.48),
    inset 0 0 40px rgba(255, 255, 255, 0.18);
}

.orb-label {
  color: var(--kwe-text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operator-panel {
  margin-top: 22px;
}

.operator-questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.operator-questions div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.operator-questions strong {
  display: block;
  color: var(--kwe-cyan);
  font-size: 1.4rem;
}

.operator-questions span {
  color: var(--kwe-text);
}

pre,
code {
  background: rgba(2, 6, 23, 0.72);
  color: #CFFAFE;
  border: 1px solid var(--kwe-line);
  border-radius: 16px;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid.three,
  .metric-grid,
  .operator-questions {
    grid-template-columns: 1fr;
  }
}
/* KWE_UI_DIRECTION_V1_END */

/* KWE_EDGE_SAFE_DEVICE_UI_V1_START */
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.edge-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.edge-device-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--kwe-line, rgba(148, 163, 184, 0.18));
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.edge-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.edge-device-card h3 {
  margin: 4px 0 0;
  color: var(--kwe-text, #F8FAFC);
}

.edge-health-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(148, 163, 184, 0.20);
  color: var(--kwe-muted, #94A3B8);
  background: rgba(148, 163, 184, 0.08);
}

.status-good {
  color: #A7F3D0;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.status-warn {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.30);
}

.status-neutral {
  color: #BFDBFE;
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(59, 130, 246, 0.24);
}

.edge-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.edge-details div {
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.10);
}

.edge-details dt {
  margin: 0 0 4px;
  color: var(--kwe-muted, #94A3B8);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.edge-details dd {
  margin: 0;
  color: var(--kwe-text, #F8FAFC);
  font-weight: 800;
}
/* KWE_EDGE_SAFE_DEVICE_UI_V1_END */

/* KWE_EDGE_DOWNLOAD_V1_START */
.download-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.download-details div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.download-details strong {
  display: block;
  color: var(--kwe-cyan, #22D3EE);
  margin-bottom: 6px;
}

.download-details span {
  color: var(--kwe-text, #F8FAFC);
}

@media (max-width: 800px) {
  .download-details {
    grid-template-columns: 1fr;
  }
}
/* KWE_EDGE_DOWNLOAD_V1_END */

/* KWE_EDGE_DEMO_NODES_PAGES_V1_START */
.demo-notice {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  color: #BFDBFE;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.24);
}

.hidden {
  display: none !important;
}

.edge-actions {
  margin-top: 16px;
}

.edge-event-list {
  display: grid;
  gap: 12px;
}

.edge-event-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--kwe-line, rgba(148, 163, 184, 0.18));
}

.edge-event-card h3 {
  margin: 4px 0 6px;
  color: var(--kwe-text, #F8FAFC);
  text-transform: capitalize;
}

.detail-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .detail-wide {
    grid-template-columns: 1fr;
  }

  .edge-event-card {
    flex-direction: column;
  }
}
/* KWE_EDGE_DEMO_NODES_PAGES_V1_END */

/* KWE-V0.4.0-INTERSECTION-ANALYTICS-CSS-V2-START */

/* KWE-V0.4.0-INTERSECTION-ANALYTICS-METRIC-V2-START */
.vehicle-analytics-page .metric {
  margin: 8px 0;
  font-size: 42px;
  font-weight: 800;
}
/* KWE-V0.4.0-INTERSECTION-ANALYTICS-METRIC-V2-END */

/* KWE-V0.4.0-INTERSECTION-ANALYTICS-DETAILS-V2-START */
.vehicle-analytics-page .details-box {
  min-height: 220px;
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #e5e7eb;
}
/* KWE-V0.4.0-INTERSECTION-ANALYTICS-DETAILS-V2-END */

/* KWE-V0.4.0-INTERSECTION-ANALYTICS-PANEL-V2-START */
.vehicle-analytics-page .identity-card {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: white;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  color: #0f172a;
}
/* KWE-V0.4.0-INTERSECTION-ANALYTICS-PANEL-V2-END */

/* KWE-V0.4.6-VIDEO-PAGE-IDENTITY-CARD-CONTRAST-V1-START */
.vehicle-analytics-page .identity-card > h2,
.vehicle-analytics-page .intersection-report-header h2 {
  color: #0f172a;
}

.vehicle-analytics-page .identity-card > label,
.vehicle-analytics-page .identity-card > ul {
  color: #334155;
}

.vehicle-analytics-page .identity-card > .muted,
.vehicle-analytics-page .intersection-report-header .muted,
.vehicle-analytics-page .intersection-evidence-details > .muted {
  color: #64748b;
}
/* KWE-V0.4.6-VIDEO-PAGE-IDENTITY-CARD-CONTRAST-V1-END */

/* KWE-V0.4.0-INTERSECTION-ANALYTICS-CSS-V2-END */

/* KWE-V0.4.2-INTERSECTION-STRUCTURED-REPORT-CSS-START */
.vehicle-analytics-page .intersection-report[hidden] {
  display: none;
}

.vehicle-analytics-page .intersection-report-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.vehicle-analytics-page .intersection-report-kicker,
.vehicle-analytics-page .intersection-report-label {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.vehicle-analytics-page .intersection-report-status {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.vehicle-analytics-page .intersection-report-status[data-ready="true"] {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}

.vehicle-analytics-page .intersection-report-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.vehicle-analytics-page .intersection-report-meta div,
.vehicle-analytics-page .intersection-total-card,
.vehicle-analytics-page .intersection-movement-card,
.vehicle-analytics-page .intersection-breakdown-card {
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fafc;
}

.vehicle-analytics-page .intersection-report-meta dt {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vehicle-analytics-page .intersection-report-meta dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-weight: 700;
}

.vehicle-analytics-page .intersection-total-card {
  margin-bottom: 16px;
  border-color: #67e8f9;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.vehicle-analytics-page .intersection-report-total {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1;
}

.vehicle-analytics-page .intersection-movement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.vehicle-analytics-page .intersection-movement-count {
  margin: 0;
  color: #0f172a;
  font-size: 2.5rem;
  font-weight: 900;
}

.vehicle-analytics-page .intersection-report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* KWE-V0.4.3-INTERSECTION-REPORT-CONTRAST-HEADING-START */
.vehicle-analytics-page .intersection-breakdown-card h3 {
  margin-top: 0;
  color: #0f172a;
}
/* KWE-V0.4.3-INTERSECTION-REPORT-CONTRAST-HEADING-END */

.vehicle-analytics-page .intersection-breakdown-list {
  display: grid;
  gap: 8px;
}

/* KWE-V0.4.3-INTERSECTION-REPORT-CONTRAST-ROW-START */
.vehicle-analytics-page .intersection-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #e2e8f0;
}

.vehicle-analytics-page .intersection-breakdown-row span,
.vehicle-analytics-page .intersection-breakdown-row strong {
  color: #0f172a;
}
/* KWE-V0.4.3-INTERSECTION-REPORT-CONTRAST-ROW-END */

/* KWE-V0.4.3-INTERSECTION-REPORT-CONTRAST-MUTED-START */
.vehicle-analytics-page .intersection-breakdown-card .muted {
  color: #64748b;
}
/* KWE-V0.4.3-INTERSECTION-REPORT-CONTRAST-MUTED-END */

.vehicle-analytics-page .intersection-evidence-details {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.vehicle-analytics-page .intersection-evidence-details summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 800;
}

.vehicle-analytics-page .intersection-evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-analytics-page .intersection-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 800px) {
  .vehicle-analytics-page .intersection-report-header {
    flex-direction: column;
  }

  .vehicle-analytics-page .intersection-report-meta,
  .vehicle-analytics-page .intersection-movement-grid,
  .vehicle-analytics-page .intersection-report-columns,
  .vehicle-analytics-page .intersection-evidence-grid {
    grid-template-columns: 1fr;
  }
}
/* KWE-V0.4.2-INTERSECTION-STRUCTURED-REPORT-CSS-END */


