@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
:root {
  --bg: #0B0A10;
  --bg-2: #0F0E16;
  --card: #15131E;
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --text: #ECEAF4;
  --muted: #C9C6D6;
  --soft: #B7B0D4;
  --fine: #A8A3BB;
  --brand: #4E2FD1;
  --brand-hover: #5B3DE0;
  --accent: #C4B5FF;
  --white: #FAFAFA;
  --focus: #FFD166;
  --ok: #8FE3B0;
  --warn: #FFD166;
  --bad: #FFB4B4;
  --pending: #C9B8FF;
  --sidebar: 250px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
body { background:
  radial-gradient(circle at 12% -10%, rgba(78,47,209,0.22), transparent 42%),
  radial-gradient(circle at 90% 0%, rgba(125,179,255,0.08), transparent 36%),
  var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: #fff; }
button, input, select, textarea { font: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; padding: 10px 14px; background: #fff; color: #000; border-radius: 8px; }

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: auto;
  background: var(--bg-2); border-right: 1px solid var(--line);
  padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; color: inherit; }
.brand img { height: 32px; width: auto; max-width: 140px; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 15px; letter-spacing: 0.02em; }
.brand-text span { color: var(--fine); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-label { margin: 14px 8px 6px; color: var(--fine); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 550;
}
.nav a:hover { background: rgba(255,255,255,0.04); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: #1B1630; color: #fff; }
.nav .count { font-size: 11px; font-weight: 700; background: #1C1930; color: var(--accent); padding: 1px 7px; border-radius: 999px; }
.mode-toggle { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.mode-toggle p { margin: 0; color: var(--fine); font-size: 12px; }
.seg { display: flex; background: #0B0A10; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 7px 8px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.main { min-width: 0; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--line); background: rgba(11,10,16,0.72); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 5;
}
.top h1 { margin: 0; font: 650 20px/1.3 Inter, system-ui, sans-serif; color: #fff; }
.top .meta { color: var(--fine); font-size: 13px; }
.crumb { color: var(--fine); font-size: 12px; margin: 0 0 4px; }
.content { padding: 24px 28px 48px; max-width: 1280px; }

.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: 1.3fr 1fr; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  .grid.cols-3, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
}

.nav-toggle, .nav-backdrop { display: none; }
.nav-drawer { display: flex; flex-direction: column; flex: 1; gap: 6px; min-height: 0; }
.nav-toggle {
  align-items: center; gap: 8px; margin-left: auto; flex: none;
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text); font-weight: 650; cursor: pointer;
}
.nav-toggle:hover, .nav-toggle:focus-visible { background: rgba(255,255,255,0.06); color: #fff; }
.nav-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nav-toggle-icon {
  display: block; width: 16px; height: 12px; position: relative;
}
.nav-toggle-icon::before, .nav-toggle-icon::after, .nav-toggle-icon {
  background: currentColor;
}
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: currentColor;
}
.nav-toggle-icon::before { top: 0; box-shadow: 0 5px 0 currentColor; }
.nav-toggle-icon::after { bottom: 0; }
/* The icon element itself shouldn't be a solid bar — only the pseudo lines. */
.nav-toggle-icon { background: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  body.nav-open { overflow: hidden; }
  .sidebar {
    position: sticky; top: 0; z-index: 40;
    height: 56px; max-height: 56px; overflow: visible;
    flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px;
    padding: 0 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0; flex: 1; min-width: 0; gap: 8px; }
  .brand img { height: 28px; max-width: 110px; }
  .nav-toggle { display: inline-flex; }
  .nav-drawer {
    display: none;
    position: fixed; top: 56px; left: 0; bottom: 0;
    width: min(300px, 88vw);
    z-index: 42;
    background: var(--bg-2);
    border-right: 1px solid var(--line);
    padding: 12px 12px 24px;
    overflow: auto;
    flex: none;
  }
  .sidebar.is-open .nav-drawer { display: flex; }
  .nav-backdrop {
    position: fixed; inset: 0; top: 56px;
    z-index: 41;
    border: 0; padding: 0; margin: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
  }
  .app.is-nav-open .nav-backdrop { display: block; }
  .top { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
}


.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px;
}
.card h2, .card h3 { margin: 0 0 12px; color: #fff; font: 650 16px/1.3 Inter, system-ui, sans-serif; }
.card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card header h2, .card header h3 { margin: 0; }
.muted { color: var(--muted); }
.fine { color: var(--fine); font-size: 13px; }
.stat { padding: 16px 18px; }
.stat .n { font: 700 28px/1 Inter, system-ui, sans-serif; color: #fff; }
.stat .l { margin-top: 6px; color: var(--fine); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font: 650 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; background: #1B1630; color: var(--accent); white-space: nowrap; }
.pill.done, .pill.ok { background: rgba(143,227,176,0.12); color: var(--ok); }
.pill.blocked, .pill.failed, .pill.bad { background: rgba(255,180,180,0.12); color: var(--bad); }
.pill.waiting, .pill.warn, .pill.overdue { background: rgba(255,209,102,0.12); color: var(--warn); }
.pill.pending, .pill.in_progress, .pill.recurring { background: #1B1630; color: var(--pending); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--fine); font-weight: 650; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: rgba(255,255,255,0.03); }
.title-cell { color: #fff; font-weight: 600; }
.detail { margin: 4px 0 0; color: var(--fine); font-size: 12.5px; max-width: 64ch; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list strong { color: #fff; display: block; }
.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-weight: 650; cursor: pointer; }
.btn:hover { background: rgba(255,255,255,0.04); color: #fff; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { color: var(--accent); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.field { display: flex; flex-direction: column; gap: 6px; font: 500 14px/1.3 Inter, system-ui, sans-serif; color: #EDEBF7; margin: 0 0 14px; }
.field input, .field textarea, .field select {
  font: 16px/1.4 Inter, system-ui, sans-serif; padding: 10px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.22); background: #0B0A10; color: #fff; width: 100%;
}
.field textarea { min-height: 90px; resize: vertical; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check input { margin-top: 3px; accent-color: #7c3aed; }
.progress { height: 8px; background: #1B1630; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7DB3FF); }

.banner { padding: 12px 14px; border-radius: 12px; background: #1B1630; border: 1px solid rgba(196,181,255,0.25); color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }
.banner strong { color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid #1B1630; margin-left: 7px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #1B1630; border: 2px solid var(--accent); }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.pending::before { background: var(--bg); border-color: var(--fine); }
.msg { background: #0B0A10; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; }
.msg .who { font-weight: 650; color: #fff; }
.templates { display: grid; gap: 10px; }
.templates pre, .preview {
  white-space: pre-wrap; background: #0B0A10; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font: 13.5px/1.5 Inter, system-ui, sans-serif; margin: 0;
}
.kvs { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 14px; }
.kvs dt { color: var(--fine); }
.kvs dd { margin: 0; color: var(--text); }
.empty { color: var(--fine); padding: 8px 0; }
.actions .count { font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.12); padding: 1px 7px; border-radius: 999px; }

/* Outage Alerts channels (Nov 17). */
.chan { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; color: var(--text, #ECEAF4); cursor: pointer; }
.chan input { width: auto; margin: 0; accent-color: #7c3aed; }

/* Chat design (website chat onboarding) */
.swatches { display: grid; gap: 10px; margin: 8px 0; }
.swatch { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.swatch > span { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.swatch code { font-size: 12px; }
.tweaks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tweaks .fine { grid-column: 1 / -1; }
.tweaks input[type=color] { height: 38px; padding: 2px; }


/* Onboarding wizard (web design + marketing) */
.wizard-steps { display:flex; flex-wrap:wrap; gap:8px; list-style:none; margin:0 0 16px; padding:0; }
.wizard-steps li button { border:1px solid var(--line-2); background:#0B0A10; color:var(--muted); padding:7px 12px; border-radius:999px; font-weight:650; font-size:13px; cursor:pointer; }
.wizard-steps li.current button { background:var(--brand); border-color:var(--brand); color:#fff; }
.wizard-steps li.done button { color:var(--ok); border-color:rgba(143,227,176,0.35); }
.wizard-steps li button[disabled] { opacity:0.45; cursor:not-allowed; }
.kit-row { border:1px solid var(--line); border-radius:12px; padding:12px 14px; margin:0 0 10px; background:#0B0A10; }
.kit-row.confirmed { border-color:rgba(143,227,176,0.35); }
.kit-row.rejected { border-color:rgba(255,180,180,0.35); opacity:0.75; }
.kit-row.blank { opacity:0.9; }
.kit-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:8px; }
.kit-head strong { color:#fff; }
.kit-body { color:var(--text); }
.kit-value { white-space:pre-wrap; }
.kit-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.kit-edit { margin-top:10px; }
.kit-img { max-height:64px; max-width:200px; background:#1B1630; border-radius:8px; padding:6px; display:block; }
.kit-img.sm { max-height:36px; max-width:140px; }
.pill.proposed { background:#1B1630; color:var(--pending); }
.pill.confirmed { background:rgba(143,227,176,0.12); color:var(--ok); }
.pill.rejected { background:rgba(255,180,180,0.12); color:var(--bad); }
.pill.blank, .pill.draft { background:#1B1630; color:var(--fine); }
/* Chat settings: welcome line + announcements editor */
.ann-edit { border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px 16px 6px; margin: 0 0 16px; }
.ann-edit legend { padding: 0 6px; font: 600 14px/1.3 Inter, system-ui, sans-serif; color: #EDEBF7; }
.ann-edit .ann-table { width: 100%; margin: 8px 0 12px; }
.ann-edit .ann-table th { text-align: left; }
.ann-edit .ann-table td { padding: 4px 6px 4px 0; vertical-align: top; }
.ann-edit .ann-table input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #EDEBF7; padding: 8px 10px; font: 400 14px/1.3 Inter, system-ui, sans-serif; color-scheme: dark; }
.ann-edit .ann-table td:first-child { width: 42%; }
@media (max-width: 760px) {
  .ann-edit .ann-table thead { display: none; }
  .ann-edit .ann-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .ann-edit .ann-table td:first-child, .ann-edit .ann-table td:nth-child(2) { grid-column: 1 / -1; width: auto; }
}
