/* TryPreven demo — design tokens + base styles */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --navy: #000a3c;
  --navy-soft: #0a1554;
  --green: #0d4f3c;
  --green-soft: #11664e;
  --lime: #d4ff3a;
  --lime-soft: #e2ff6e;
  --alert: #ff6b1a;
  --alert-soft: #ff8a4a;

  --sidebar: var(--navy);
  --sidebar-fg: #cbd5e1;
  --sidebar-active: rgba(212, 255, 58, 0.12);
  --sidebar-active-fg: var(--lime);
  --text: #0a0a0a;
  --muted: #5b6478;
  --muted-2: #8b95a8;
  --border: #e3e6ec;
  --border-strong: #cbd0db;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.10);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; color: var(--navy); }

/* ─── Demo banner (top, fixed) ─────────────────────── */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 10, 60, 0.94);
  color: #fff;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-banner .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}
.demo-banner a {
  color: var(--lime);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.demo-banner .role-toggle {
  margin-left: 24px;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.demo-banner .role-toggle a {
  padding: 4px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}
.demo-banner .role-toggle a.active {
  background: var(--lime);
  color: var(--navy);
}

/* ─── App layout (admin) ───────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
  padding-top: 38px; /* leave space for the demo banner */
}

.sidebar {
  width: 248px;
  background: var(--sidebar);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 38px;
  height: calc(100vh - 38px);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
}
.sidebar-logo .mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--navy);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.25);
}
.sidebar-logo .mark svg { width: 22px; height: 22px; }
.sidebar-logo .name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #fff;
}
.sidebar-logo .sub {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin-top: 2px;
}

.company-switcher {
  margin: 0 14px 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: default;
}
.company-switcher .icon { color: rgba(203, 213, 225, 0.6); display: grid; place-items: center; }
.company-switcher .icon svg { width: 16px; height: 16px; }
.company-switcher .name {
  flex: 1;
  font-weight: 600;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
}
.company-switcher .name small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}
.company-switcher .chev { color: rgba(203, 213, 225, 0.4); }
.company-switcher .chev svg { width: 12px; height: 12px; }

.nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.78);
  transition: background 0.12s ease, color 0.12s ease;
}
.nav a:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.nav a.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-fg);
  font-weight: 600;
}
.nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav .section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  font-weight: 700;
  padding: 14px 14px 6px;
}

.sidebar-footer {
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.user-card .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--navy);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.user-card .info { flex: 1; min-width: 0; }
.user-card .info .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.user-card .info .role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}

/* ─── Main content area ────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  padding: 30px 40px 60px;
  overflow-x: hidden;
}
@media (max-width: 880px) {
  .sidebar { display: none; }
  .main { padding: 20px; }
}

/* ─── Page header ──────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--navy));
  color: var(--lime);
  display: grid; place-items: center;
}
.page-header .icon-wrap svg { width: 22px; height: 22px; }
.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-header .subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 0;
}
.page-header .actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ─── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, border-color 0.1s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn--primary {
  background: var(--lime);
  color: var(--navy);
  font-weight: 700;
}
.btn--primary:hover { background: var(--lime-soft); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--green); }
.btn--outline { background: transparent; border-color: var(--border-strong); color: var(--navy); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--sm { padding: 6px 12px; font-size: 12px; }

/* ─── KPIs ─────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.kpi:hover { border-color: var(--lime); box-shadow: var(--shadow-sm); }
.kpi .icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kpi .icon svg { width: 20px; height: 20px; color: #fff; }
.kpi .icon.green { background: var(--green); }
.kpi .icon.navy  { background: var(--navy); }
.kpi .icon.alert { background: var(--alert); }
.kpi .icon.lime  { background: var(--lime); color: var(--navy); }
.kpi .icon.lime svg { color: var(--navy); }
.kpi .icon.info  { background: var(--info); }
.kpi .num { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.kpi .label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ─── Cards ────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ─── Tables ───────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.t thead th {
  text-align: left;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
table.t tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: #f8fafc; }
table.t td.num { font-variant-numeric: tabular-nums; }

/* ─── Badges ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge .pip { width: 6px; height: 6px; border-radius: 50%; }
.badge-success { background: rgba(16, 185, 129, 0.12); color: #065f46; }
.badge-success .pip { background: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #92400e; }
.badge-warning .pip { background: var(--warning); }
.badge-danger  { background: rgba(239, 68, 68, 0.12); color: #991b1b; }
.badge-danger .pip { background: var(--danger); }
.badge-info    { background: rgba(59, 130, 246, 0.12); color: #1e3a8a; }
.badge-info .pip { background: var(--info); }
.badge-muted   { background: rgba(91, 100, 120, 0.10); color: var(--muted); }
.badge-muted .pip { background: var(--muted-2); }
.badge-alert   { background: rgba(255, 107, 26, 0.12); color: #9a3412; }
.badge-alert .pip { background: var(--alert); }
.badge-lime    { background: rgba(212, 255, 58, 0.25); color: var(--navy); }
.badge-lime .pip { background: var(--lime); }

/* ─── Toolbar (filters) ────────────────────────────── */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.input, .select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  min-width: 180px;
}
.input::placeholder { color: var(--muted-2); }

/* ─── Chips ────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2f7;
  color: var(--muted);
  border: 1px solid var(--border);
}
.chip.active {
  background: var(--navy);
  color: var(--lime);
  border-color: var(--navy);
}

/* ─── Visit detail blocks ──────────────────────────── */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.checklist-item .state {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
}
.checklist-item .state.ok { background: rgba(16, 185, 129, 0.15); color: #065f46; }
.checklist-item .state.warn { background: rgba(245, 158, 11, 0.15); color: #92400e; }
.checklist-item .state.bad { background: rgba(239, 68, 68, 0.15); color: #991b1b; }
.checklist-item .item-text { flex: 1; font-size: 13.5px; }
.checklist-item .note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* ─── Photos grid ──────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 720px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
.photo {
  aspect-ratio: 4/3;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--green));
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo .tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 10, 60, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.photo .danger-pin {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--alert);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.3);
}

/* ─── Two-column layouts ───────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.grid-3-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-2-3, .grid-3-2 { grid-template-columns: 1fr; }
}

/* ─── Map placeholder ──────────────────────────────── */
.map-mock {
  position: relative;
  height: 320px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #e7eef7 0%, #f3f5f9 100%);
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 10, 60, 0.05) 0 1px, transparent 1px 50px),
    repeating-linear-gradient(90deg, rgba(0, 10, 60, 0.05) 0 1px, transparent 1px 50px),
    radial-gradient(circle at 30% 60%, rgba(13, 79, 60, 0.10), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(0, 10, 60, 0.08), transparent 50%);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-mock .pin {
  position: absolute;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--alert);
  border: 3px solid #fff;
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(255, 107, 26, 0.40);
  transform: translate(-50%, -50%);
}
.map-mock .pin.green { background: var(--green); box-shadow: 0 6px 16px rgba(13, 79, 60, 0.40); }
.map-mock .pin.navy { background: var(--navy); box-shadow: 0 6px 16px rgba(0, 10, 60, 0.40); }
.map-mock .label {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  transform: translate(-50%, 4px);
  box-shadow: var(--shadow-sm);
}

/* ─── Signature placeholder ────────────────────────── */
.signature-box {
  background: #fafbfd;
  border: 2px dashed var(--border-strong);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.signature-box.signed {
  background: var(--surface);
  border-style: solid;
  border-color: var(--success);
  font-style: italic;
  color: var(--navy);
}
.signature-box.signed svg {
  width: 120px;
  margin: 0 auto;
  display: block;
  color: var(--navy);
}

/* ─── Voice dictation block ─────────────────────────── */
.voice-block {
  background: linear-gradient(160deg, var(--navy), #051030);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.voice-block .voice-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.voice-block .rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--alert);
  box-shadow: 0 0 12px var(--alert);
}
.voice-block .transcript {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.55;
}
.voice-block .ai-arrow {
  text-align: center;
  font-size: 11px;
  color: var(--lime);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
}
.voice-block .ai-output {
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 18px;
}
.voice-block .ai-output h5 {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.voice-block .ai-output p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; }
.voice-block .ai-output ol { margin: 4px 0 10px 20px; font-size: 13.5px; padding: 0; }
.voice-block .ai-output .ref {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(13, 79, 60, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}

/* ─── Chart placeholders (bars) ─────────────────────── */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding: 6px 0 0;
}
.chart-bars .bar {
  flex: 1;
  background: linear-gradient(to top, var(--green), var(--green-soft));
  border-radius: 8px 8px 0 0;
  position: relative;
  min-height: 8px;
  transition: opacity 0.15s ease;
}
.chart-bars .bar:hover { opacity: 0.85; }
.chart-bars .bar.alert { background: linear-gradient(to top, var(--alert), var(--alert-soft)); }
.chart-bars .bar .v {
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
}
.chart-bars-labels {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.chart-bars-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* ─── Folder grid (documents) ───────────────────────── */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 880px) { .folder-grid { grid-template-columns: 1fr; } }
.folder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.folder:hover { border-color: var(--lime); transform: translateY(-1px); }
.folder .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(13, 79, 60, 0.10);
  color: var(--green);
  display: grid; place-items: center;
  font-size: 22px;
}
.folder .info { flex: 1; min-width: 0; }
.folder .info .name { font-weight: 700; font-size: 14px; color: var(--navy); }
.folder .info .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ─── Document rows ─────────────────────────────────── */
.doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.doc-row .ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 11px;
}
.doc-row .info { flex: 1; min-width: 0; }
.doc-row .info .name { font-weight: 600; font-size: 13.5px; color: var(--navy); }
.doc-row .info .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ─── Workload bars ─────────────────────────────────── */
.workload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.workload-row .who {
  width: 130px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.workload-row .bar-track {
  flex: 1;
  height: 10px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}
.workload-row .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-soft));
  border-radius: 999px;
}
.workload-row .val {
  width: 70px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

/* ─── List of recent items ─────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.list-item .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--navy);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.list-item .body { flex: 1; min-width: 0; font-size: 13.5px; }
.list-item .body .title { font-weight: 600; color: var(--navy); }
.list-item .body .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-item .right { font-size: 11px; color: var(--muted); }

/* ─── Section spacing ──────────────────────────────── */
.section-block { margin-bottom: 24px; }
.section-block-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════
   ═══════════ TECHNICIAN MOBILE LAYOUT ════════════════
   ═══════════════════════════════════════════════════════ */
body.tech {
  background: #f0f2f6;
}
.tech-phone {
  max-width: 480px;
  margin: 38px auto 0;
  min-height: calc(100vh - 38px);
  background: var(--surface);
  padding-bottom: 92px;
  position: relative;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.tech-header {
  background: linear-gradient(160deg, var(--navy), var(--green));
  color: #fff;
  padding: 24px 22px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.tech-header .hello {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.tech-header .subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}
.tech-header .brand-mini {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tech-header .brand-mini .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--navy);
  display: grid; place-items: center;
}
.tech-header .brand-mini .mark svg { width: 18px; height: 18px; }
.tech-content { padding: 20px 18px 24px; }

.tech-content .card { padding: 18px; margin-bottom: 14px; }

.btn-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  font-size: 16px;
  border-radius: 14px;
  border: 0;
  box-shadow: 0 10px 24px rgba(212, 255, 58, 0.35);
  font-family: inherit;
  margin-bottom: 18px;
  cursor: pointer;
}

.tech-bottomnav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
}
.tech-bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px 14px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-2);
}
.tech-bottomnav a.active {
  color: var(--green);
}
.tech-bottomnav a.active .ico {
  background: var(--green);
  color: var(--lime);
}
.tech-bottomnav a .ico {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #f0f2f6;
  color: var(--muted-2);
  display: grid; place-items: center;
}
.tech-bottomnav a .ico svg { width: 16px; height: 16px; }

/* Wizard pasos */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.wizard-step {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e3e6ec;
}
.wizard-step.done { background: var(--green); }
.wizard-step.active { background: var(--lime); }
.wizard-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.wizard-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--navy);
}

.obra-card-select {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.obra-card-select.selected {
  border-color: var(--green);
  background: rgba(13, 79, 60, 0.04);
}
.obra-card-select .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--navy));
  color: var(--lime);
  display: grid; place-items: center;
  font-size: 20px;
}
.obra-card-select .info { flex: 1; min-width: 0; }
.obra-card-select .info .name { font-weight: 700; font-size: 14px; color: var(--navy); }
.obra-card-select .info .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Detalle visita: secciones */
.detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.detail-section h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--navy);
}
.kv-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--muted); }
.kv-row .v { color: var(--navy); font-weight: 600; }
