/* ezphony design system — mobile first.
   Marketing: white / navy / electric blue. Portals: dark navy. */

:root {
  --navy-950: #050d1f;
  --navy-900: #0b1b3a;
  --navy-800: #13284f;
  --navy-700: #1d3666;
  --ink: #0b1b3a;
  --ink-2: #3c4f70;
  --ink-3: #5d6f8d;
  --blue: #1f5bff;
  --blue-600: #1749d6;
  --blue-50: #eef3ff;
  --blue-100: #dde7ff;
  --cyan: #19b6ff;
  --line: #e3e9f4;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --success: #0f9d6a;
  --warning: #b86e00;
  --danger: #d02f3f;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 58, .06), 0 2px 8px rgba(11, 27, 58, .04);
  --shadow: 0 10px 30px rgba(11, 27, 58, .08);
  --shadow-lg: 0 30px 80px rgba(16, 45, 110, .18);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--blue);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-600); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 6vw, 3.9rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--ink-2); max-width: 640px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(31, 91, 255, .28); }
.btn-primary:hover { background: var(--blue-600); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy-900); border-color: #c9d6ee; }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--blue-50); color: var(--blue); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(208, 47, 63, .4); }
.btn-danger:hover { background: rgba(208, 47, 63, .08); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 7px 13px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; }
.brand-word { font-size: 1.6rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.brand-ez { color: var(--blue); }
.brand-phony { color: var(--navy-900); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.nav-toggle .icon { width: 22px; height: 22px; }
.site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 20px 20px; display: none; }
.site-nav.open { display: block; }
.no-js .site-nav { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 12px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) { display: block; padding: 12px 6px; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--blue); }
.nav-actions { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav { display: flex; position: static; align-items: center; gap: 28px; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .site-nav ul { display: flex; gap: 26px; }
  .site-nav a:not(.btn) { padding: 6px 0; border: 0; font-size: .95rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--blue); }
  .nav-actions { display: flex; margin: 0; align-items: center; }
}

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .section { padding: 104px 0; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; background:
  radial-gradient(900px 500px at 85% 10%, rgba(25, 182, 255, .14), transparent 60%),
  radial-gradient(800px 600px at 100% 80%, rgba(31, 91, 255, .12), transparent 60%),
  linear-gradient(180deg, #fff, #f5f8ff); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; background: linear-gradient(92deg, var(--blue), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-size: .93rem; font-weight: 600; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points .icon { color: var(--success); }
@media (min-width: 960px) { .hero { padding: 96px 0 120px; } .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 64px; } }

/* Product illustration (pure HTML/CSS, illustrative) */
.device { position: relative; background: linear-gradient(160deg, var(--navy-800), var(--navy-950)); color: #e7eeff; border-radius: 26px; padding: 20px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .06); }
.device::after { content: ""; position: absolute; inset: -40px -30px auto auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(25, 182, 255, .35), transparent 70%); z-index: -1; }
.device-top { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: #9fb3d9; margin-bottom: 16px; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #2b4271; }
.dots i:first-child { background: #ff6b7a; } .dots i:nth-child(2) { background: #ffc24b; } .dots i:nth-child(3) { background: #34d399; }
.call-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); margin-bottom: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; flex: none; }
.call-card strong { display: block; color: #fff; font-size: .95rem; }
.call-card small { color: #9fb3d9; }
.call-card .pill { margin-left: auto; }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.flow div { padding: 12px 10px; border-radius: 14px; background: rgba(31, 91, 255, .14); border: 1px solid rgba(31, 91, 255, .3); text-align: center; font-size: .78rem; color: #cfe0ff; }
.flow .icon { display: block; margin: 0 auto 6px; color: var(--cyan); width: 22px; height: 22px; }
.wave { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px; }
.wave span { flex: 1; border-radius: 3px; background: linear-gradient(180deg, var(--cyan), var(--blue)); opacity: .9; }
.device-note { font-size: .72rem; color: #7f94bd; margin: 8px 0 0; text-align: right; }

/* Pills / badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--blue-50); color: var(--blue); white-space: nowrap; }
.pill-live { background: rgba(52, 211, 153, .15); color: #34d399; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.badge-published, .badge-active { background: rgba(15, 157, 106, .14); color: #0b8a5c; }
.badge-draft, .badge-pending, .badge-new { background: rgba(31, 91, 255, .12); color: var(--blue); }
.badge-archived, .badge-cancelled, .badge-disabled, .badge-read { background: rgba(93, 111, 141, .15); color: var(--ink-3); }
.badge-suspended, .badge-changes { background: rgba(184, 110, 0, .14); color: var(--warning); }

/* Cards & grids */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.feature-card { transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-50), #e5f6ff); color: var(--blue); margin-bottom: 18px; }
.feature-icon .icon { width: 24px; height: 24px; }
.card p { color: var(--ink-2); margin: 0; }

/* Glossary (extensions vs channels vs trunks vs DIDs) */
.term { position: relative; padding-top: 30px; }
.term-tag { position: absolute; top: -12px; left: 24px; background: var(--navy-900); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; }
.term .example { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); font-size: .9rem; color: var(--ink-2); }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); }

/* Pricing */
.billing-toggle { display: inline-flex; padding: 5px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); gap: 4px; margin-bottom: 32px; }
.billing-toggle button { font: inherit; font-weight: 700; font-size: .9rem; border: 0; border-radius: 10px; padding: 9px 18px; background: transparent; color: var(--ink-2); cursor: pointer; min-height: 40px; }
.billing-toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.plans { display: grid; gap: 22px; align-items: stretch; }
@media (min-width: 768px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .plans.count-3 { grid-template-columns: repeat(3, 1fr); } .plans.count-4 { grid-template-columns: repeat(4, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.plan.featured { border: 2px solid var(--blue); box-shadow: 0 20px 50px rgba(31, 91, 255, .16); }
.plan-flag { position: absolute; top: -13px; left: 26px; background: linear-gradient(90deg, var(--blue), var(--cyan)); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.35rem; margin-bottom: 4px; }
.plan-tagline { color: var(--ink-3); font-size: .93rem; min-height: 1.5em; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 2px; }
.price strong { font-size: 2.8rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price span { color: var(--ink-3); font-weight: 600; }
.price-note { font-size: .82rem; color: var(--ink-3); min-height: 1.4em; margin-bottom: 18px; }
.plan-limits { display: grid; gap: 8px; padding: 16px; border-radius: 14px; background: var(--bg-soft); margin-bottom: 18px; list-style: none; }
.plan-limits li { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; color: var(--ink-2); }
.plan-limits b { color: var(--ink); }
.plan-features { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 9px; flex: 1; align-content: start; }
.plan-features li { display: flex; gap: 9px; font-size: .93rem; color: var(--ink-2); }
.plan-features .icon { color: var(--blue); margin-top: 2px; }
.annual-price { display: none; }
.show-annual .annual-price { display: block; }
.show-annual .monthly-price { display: none; }
.no-js .annual-price { display: block; }
.notice-bar { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: #fff8eb; border: 1px solid #f6dfb0; color: #6f4a00; font-size: .93rem; margin-bottom: 28px; }
.notice-bar .icon { color: var(--warning); margin-top: 2px; }

/* Tables */
.table-wrap { position: relative; width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 800; background: var(--bg-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .icon { color: var(--blue); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--blue-100); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); }

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }
label, .label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.hint { font-size: .82rem; color: var(--ink-3); margin: 6px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #cbd6ea; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 91, 255, .15); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 600; margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .93rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; }
.input-prefix input { padding-left: 28px; }

/* Flash messages */
.flash-stack { display: grid; gap: 10px; margin-bottom: 22px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; font-size: .94rem; font-weight: 600; border: 1px solid; }
.flash .icon { margin-top: 2px; }
.flash-success { background: #ecfbf4; border-color: #b5ebd2; color: #0b6b48; }
.flash-error { background: #fff0f1; border-color: #f7c3c8; color: #a11d2b; }
.flash-info { background: var(--blue-50); border-color: var(--blue-100); color: #163fa8; }
.flash-warning { background: #fff8eb; border-color: #f6dfb0; color: #7a4f00; }
.site-flash { padding-top: 20px; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 44px 28px; color: #fff; background: radial-gradient(600px 300px at 90% 0%, rgba(25, 182, 255, .45), transparent 60%), linear-gradient(135deg, var(--navy-900), var(--navy-700)); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c7d6f5; max-width: 560px; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.cta-band .btn-secondary:hover { border-color: #fff; }
@media (min-width: 768px) { .cta-band { padding: 64px; display: flex; align-items: center; justify-content: space-between; gap: 32px; } .cta-band p { margin: 0; } }

/* Page header (inner pages) */
.page-hero { padding: 56px 0 40px; background: linear-gradient(180deg, #f5f8ff, #fff); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .page-hero { padding: 88px 0 56px; } }
.prose { max-width: 760px; color: var(--ink-2); }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; color: var(--ink); }
.placeholder-box { padding: 18px 20px; border: 2px dashed #f0c46b; background: #fffaf0; border-radius: 14px; color: #6f4a00; margin-bottom: 24px; }

/* Contact */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.4fr .8fr; gap: 48px; } }
.contact-aside .card + .card { margin-top: 16px; }
.contact-line { display: flex; gap: 12px; align-items: flex-start; }
.contact-line .feature-icon { width: 40px; height: 40px; margin: 0; border-radius: 12px; }

/* Footer */
.site-footer { background: var(--navy-950); color: #9fb0cf; padding: 64px 0 28px; margin-top: 0; }
.site-footer a { color: #c9d6ef; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .93rem; }
.site-footer .brand-phony { color: #fff; }
.footer-bottom { border-top: 1px solid #1b2a4a; margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .85rem; }
.footer-note { font-size: .82rem; max-width: 380px; margin-top: 14px; }

/* ---------- Auth pages ---------- */
.auth-body { min-height: 100vh; display: grid; background: radial-gradient(900px 600px at 0% 0%, rgba(31, 91, 255, .18), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(25, 182, 255, .14), transparent 60%), var(--navy-950); }
.auth-shell { width: 100%; max-width: 460px; margin: auto; padding: 32px 16px; }
.auth-shell .brand { margin-bottom: 26px; }
.auth-shell .brand-phony { color: #fff; }
.auth-card { background: #fff; border-radius: 24px; padding: 30px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
@media (min-width: 480px) { .auth-card { padding: 38px 36px; } }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-3); margin-bottom: 24px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .9rem; margin-top: 18px; }
.auth-foot { color: #8ea2c7; font-size: .85rem; text-align: center; margin-top: 22px; }
.auth-foot a { color: #c9d6ef; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--ink-3); font-size: .82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pbx-hint { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.pbx-hint .icon { color: var(--blue); margin-top: 2px; }
.pbx-hint a { font-weight: 700; }

/* ---------- Portal / admin (dark navy) ---------- */
.app-body {
  --ink: #e8efff; --ink-2: #b6c5e2; --ink-3: #8597ba; --line: #22365a; --bg-soft: #0f1d37;
  --surface: #111f3a; --surface-2: #162749; --focus: 0 0 0 2px #0a1428, 0 0 0 4px #4d82ff;
  background: #0a1428; color: var(--ink); min-height: 100vh;
}
.app-body h1, .app-body h2, .app-body h3 { color: #fff; }
.app-body a { color: #7fa6ff; }
.app-body a:hover { color: #a9c3ff; }
.app-shell { display: grid; min-height: 100vh; }
.app-side { background: #0c1730; border-bottom: 1px solid var(--line); padding: 14px 16px; position: sticky; top: 0; z-index: 40; }
.app-side .brand-phony { color: #fff; }
.app-side .brand-word { font-size: 1.4rem; }
.app-side .brand-mark { width: 34px; height: 34px; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-side .nav-toggle { background: var(--surface); border-color: var(--line); color: #fff; }
.side-nav { display: none; margin-top: 14px; }
.side-nav.open, .no-js .side-nav { display: block; }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; color: #b6c5e2; text-decoration: none; font: inherit; font-weight: 600; font-size: .94rem; background: none; border: 0; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-nav button:hover { background: #15284d; color: #fff; }
.side-nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(31, 91, 255, .35), rgba(31, 91, 255, .12)); color: #fff; box-shadow: inset 3px 0 0 var(--cyan); }
.side-nav .count { margin-left: auto; background: var(--blue); color: #fff; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.side-label { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #5f739b; padding: 18px 12px 6px; }
.side-user { margin-top: 18px; padding: 14px 12px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
.side-user strong { display: block; color: #fff; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; }
.app-main { padding: 24px 16px 48px; min-width: 0; }
.app-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.app-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0; }
.app-head .eyebrow { color: #6fa0ff; margin-bottom: 8px; }
.app-head p { color: var(--ink-3); margin: 6px 0 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 1024px) {
  .app-shell { grid-template-columns: 264px 1fr; }
  .app-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; }
  .app-side .nav-toggle { display: none; }
  .side-nav, .no-js .side-nav { display: flex; flex-direction: column; flex: 1; margin-top: 28px; }
  .side-user { margin-top: auto; }
  .app-main { padding: 40px 44px 64px; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { font-size: 1.15rem; margin: 0; letter-spacing: -.01em; }
.panel p { color: var(--ink-2); }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .82rem; font-weight: 700; }
.stat-label .icon { color: #6fa0ff; }
.stat strong { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.stat small { color: var(--ink-3); font-size: .8rem; }
.split { display: grid; gap: 20px; }
@media (min-width: 1100px) { .split { grid-template-columns: 1.5fr 1fr; align-items: start; } .split > .panel + .panel, .split > div > .panel + .panel { margin-top: 0; } }
.stack > * + * { margin-top: 20px; }
.launch-card { position: relative; overflow: hidden; background: radial-gradient(500px 260px at 100% 0%, rgba(25, 182, 255, .3), transparent 60%), linear-gradient(135deg, #16306a, #0f1f44); border: 1px solid #2a4b8f; }
.launch-card .feature-icon { background: rgba(255, 255, 255, .1); color: #fff; }
.app-body .table-wrap { background: var(--surface); border-color: var(--line); }
.app-body th { background: #0f1d37; color: #8597ba; }
.app-body td { border-color: var(--line); color: var(--ink-2); }
.app-body td strong, .app-body td a { color: #fff; }
.app-body tr:hover td { background: rgba(255, 255, 255, .02); }
.app-body label, .app-body .label { color: #dbe5fb; }
.app-body .hint { color: var(--ink-3); }
.app-body input[type=text], .app-body input[type=email], .app-body input[type=password], .app-body input[type=tel], .app-body input[type=number], .app-body input[type=url], .app-body input[type=search], .app-body select, .app-body textarea {
  background: #0b1630; color: #fff; border-color: #2c4470; }
.app-body input::placeholder, .app-body textarea::placeholder { color: #61759b; }
.app-body input:focus, .app-body select:focus, .app-body textarea:focus { border-color: #4d82ff; box-shadow: 0 0 0 4px rgba(77, 130, 255, .2); }
.app-body .btn-secondary { background: transparent; color: #dbe5fb; border-color: #33507f; }
.app-body .btn-secondary:hover { border-color: #7fa6ff; color: #fff; }
.app-body .btn-ghost { color: #b6c5e2; }
.app-body .btn-ghost:hover { background: #15284d; color: #fff; }
.app-body .btn-danger { color: #ff8e99; border-color: rgba(255, 142, 153, .4); }
.app-body .btn-danger:hover { background: rgba(255, 142, 153, .1); color: #ffb3bb; }
.app-body .field-error { color: #ff8e99; }
.app-body input[aria-invalid="true"] { border-color: #ff8e99; }
.app-body .flash-success { background: rgba(15, 157, 106, .12); border-color: rgba(52, 211, 153, .35); color: #7ce8bd; }
.app-body .flash-error { background: rgba(208, 47, 63, .14); border-color: rgba(255, 142, 153, .4); color: #ffb3bb; }
.app-body .flash-info { background: rgba(31, 91, 255, .14); border-color: rgba(77, 130, 255, .4); color: #b4ccff; }
.app-body .flash-warning { background: rgba(255, 194, 75, .1); border-color: rgba(255, 194, 75, .35); color: #ffd78a; }
.app-body .badge-published, .app-body .badge-active { background: rgba(52, 211, 153, .15); color: #6ee7b7; }
.app-body .badge-draft, .app-body .badge-pending, .app-body .badge-new { background: rgba(77, 130, 255, .18); color: #9dbbff; }
.app-body .badge-archived, .app-body .badge-cancelled, .app-body .badge-disabled, .app-body .badge-read { background: rgba(133, 151, 186, .18); color: #a7b6d3; }
.app-body .badge-suspended, .app-body .badge-changes { background: rgba(255, 194, 75, .15); color: #ffd78a; }
.app-body .plan { background: #fff; }
.app-body .plan * { --ink: #0b1b3a; --ink-2: #3c4f70; --ink-3: #5d6f8d; --bg-soft: #f6f8fc; --line: #e3e9f4; }
.app-body .plan h3 { color: #0b1b3a; }
.app-body .plan strong { color: #0b1b3a; }
.app-body .check { color: var(--ink-2); }
.app-body .notice-bar { background: rgba(255, 194, 75, .08); border-color: rgba(255, 194, 75, .3); color: #ffd78a; }
.app-body .pbx-hint { background: #0f1d37; border-color: var(--line); color: var(--ink-2); }
.kv { display: grid; gap: 0; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: #fff; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.check-list li { display: flex; gap: 10px; color: var(--ink-2); }
.check-list .icon { color: #6ee7b7; margin-top: 2px; }
.feature-picker { display: grid; gap: 8px; }
@media (min-width: 640px) { .feature-picker { grid-template-columns: repeat(2, 1fr); } }
.feature-picker label { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: #0b1630; font-weight: 600; font-size: .9rem; cursor: pointer; margin: 0; }
.feature-picker label:has(input:checked) { border-color: #4d82ff; background: rgba(31, 91, 255, .12); }
.feature-picker input { width: 18px; height: 18px; accent-color: var(--blue); }
.editor { display: grid; gap: 20px; }
@media (min-width: 1200px) { .editor { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .editor-preview { position: sticky; top: 24px; } }
.preview-label { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.inline-form { display: inline; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .icon { width: 36px; height: 36px; color: #4d6a9c; margin-bottom: 10px; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; background: #0b1630; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: #fff; word-break: break-all; letter-spacing: .06em; }
.qr { background: #fff; padding: 12px; border-radius: 14px; width: 200px; height: 200px; display: grid; place-items: center; }
.qr svg { width: 176px; height: 176px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.codes span { background: #0b1630; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; color: #fff; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filter-bar input, .filter-bar select { width: auto; flex: 1 1 200px; min-height: 42px; }
.meta { font-size: .82rem; color: var(--ink-3); }
.message-body { white-space: pre-wrap; color: var(--ink); background: #0b1630; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.verify-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
details.json summary { cursor: pointer; color: #7fa6ff; font-size: .82rem; }
details.json pre { white-space: pre-wrap; font-size: .78rem; color: var(--ink-2); max-width: 420px; }
@media (max-width: 639px) {
  .table-wrap.responsive { border: 0; background: transparent; }
  .table-wrap.responsive table, .table-wrap.responsive tbody, .table-wrap.responsive tr, .table-wrap.responsive td { display: block; width: 100%; }
  .table-wrap.responsive thead { display: none; }
  .table-wrap.responsive tr { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 6px 0; }
  .table-wrap.responsive td { border: 0; padding: 7px 14px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-wrap.responsive td::before { content: attr(data-label); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: left; }
  .table-wrap.responsive td.num { text-align: right; }
}

/* waveform bar heights (no inline styles under CSP) */
.wave .h25{height:25%}.wave .h30{height:30%}.wave .h35{height:35%}.wave .h40{height:40%}.wave .h45{height:45%}.wave .h50{height:50%}.wave .h55{height:55%}.wave .h60{height:60%}.wave .h65{height:65%}.wave .h70{height:70%}.wave .h75{height:75%}.wave .h80{height:80%}.wave .h85{height:85%}.wave .h90{height:90%}.wave .h95{height:95%}

/* Buttons keep their own colours inside the dark shell (link colour must not win) */
.app-body a.btn-primary, .app-body a.btn-primary:hover { color: #fff; }
.app-body a.btn-secondary { color: #dbe5fb; }
.app-body a.btn-secondary:hover { color: #fff; }
.app-body .plan .btn-secondary { background: #fff; color: var(--navy-900); border-color: #c9d6ee; }
.app-body .plan .btn-primary { color: #fff; }
.app-body .plan.featured [data-p=cta] { background: var(--blue); color: #fff; border-color: var(--blue); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.app-side { align-self: start; }
tbody th { text-transform: none; letter-spacing: 0; font-size: .93rem; font-weight: 600; color: var(--ink); background: transparent; white-space: normal; }
.plans + .muted { margin-top: 24px; }
