/* SIPfonica Provisioning admin UI, styled after www.sipfonica.net:
   black header with a 5px brand-green rule, white content on a light grey page,
   condensed type, flat hairlines, no shadows. */
* { box-sizing: border-box; }
:root {
  --brand: #6CA326;        /* SIPfonica green */
  --bg: #e7e7e7;           /* page / teaser grey of the website */
  --panel: #ffffff;        /* content and cards */
  --panel-2: #f2f2f2;      /* panel heads, secondary buttons */
  --panel-3: #e9e9e9;      /* inputs, hover rows */
  --line: #cccccc;         /* hairline */
  --line-2: #b3b3b3;       /* slightly stronger hairline */
  --fg: #000000;
  --fg-dim: #333333;
  --muted: #666666;
  --muted-2: #999999;
  --accent: var(--brand);  /* app.js applyBrand() overrides --accent / --accent-hi / --accent-dim per tenant */
  --accent-hi: #5a8a1f;    /* hover = darker green */
  --accent-fg: #ffffff;    /* white ink on green */
  --accent-dim: rgba(108, 163, 38, 0.14);
  --good: #6CA326;  --good-bg: rgba(108, 163, 38, 0.12);
  --bad:  #d23b3b;  --bad-bg:  rgba(210, 59, 59, 0.10);
  --warn: #b1740d;  --warn-bg: rgba(177, 116, 13, 0.13);
  --header: #000000;
  --header-fg: #cccccc;
  --radius: 3px;
  --radius-sm: 2px;
  --font: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --col: 1200px;           /* content column (site uses 1000px; admin tables need more) */
}

html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex; flex-direction: column;
  font: 400 15px/1.45 var(--font);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
/* The markup toggles the hidden attribute; make sure no display rule beats it. */
[hidden] { display: none !important; }

/* ---- flat icons ---- */
.ic {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex: none; vertical-align: -2px;
}

/* ---- header (the aside.sidebar markup is laid out as the site's black top bar) ---- */
.sidebar {
  position: sticky; top: 0; z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand user" "nav nav";
  column-gap: 16px;
  padding: 0 max(16px, calc((100% - var(--col)) / 2));
  background: var(--header);
  color: var(--header-fg);
  border-bottom: 5px solid var(--accent);
  white-space: nowrap;
}
.side-brand {
  grid-area: brand;
  display: flex; align-items: center; gap: 14px; min-width: 0;
  height: 60px;
  color: #fff; font-size: 15px; font-weight: 500;
}
.side-brand .logo-img {
  display: block; height: 38px; width: auto; max-width: 160px;
  object-fit: contain;
}
/* brand / product name next to the logo, separated by a grey hairline */
.side-brand .side-label,
.side-brand .side-tag {
  padding-left: 14px; border-left: 1px solid #444;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 500;
  color: var(--header-fg); line-height: 20px;
  overflow: hidden; text-overflow: ellipsis;
}
.side-brand #brand-name { color: #fff; font-size: 15px; }
/* the default wordmark already says SIPfonica: do not repeat it as text */
.side-brand .logo-img[src$="/sipfonica-logo.png"] + #brand-name { display: none; }
.side-foot {
  grid-area: user;
  display: flex; align-items: center; gap: 4px;
  height: 60px;
}
.side-nav {
  grid-area: nav;
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid #222;
}
.side-nav::-webkit-scrollbar { display: none; }
.side-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px; height: 40px;
  border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  background: none; color: var(--header-fg); cursor: pointer; text-decoration: none;
  font: inherit; font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.07em; text-align: left;
  transition: color .12s, border-color .12s;
}
.side-item .ic { width: 16px; height: 16px; flex: none; }
.side-item:hover { color: #fff; text-decoration: none; }
.side-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.side-nav .side-item:first-child { padding-left: 0; }
.side-foot .side-item { height: 60px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; border-bottom: 0; padding: 0 10px; }
.side-foot .side-item:last-child { padding-right: 0; }
.side-item.static, .side-item.static:hover { cursor: default; background: none; color: var(--muted-2); }
.side-foot .side-item.static .side-label { color: #fff; }
.side-foot .side-item:not(.static):hover .side-label { text-decoration: underline; }
.side-label { opacity: 1; }
#who { color: #fff; }
.side-foot .hsel {
  background: #222; color: #fff; border-color: #444;
  margin-right: 10px; max-width: 200px;
}
.side-foot .hsel:focus { border-color: var(--accent); }

/* legacy top-bar rules kept for templates that still render them */
header {
  display: flex; justify-content: space-between; align-items: center;
  height: 60px; padding: 0 24px;
  background: var(--header); color: var(--header-fg);
  border-bottom: 5px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-name { font-size: 15px; font-weight: 500; color: #fff; }
.logo-img { display: block; object-fit: contain; }
.logo-img.lg {
  /* black band at the top of the login / password cards, like the site header */
  display: block; height: 38px; width: auto; max-width: none;
  box-sizing: content-box; padding: 16px 28px;
  margin: -28px -28px 22px;
  background: var(--header); border-bottom: 3px solid var(--accent);
}
header nav { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.navlink { display: inline-flex; align-items: center; gap: 7px; color: var(--header-fg); text-decoration: none; }
.navlink:hover { color: #fff; }

/* ---- layout ---- */
main {
  flex: 1 0 auto;
  width: 100%; max-width: var(--col); margin: 0 auto;
  padding: 26px 24px 56px;
  background: var(--panel);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
h1 { margin: 0; font-size: 20px; font-weight: 500; color: var(--accent); }
h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: 0.01em; color: var(--accent); }
h3 {
  margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-dim);
  display: inline-flex; align-items: center; gap: 8px;
}
h3 .ic { width: 15px; height: 15px; color: var(--accent); }
.muted { color: var(--muted); }
.sub { margin: 4px 0 0; font-size: 14px; font-weight: 300; color: var(--muted); }
p { font-weight: 300; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); padding: 1px 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--accent);
}

/* ---- panels (hairline boxes, light grey head) ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th {
  background: #dfdfdf;
  font-weight: 500; color: var(--fg-dim); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
th.num, td.num { text-align: center; width: 1%; white-space: nowrap; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--panel-2); }
.actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.actions-cell .btn + .btn { margin-left: 6px; }
td .mono, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---- buttons (flat, no gradients) ---- */
.btn {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--panel-3); border-color: var(--line-2); }
.btn .ic { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.danger { color: var(--bad); border-color: var(--line); background: transparent; }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; padding: 9px; font-size: 15px; }
.btn:focus-visible, .pg:focus-visible, .side-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }

/* ---- pills / badges (hairline outlined) ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 8px; border: 1px solid currentColor; border-radius: var(--radius-sm);
  background: transparent;
  font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  line-height: 1.5;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.on   { color: var(--good); }
.pill.off  { color: var(--bad); }
.pill.warn { color: var(--warn); }
.pill.neutral { color: var(--muted); }
.pill.bare { color: var(--muted); border-color: var(--line-2); }
.pill.bare::before { display: none; }

/* ---- call direction ---- */
.dir { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 13.5px; }
.dir .ic { width: 15px; height: 15px; }
.dir.in  { color: var(--good); }
.dir.out { color: var(--fg-dim); }

/* ---- switch (flat) ---- */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 34px; height: 18px; border-radius: 2px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  position: relative; transition: background .15s, border-color .15s; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 1px;
  background: var(--muted); transition: transform .16s, background .16s;
}
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- detail header ---- */
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.crumb:hover { color: var(--fg); text-decoration: none; }
.crumb .ic { width: 16px; height: 16px; }
.detail-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  margin-bottom: 20px; padding-bottom: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--accent);
}
.detail-head h2 { font-size: 22px; }
.detail-head .muted { margin-top: 2px; font-weight: 300; }

/* ---- stat cards ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 11px 14px; }
.stat .k { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.stat .k .ic { width: 14px; height: 14px; }
.stat .v { font-size: 20px; font-weight: 500; margin-top: 6px; line-height: 1.2; }
.stat .v .mono { font-family: var(--mono); font-size: 13px; }
.stat .x { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 300; }

/* ---- pagination ---- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; background: var(--panel-2); border-top: 1px solid var(--line);
}
.pager-info { font-size: 13px; color: var(--muted); }
.pager-ctrl { display: flex; align-items: center; gap: 3px; }
.pg {
  min-width: 28px; height: 28px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--fg-dim);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.pg:hover:not(:disabled):not(.active) { background: var(--panel-3); color: var(--fg); }
.pg.active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); cursor: default; }
.pg:disabled { opacity: 0.4; cursor: not-allowed; }
.pg.gap { border: 0; background: none; cursor: default; color: var(--muted); min-width: 18px; }
.pg .ic { width: 16px; height: 16px; }

/* ---- empty state ---- */
.empty { padding: 28px 14px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 300; }
.empty b { color: var(--fg-dim); font-weight: 500; }

/* ---- inputs (flat grey, green focus) ---- */
input, select, textarea, button { font-family: inherit; }
dialog input, dialog select, dialog textarea,
.panel-body input, .panel-body select, .panel-body textarea,
.brand-fields input, .fld > input, .fld > select, .hsel {
  background: var(--panel-3); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; font-weight: 400;
}
dialog input:focus, dialog select:focus, dialog textarea:focus,
.panel-body input:focus, .panel-body select:focus, .panel-body textarea:focus,
.brand-fields input:focus, .fld > input:focus, .fld > select:focus, .hsel:focus { outline: none; border-color: var(--accent); background: #fff; }
input:invalid:not(:placeholder-shown):not(:focus) { background: #f3d6d6; }
::placeholder { color: var(--muted-2); font-weight: 300; }

/* ---- dialog ---- */
dialog {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--line-2);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px 18px;
  min-width: 420px; max-width: 92vw;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h3 { margin: 0 0 14px; font-size: 20px; text-transform: none; letter-spacing: 0.01em; color: var(--accent); font-weight: 500; }
dialog label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
dialog input, dialog select, dialog textarea { width: 100%; padding: 8px 10px; margin-bottom: 12px; }
dialog textarea { resize: vertical; min-height: 60px; }
dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 10px 0 0; }
dialog button {
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--fg); cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
}
dialog button:hover { background: var(--panel-3); }
dialog button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
dialog button.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }

/* ---- login card ---- */
#login-card {
  max-width: 420px; margin: 56px auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
}
#login-card h2 { margin-bottom: 6px; }
#login-card p { color: var(--muted); margin: 6px 0 20px; font-weight: 300; }

/* The forced-password-change screen reuses the login card's chrome. */
#pwchange-card {
  max-width: 420px; margin: 56px auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
}
#pwchange-card h2 { margin-bottom: 6px; }

/* Pairing with the provisioning console: same chrome as the login card. */
#pair-card {
  max-width: 420px; margin: 56px auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
}
#pair-card h2 { margin-bottom: 6px; }
#pair-card p { color: var(--muted); margin: 6px 0 20px; font-weight: 300; }
#sso-login .btn.block + .btn.block { margin-top: 8px; }
#pair-form .btn.block + .btn.block { margin-top: 8px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-3); color: var(--fg); }
a.btn.block { text-decoration: none; }
#pwchange-card p { color: var(--muted); margin: 6px 0 20px; font-weight: 300; }

/* ---- simple forms (login, password change, licence / admin dialogs) ---- */
.fld { display: block; text-align: left; margin-bottom: 14px; text-transform: none; letter-spacing: 0; }
.fld > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.fld > input, .fld > select { width: 100%; padding: 8px 10px; margin-bottom: 0; }
.err {
  text-align: left; margin: 0 0 14px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bad-bg); color: var(--bad);
  border: 1px solid var(--bad); font-size: 14px;
}

/* ---- context banner (tenant view / licence lock) ----
   Deliberately unmissable: a SUPERADMIN acting inside a tenant, or a tenant
   whose licence is inactive, must be obvious on every page. */
#context-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 18px; padding: 9px 14px;
  border-radius: var(--radius-sm); font-size: 14px;
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); border-left-width: 4px;
}
#context-banner.locked { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
#context-banner .btn { color: inherit; border-color: currentColor; background: transparent; }

/* Secret shown once during 2FA enrolment / after a password reset. */
.secret-box {
  font-family: var(--mono); font-size: 13px;
  background: var(--panel-3); border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; margin: 8px 0; word-break: break-all; user-select: all;
}

/* ---- top tabs (legacy) ---- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--accent); }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  color: var(--muted); padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.07em;
  cursor: pointer; transition: color .12s, border-color .12s;
}
.tab .ic { width: 15px; height: 15px; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- white-label / branding panel ---- */
.brand-body { padding: 14px; }
.brand-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.flbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.brand-fields input { width: 100%; padding: 8px 10px; }
.color-swatch { width: 40px !important; height: 36px; padding: 2px !important; cursor: pointer; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.brand-asset {
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--panel-2);
}
.brand-preview {
  width: 72px; height: 72px; flex: none; border-radius: var(--radius); object-fit: cover;
  border: 1px solid var(--line); background: var(--panel-3);
}
.brand-preview.empty-prev { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.brand-preview.empty-prev .ic { width: 26px; height: 26px; }
.brand-asset-body { min-width: 0; }
.brand-asset-title { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
@media (max-width: 560px) { .brand-fields { grid-template-columns: 1fr; } }

/* ---- device manage dialog ---- */
.dev-sip-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.dev-sip-row:first-of-type { border-top: 0; }
.dev-sip-row .switch { flex: 1 1 auto; }
.dev-sip-row .lbl { font-size: 14px; }
.dev-sip-row .lbl .mono { font-size: 11.5px; margin-left: 6px; }
.dev-sip-reason { flex: 1 1 100%; margin: 0 !important; }

/* ---- header select (company assignment, tenant view) ---- */
.hsel { padding: 6px 10px; font-size: 14px; max-width: 220px; }

/* ---- section head (call groups list) ---- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--accent); }

/* ---- call group cards ---- */
.group-name { font-size: 16px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.group-name .ic { width: 16px; height: 16px; color: var(--accent); }
.gh-desc { font-size: 13px; color: var(--muted); margin-top: 2px; font-weight: 300; }

/* ---- presence pills ---- */
.pill.busy { color: var(--bad); }
.pill.free { color: var(--good); }
.pill.offline { color: var(--muted-2); }

/* ---- Asterisk / settings tab (connection, accounts, monitor) ---- */
.panel-body { padding: 14px; }
.panel-body > label {
  display: block; font-size: 13px; color: var(--muted);
  margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
}
.panel-body > label .muted { font-weight: 300; text-transform: none; letter-spacing: 0; }
.panel-body input { width: 100%; max-width: 560px; padding: 8px 10px; margin-bottom: 14px; }
.panel-body .row { margin-top: 2px; }
#set-msg { font-size: 13.5px; }

/* checkbox row inside the modal (e.g. "also create on Asterisk") */
.chk { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: var(--fg); text-transform: none; letter-spacing: 0; }
.chk input { width: auto; margin: 0; accent-color: var(--accent); }
.chk.disabled { opacity: .5; cursor: default; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* collapsible panel header (e.g. Live registrations) */
.panel-head.collapser { cursor: pointer; user-select: none; }
.panel-head.collapser:hover { background: var(--panel-3); }
.panel-head.collapser .chevron { transition: transform .15s ease; color: var(--muted); }
.panel-head.collapser.open .chevron { transform: rotate(90deg); }

/* ---- footer (black, like the site) ---- */
.site-foot {
  flex: none;
  background: var(--header); color: var(--header-fg);
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  padding: 14px max(16px, calc((100% - var(--col)) / 2));
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.site-foot a { color: var(--header-fg); }
.site-foot a:hover { color: var(--muted-2); text-decoration: none; }
.site-foot .foot-brand { text-transform: uppercase; }
.site-foot .foot-brand b { color: #fff; font-weight: 500; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  main { border-left: 0; border-right: 0; }
}
@media (max-width: 720px) {
  main { padding: 18px 16px 40px; }
  .side-brand { height: 52px; }
  .side-foot { height: 52px; }
  .side-foot .side-item { height: 52px; }
  .side-brand .side-label, .side-brand .side-tag { display: none; }
  .side-foot .side-item:not(.static) .side-label { display: none; }
  .side-foot .hsel { max-width: 120px; }
  .side-nav .side-item { padding: 0 10px; font-size: 13px; letter-spacing: 0.05em; }
  .side-nav .side-item .ic { display: none; }
  .page-head, .detail-head { flex-direction: column; align-items: stretch; }
  #context-banner { flex-direction: column; align-items: flex-start; }
  .tab { padding: 6px 9px; }
  th, td { padding: 8px 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .pager { flex-direction: column; align-items: stretch; gap: 8px; }
  .pager-info { text-align: center; }
  .pager-ctrl { justify-content: center; }
  dialog { min-width: 0; width: calc(100vw - 32px); padding: 16px; }
  .logo-img.lg { margin: -16px -16px 18px; padding: 14px 16px; }
  #login-card, #pwchange-card, #pair-card { padding: 16px; margin: 24px auto; }
  .site-foot { justify-content: center; text-align: center; }
}

/* ---- white-label v2: collapsible panel, settings (left) + live previews (right) ---- */
.wl-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 14px; }
@media (min-width: 1000px) {
  .wl-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wl-previews { position: sticky; top: 96px; align-self: start; }
}
.wl-settings { min-width: 0; }
.wl-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.wl-group-title { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.wl-sub { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px; }
.wl-group .brand-asset { margin-bottom: 8px; }
.wl-group .brand-fields { margin-bottom: 0; }
.wl-field input:not([type="color"]) {
  width: 100%; padding: 8px 10px;
  background: var(--panel-3); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px;
}
.wl-field input:not([type="color"]):focus { outline: none; border-color: var(--accent); background: #fff; }
.wl-radios { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.wl-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.wl-mode { margin-bottom: 6px; }
.wl-layouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.wl-layout { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius); padding: 8px 10px; }
.wl-layout-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 14px; }
.wl-slider { display: grid; grid-template-columns: 68px minmax(0, 1fr) 52px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 3px 0; }
.wl-slider input[type="range"] { width: 100%; margin: 0; padding: 0; background: none; border: 0; accent-color: var(--accent); }
.wl-slider output { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--fg-dim); }

/* previews: native-size frames scaled with --wl-s (set by app.js to fit the column) */
.wl-previews { --wl-s: .5; --wl-accent: var(--brand); display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; align-content: flex-start; min-width: 0; }
.wl-preview { min-width: 0; }
.wl-preview-banner { flex: 1 1 100%; }
.wl-cap { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.wl-scale { position: relative; overflow: visible; }
.wl-frame {
  position: relative; overflow: hidden; transform: scale(var(--wl-s)); transform-origin: top left;
  background: #fff; color: #000; user-select: none; line-height: 1.2;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
.wl-phone.wl-frame-native {
  border-radius: 54px;
  background: #fff;
  box-shadow: 0 0 0 10px #1a1a1a, 0 0 0 12px #3a3a3a, 0 20px 48px rgba(0, 0, 0, 0.4);
}
.wl-status { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 12px 30px 0; font-size: 16px; font-weight: 600; pointer-events: none; }
.wl-sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.wl-sig i { width: 3px; background: currentColor; border-radius: 1px; height: 5px; }
.wl-sig i:nth-child(2) { height: 7px; } .wl-sig i:nth-child(3) { height: 9px; } .wl-sig i:nth-child(4) { height: 12px; }
.wl-sig em { width: 24px; height: 11px; margin-left: 6px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .9; }
.wl-island { position: absolute; top: 11px; left: 50%; width: 120px; height: 34px; margin-left: -60px; border-radius: 20px; background: #000; z-index: 6; pointer-events: none; }
.wl-band { position: absolute; overflow: hidden; background: var(--wl-base, #f2f2f7); z-index: 1; }
.wl-band .wl-blur, .wl-band .wl-bd { position: absolute; inset: 0; background-size: cover; background-position: center; }
.wl-band .wl-blur { inset: -40px; filter: blur(30px) saturate(1.15); opacity: .85; }
.wl-acct { position: absolute; left: 0; right: 0; height: 24px; line-height: 24px; text-align: center; font-size: 16px; font-weight: 600; z-index: 4; pointer-events: none; }
.wl-onimg .wl-acct, .wl-onimg .wl-status { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.wl-fg { position: absolute; z-index: 2; cursor: grab; touch-action: none; }
.wl-fg.dragging { cursor: grabbing; }
.wl-fg.wl-empty { cursor: default; outline: 1px dashed rgba(0, 0, 0, .18); }
.wl-fg img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: center; pointer-events: none; }
.wl-fade { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--wl-page, #fff)); }
.wl-mac.wl-frame-native {
  background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .25);
}
.wl-mac-acct {
  position: absolute; z-index: 4; color: #000; font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; pointer-events: none;
}
/* macOS incoming-call banner on a faux desktop */
.wl-desk-native {
  display: flex; justify-content: center; align-items: center; padding: 24px 16px; border-radius: 8px;
  background: linear-gradient(135deg, #c9d4e2, #e8edf4 55%, #f3e4d4); overflow: hidden;
}
.wl-banner-native {
  position: relative; margin: 0 auto; user-select: none;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; line-height: 1.25;
}
.wl-banner-bg-layer {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.wl-banner-bd {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.wl-banner-avatar-ring {
  pointer-events: none; border-radius: 50%;
}
.wl-banner-native .wl-btext {
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; line-height: 1.25;
}
@media (max-width: 720px) { .wl-body { padding: 10px; gap: 14px; } .wl-group { padding: 10px; } }

/* ---- Soft white-label v3: mode toggle, dark previews ---- */
.wl-head-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.wl-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  gap: 4px;
  background: var(--panel-3);
}
.wl-mode-toggle button {
  border: 0;
  background: none;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}
.wl-mode-toggle button:hover {
  color: var(--fg);
}
.wl-mode-toggle button.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  color: var(--fg);
  font-weight: 600;
}
.wl-dark-mode .wl-phone.wl-frame-native {
  background: #000;
  box-shadow: 0 0 0 10px #1f1f21, 0 0 0 12px #38383a, 0 20px 48px rgba(0, 0, 0, 0.6);
}
.wl-dark-mode .wl-phone .wl-status { color: #fff; }
.wl-dark-mode .wl-island {
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.wl-dark-mode .wl-mac-acct { color: #fff; }
.wl-dark-mode .wl-mac.wl-frame-native { background: #1e1e1e; }
.wl-dark-mode .wl-desk-native {
  background: linear-gradient(135deg, #18202c, #222b3a 55%, #1c1824);
}

/* ---- screenshot frames (public/wl-frames, scripts/wl-frames.py) ----
   .wlf-frame is a native-size box scaled by --wl-s (set per .wl-scale by app.js).
   Layers: .wl-band (base colour / backdrop / foreground) 1, .wlf-tint 2,
   .wlf-chrome (frame PNG) 3, .wlf-accent / .wlf-text (masked colour) 4, HTML overlays 5. */
.wlf-frame {
  position: relative; transform: scale(var(--wl-s, .5)); transform-origin: top left; user-select: none;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; line-height: 1.2;
}
.wlf-band { background: var(--wl-base, transparent); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.wlf-chrome { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.wlf-mask {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.wlf-tint { z-index: 2; background: var(--wl-base, transparent); }
.wlf-accent { background: var(--wl-accent, #6ca326); }
.wlf-banner .wlf-accent { background: var(--wl-bacc, #6ca326); }
.wlf-text { background: var(--wl-btext, #000); }
.wlf-acct {
  position: absolute; z-index: 5; display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #000; white-space: nowrap; pointer-events: none;
}
.wl-dark-mode .wlf-acct { color: #fff; }
.wl-onimg .wlf-acct { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.wlf-capsule {
  position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: .3em; padding: 0 .85em;
  border-radius: 999px; background: rgba(236, 236, 236, .7); color: #222; white-space: nowrap; pointer-events: none;
}
.wlf-capsule b { font-weight: 600; }
.wl-dark-mode .wlf-capsule { background: rgba(0, 0, 0, .55); color: #fff; }
.wlf-desk {
  display: flex; justify-content: center; padding: 24px 16px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #c9d4e2, #e8edf4 55%, #f3e4d4);
}
.wl-dark-mode .wlf-desk { background: linear-gradient(135deg, #18202c, #222b3a 55%, #1c1824); }
.brand-asset.wl-inherited { opacity: 0.85; }
.brand-asset.wl-inherited .brand-preview { filter: grayscale(0.2); }
.wl-inherit-badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.06); color: var(--muted); margin-bottom: 4px; }

/* ---- white-label: iPhone handset body around the mobile preview ----
   .wl-handset is the element scaled by --wl-s. Its shape is the SVG shell
   /img/iphone-shell.svg (250 x 514 units, measured from the owner's reference
   render); app.js sizes the handset so the screen box (screenshot frame or
   CSS mockup) lands exactly in the shell's screen window:
   --wl-sx / --wl-sy = window offset, --wl-ri = window corner radius. */
.wl-handset {
  position: relative; box-sizing: border-box;
  background: url("/img/iphone-shell.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 calc(6px * var(--wl-k, 3)) calc(18px * var(--wl-k, 3)) rgba(0, 0, 0, .32));
  transform: scale(var(--wl-s, .5)); transform-origin: top left;
}
.wl-handset > .wlf-frame,
.wl-handset > .wl-phone.wl-frame-native,
.wl-dark-mode .wl-handset > .wl-phone.wl-frame-native {
  position: absolute; left: var(--wl-sx, 0); top: var(--wl-sy, 0);
  transform: none; overflow: hidden; border-radius: var(--wl-ri, 150px); box-shadow: none;
}

/* ---- white-label: built-in backdrop preset ("App default") ----
   The app's robot artwork at 22 percent over the base colour; between the
   backdrop image and the foreground, shown only while .wl-on is set. */
.wl-band .wl-preset { position: absolute; inset: 0; display: none; background: url("/logo.png") center / cover no-repeat; opacity: .22; }
.wl-band .wl-preset.wl-on { display: block; }
.wl-preset-card { display: flex; gap: 12px; align-items: center; }
.wl-preset-card .brand-preview { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
/* wide images (wordmark, logo) are shown whole in their thumbnail instead of cropped */
.brand-asset[data-asset="dialer_background_wide"] .brand-preview,
.brand-asset[data-asset="logo"] .brand-preview { object-fit: contain; padding: 4px; box-sizing: border-box; }

/* ---- Showcase (apps and the macOS call widget on devices) ---- */
.sc-panel .panel-head { flex-wrap: wrap; }
.sc-panel .panel-head .muted { font-size: 13px; font-weight: 300; }
.sc-fig { margin: 0; min-width: 0; }
.sc-fig figcaption { font-size: 13px; font-weight: 300; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.sc-fig figcaption b { color: var(--fg-dim); font-weight: 500; }
.sc-fig img { display: block; max-width: 100%; height: auto; }
.sc-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 14px; align-items: start; }
.sc-col-head { font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 720px) { .sc-grid4 { grid-template-columns: 1fr; } .sc-grid4 .sc-col-head { display: none; } }
.sc-photo { background: #f4f4f4; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sc-photo img { width: 100%; }
.sc-facts { margin: 0; padding: 0 14px 14px 32px; font-size: 14px; font-weight: 300; color: var(--fg-dim); }
.sc-facts li { margin: 4px 0; }
.sc-facts b { font-weight: 500; }
.sc-apps { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); grid-template-areas: "mac ios" "win android"; gap: 22px 18px; padding: 14px; align-items: start; }
.sc-app-mac { grid-area: mac; }
.sc-app-ios { grid-area: ios; }
.sc-app-android { grid-area: android; }
.sc-app-win { grid-area: win; }
@media (max-width: 720px) { .sc-apps { grid-template-columns: 1fr; grid-template-areas: "mac" "ios" "win" "android"; } }
.sc-iphone { position: relative; width: 100%; max-width: 240px; aspect-ratio: 250 / 514; margin: 0 auto; }
/* the shell's screen window is painted black; the screenshot lies on top of it */
.sc-iphone .sc-shell { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.sc-iphone .sc-iphone-screen { position: absolute; left: 4%; top: 1.95%; width: 92%; height: 96.1%; object-fit: cover; border-radius: 13% / 6%; z-index: 2; }
.sc-mac { border: 1px solid #444; border-radius: 6px; overflow: hidden; background: #1e1e1e; }
.sc-mac img { width: 100%; }
.sc-placeholder { display: grid; place-items: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted-2); font-size: 13px; background: var(--panel-2); }
.sc-android { width: 100%; max-width: 170px; aspect-ratio: 9 / 19.5; margin: 0 auto; border-radius: 18px; }
.sc-win { aspect-ratio: 16 / 9; max-width: 520px; }
.sc-text { padding: 14px; font-size: 14px; }
.sc-text p { margin: 0 0 12px; max-width: 70ch; }

/* console on a phone system: no companies, no tariffs */
.pbx-mode .full-only,
.pbx-mode #calls-stats .stat:nth-child(3),
.pbx-mode #admins table tr > :nth-child(4),
.pbx-mode #calls table tr > :last-child:nth-child(4),
.pbx-mode #calls table tr > :last-child:nth-child(6) { display: none !important; }

/* the phone system's name stays visible, also next to the default logo */
.pbx-mode .side-brand #brand-name { display: inline; }

/* ---- Visual editor (trunk and phone system) ---- */
.flow-panel { overflow: hidden; }
.flow-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.flow-legend { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.flow-legend label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; color: var(--fg-dim); }
.flow-legend i { display: inline-block; width: 20px; border-top: 2px solid; vertical-align: middle; }
.flow-legend .lg-in { border-color: var(--accent); }
.flow-legend .lg-out { border-color: #2f6db5; }
.flow-legend .lg-alt { border-color: var(--warn); margin-right: 6px; }
.flow-legend .lg-fwd { border-color: var(--warn); border-top-style: dashed; margin-right: 6px; }
.flow-legend .lg-imp { border-top-style: dashed; border-color: var(--muted-2); margin-right: 6px; }
.flow-hint { flex: 1; min-width: 220px; color: var(--muted); font-size: 14px; }
.flow-hint.warn { color: var(--warn); }
.flow-tools { display: flex; gap: 4px; align-items: center; }
.flow-filter { display: flex; gap: 6px; align-items: center; }
.flow-filter select { width: auto; margin: 0; padding: 5px 8px; font-size: 14px; }
#flow-pbx { min-width: 180px; }
.flow-vp {
  position: relative; height: 72vh; min-height: 520px; max-height: 860px; overflow: hidden; outline: none; cursor: grab; touch-action: none;
  background-color: #f7f7f5;
  background-image: radial-gradient(circle, #c4c4c0 1px, transparent 1.4px);
  background-size: 24px 24px;
}
.flow-vp.panning { cursor: grabbing; }
.flow-vp.linking, .flow-vp.linking .fn { cursor: crosshair; }
.flow-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.flow-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.flow-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.fe { fill: none; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.fe.in { stroke: var(--accent); }
.fe.out, .fe.member { stroke: #2f6db5; }
.fe.call { stroke: var(--accent); }
.fe.alt { stroke: var(--warn); }
.fe.fwd { stroke: var(--warn); stroke-dasharray: 7 5; }
.fe.implicit { stroke-dasharray: 3 6; stroke-width: 1.5; opacity: 0.4; }
.fe.sel { stroke-width: 4; }
.fe.live { stroke-dasharray: 9 6; animation: flow-dash 0.9s linear infinite; }
.fe.temp { stroke: var(--fg-dim); stroke-dasharray: 6 4; }
@keyframes flow-dash { to { stroke-dashoffset: -15; } }
@media (prefers-reduced-motion: reduce) { .fe.live { animation: none; } }
.fe-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.fe-badge circle { fill: #2f6db5; }
.fe-badge text { fill: #fff; font: 600 11px var(--font); text-anchor: middle; pointer-events: none; }
.fn {
  position: absolute; width: 196px; padding: 9px 14px 10px; user-select: none; cursor: move;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.15s;
}
.fn:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 22px rgba(0, 0, 0, 0.11); }
.fn.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim), 0 6px 16px rgba(0, 0, 0, 0.08); }
.fn.off { opacity: 0.55; }
.fn.busy { border-color: var(--good); }
.fn-kind { display: flex; align-items: center; gap: 5px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.fn-kind .ic { width: 13px; height: 13px; }
.fn-upstream .fn-kind { color: #2f6db5; }
.fn-pbx .fn-kind, .fn-group .fn-kind, .fn-queue .fn-kind { color: var(--accent-hi); }
.fn-trunk .fn-kind { color: #2f6db5; }
.fn-rule .fn-kind { color: var(--warn); }
.fp-l { position: absolute; right: 12px; margin-top: -8px; font-size: 11px; line-height: 16px; color: var(--muted); pointer-events: none; }
.fn-hangup { color: var(--muted); }
.fn-title { font-size: 18px; font-weight: 600; line-height: 1.2; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-foot { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: 13px; }
.fn-calls { display: inline-flex; align-items: center; gap: 3px; color: var(--good); }
.fn-calls .ic { width: 13px; height: 13px; }
.fn-num { width: auto; min-width: 150px; padding: 6px 16px; border-radius: 18px; background: #fff; }
.fn-num .fn-title { font-size: 14px; font-weight: 500; margin: 0; display: flex; align-items: center; gap: 5px; }
.fn-num .fn-title .ic { width: 13px; height: 13px; flex: none; }
.fn-vm, .fn-fwd, .fn-hangup { background: #fbfaf6; }
.fp {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--line-2); cursor: crosshair; z-index: 1;
  transition: transform 0.1s, background 0.1s, border-color 0.1s;
}
.fp.in { left: -8px; }
.fp.out { right: -8px; }
.fp:hover, .fp.target { transform: scale(1.35); border-color: var(--accent); background: var(--accent); }
.fn-upstream .fp.in:hover, .fn-upstream .fp.in.target { border-color: #2f6db5; background: #2f6db5; }
