@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --sidebar: #0f1623;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(99, 102, 241, 0.18);
  --sidebar-active-bar: #818cf8;
  --sidebar-text: #b6c0d4;
  --sidebar-muted: #6b7794;
  --sidebar-brand: #ffffff;

  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --fg: #0b1220;
  --fg-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e6e9ef;
  --border-strong: #cfd6e0;

  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-glow: rgba(79, 70, 229, 0.18);

  --teal: #0ea5a4;
  --teal-soft: #ccfbf1;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --ok: #059669;
  --ok-soft: #d1fae5;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --pink: #db2777;
  --pink-soft: #fce7f3;

  --shadow-xs: 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
}

* { box-sizing: border-box; }
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--fg);
  background: var(--page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14.5px;
}

body:not(.app-shell):not(.auth-shell):not(.admin-auth):not(.landing) {
  background: var(--page);
  color: var(--fg);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover { color: var(--accent-hover); }

/* ============================================================
   Auth / marketing (no sidebar)
   ============================================================ */
body.auth-shell {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.5), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(14, 165, 164, 0.35), transparent 55%),
    linear-gradient(135deg, #0b1226 0%, #1e1b4b 50%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  color: #f1f5f9;
}

body.auth-shell .auth-top {
  padding: 24px 32px;
}
body.auth-shell .auth-top .brand {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
body.auth-shell .auth-top .brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #818cf8, #0ea5a4);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
body.auth-shell .auth-top .brand:hover { color: #e0e7ff; }

body.auth-shell .auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}

body.auth-shell .auth-panel {
  width: 100%;
  max-width: 440px;
}

body.auth-shell .auth-panel .card {
  background: rgba(255, 255, 255, 0.98);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  border-radius: var(--radius-lg);
  padding: 32px;
}

body.auth-shell .auth-hero {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
  color: #fff;
}

body.auth-shell .auth-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  line-height: 1.1;
}
body.auth-shell .auth-hero .lead {
  color: rgba(241, 245, 249, 0.85);
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.55;
}

body.auth-shell .auth-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

body.auth-shell .btn-ghost-light {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}
body.auth-shell .btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

body.auth-shell .steps-card {
  max-width: 720px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.97);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.4);
}

/* ============================================================
   App shell (sidebar + main)
   ============================================================ */
body.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--page);
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 18px 0 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 28px;
  color: var(--sidebar-brand);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.sidebar .brand:hover { color: #fff; text-decoration: none; }

.sidebar .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #818cf8 0%, #4f46e5 60%, #0ea5a4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  position: relative;
}
.sidebar nav a:hover {
  background: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}
.sidebar nav a.active {
  background: var(--sidebar-active);
  color: #fff;
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sidebar-active-bar);
}
.sidebar nav a .nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  flex-shrink: 0;
}
.sidebar nav a .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar nav a.active .nav-icon { opacity: 1; }

.sidebar-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-muted);
  padding: 12px 12px 6px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--sidebar-muted);
}
.sidebar-footer a { color: var(--sidebar-muted); font-weight: 500; }
.sidebar-footer a:hover { color: #fff; }

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.app-topbar h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.app-topbar .topbar-sub {
  margin: 3px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.app-topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--fg-2);
  font-weight: 500;
}
.app-topbar .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.app-content {
  padding: 28px 32px 56px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 { color: var(--fg); }
h1 {
  font-size: 1.6rem;
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.02rem;
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.page-title { margin: 0 0 4px; }

.lead {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 42em;
  line-height: 1.55;
}

.muted { color: var(--muted); font-size: 0.92rem; }
.muted.small { font-size: 0.8rem; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title h2 { margin: 0; }
.section-title .meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: block;
}

/* ============================================================
   Alerts
   ============================================================ */
.err {
  color: #991b1b;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.ok { color: var(--ok); }

.hint {
  background: var(--accent-soft);
  border: 1px solid #c7d2fe;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: #3730a3;
  font-size: 0.9rem;
}

/* ============================================================
   Cards & layout
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card h2 { margin-bottom: 8px; }

.card-flush {
  padding: 0;
  overflow: hidden;
}
.card-flush > .card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-flush > .card-head h2 { margin: 0; }
.card-flush > .card-head .meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  position: relative;
  transition: box-shadow 0.15s, transform 0.15s;
}
.stat-card:hover { box-shadow: var(--shadow-sm); }

.stat-card .stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-card .stat-label .icon-pill {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.stat-card .stat-label .icon-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stat-card .stat-label .icon-pill.teal { color: var(--teal); background: var(--teal-soft); }
.stat-card .stat-label .icon-pill.warn { color: var(--warn); background: var(--warn-soft); }
.stat-card .stat-label .icon-pill.violet { color: var(--violet); background: var(--violet-soft); }
.stat-card .stat-label .icon-pill.pink { color: var(--pink); background: var(--pink-soft); }
.stat-card .stat-label .icon-pill.blue { color: var(--blue); background: var(--blue-soft); }

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 10px 0 4px;
  color: var(--fg);
  line-height: 1.1;
}
.stat-card .stat-value .unit {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}
.stat-card .stat-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.stat-card .stat-meta strong { color: var(--fg-2); font-weight: 600; }

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

.grid-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 1000px) {
  .grid-row { grid-template-columns: 1fr; }
}

.tile {
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
  display: block;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #c7d2fe;
  text-decoration: none;
}
.tile h2 {
  color: var(--fg);
  font-size: 1.05rem;
}
.tile .tile-arrow {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 10px;
  font-weight: 600;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, color 0.12s;
  font-family: inherit;
}
.btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--fg);
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn.small { padding: 6px 12px; font-size: 0.82rem; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

/* ============================================================
   Forms
   ============================================================ */
.form-narrow { max-width: 400px; }

.card label {
  display: block;
  margin-bottom: 14px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--fg-2);
}

.card input[type="text"],
.card input[type="password"],
.card input[type="number"],
.card input[type="email"],
.card select,
.card textarea {
  width: 100%;
  padding: 10px 14px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.card input:focus,
.card select:focus,
.card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.inline-form input {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.92rem;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tbl th, .tbl td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tbl tbody tr {
  transition: background 0.1s;
}
.tbl tbody tr:hover { background: #fafbff; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .name-cell { font-weight: 600; color: var(--fg); }
.tbl .name-cell a { color: var(--fg); }
.tbl .name-cell a:hover { color: var(--accent); }

.tbl .num {
  font-variant-numeric: tabular-nums;
  color: var(--fg-2);
}
.tbl .right { text-align: right; }

/* Avatar pill for table rows */
.avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.avatar-pill .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--teal));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.avatar-pill .av.color-1 { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.avatar-pill .av.color-2 { background: linear-gradient(135deg, #34d399, #0ea5a4); }
.avatar-pill .av.color-3 { background: linear-gradient(135deg, #f59e0b, #db2777); }
.avatar-pill .av.color-4 { background: linear-gradient(135deg, #38bdf8, #4f46e5); }
.avatar-pill .av.color-5 { background: linear-gradient(135deg, #f472b6, #7c3aed); }

/* ============================================================
   Badges & progress
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.muted { background: var(--surface-3); color: var(--muted); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--blue-soft); color: var(--blue); }

.progress-track {
  height: 8px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
  width: 100%;
  max-width: 240px;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--teal));
  transition: width 0.3s;
}
.progress-fill.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-fill.danger { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress-fill.ok { background: linear-gradient(90deg, var(--teal), #34d399); }

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-row .progress-track { flex: 1; }
.progress-row .progress-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
}

/* Donut */
.donut {
  --size: 84px;
  --thick: 10px;
  --pct: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--pct) * 1%), #e7eaf3 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.donut::after {
  content: "";
  position: absolute;
  inset: var(--thick);
  background: var(--surface);
  border-radius: 50%;
}
.donut > span {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

/* ============================================================
   Day picker & tabs
   ============================================================ */
.day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 18px;
  background: var(--surface);
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.day-picker a, .day-picker strong {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.day-picker a {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.day-picker a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.day-picker strong {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tabs {
  margin: 0 0 16px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab {
  padding: 9px 16px;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: default;
  position: relative;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ============================================================
   Reports, code, env blocks
   ============================================================ */
.report-body .md-content {
  line-height: 1.65;
  font-size: 0.95rem;
  color: var(--fg-2);
}
.report-body .md-content h1,
.report-body .md-content h2,
.report-body .md-content h3 {
  margin-top: 1.4em;
  color: var(--fg);
}
.report-body .md-content h1 { font-size: 1.4rem; }
.report-body .md-content h2 { font-size: 1.15rem; }
.report-body .md-content h3 { font-size: 1rem; }
.report-body .md-content ul, .report-body .md-content ol {
  padding-left: 1.3rem;
  margin: 0.6em 0;
}
.report-body .md-content li { margin-bottom: 4px; }
.report-body .md-content p { margin: 0.6em 0; }
.report-body .md-content strong { color: var(--fg); }
.report-body .md-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 14px;
  background: var(--accent-soft);
  color: #3730a3;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.dl-card {
  text-align: center;
  padding: 30px 20px;
}
.dl-card .dl-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}
.dl-card h2 { margin-bottom: 14px; }

.setup-code pre, .env-block {
  background: #0b1226;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.6;
  border: none;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

pre.token {
  color: #5eead4;
  word-break: break-all;
  border: 2px dashed #6366f1;
  background: var(--accent-soft);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color: #1e1b4b;
}

code {
  font-size: 0.84em;
  background: var(--surface-3);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  border: 1px solid var(--border);
}

.meta-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 18px;
  font-size: 0.9rem;
}
.meta-dl dt {
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}
.meta-dl dd { margin: 0; color: var(--fg); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.filter-bar label { margin: 0; font-size: 0.88rem; }
.filter-bar select, .filter-bar input {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-family: inherit;
}

.steps-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.75;
  color: var(--fg);
  counter-reset: step;
}
.steps-list li { margin-bottom: 12px; }

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  margin-right: 6px;
  letter-spacing: 0.01em;
}

/* ============================================================
   Activity dashboard (replaces <pre> dump)
   ============================================================ */
.activity-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) {
  .activity-grid { grid-template-columns: 1fr; }
}

/* Hourly bar chart */
.hourly-chart {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  align-items: end;
  gap: 4px;
  height: 180px;
  padding: 12px 4px 0;
  border-bottom: 1px solid var(--border);
}
.hourly-bar {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: default;
}
.hourly-bar .bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  min-height: 1px;
}
.hourly-bar .bar-active {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  width: 100%;
  transition: opacity 0.15s;
}
.hourly-bar .bar-idle {
  background: #d4dae5;
  width: 100%;
}
.hourly-bar:hover .bar-active { opacity: 0.85; }
.hourly-bar .bar-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: #fff;
  font-size: 0.74rem;
  padding: 6px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}
.hourly-bar .bar-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--fg);
}
.hourly-bar:hover .bar-tip { opacity: 1; }

.hourly-axis {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
  padding: 8px 4px 4px;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.hourly-axis span:nth-child(odd) { visibility: hidden; }
@media (min-width: 700px) {
  .hourly-axis span:nth-child(odd) { visibility: visible; }
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
}
.chart-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.chart-legend .dot.active { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.chart-legend .dot.idle { background: #d4dae5; }

/* App breakdown rows */
.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
}
.app-row .app-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-row .app-time {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.app-row .app-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.app-row .app-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--teal));
  border-radius: 999px;
}

/* Top titles list */
.title-list {
  display: flex;
  flex-direction: column;
}
.title-list .title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.title-list .title-row:last-child { border-bottom: none; }
.title-list .title-row .meta-line {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.title-list .title-row .meta-line .tag-soft {
  background: var(--surface-3);
  color: var(--fg-2);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.7rem;
}
.title-list .title-row .title-text {
  font-size: 0.9rem;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.title-list .title-row .duration {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
}
.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.empty-state .empty-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state h2 { margin: 0 0 6px; color: var(--fg); }
.empty-state p { margin: 0 0 16px; }

/* ============================================================
   Home: PC shortcut grid + trend + feed
   ============================================================ */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.pc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: var(--shadow-xs);
  position: relative;
}
.pc-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: #c7d2fe;
  text-decoration: none;
}
.pc-card .pc-av {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--teal));
  position: relative;
}
.pc-card .pc-av.color-1 { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.pc-card .pc-av.color-2 { background: linear-gradient(135deg, #34d399, #0ea5a4); }
.pc-card .pc-av.color-3 { background: linear-gradient(135deg, #f59e0b, #db2777); }
.pc-card .pc-av.color-4 { background: linear-gradient(135deg, #38bdf8, #4f46e5); }
.pc-card .pc-av.color-5 { background: linear-gradient(135deg, #f472b6, #7c3aed); }
.pc-card .pc-av .status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--muted-2);
}
.pc-card .pc-av .status-dot.online { background: var(--ok); }
.pc-card .pc-av .status-dot.paused { background: var(--warn); }
.pc-card .pc-av .status-dot.offline { background: var(--muted-2); }
.pc-card .pc-meta { min-width: 0; flex: 1; }
.pc-card .pc-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-card .pc-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pc-card .pc-sub .dot-sep { opacity: 0.5; }
.pc-card .pc-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* "Add computer" tile that matches pc-card */
.pc-card.add-tile {
  border-style: dashed;
  background: var(--surface-2);
  color: var(--accent);
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}
.pc-card.add-tile:hover { border-color: var(--accent); background: var(--accent-soft); }

/* 7-day trend chart */
.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 140px;
  padding: 8px 4px 0;
}
.trend-bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  position: relative;
}
.trend-bar .bar {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 6px 6px 0 0;
  transition: opacity 0.15s;
}
.trend-bar.today .bar {
  background: linear-gradient(180deg, #34d399, var(--teal));
}
.trend-bar:hover .bar { opacity: 0.85; }
.trend-bar .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  background: var(--fg);
  color: #fff;
  font-size: 0.74rem;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  font-variant-numeric: tabular-nums;
}
.trend-bar:hover .tip { opacity: 1; }
.trend-axis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 8px 4px 0;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
}
.trend-axis .day-cell .lbl { font-weight: 600; color: var(--fg-2); }
.trend-axis .day-cell .sub {
  display: block;
  font-size: 0.68rem;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.trend-axis .day-cell.today .lbl { color: var(--teal); }

/* Status pill summary */
.status-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-2);
}
.status-pill .num {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--fg);
}
.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.status-pill.online { background: var(--ok-soft); color: var(--ok); }
.status-pill.paused { background: var(--warn-soft); color: var(--warn); }
.status-pill.offline { background: var(--surface-3); color: var(--muted); }

/* Delta indicator */
.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.delta.up { background: var(--ok-soft); color: var(--ok); }
.delta.down { background: var(--danger-soft); color: var(--danger); }
.delta.flat { background: var(--surface-3); color: var(--muted); }

/* Feed list */
.feed-list { display: flex; flex-direction: column; }
.feed-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.feed-row:last-child { border-bottom: none; }
.feed-row .feed-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feed-row .feed-icon.report { background: var(--violet-soft); color: var(--violet); }
.feed-row .feed-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feed-row .feed-main { min-width: 0; }
.feed-row .feed-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-row .feed-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}
.feed-row .feed-time {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Two-column home layout */
.home-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .home-cols { grid-template-columns: 1fr; }
}

/* Quick shortcut row */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.quick-actions .qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-2);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.quick-actions .qa-btn:hover {
  background: var(--accent-soft);
  border-color: #c7d2fe;
  color: var(--accent);
  text-decoration: none;
}
.quick-actions .qa-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   Landing page (marketing) — body.landing
   ============================================================ */
body.landing {
  background: #0b0f1d;
  color: #e2e8f0;
  display: block;
}
body.landing .auth-main {
  display: block;
  padding: 0;
  flex: none;
}
body.landing .auth-top { display: none; }

/* Sticky transparent nav */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 40px;
  background: rgba(11, 15, 29, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-nav .lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  font-size: 1.05rem;
  text-decoration: none;
}
.lp-nav .lp-brand .lp-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #818cf8, #0ea5a4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}
.lp-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.lp-nav-links a {
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.lp-nav-links a:hover { color: #fff; }
.lp-nav-cta { display: flex; gap: 10px; align-items: center; }
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
}
.lp-btn-ghost { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.14); }
.lp-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none; }
.lp-btn-primary {
  background: linear-gradient(135deg, #6366f1, #0ea5a4);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.7);
}
.lp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -8px rgba(99, 102, 241, 0.85);
  color: #fff;
  text-decoration: none;
}
.lp-btn-lg { padding: 14px 28px; font-size: 1rem; }

@media (max-width: 800px) {
  .lp-nav { padding: 12px 18px; }
  .lp-nav-links { display: none; }
}

/* Hero */
.lp-hero {
  position: relative;
  padding: 80px 32px 60px;
  text-align: center;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(99, 102, 241, 0.35), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(14, 165, 164, 0.25), transparent 60%),
    radial-gradient(1000px 800px at 50% 100%, rgba(217, 70, 239, 0.18), transparent 60%);
  overflow: hidden;
}
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(800px 500px at 50% 30%, #000 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(800px 500px at 50% 30%, #000 50%, transparent 100%);
  pointer-events: none;
}
.lp-hero-inner { position: relative; max-width: 1100px; margin: 0 auto; }
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 24px;
}
.lp-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}
.lp-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0 0 22px;
  color: #fff;
  background: linear-gradient(180deg, #ffffff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-hero h1 .grad-accent {
  background: linear-gradient(90deg, #818cf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-hero .lp-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(226, 232, 240, 0.78);
  max-width: 700px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.lp-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.lp-hero-meta {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.55);
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.lp-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lp-hero-meta svg {
  width: 14px; height: 14px;
  stroke: #34d399; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Dashboard mockup under hero */
.lp-mockup {
  margin: 56px auto 0;
  max-width: 1080px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #0f172a, #111827);
  box-shadow:
    0 40px 100px -20px rgba(99, 102, 241, 0.45),
    0 20px 60px -20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}
.lp-mockup .mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-mockup .mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.lp-mockup .mockup-dot.r { background: #ef4444; }
.lp-mockup .mockup-dot.y { background: #f59e0b; }
.lp-mockup .mockup-dot.g { background: #10b981; }
.lp-mockup .mockup-url {
  margin-left: 14px;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.5);
  font-family: ui-monospace, monospace;
}
.lp-mockup-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 380px;
}
.lp-mockup-sidebar {
  background: rgba(7, 11, 24, 0.6);
  padding: 18px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-mockup-sidebar .mock-nav {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-mockup-sidebar .mock-nav.active { background: rgba(99, 102, 241, 0.2); color: #fff; }
.lp-mockup-sidebar .mock-nav .swatch { width: 14px; height: 14px; border-radius: 4px; background: rgba(255,255,255,0.15); }
.lp-mockup-main { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.lp-mockup-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lp-mockup-kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
  border-radius: 10px;
}
.lp-mockup-kpi .kpi-l { font-size: 0.65rem; color: rgba(226, 232, 240, 0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.lp-mockup-kpi .kpi-v { font-size: 1.1rem; font-weight: 700; color: #fff; margin-top: 4px; }
.lp-mockup-kpi .kpi-delta { font-size: 0.7rem; color: #34d399; margin-top: 2px; }
.lp-mockup-chart {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  align-items: end;
  height: 130px;
}
.lp-mockup-chart .bar {
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
}
.lp-mockup-chart .bar.idle { background: rgba(255, 255, 255, 0.1); }

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

/* Generic section container */
.lp-section {
  padding: 80px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.lp-section-head { text-align: center; margin-bottom: 56px; }
.lp-section-head .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lp-section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 16px;
}
.lp-section-head p {
  font-size: 1.05rem;
  color: rgba(226, 232, 240, 0.65);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Stat strip (social proof) */
.lp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 32px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-stat { text-align: center; }
.lp-stat .v {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #818cf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-stat .l {
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.6);
  margin-top: 6px;
}
@media (max-width: 700px) {
  .lp-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Feature grid */
.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lp-feature {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 26px;
  border-radius: 16px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.lp-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(99, 102, 241, 0.06);
}
.lp-feature .lp-fi {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(14, 165, 164, 0.2));
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #c7d2fe;
  margin-bottom: 18px;
}
.lp-feature .lp-fi svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lp-feature h3 {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.lp-feature p {
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 900px) { .lp-feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .lp-feature-grid { grid-template-columns: 1fr; } }

/* How it works */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.lp-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px;
  border-radius: 16px;
  position: relative;
}
.lp-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -20px;
  left: 28px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 10px 20px -8px rgba(99, 102, 241, 0.6);
}
.lp-step h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 18px 0 8px;
}
.lp-step p { color: rgba(226, 232, 240, 0.65); font-size: 0.93rem; line-height: 1.55; margin: 0; }
@media (max-width: 800px) { .lp-steps { grid-template-columns: 1fr; } }

/* Pricing */
.lp-pricing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.lp-plan {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 32px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}
.lp-plan.featured {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 164, 0.08));
  border-color: rgba(129, 140, 248, 0.45);
  position: relative;
}
.lp-plan.featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #818cf8, #34d399);
  color: #0b0f1d;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.lp-plan h3 { color: #fff; font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
.lp-plan .plan-tagline { color: rgba(226, 232, 240, 0.6); font-size: 0.9rem; margin: 0 0 22px; }
.lp-plan .plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.lp-plan .plan-price .num {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}
.lp-plan .plan-price .per { color: rgba(226, 232, 240, 0.6); font-size: 0.92rem; }
.lp-plan .plan-fine { font-size: 0.82rem; color: rgba(226, 232, 240, 0.5); margin-bottom: 24px; }
.lp-plan ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  flex: 1;
}
.lp-plan ul li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.85);
}
.lp-plan ul li svg {
  width: 16px; height: 16px;
  stroke: #34d399; fill: none; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 3px;
}
@media (max-width: 700px) { .lp-pricing { grid-template-columns: 1fr; } }

/* Comparison row */
.lp-vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.lp-vs > div {
  padding: 28px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-vs .vs-them { background: rgba(255, 255, 255, 0.02); }
.lp-vs .vs-us {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 164, 0.07));
  border-color: rgba(129, 140, 248, 0.35);
}
.lp-vs h3 { color: #fff; font-size: 1.05rem; margin: 0 0 14px; }
.lp-vs ul { list-style: none; padding: 0; margin: 0; }
.lp-vs ul li { padding: 7px 0; color: rgba(226, 232, 240, 0.75); font-size: 0.9rem; display: flex; gap: 8px; align-items: start; }
.lp-vs .vs-them li::before { content: "✗"; color: #ef4444; font-weight: 800; }
.lp-vs .vs-us li::before { content: "✓"; color: #34d399; font-weight: 800; }
@media (max-width: 700px) { .lp-vs { grid-template-columns: 1fr; } }

/* FAQ */
.lp-faq { max-width: 800px; margin: 0 auto; }
.lp-faq details {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.lp-faq summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 1.4rem; color: rgba(226, 232, 240, 0.5); font-weight: 300; transition: transform 0.2s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq details p { color: rgba(226, 232, 240, 0.7); font-size: 0.94rem; line-height: 1.55; margin: 12px 0 0; }

/* Final CTA */
.lp-cta {
  margin: 80px 32px;
  padding: 60px 40px;
  background:
    radial-gradient(800px 400px at 20% 30%, rgba(99, 102, 241, 0.4), transparent 60%),
    radial-gradient(600px 400px at 80% 70%, rgba(52, 211, 153, 0.3), transparent 60%),
    linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  text-align: center;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.lp-cta h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.lp-cta p { color: rgba(226, 232, 240, 0.75); font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }
.lp-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.lp-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 32px;
  color: rgba(226, 232, 240, 0.45);
  font-size: 0.82rem;
  text-align: center;
}
.lp-footer a { color: rgba(226, 232, 240, 0.65); text-decoration: none; margin: 0 12px; }
.lp-footer a:hover { color: #fff; }

/* ============================================================
   Demo banner
   ============================================================ */
.demo-banner {
  background: linear-gradient(90deg, var(--warn-soft), #fef9c3);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #78350f;
  margin: -8px 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.demo-banner strong { color: #92400e; }
.demo-banner a {
  color: #78350f;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.demo-banner a:hover { color: #451a03; }

/* ============================================================
   Projects / clients
   ============================================================ */
.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--fg-2);
}
.project-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--proj-color, var(--accent));
}
.project-chip.unassigned { background: var(--surface-3); color: var(--muted); }
.project-chip.unassigned::before { background: var(--muted-2); }

.project-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
  margin-bottom: 16px;
}
.project-bar > span {
  height: 100%;
  background: var(--seg-color, var(--accent));
  transition: width 0.3s;
}

.project-bucket {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
  margin-bottom: 12px;
  position: relative;
}
.project-bucket.unassigned {
  border-style: dashed;
  background: var(--surface-2);
}
.project-bucket .pb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.project-bucket .pb-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--fg);
}
.project-bucket .pb-name .swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--proj-color, var(--accent));
}
.project-bucket .pb-meta {
  font-size: 0.86rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.project-bucket .pb-meta strong { color: var(--fg); font-weight: 700; }
.project-bucket .pb-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.project-bucket .pb-app {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.project-bucket .pb-titles {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}
.project-bucket .pb-titles .pt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.project-bucket .pb-titles .pt-row .pt-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-2);
}
.project-bucket .pb-tag-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.project-bucket .pb-tag-form select,
.project-bucket .pb-tag-form input[type="text"] {
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  font-family: inherit;
  font-size: 0.84rem;
  background: var(--surface);
}
.project-bucket .pb-tag-form .pb-tag-label {
  color: var(--muted);
  font-weight: 500;
}

.color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  vertical-align: middle;
}

/* Color picker palette for the create-project form */
.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.swatch-grid label {
  margin: 0 !important;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.12s;
}
.swatch-grid input { display: none; }
.swatch-grid label:has(input:checked) { border-color: var(--fg); }

/* ============================================================
   Privacy / restriction toggles
   ============================================================ */
.privacy-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.privacy-card.enabled {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, rgba(209, 250, 229, 0.35), var(--surface));
}
.privacy-card .p-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.privacy-card.enabled .p-icon { background: var(--ok-soft); color: var(--ok); }
.privacy-card .p-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.privacy-card.legal .p-icon { background: var(--violet-soft); color: var(--violet); }
.privacy-card.legal.enabled .p-icon { background: var(--ok-soft); color: var(--ok); }
.privacy-card .p-body h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.privacy-card .p-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.privacy-card .p-body details {
  font-size: 0.84rem;
  margin-top: 6px;
}
.privacy-card .p-body details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.privacy-card .p-body details summary::-webkit-details-marker { display: none; }
.privacy-card .p-body details summary::after {
  content: "▾";
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.privacy-card .p-body details[open] summary::after { transform: rotate(180deg); }
.privacy-card .p-body details .rule-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.privacy-card .p-body details .rule-grid .rule-item {
  font-size: 0.78rem;
  color: var(--fg-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.privacy-card .p-body details .rule-grid .rule-item .field {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.15s;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus + .slider { box-shadow: 0 0 0 3px var(--accent-glow); }

.notice {
  background: var(--ok-soft);
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

/* ============================================================
   Admin pages
   ============================================================ */
body.admin-auth {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}
body.admin-auth .wrap {
  max-width: 440px;
  margin: 48px auto;
  padding: 0 20px;
}
body.admin-auth .top {
  background: transparent;
  border: none;
  padding: 24px 20px 0;
}
body.admin-auth .top .brand { color: #fff; }
body.admin-app .sidebar { background: #0a0f1c; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .app-content { padding: 20px; }
  .app-topbar { padding: 14px 20px; }
  .activity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body.app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: column;
    padding: 12px;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
  }
  .sidebar nav a.active::before { display: none; }
  .sidebar .brand { padding-bottom: 12px; }
  .sidebar-footer { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .hourly-chart { height: 140px; }
}
