:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-2: #273449;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #16a34a;
  --warn: #d97706;
  --input-bg: #0b1424;
  --row-hover: rgba(255,255,255,.02);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: #60a5fa; }

button {
  font-family: inherit; font-size: 14px;
  padding: 8px 14px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text);
  cursor: pointer; transition: background .15s;
}
button:hover { background: #334155; }
button.primary { background: var(--primary); border-color: var(--primary); color: #ffffff; }
button.primary:hover { background: var(--primary-hover); color: #ffffff; }
button.danger { background: var(--danger); border-color: var(--danger); color: #ffffff; }
button.danger:hover { background: var(--danger-hover); color: #ffffff; }
button.ghost { background: transparent; }

input, select, textarea {
  font-family: inherit; font-size: 14px;
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field { margin-bottom: 12px; }

.login-wrap { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 700; font-size: 20px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white;
}
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.login-error { color: #f87171; font-size: 13px; margin-top: 10px; min-height: 16px; }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 20px 0; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 20px 20px; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 20px; color: var(--text); cursor: pointer;
  border-left: 3px solid transparent; font-size: 14px;
}
.nav-link:hover { background: var(--panel-2); }
.nav-link.active { background: var(--panel-2); border-left-color: var(--primary); font-weight: 600; }
.nav-badge {
  display: none; min-width: 22px; padding: 2px 7px; border-radius: 11px;
  background: var(--accent); color: white; font-size: 11px; font-weight: 600;
  text-align: center; line-height: 1.4;
}
.nav-badge.on { display: inline-block; }
.nav-spacer { flex: 1; }
.userbar { padding: 16px 20px; border-top: 1px solid var(--border); font-size: 13px; }
.userbar .who { color: var(--muted); margin-bottom: 8px; word-break: break-all; }

.main { padding: 24px 32px; overflow-x: auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: 22px; }
.page-header .actions { display: flex; gap: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; text-align: center; }
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .val { font-size: 22px; font-weight: 700; margin-top: 4px; }

.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--panel-2); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--row-hover); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.ok { background: rgba(22,163,74,.15); color: #4ade80; }
.badge.warn { background: rgba(217,119,6,.18); color: #fbbf24; }
.badge.crit { background: rgba(220,38,38,.18); color: #f87171; }
.badge.expired { background: rgba(100,116,139,.25); color: #cbd5e1; }
.badge.role { background: rgba(37,99,235,.18); color: #93c5fd; }
.badge.sent { background: rgba(22,163,74,.15); color: #4ade80; }
.badge.error { background: rgba(220,38,38,.18); color: #f87171; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 520px; padding: 24px; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin: 0 0 4px; font-size: 18px; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.acct-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.acct-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer; transition: background .12s, border-color .12s; }
.acct-row:hover { border-color: var(--accent); background: var(--panel); }
.acct-row-label { flex: 1; }
.acct-row-title { font-size: 14px; font-weight: 600; }
.acct-row-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.acct-row-chev { color: var(--muted); font-size: 22px; line-height: 1; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Ticket thread */
.ticket-thread { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); }
.ticket-msg { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); }
.ticket-msg .meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.ticket-msg .body { font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.ticket-msg.orig    { border-left: 3px solid #94a3b8; }
.ticket-msg.client  { border-left: 3px solid #94a3b8; }
.ticket-msg.admin   { border-left: 3px solid #3b82f6; }
.ticket-msg.internal{ border-left: 3px solid #f59e0b; background: rgba(245,158,11,0.06); }

.row-click { cursor: pointer; }
.row-click:hover { background: var(--input-bg); }

/* Job terms acceptance box */
.terms-box { margin: 12px 0; padding: 14px 16px; border: 2px solid var(--accent); border-radius: 8px; background: rgba(59,130,246,0.06); }
.terms-box.terms-agreed { border-color: #22c55e; background: rgba(34,197,94,0.06); }
.terms-box.terms-rejected { border-color: #f87171; background: rgba(248,113,113,0.06); }

.cal-chip.job { background: rgba(59,130,246,0.12); border-left: 3px solid #3b82f6; }

/* Rotate the disclosure arrow on <details> when open */
details[open] > summary > span:first-child { transform: rotate(90deg); }

/* Dashboard redesign */
.dash-section { font-size: 14px; font-weight: 600; color: var(--muted); margin: 24px 0 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-tile { transition: border-color .15s, background .15s; }
.dash-tile[data-go]:hover { border-color: var(--accent); background: var(--input-bg); }

.attention-panel { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; background: rgba(245,158,11,0.06); border-left: 4px solid #f59e0b; }
.attention-panel.attention-clear { background: rgba(34,197,94,0.06); border-left-color: #22c55e; color: var(--text); }
.attention-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.attention-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.attn-card { padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: background .12s, transform .12s; text-align: center; }
.attn-card:hover { background: var(--input-bg); transform: translateY(-1px); }
.attn-count { font-size: 20px; font-weight: 700; line-height: 1.1; }
.attn-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* SLA target editor on the Settings page */
.sla-grid { display: grid; grid-template-columns: 80px 90px auto 80px 90px auto; gap: 6px 10px; align-items: center; }
.sla-grid input { padding: 6px 8px; }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--panel-2); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  padding: 12px 16px; border-radius: 6px; z-index: 200;
  animation: slidein .2s ease-out;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.reminder-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.reminder-card .head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.reminder-card pre { background: var(--input-bg); border: 1px solid var(--border); border-radius: 6px; padding: 12px; font-size: 12px; white-space: pre-wrap; margin: 0; }

.helper-note { background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.3); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; color: #cbd5e1; }
.helper-warn { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.3); }

@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .sidebar .brand { padding: 0 12px 0 0; }
  .nav-link { padding: 8px 12px; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-link.active { border-left: 0; border-bottom-color: var(--primary); }
  .nav-spacer { display: none; }
  .userbar { width: 100%; border-top: 1px solid var(--border); margin-top: 8px; }
  .main { padding: 16px; }
  .row { grid-template-columns: 1fr; }
}

/* ---- Landing page ---- */
/* ===== Landing page ===== */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bg) 0%, rgba(124,58,237,0.04) 100%); }
.landing-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky; top: 0; z-index: 10;
}
.landing-bar .brand { margin-bottom: 0; }
.landing-nav { display: flex; gap: 24px; }
.landing-nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s; }
.landing-nav a:hover { color: var(--text); }

.hero {
  display: grid; grid-template-columns: 1fr 460px; align-items: center;
  gap: 48px;
  padding: 80px 56px 64px;
  max-width: 1200px; width: 100%; margin: 0 auto;
}
.hero-content { max-width: 600px; }
.hero-pill {
  display: inline-block;
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(168,85,247,0.18));
  border: 1px solid rgba(168,85,247,0.4);
  color: #c4b5fd;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  margin-bottom: 18px;
}
body.light .hero-pill { color: #6d28d9; border-color: rgba(124,58,237,0.35); background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(168,85,247,0.12)); }
.hero h1 {
  font-size: 52px; line-height: 1.05; margin: 0 0 18px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.grad-text {
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .lead { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 0 28px; line-height: 1.55; }
.hero-ctas { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
button.big { font-size: 16px; padding: 12px 24px; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none; color: var(--text); font-size: 15px; font-weight: 600;
  padding: 12px 20px; border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color .15s, background .15s;
}
.ghost-btn:hover { border-color: var(--primary); background: rgba(59,130,246,0.06); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }

.hero-illust { display: flex; justify-content: center; align-items: center; }
.hero-illust svg { width: 100%; max-width: 460px; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25)); }

.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 0 56px 64px;
}
.stat-pill {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  text-align: center;
}
.stat-pill .stat-num {
  font-size: 32px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stat-pill .stat-lab { font-size: 13px; color: var(--muted); margin-top: 6px; }

.section-h {
  text-align: center; font-size: 32px; font-weight: 700; margin: 0 0 12px;
  color: var(--text); letter-spacing: -0.01em;
}
.section-sub {
  text-align: center; color: var(--muted); font-size: 16px;
  max-width: 640px; margin: 0 auto 36px;
}

.features-wrap, .who-wrap, .faq-wrap {
  max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 64px 56px;
}
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px;
  transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--primary); transform: translateY(-2px); }
.feature .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(59,130,246,.20), rgba(168,85,247,.20));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.who-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px;
  text-align: center;
  transition: transform .15s, border-color .15s;
}
.who-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.who-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.who-card h3 { margin: 0 0 10px; font-size: 18px; color: var(--text); }
.who-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.faq-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 22px;
}
.faq-item h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.faq-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.contact-cta {
  max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 32px 56px 80px;
}
.cta-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(168,85,247,0.12));
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
}
.cta-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(59,130,246,0.35);
}
.cta-card h2 { margin: 0 0 12px; font-size: 30px; color: var(--text); }
.cta-card p { color: var(--muted); font-size: 16px; max-width: 540px; margin: 0 auto 24px; }
.cta-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cta-buttons .primary { text-decoration: none; display: inline-block; }
.hero-demo-btn {
  text-decoration: none; display: inline-block;
  background: var(--primary); border: 1px solid var(--primary);
  color: #ffffff !important;
  padding: 12px 28px; border-radius: 6px;
  font-size: 16px; font-weight: 600;
  transition: background .15s;
}
.hero-demo-btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.cta-email-btn {
  font-size: 20px; font-weight: 700; letter-spacing: 0.01em;
  padding: 16px 36px; border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}
.cta-fine { font-size: 12px; color: var(--muted); margin: 0; }

.landing-foot {
  border-top: 1px solid var(--border);
  padding: 24px 56px;
  background: var(--panel);
}
.foot-row { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-muted { color: var(--muted); font-size: 13px; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding: 56px 24px; gap: 32px; }
  .hero-illust { order: -1; max-width: 380px; margin: 0 auto; }
  .hero h1 { font-size: 36px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); padding: 0 24px 48px; }
  .features-wrap, .who-wrap, .faq-wrap { padding: 48px 24px; }
  .section-h { font-size: 26px; }
  .landing-nav { display: none; }
  .contact-cta { padding: 24px 24px 56px; }
  .cta-card h2 { font-size: 24px; }
  .landing-foot { padding: 20px 24px; }
}
@media (max-width: 480px) {
  .stats-strip { grid-template-columns: 1fr; }
}



/* ---- Calendar ---- */
.cal-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 4px 6px; letter-spacing: .5px; text-align: center; }
.cal-day { background: var(--input-bg); border: 1px solid var(--border); border-radius: 6px; min-height: 96px; padding: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.cal-day.outside { opacity: 0.35; }
.cal-day.today { border-color: var(--primary); background: rgba(37,99,235,.08); }
.cal-day .num { font-weight: 600; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.cal-day.today .num { color: #93c5fd; }
.cal-chip { background: var(--panel-2); border-left: 3px solid var(--primary); padding: 2px 6px; border-radius: 3px; font-size: 11px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip:hover { background: #334155; }
.cal-chip.crit { border-left-color: #f87171; }
.cal-chip.warn { border-left-color: #fbbf24; }
.cal-chip.ok   { border-left-color: #4ade80; }
.cal-chip.expired { border-left-color: #94a3b8; opacity: 0.6; }
@media (max-width: 768px) {
  .cal-day { min-height: 70px; padding: 4px; }
  .cal-chip { font-size: 10px; padding: 1px 4px; }
}


/* ---- Light theme ---- */
html, body { transition: background-color .15s, color .15s; }
body.light {
  --bg: #dde5ef;
  --panel: #ffffff;
  --panel-2: #e2e8f0;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --input-bg: #ffffff;
  --row-hover: rgba(15,23,42,.05);
}
body.light a { color: #1d4ed8; }
body.light button:hover { background: #cbd5e1; }
body.light th { background: #e2e8f0; }
body.light .modal-backdrop { background: rgba(15,23,42,.45); }
body.light .badge.ok      { background: rgba(22,163,74,.15);  color: #15803d; }
body.light .badge.warn    { background: rgba(217,119,6,.18);  color: #b45309; }
body.light .badge.crit    { background: rgba(220,38,38,.18);  color: #b91c1c; }
body.light .badge.expired { background: rgba(100,116,139,.18); color: #475569; }
body.light .badge.role    { background: rgba(37,99,235,.15);  color: #1d4ed8; }
body.light .badge.sent    { background: rgba(22,163,74,.15);  color: #15803d; }
body.light .badge.error   { background: rgba(220,38,38,.18);  color: #b91c1c; }
body.light .helper-note   { color: #334155; }
body.light .login-error   { color: #b91c1c; }
body.light .cal-day.today { background: rgba(37,99,235,.06); }


/* ---- Search ---- */
.sb-search {
  margin: 0 16px 12px; padding: 8px 10px;
  background: var(--input-bg); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px;
}
.sb-search:hover { color: var(--text); }
.sb-search kbd {
  margin-left: auto; font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.search-input {
  width: 100%; font-size: 16px; padding: 12px 14px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--input-bg); color: var(--text);
}
.search-input:focus { outline: 2px solid var(--primary); }
.search-results { max-height: 50vh; overflow-y: auto; margin-top: 12px; }
.search-group-label { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; padding: 8px 4px 4px; }
.search-item {
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.search-item:hover, .search-item.active { background: var(--panel-2); }
.search-item .sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.search-empty { padding: 24px; text-align: center; color: var(--muted); }

/* ---------- Cyber Essentials ---------- */
.ce-meta { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.ce-meta-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px 16px; }
.ce-meta-grid .field { margin-bottom: 6px; }
.ce-score { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.ce-score-bar { flex: 1; height: 12px; background: #e5e8f0; border-radius: 6px; overflow: hidden; }
body.light .ce-score-bar { background: #e5e8f0; }
.ce-score-fill { height: 100%; background: #1f8a4c; transition: width .25s ease; }
.ce-score-text { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ce-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.ce-tab { padding: 8px 12px; cursor: pointer; border-radius: 6px 6px 0 0; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.ce-tab:hover { background: var(--panel-2); color: var(--text); }
.ce-tab.active { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-bottom: 1px solid var(--panel); margin-bottom: -1px; font-weight: 600; }
.ce-tab-pct { font-size: 11px; color: var(--muted); font-weight: 400; }
.ce-section-body { padding-top: 6px; }
.ce-q { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.ce-q-head { display: flex; align-items: flex-start; gap: 10px; }
.ce-q-key { font-weight: 700; color: var(--muted); font-size: 12px; min-width: 36px; padding-top: 2px; }
.ce-q-text { flex: 1; font-weight: 600; color: var(--text); line-height: 1.35; }
.ce-q-help { color: var(--muted); font-size: 12px; margin: 4px 0 8px 46px; font-style: italic; }
.ce-q-input { margin: 8px 0 6px 46px; }
.ce-q-input input[type=text], .ce-q-input input[type=number], .ce-q-input textarea { width: 100%; }
.ce-q-notes { margin: 6px 0 0 46px; }
.ce-q-notes label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }
.ce-q-notes textarea { width: 100%; }
.ce-radio-group { display: flex; gap: 18px; flex-wrap: wrap; }
.ce-radio-group label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.ce-tag { font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 3px 8px; border-radius: 4px; color: #fff; }
.ce-tag.pass    { background: #1f8a4c; }
.ce-tag.fail    { background: #c53030; }
.ce-tag.na      { background: #7a8194; }
.ce-tag.pending { background: #a0a4b3; }
.ce-tag.info    { background: #2563eb; }
@media (max-width: 880px) {
  .ce-meta-grid { grid-template-columns: 1fr; }
}

/* ---------- Financials ---------- */
.fin-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 6px 0; }
.fin-tile { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.fin-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.fin-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.fin-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 980px) { .fin-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fin-tiles { grid-template-columns: 1fr; } }

/* Center-aligned table — used by renewals view */
.center-table th, .center-table td { text-align: center; vertical-align: middle; }

/* ---------- Legal pages (Privacy / Cookies) ---------- */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 56px 32px 80px; color: var(--text); line-height: 1.65; }
.legal-wrap h1 { font-size: 36px; margin: 0 0 8px; letter-spacing: -0.01em; }
.legal-sub { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
.legal-wrap h2 { font-size: 20px; margin: 32px 0 10px; color: var(--text); }
.legal-wrap h3 { font-size: 16px; margin: 20px 0 6px; color: var(--text); }
.legal-wrap p { margin: 0 0 14px; color: var(--text); }
.legal-wrap ul { margin: 6px 0 16px 22px; padding: 0; }
.legal-wrap li { margin: 5px 0; color: var(--text); }
.legal-wrap a { color: #3b82f6; }
.legal-wrap strong { color: var(--text); }
.legal-back { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; }

/* Landing footer link strip */
.foot-links { gap: 12px; font-size: 13px; justify-content: center; }
.foot-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.foot-links a:hover { color: var(--text); }
.landing-foot .foot-row + .foot-row { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }

@media (max-width: 720px) {
  .legal-wrap { padding: 36px 20px 56px; }
  .legal-wrap h1 { font-size: 28px; }
  .legal-wrap h2 { font-size: 18px; }
}
r); padding-top: 14px; margin-top: 14px; }

@media (max-width: 720px) {
  .legal-wrap { padding: 36px 20px 56px; }
  .legal-wrap h1 { font-size: 28px; }
  .legal-wrap h2 { font-size: 18px; }
}

/* Company logo in sidebar brand area */
.brand-logo { max-height: 64px; max-width: 160px; object-fit: contain; display: inline-block; vertical-align: middle; }
.sidebar .brand { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
