/* LIVE VOIP — palette derived from the LIVE VOIP brand
   brand #3D8AC4 · deep #1D477A/#154172 · ice #E6F3FF · surface #F5F5F5
   taupe #716A5C/#968E7E · action green #63AA07 */
:root {
  --brand: #3d8ac4;
  --brand-600: #3578ac;
  --brand-700: #2b6b9b;
  --brand-800: #1d477a;
  --brand-900: #154172;
  --brand-950: #10355e;
  --ice: #e6f3ff;
  --ice-2: #f2f9ff;
  --surface: #f5f5f5;
  --taupe: #716a5c;
  --taupe-2: #968e7e;
  --taupe-3: #a39b8b;
  --green: #63aa07;
  --green-dark: #519a02;
  --ink: #10263f;
  --text: #263c55;
  --muted: #6b7c93;
  --line: #e0e8f0;
  --line-2: #edf2f7;
  --danger: #c0392b;
  --danger-soft: #fdf0ee;
  --warn: #a86b0f;
  --warn-soft: #fff8e6;
  --ok-soft: #eef9e2;
  --white: #fff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 38, 63, 0.05), 0 10px 30px rgba(16, 38, 63, 0.06);
  --shadow-lg: 0 20px 60px rgba(16, 38, 63, 0.18);
  --font: "Lato", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-800); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
img, svg { vertical-align: middle; }
table { border-collapse: collapse; width: 100%; }
::selection { background: #cfe6fb; }

/* ---------------------------------------------------------------- shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: linear-gradient(178deg, #1d477a 0%, #154172 55%, #11395f 100%);
  color: #fff;
  box-shadow: 4px 0 24px rgba(16, 38, 63, 0.12);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 220px at 20% 0%, rgba(123, 168, 204, 0.22), transparent 70%),
    radial-gradient(300px 300px at 110% 90%, rgba(99, 170, 7, 0.12), transparent 70%);
}
.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 22px 18px;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: radial-gradient(120% 120% at 20% 0%, #6aaee0 0%, #3d8ac4 45%, #2b6b9b 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 17px; letter-spacing: 0.01em; }
.brand-text span { font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }

.nav { position: relative; z-index: 1; padding: 8px 12px 20px; overflow-y: auto; flex: 1; }
.nav-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.4);
  padding: 16px 12px 7px;
  font-weight: 700;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13.5px;
  font-weight: 500;
  margin: 1px 0;
  transition: background 0.15s, color 0.15s;
}
.nav a .icon { width: 18px; height: 18px; opacity: 0.85; }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a.active {
  background: linear-gradient(90deg, rgba(61, 138, 196, 0.5), rgba(61, 138, 196, 0.16));
  color: #fff;
  box-shadow: inset 3px 0 0 #8bc0e8;
}
.nav a.active .icon { opacity: 1; color: #b9dcf7; }
.nav .nav-spacer { height: 4px; }
.side-foot {
  position: relative;
  z-index: 1;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 30, 52, 0.18);
}
.side-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6aaee0, #2b6b9b);
  color: #fff; font-weight: 700; font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
}
.side-user .who { min-width: 0; flex: 1; }
.side-user b { display: block; font-size: 12.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user span { display: block; font-size: 10.5px; color: rgba(255, 255, 255, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot form { margin: 0; }
.icon-btn {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.icon-btn .icon { width: 17px; height: 17px; }

.main { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 70px; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 30px;
}
.topbar .menu-toggle { display: none; }
.crumb { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.crumb .eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; }
.crumb h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb h1 .sub { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 8px; letter-spacing: 0; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--ice); color: var(--brand-800);
  font-size: 11px; font-weight: 700; border: 1px solid #d3e9fb;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(99, 170, 7, 0.16); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14); }

.content { padding: 26px 30px 10px; flex: 1; max-width: 1560px; width: 100%; }
.foot {
  padding: 16px 30px 26px; color: #8b9bae; font-size: 11px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.foot a { color: #8b9bae; }

/* ---------------------------------------------------------------- headers */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .lead { flex: 1; min-width: 240px; }
.page-head h2 { font-size: 25px; margin-bottom: 4px; }
.page-head p { color: var(--muted); font-size: 13px; margin: 0; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-title h3 { font-size: 15px; }
.section-title .link { margin-left: auto; font-size: 12px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- grid & cards */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: 1.65fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 1.65fr; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 14px; }
.card-head .sub { color: var(--muted); font-size: 11.5px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); background: #fbfdff; border-radius: 0 0 var(--radius) var(--radius); }

.kpi { position: relative; padding: 18px; overflow: hidden; }
.kpi .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.kpi .value { font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin: 7px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .meta { font-size: 11.5px; color: var(--muted); }
.kpi .kicon {
  position: absolute; right: 16px; top: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--ice); color: var(--brand-600);
}
.kpi .kicon .icon { width: 18px; height: 18px; }
.kpi.green .kicon { background: var(--ok-soft); color: var(--green-dark); }
.kpi.taupe .kicon { background: #f2f0ec; color: var(--taupe); }
.kpi.warn .kicon { background: var(--warn-soft); color: var(--warn); }
.kpi::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-800)); opacity: 0.9;
}
.kpi.green::after { background: linear-gradient(180deg, #8bc34a, var(--green)); }
.kpi.taupe::after { background: linear-gradient(180deg, var(--taupe-3), var(--taupe)); }
.kpi.warn::after { background: linear-gradient(180deg, #e3a72f, var(--warn)); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border-radius: 9px; border: 1px solid transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, #4b96cc, var(--brand-600)); color: #fff; box-shadow: 0 2px 6px rgba(43, 107, 155, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-primary:hover { background: linear-gradient(180deg, #3d8ac4, var(--brand-700)); color: #fff; }
.btn-green { background: linear-gradient(180deg, #74bc16, var(--green-dark)); color: #fff; box-shadow: 0 2px 6px rgba(99, 170, 7, 0.28); }
.btn-green:hover { background: linear-gradient(180deg, #63aa07, #478a02); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #c3d6e8; background: #fbfdff; color: var(--brand-800); }
.btn-soft { background: var(--ice); color: var(--brand-800); border-color: #d7ebfc; }
.btn-soft:hover { background: #d9edff; color: var(--brand-900); }
.btn-danger { background: #fff; border-color: #f0cfca; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: #9d2c20; }
.btn-dark { background: var(--brand-900); color: #fff; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-sm .icon { width: 13px; height: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* ---------------------------------------------------------------- badges & alerts */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  background: #eef2f6; color: #5b6c7e; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.badge.ok { background: var(--ok-soft); color: #4e8600; }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.brand { background: var(--ice); color: var(--brand-700); }
.badge.taupe { background: #f2f0ec; color: var(--taupe); }
.badge.no-dot::before { display: none; }
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 18px;
  font-size: 12.5px; border: 1px solid;
}
.alert .icon { width: 16px; height: 16px; margin-top: 1px; flex: 0 0 auto; }
.alert.ok { background: var(--ok-soft); border-color: #d9efc2; color: #3f7000; }
.alert.err { background: var(--danger-soft); border-color: #f3d6d2; color: #962b1f; }
.alert.info { background: var(--ice); border-color: #d3e9fb; color: var(--brand-800); }
.alert.warn { background: var(--warn-soft); border-color: #f3e2b8; color: #7d5108; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.table { font-size: 12.5px; }
.table th {
  text-align: left; font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase;
  color: #8494a6; font-weight: 700; padding: 11px 16px;
  background: #fafcfe; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafdff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .name { font-weight: 700; color: var(--ink); }
.table .sub { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.table .em { color: var(--danger); }
.table .pos { color: #4e8600; }
.table td.actions { text-align: right; white-space: nowrap; }
.table-empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.table-empty .icon { width: 30px; height: 30px; color: #b7c6d6; margin-bottom: 8px; }
.table-empty h4 { color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; justify-content: flex-end; font-size: 12px; color: var(--muted); }
.pager a, .pager span.btn { min-width: 34px; }
.pager .btn { height: 30px; padding: 0 10px; }
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.searchbar input, .searchbar select { height: 38px; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 11.5px; font-weight: 700; color: #3c5269; margin-bottom: 5px; }
label .req { color: var(--danger); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="search"], select, textarea {
  width: 100%; height: 38px; padding: 8px 11px;
  border: 1px solid #cfdbe7; border-radius: 8px;
  font-family: inherit; font-size: 13px; color: var(--ink); background: #fff;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; min-height: 90px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7c93' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(61, 138, 196, 0.13); }
input::placeholder, textarea::placeholder { color: #9aabba; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 9px; align-items: center; padding-top: 6px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--text); margin: 4px 0 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-600); margin: 0; }
.input-group { display: flex; gap: 0; }
.input-group input { border-radius: 8px 0 0 8px; }
.input-group .btn { border-radius: 0 8px 8px 0; height: 38px; }
.divider { height: 1px; background: var(--line-2); margin: 18px 0; }
.form-note { background: #fafcff; border: 1px dashed #d6e5f2; border-radius: 10px; padding: 12px 14px; font-size: 11.5px; color: var(--muted); }
details.panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 12px; }
details.panel > summary {
  cursor: pointer; padding: 12px 15px; font-size: 12.5px; font-weight: 700; color: var(--brand-800);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: "+"; font-family: var(--mono); color: var(--brand); font-weight: 700; }
details.panel[open] > summary::before { content: "−"; }
details.panel .panel-body { border-top: 1px solid var(--line-2); padding: 15px; }

/* ---------------------------------------------------------------- tabs, code, misc */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a {
  padding: 9px 13px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--brand-700); }
.tabs a.active { color: var(--brand-800); border-bottom-color: var(--brand); }
pre.code, .code {
  margin: 0; background: #0f2742; color: #d9e8f5;
  border-radius: 10px; padding: 14px 16px; font-family: var(--mono); font-size: 11.5px;
  line-height: 1.65; overflow-x: auto; border: 1px solid #173f63;
}
.code .k { color: #7fc1ef; }
.code .s { color: #b6e08b; }
.code .c { color: #7896b0; }
.code-block { position: relative; }
.code-block .copy-btn {
  position: absolute; top: 8px; right: 8px; height: 26px; padding: 0 9px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cfe6f7; border-radius: 6px; font-size: 10px; font-weight: 700; cursor: pointer;
}
.code-block .copy-btn:hover { background: rgba(255, 255, 255, 0.16); }
.secret {
  font-family: var(--mono); font-size: 12.5px; background: #f7fafd;
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px;
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  overflow-wrap: anywhere;
}
.secret b { font-weight: 600; letter-spacing: 0.02em; }
.copy { border: 0; background: transparent; color: var(--brand-600); cursor: pointer; padding: 2px; border-radius: 5px; flex: 0 0 auto; }
.copy:hover { background: var(--ice); }
.copy .icon { width: 14px; height: 14px; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.callout-num { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.callout-sub { color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.stat-line { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line span { color: var(--muted); }
.stat-line b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 2px 0; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bars .bar { width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #6aaee0, var(--brand-600)); min-height: 4px; position: relative; transition: filter 0.15s; }
.bars .bar:hover { filter: brightness(1.08); }
.bars .bar.zero { background: #e8eff6; }
.bars .blabel { font-size: 9.5px; color: var(--muted); font-weight: 700; }
.bars .bval { font-size: 9.5px; color: var(--brand-800); font-weight: 700; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* usage meter */
.meter { height: 7px; border-radius: 999px; background: #e9f0f6; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4b96cc, var(--brand-700)); }
.meter.green > span { background: linear-gradient(90deg, #8bc34a, var(--green)); }
.meter.warn > span { background: linear-gradient(90deg, #f0bb4a, #c47d09); }
.meter.bad > span { background: linear-gradient(90deg, #e07a6d, var(--danger)); }

/* ---------------------------------------------------------------- public site */
.public-body { background: #fff; }
.pub-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 26px;
  max-width: 1180px; margin: 0 auto; padding: 22px 26px;
  color: #fff;
}
.pub-nav .brand { padding: 0; }
.pub-links { display: flex; gap: 22px; margin-left: 12px; }
.pub-links a { color: rgba(255, 255, 255, 0.72); font-size: 13px; font-weight: 600; }
.pub-links a:hover { color: #fff; }
.pub-nav .right { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.pub-nav .btn-ghost { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.pub-nav .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, #1d477a 0%, #154172 52%, #0f3157 100%);
  padding: 152px 26px 96px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(760px 420px at 78% 12%, rgba(61, 138, 196, 0.42), transparent 65%),
    radial-gradient(520px 400px at 8% 100%, rgba(99, 170, 7, 0.16), transparent 70%),
    radial-gradient(400px 300px at 55% 50%, rgba(123, 168, 204, 0.13), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: 0.14;
  background-image: linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(680px 420px at 70% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(680px 420px at 70% 30%, #000 0%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #bcdcf5; margin-bottom: 20px;
}
.hero h1 { color: #fff; font-size: 50px; line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 18px; max-width: 620px; }
.hero h1 em { font-style: normal; color: #8ec6eb; }
.hero p.lede { color: rgba(255, 255, 255, 0.72); font-size: 16px; line-height: 1.65; max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-cta .btn { height: 44px; padding: 0 20px; font-size: 13.5px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 22px; color: #fff; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 10.5px; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 0.1em; }
.hero-art { position: relative; }
.glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  border-radius: 18px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}
.glass .ghead { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: #cfe4f5; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.glass .grow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); font-size: 12px; color: rgba(255, 255, 255, 0.78); }
.glass .grow:last-child { border-bottom: 0; }
.glass .grow b { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }
.glass .gdot { width: 26px; height: 26px; border-radius: 8px; background: rgba(61, 138, 196, 0.35); display: grid; place-items: center; color: #9fd0f3; }
.glass .gdot .icon { width: 14px; height: 14px; }
.glass .glabel { color: rgba(255, 255, 255, 0.5); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.glass .gbig { font-size: 30px; color: #fff; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; }
.glass .gsub { color: #9fd0f3; font-size: 11px; }
.glass-float {
  position: absolute; right: -12px; bottom: -26px; width: 190px;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.glass-float .glabel { color: var(--muted); }
.glass-float .gbig { color: var(--ink); font-size: 23px; }
.glass-float .gsub { color: var(--green-dark); }

.pub-section { padding: 76px 26px; }
.pub-section.alt { background: #f7fafc; }
.pub-inner { max-width: 1180px; margin: 0 auto; }
.pub-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.pub-head .eyebrow { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-600); font-weight: 700; margin-bottom: 10px; }
.pub-head h2 { font-size: 34px; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 10px; }
.pub-head p { color: var(--muted); font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfe1f0; }
.feature .ficon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--ice); color: var(--brand-700); margin-bottom: 14px;
}
.feature .ficon.green { background: var(--ok-soft); color: var(--green-dark); }
.feature .ficon.taupe { background: #f2f0ec; color: var(--taupe); }
.feature .ficon .icon { width: 20px; height: 20px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0; }
.pricing-card { max-width: 900px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.pricing-card .phead { padding: 22px 26px; background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #fff; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pricing-card .phead h3 { color: #fff; font-size: 17px; }
.pricing-card .phead span { color: rgba(255, 255, 255, 0.7); font-size: 12px; }
.pricing-card .phead .badge { margin-left: auto; background: rgba(255, 255, 255, 0.15); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.pricing-table td, .pricing-table th { padding: 12px 26px; }
.pricing-table .num { font-weight: 700; color: var(--ink); }
.cta-band { background: linear-gradient(140deg, var(--brand-900), var(--brand-700)); border-radius: 18px; padding: 42px; color: #fff; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 26px; margin-bottom: 6px; }
.cta-band p { color: rgba(255, 255, 255, 0.7); margin: 0; font-size: 13px; }
.cta-band .btn { margin-left: auto; }
.pub-foot { border-top: 1px solid var(--line); padding: 28px 26px; }
.pub-foot .inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 11.5px; }
.pub-foot .inner .right { margin-left: auto; display: flex; gap: 18px; }
.pub-foot a { color: var(--muted); }

/* live platform strip */
.live-strip { background: linear-gradient(140deg, var(--brand-900), var(--brand-800)); padding: 30px 26px; }
.live-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px;
}
.live-item { border-left: 2px solid rgba(255, 255, 255, 0.18); padding-left: 14px; }
.live-item b {
  display: block; color: #fff; font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.live-item span { font-size: 10.5px; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.1em; }

/* SIP server specification */
.sip-spec {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
  max-width: 900px; margin: 0 auto;
}
.spec {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
}
.pub-section.alt .spec { background: #fff; }
.spec-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 6px; }
.spec-value { display: block; font-size: 15px; font-weight: 700; color: var(--brand-800); font-family: var(--mono); word-break: break-all; }
.table-scroll { max-height: 460px; overflow-y: auto; }

/* login */
.login-body {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr;
  background: #fff;
}
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 54px;
  background: linear-gradient(155deg, #1d477a 0%, #154172 55%, #10355e 100%);
  display: flex; flex-direction: column;
}
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(620px 420px at 80% 12%, rgba(61, 138, 196, 0.45), transparent 65%),
    radial-gradient(480px 400px at 0% 100%, rgba(99, 170, 7, 0.2), transparent 70%);
}
.login-art::after {
  content: ""; position: absolute; inset: 0; opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(600px 460px at 60% 40%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(600px 460px at 60% 40%, #000, transparent 78%);
}
.login-art > * { position: relative; z-index: 1; }
.login-art .brand { padding: 0; margin-bottom: 60px; }
.login-art h2 { color: #fff; font-size: 38px; line-height: 1.15; letter-spacing: -0.03em; max-width: 460px; margin-bottom: 14px; }
.login-art p { color: rgba(255, 255, 255, 0.66); font-size: 14px; max-width: 440px; line-height: 1.7; }
.login-points { margin-top: 34px; display: grid; gap: 13px; max-width: 400px; }
.login-point { display: flex; gap: 11px; align-items: flex-start; color: rgba(255, 255, 255, 0.8); font-size: 12.5px; }
.login-point .tick { width: 20px; height: 20px; border-radius: 50%; background: rgba(99, 170, 7, 0.25); color: #b6e08b; display: grid; place-items: center; flex: 0 0 auto; }
.login-point .tick .icon { width: 12px; height: 12px; }
.login-art .fine { margin-top: auto; color: rgba(255, 255, 255, 0.4); font-size: 10.5px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: linear-gradient(180deg, #fff, #f7fafc); }
.login-box { width: 100%; max-width: 372px; }
.login-box .eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--brand-600); font-weight: 700; margin-bottom: 8px; }
.login-box h1 { font-size: 27px; margin-bottom: 6px; }
.login-box .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
.login-box .field { margin-bottom: 15px; }
.login-box input { height: 44px; border-radius: 10px; }
.login-box .btn { height: 44px; border-radius: 10px; font-size: 13.5px; }
.login-alt { text-align: center; margin-top: 18px; font-size: 11.5px; color: var(--muted); }
.login-alt a { font-weight: 700; }
.login-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10.5px; color: #93a3b4; display: flex; justify-content: space-between; gap: 10px; }
.login-box .alert { margin-bottom: 16px; }

/* login role tabs (administrator / customer) */
.role-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px;
  background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; padding: 6px;
}
.role-tab {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 9px 11px; border-radius: 9px; border: 1px solid transparent;
  color: var(--muted); transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.role-tab:hover { background: rgba(255, 255, 255, 0.7); }
.role-tab.active { background: #fff; border-color: #d3e4f3; color: var(--brand-800); box-shadow: 0 1px 3px rgba(16, 53, 94, 0.08); }
.role-tab .rt-icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: #e6eef6; color: var(--brand-700);
}
.role-tab.active .rt-icon { background: var(--ice); color: var(--brand-600); }
.role-tab .rt-icon .icon { width: 15px; height: 15px; }
.role-tab .rt-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.role-tab .rt-text b { font-size: 12.5px; font-weight: 700; }
.role-tab .rt-text small { font-size: 10px; color: var(--muted); margin-top: 2px; }

.login-host {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin-top: 16px;
  background: #f7fafc; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.login-host .lh-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); align-self: center; }
.login-host .lh-value { font-family: var(--mono); font-size: 11.5px; color: var(--brand-800); font-weight: 600; word-break: break-all; }
.login-brand-mobile { display: none; align-items: center; gap: 10px; margin-bottom: 26px; }

/* 404 */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #f5f5f5, #e6f3ff); }
.center-card { max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px; text-align: center; box-shadow: var(--shadow); }
.center-card .big { font-size: 64px; font-weight: 700; color: var(--brand); letter-spacing: -0.05em; line-height: 1; }
.center-card h1 { font-size: 22px; margin: 12px 0 8px; }
.center-card p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

/* responsive */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 42px; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.22s ease; }
  body.nav-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .topbar .menu-toggle { display: inline-grid; }
  .content { padding: 20px 18px 8px; }
  .foot { padding: 14px 18px 22px; }
  .hero-inner { grid-template-columns: 1fr; gap: 46px; }
  .hero { padding-top: 132px; }
  .hero-art { max-width: 480px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 18px; }
  .sip-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-body { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-brand-mobile { display: flex; }
  .login-brand-mobile .brand-text b { color: var(--ink); }
  .login-brand-mobile .brand-text span { color: var(--muted); }
  .pub-links { display: none; }
}
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero p.lede { font-size: 14px; }
  .public-body .pub-nav { padding: 16px 18px; }
  .pub-nav .right .btn-ghost { display: none; }
  .hero-stats { gap: 22px; }
  .pub-section { padding: 54px 18px; }
  .pub-head h2 { font-size: 27px; }
  .cta-band { padding: 28px; }
  .cta-band .btn { margin-left: 0; }
  .kv { grid-template-columns: 100px 1fr; }
  .top-actions .chip.hide-sm { display: none; }
  .login-panel { padding: 30px 18px; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .live-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sip-spec { grid-template-columns: 1fr; }
  .role-tabs { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 21px; }
  .kpi .value { font-size: 24px; }
  .content { padding: 16px 12px 6px; }
  .topbar { height: 62px; }
  .crumb h1 { font-size: 16px; }
  .crumb .eyebrow { display: none; }
  .card-body { padding: 14px; }
  .table th, .table td { padding: 10px 12px; }
  .hero h1 { font-size: 29px; }
  .glass-float { display: none; }
  .login-box h1 { font-size: 23px; }
}

/* ---------------------------------------------------------------- docs */
.docs-wrap { max-width: 1180px; margin: 0 auto; padding: 46px 26px 70px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 46px; }
.docs-toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.docs-toc a { padding: 7px 10px; border-radius: 7px; color: var(--muted); font-weight: 600; }
.docs-toc a:hover { background: var(--ice); color: var(--brand-800); }
.docs-body { min-width: 0; }
.docs-section { margin-bottom: 48px; scroll-margin-top: 20px; }
.docs-section h2 { font-size: 24px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.docs-section h3 { font-size: 15px; margin: 24px 0 9px; }
.docs-section p { color: #4b6076; font-size: 13px; line-height: 1.75; }
code.inline { font-family: var(--mono); font-size: 11.5px; background: #f1f6fb; border: 1px solid #e2ebf4; border-radius: 5px; padding: 1px 5px; color: var(--brand-800); }
.docs-note { display: flex; gap: 10px; background: var(--ice); border: 1px solid #d3e9fb; border-radius: 10px; padding: 12px 14px; margin: 14px 0; font-size: 12px; color: var(--brand-800); line-height: 1.6; }
.docs-note .icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.docs-list { padding-left: 20px; color: #4b6076; font-size: 13px; line-height: 2; margin: 0 0 14px; }
.docs-mini { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fafcff; }
.docs-mini .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.docs-mini .mono { font-size: 11.5px; }
@media (max-width: 900px) {
  .docs-wrap { grid-template-columns: 1fr; gap: 24px; padding: 32px 18px 50px; }
  .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
}
.text-danger { color: var(--danger) !important; }
.text-ok { color: #4e8600 !important; }
