/* Painel do Tel. Tokens em :root (claro) e no bloco escuro; componentes abaixo. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/vendor/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/vendor/fonts/inter-latin-ext-var.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f6f7fb; --surface: #fff; --surface-2: #f3f4f8; --surface-3: #eceef4;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e6e8ef; --line-strong: #d5d9e3;
  --primary: #5b4cf0; --primary-600: #4a3bdb; --primary-soft: #efedfe; --primary-ink: #fff; --primary-text: #4a3bdb;
  --ok: #15803d; --ok-soft: #e7f6ec; --ok-solid: #16a34a;
  --warn: #b45309; --warn-soft: #fdf2e1;
  --bad: #c02626; --bad-soft: #fdecec; --bad-solid: #dc2626;
  --info: #1d63d8; --info-soft: #e8f0fd;
  --neutral: #52607a; --neutral-soft: #eef0f4;
  --side-bg: #0f1222; --side-2: #181c31; --side-3: #22273f; --side-text: #c9cde0; --side-muted: #7d84a3; --side-line: #22273d;
  --chart: #5b4cf0; --chart-fill-top: rgba(91, 76, 240, .22); --chart-fill-bottom: rgba(91, 76, 240, 0);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  --ring: 0 0 0 3px rgba(91, 76, 240, .25);
  --radius: 12px; --radius-sm: 8px; --sidebar: 252px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d16; --surface: #131626; --surface-2: #1a1e31; --surface-3: #22273d;
    --text: #e8eaf3; --text-2: #c3c8da; --muted: #8b92ad; --faint: #646b88;
    --line: #232840; --line-strong: #30364f;
    --primary: #8577ff; --primary-600: #9a8eff; --primary-soft: #241f4d; --primary-ink: #fff; --primary-text: #aea5ff;
    --ok: #4ade80; --ok-soft: #12301f; --ok-solid: #22c55e;
    --warn: #fbbf24; --warn-soft: #34270d;
    --bad: #f87171; --bad-soft: #3a1717; --bad-solid: #ef4444;
    --info: #7cacff; --info-soft: #172744;
    --neutral: #a3abc4; --neutral-soft: #20253a;
    --side-bg: #090b14; --side-2: #121527; --side-3: #1c2036; --side-line: #1a1e33;
    --chart: #8577ff; --chart-fill-top: rgba(133, 119, 255, .28); --chart-fill-bottom: rgba(133, 119, 255, 0);
    --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 14px 40px rgba(0, 0, 0, .55);
    --ring: 0 0 0 3px rgba(133, 119, 255, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.015em; color: var(--text); }
p { margin: 0; }
a { color: var(--primary-text); }
code, .code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--text-2); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.center { text-align: center; margin-top: 20vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: var(--primary-soft); }

/* ================= casca ================= */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.shell.collapsed { --sidebar: 76px; }

.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; background: var(--side-bg); color: var(--side-text); overflow: hidden; z-index: 30; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.logo { width: 32px; height: 32px; flex: none; display: block; }
.sidebar .icon-btn { color: var(--side-muted); }
.sidebar .icon-btn:hover { background: var(--side-3); color: #fff; }

.ws { position: relative; margin: 2px 0 10px; }
.ws summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--side-2); border: 1px solid var(--side-line); }
.ws summary::-webkit-details-marker { display: none; }
.ws summary:hover { background: var(--side-3); }
.ws.static .ws-current { padding: 8px; border-radius: 10px; background: var(--side-2); border: 1px solid var(--side-line); }
.ws-current { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ws-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ws-text strong { color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-text span { color: var(--side-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-chevron { color: var(--side-muted); width: 16px; height: 16px; }
.ws-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; max-height: 60vh; overflow-y: auto; }
.ws-menu input { margin-bottom: 6px; }
.ws-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: none; border-radius: 8px; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.ws-list button:hover { background: var(--surface-2); }
.ws-list button.current { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.ws-list em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.ws-sep { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 8px 4px; }

.sidenav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); padding: 14px 10px 6px; white-space: nowrap; }
.sidenav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; font-weight: 500; white-space: nowrap; }
.sidenav a .icon { color: var(--side-muted); }
.sidenav a:hover { background: var(--side-2); color: #fff; }
.sidenav a:hover .icon { color: #fff; }
.sidenav a.active { background: linear-gradient(90deg, rgba(133, 119, 255, .22), rgba(133, 119, 255, .08)); color: #fff; }
.sidenav a.active .icon { color: #b3aaff; }
.sidenav a.active::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #8f82ff; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; }

.side-bottom { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--side-line); }
.plan-card { padding: 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(133, 119, 255, .22), rgba(91, 76, 240, .06)); border: 1px solid rgba(133, 119, 255, .25); }
.plan-top { display: flex; align-items: center; gap: 8px; color: #fff; }
.plan-top .icon { color: #b3aaff; width: 16px; height: 16px; }
.plan-card p { color: var(--side-text); font-size: 12px; margin-top: 4px; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--side-2); }
.user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.user-text strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text span { color: var(--side-muted); font-size: 12px; }
.user-more { color: var(--side-muted); }
.user-menu .menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 40; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu-info { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-info span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.menu button, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.menu button .icon, .dropdown-menu button .icon { width: 16px; height: 16px; color: var(--muted); }
.dropdown-menu button.danger, .dropdown-menu button.danger .icon { color: var(--bad); }

/* recolhido */
.shell.collapsed .brand-name, .shell.collapsed .nav-label, .shell.collapsed .nav-section, .shell.collapsed .ws-text, .shell.collapsed .ws-chevron,
.shell.collapsed .plan-card, .shell.collapsed .user-text, .shell.collapsed .user-more { display: none; }
.shell.collapsed .side-top { flex-direction: column; gap: 10px; }
.shell.collapsed .collapse-btn .icon { transform: rotate(180deg); }
.shell.collapsed .sidenav a { justify-content: center; padding: 10px; }
.shell.collapsed .nav-badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.shell.collapsed .ws summary, .shell.collapsed .ws.static .ws-current { justify-content: center; padding: 6px; }
.shell.collapsed .ws-menu { width: 260px; }
.shell.collapsed .user-menu summary { justify-content: center; }
.shell.collapsed .user-menu .menu { width: 240px; }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.crumbs strong { color: var(--text); font-weight: 600; }
.crumb-sep { color: var(--faint); }
.topbar .menu-btn { display: none; }
.global-search { display: flex; align-items: center; gap: 8px; width: min(360px, 34vw); height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); }
.global-search:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.global-search input { border: 0; padding: 0; height: 100%; background: none; box-shadow: none !important; min-height: 0; }
.phone-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); white-space: nowrap; }
.phone-pill:hover { border-color: var(--primary); }
.phone-pill-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-text); }
.phone-pill-icon .icon { width: 15px; height: 15px; }
.phone-pill[data-state="ready"] .phone-pill-icon { background: var(--ok-soft); color: var(--ok); position: relative; }
.phone-pill[data-state="ready"] .phone-pill-icon::after { content: ""; position: absolute; right: -1px; top: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-solid); border: 2px solid var(--surface); }
.phone-pill[data-state="error"] .phone-pill-icon, .phone-pill[data-state="off"] .phone-pill-icon { background: var(--neutral-soft); color: var(--neutral); }
.phone-pill[data-state="connecting"] .phone-pill-icon { background: var(--warn-soft); color: var(--warn); }
.phone-pill[data-state="call"] { background: var(--ok-solid); border-color: var(--ok-solid); color: #fff; }
.phone-pill[data-state="call"] .phone-pill-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.phone-pill[data-state="ringing"] { background: var(--ok-solid); border-color: var(--ok-solid); color: #fff; animation: ring 1s ease-in-out infinite; }
.phone-pill[data-state="ringing"] .phone-pill-icon { background: rgba(255, 255, 255, .2); color: #fff; }
@keyframes ring { 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, .25); } }
.scrim { display: none; }

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 28px 48px; }
.view { display: contents; }

@media (max-width: 960px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; --sidebar: 280px; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; visibility: hidden; }
  .shell.menu-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  .shell.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(9, 11, 20, .5); }
  .shell.collapsed .brand-name, .shell.collapsed .nav-label, .shell.collapsed .nav-section, .shell.collapsed .ws-text, .shell.collapsed .plan-card, .shell.collapsed .user-text { display: revert; }
  .collapse-btn { display: none; }
  .topbar { padding: 0 14px; gap: 10px; height: 58px; }
  .topbar .menu-btn { display: inline-grid; }
  .global-search { display: none; }
  .phone-pill-text { display: none; }
  .phone-pill { padding: 0 4px; }
  main { padding: 18px 16px 40px; }
}

/* ================= página ================= */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { flex: 1; min-width: 240px; }
.page-head h1 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.025em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-actions:empty { display: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.grid-main > .card, .grid-2 > .card { margin-bottom: 0; }
.grid-main + .grid-2 { margin-top: 18px; }
@media (max-width: 1100px) { .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.info-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border-radius: 10px; background: var(--primary-soft); color: var(--text-2); font-size: 13px; }
.info-strip .icon { color: var(--primary-text); }
.foot-note { color: var(--muted); font-size: 12.5px; margin-top: -6px; }

/* ================= formulários ================= */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
label, .field > label { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0; }
.hint { color: var(--muted); font-size: 12px; }
input, select, textarea { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--muted)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; line-height: 1.5; }
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid-form.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid-form, .grid-form.three { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 8px; min-width: 260px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.card .setting-row:first-of-type { border-top: 0; padding-top: 4px; }
.setting-row p { color: var(--muted); font-size: 13px; margin-top: 2px; max-width: 560px; }
@media (max-width: 640px) { .setting-row { flex-direction: column; align-items: stretch; gap: 10px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 1px 2px rgba(74, 59, 219, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn.danger { background: var(--bad-solid); border-color: var(--bad-solid); color: #fff; }
.btn.ghost { box-shadow: none; }
.btn.ghost.danger { background: var(--surface); border-color: var(--line-strong); color: var(--bad); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { min-height: 44px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy > * { visibility: hidden; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) var(--muted) var(--muted) transparent; animation: spin .7s linear infinite; }
.btn.primary.busy::after { border-color: #fff #fff #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; padding: 0; color: var(--primary-text); font: inherit; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* interruptor */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; font-weight: 500; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--line-strong); transition: background .15s; flex: none; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
.switch input:disabled + .switch-track { opacity: .5; cursor: not-allowed; }
.switch-label { font-size: 13px; }

/* segmentado e abas */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); flex-wrap: wrap; }
.segmented button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 -24px 20px; padding: 0 24px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 4px; margin-right: 18px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--primary-text); border-bottom-color: var(--primary); }

/* dropdown "⋯" */
.dropdown { position: relative; display: inline-block; }
.dropdown summary { list-style: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); text-align: left; }

/* filtros */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar select { width: auto; min-width: 170px; }
.search-input { position: relative; flex: 1; min-width: 220px; }
.search-input .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; }
.search-input input { padding-left: 34px; }
.date-range { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.date-range input { width: 150px; }

/* ================= dados ================= */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { position: sticky; top: 0; text-align: left; padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
tbody tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; }
td.actions { text-align: right; width: 1%; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--surface-2); }
.summary-cell { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-cell select { max-width: 340px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); min-height: 52px; }
.msg-list + .table-foot { border-top: 0; padding: 4px 0; }
.count { color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px) { .hide-sm { display: none; } }

.identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.identity-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.identity-text strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-text span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }

.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 13px; font-weight: 700; flex: none; letter-spacing: 0; }
.avatar .icon { width: 17px; height: 17px; }
.avatar.small { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.avatar.small .icon { width: 14px; height: 14px; }
.avatar.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.avatar.xl { width: 64px; height: 64px; border-radius: 99px; font-size: 22px; }
.avatar.xl .icon { width: 26px; height: 26px; }
.tone-0 { background: #efedfe; color: #4a3bdb; } .tone-1 { background: #e3f4fb; color: #0e7490; } .tone-2 { background: #e7f6ec; color: #15803d; } .tone-3 { background: #fdf2e1; color: #b45309; }
.tone-4 { background: #fce8f3; color: #be185d; } .tone-5 { background: #e8f0fd; color: #1d63d8; } .tone-6 { background: #f1ecfd; color: #7c3aed; } .tone-7 { background: #e9f6f4; color: #0f766e; }
.tone-p { background: var(--primary-soft); color: var(--primary-text); } .tone-i { background: var(--info-soft); color: var(--info); }
@media (prefers-color-scheme: dark) {
  .tone-0 { background: #241f4d; color: #b3aaff; } .tone-1 { background: #10303b; color: #67d2ec; } .tone-2 { background: #12301f; color: #6ee7a0; } .tone-3 { background: #34270d; color: #fbbf24; }
  .tone-4 { background: #3a1529; color: #f9a8d4; } .tone-5 { background: #172744; color: #93c5fd; } .tone-6 { background: #2a1d4d; color: #c4b5fd; } .tone-7 { background: #0f2f2b; color: #5eead4; }
}

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary-text); }
.badge.live { background: var(--ok-soft); color: var(--ok); }
.badge.live .badge-dot { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

.presence { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.presence .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.presence.on { color: var(--ok); }
.presence.on .dot { background: var(--ok-solid); }
.presence.on .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok-solid); opacity: .5; animation: pulse 1.8s ease-out infinite; }
.presence.busy { color: var(--warn); } .presence.busy .dot { background: var(--warn); }
@keyframes pulse { from { transform: scale(.6); opacity: .6; } to { transform: scale(1.5); opacity: 0; } }

.progress { display: block; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.progress.full span { background: var(--warn); }
.usage { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.usage .progress { width: 80px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 20px; gap: 6px; }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 6px; }
.empty-icon .icon { width: 22px; height: 22px; }
.empty-title { font-weight: 600; color: var(--text); font-size: 15px; }
.empty-hint { color: var(--muted); max-width: 380px; }
.empty .btn { margin-top: 10px; }

/* ================= avisos, modal, painel ================= */
.notice { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; }
.notice.error { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.toasts { position: fixed; z-index: 70; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; max-width: min(400px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #111427; color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; transition: opacity .3s, transform .3s; animation: toast-in .2s ease-out; }
.toast .icon { width: 16px; height: 16px; padding: 3px; box-sizing: content-box; border-radius: 99px; }
.toast.ok .icon { background: var(--ok-solid); }
.toast.warn .icon { background: #d97706; }
.toast.error .icon { background: var(--bad-solid); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

dialog.modal { border: 0; padding: 0; width: min(500px, calc(100vw - 32px)); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(9, 11, 20, .55); backdrop-filter: blur(2px); }
dialog.modal form { padding: 22px 24px 20px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.modal-head > div { flex: 1; }
.modal-head h2 { font-size: 18px; margin: 0; }
.modal-head p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.modal-text { color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.secret-box { display: flex; flex-direction: column; gap: 8px; }
.secret-row { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.secret-row span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.secret-row code { background: none; border: 0; padding: 0; font-size: 14px; color: var(--text); word-break: break-all; }

.overlay { position: fixed; inset: 0; z-index: 45; background: rgba(9, 11, 20, .45); animation: fade .15s; }
.drawer { position: fixed; z-index: 46; top: 0; right: 0; height: 100vh; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer.wide { width: min(860px, 100vw); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-head > :first-child { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 17px; margin: 0; }
.drawer-head .identity-text strong { font-size: 16px; }
.drawer-body { padding: 0 24px 24px; overflow-y: auto; flex: 1; }
.drawer-body > :first-child:not(.tabs-wrap) { margin-top: 20px; }
.drawer-actions { position: sticky; bottom: -24px; display: flex; gap: 8px; align-items: center; padding: 16px 0 24px; margin: 20px 0 -24px; background: var(--surface); border-top: 1px solid var(--line); }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.mini-stat { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.mini-stat > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.mini-stat strong { font-weight: 600; }
.summary-box { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, var(--primary-soft), transparent); border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line)); }
.summary-title { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary-text); font-size: 13px; margin-bottom: 6px; }
.summary-title .icon { width: 15px; height: 15px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 12px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); color: var(--text); }
.bubble.agent { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.caller { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble .who { display: block; font-size: 11.5px; font-weight: 600; opacity: .7; margin-bottom: 2px; }

/* ================= início ================= */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { gap: 12px; } }
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 18px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font: inherit; color: var(--text); min-width: 0; }
button.kpi { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.kpi:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-lg); }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.kpi-icon .icon { width: 17px; height: 17px; }
.kpi-icon.primary { background: var(--primary-soft); color: var(--primary-text); }
.kpi-icon.ok { background: var(--ok-soft); color: var(--ok); }
.kpi-icon.info { background: var(--info-soft); color: var(--info); }
.kpi-icon.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.kpi-hint { color: var(--muted); font-size: 12.5px; }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 99px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta .icon { width: 12px; height: 12px; stroke-width: 2.25; }
.delta.up { background: var(--ok-soft); color: var(--ok); }
.delta.down { background: var(--bad-soft); color: var(--bad); }
.delta.flat { background: var(--neutral-soft); color: var(--neutral); }
@media (max-width: 520px) { .kpi { padding: 14px; } .kpi-value { font-size: 24px; } .kpi-hint { display: none; } }

.status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.status-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; border-right: 1px solid var(--line); background: none; font: inherit; color: var(--text); text-align: left; min-width: 0; }
.status-item:last-child { border-right: 0; }
button.status-item { cursor: pointer; }
button.status-item:hover { background: var(--surface-2); }
.status-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--muted); flex: none; }
.status-icon .icon { width: 16px; height: 16px; }
.status-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.status-text span { color: var(--muted); font-size: 12.5px; }
.status-text strong { font-variant-numeric: tabular-nums; }
.status-item .progress { width: 72px; }
@media (max-width: 720px) { .status-strip { grid-template-columns: 1fr; } .status-item { border-right: 0; border-bottom: 1px solid var(--line); } .status-item:last-child { border-bottom: 0; } }

.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { stroke: var(--line-strong); }
.chart .tick-y { fill: var(--faint); font-size: 11px; text-anchor: end; font-family: var(--font); }
.chart .tick-x { fill: var(--muted); font-size: 11px; text-anchor: middle; font-family: var(--font); }
.chart .tick-x.strong { fill: var(--text); font-weight: 600; }
.chart .line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area-stop-top { stop-color: var(--chart); stop-opacity: .22; }
.chart .area-stop-bottom { stop-color: var(--chart); stop-opacity: 0; }
.chart .dot { fill: var(--surface); stroke: var(--chart); stroke-width: 2.5; }
.chart .guide { stroke: var(--line-strong); stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); display: flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 8px; background: #111427; color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-lg); }
.chart-tip span { opacity: .7; }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bars-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.bars-label .num { color: var(--muted); }
.bars-label strong { color: var(--text); }
.bars-track { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bars-track span { display: block; height: 100%; border-radius: 99px; background: var(--chart); }

.feed { list-style: none; margin: 0 -20px -20px; padding: 0; }
.feed li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.feed li.clickable { cursor: pointer; }
.feed li.clickable:hover { background: var(--surface-2); }
.feed-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; color: var(--muted); font-size: 12px; }
.feed .identity-text span { max-width: 300px; }

/* ================= recados ================= */
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-list > .empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.msg { display: flex; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.msg.done { background: var(--surface-2); box-shadow: none; }
.msg.done .avatar { filter: grayscale(.8); opacity: .7; }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-head strong { font-size: 14.5px; }
.msg-body { margin-top: 6px; color: var(--text-2); }
.msg-body p + p { margin-top: 2px; }
.msg-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.done-mark { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 12.5px; font-weight: 600; }
.done-mark .icon { width: 15px; height: 15px; }

/* ================= agentes ================= */
.agent-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.agent-card:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); box-shadow: var(--shadow-lg); }
.agent-card.off { opacity: .75; }
.agent-top { display: flex; align-items: center; gap: 12px; }
.agent-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; color: #fff; background: linear-gradient(135deg, #8a7bff, #4a3bdb); box-shadow: 0 4px 12px rgba(91, 76, 240, .35); }
.agent-avatar .icon { width: 20px; height: 20px; }
.agent-id { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.agent-id strong { font-size: 16px; }
.agent-id span { color: var(--muted); font-size: 12.5px; }
.agent-greeting { color: var(--text-2); font-style: italic; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-meta { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.agent-meta span { display: inline-flex; align-items: center; gap: 6px; }
.agent-meta .icon { width: 14px; height: 14px; }
.agent-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.days { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.day { display: grid; grid-template-columns: auto 90px 1fr auto 1fr; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.day-name { font-weight: 500; }
@media (max-width: 560px) { .day { grid-template-columns: auto 1fr 1fr; } .day-name { grid-column: 2 / 4; } .day > .muted { display: none; } }
.dests { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.dest-card { padding: 16px 16px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.dest-card .field { margin-bottom: 10px; }

/* ================= login ================= */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.login-hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 56px; color: #fff; overflow: hidden;
  background: radial-gradient(1200px 600px at -10% -10%, #6d5ef7 0%, transparent 55%), radial-gradient(800px 500px at 110% 110%, #2b1f9e 0%, transparent 60%), linear-gradient(160deg, #1a1446 0%, #0f1222 70%); }
.login-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 70%); pointer-events: none; }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; position: relative; z-index: 1; }
.login-brand .logo { width: 38px; height: 38px; }
.login-pitch { position: relative; z-index: 1; max-width: 460px; }
.login-pitch h2 { color: #fff; font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 28px; }
.features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.features li { display: flex; gap: 14px; }
.feature-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); flex: none; }
.features strong { display: block; font-size: 15px; }
.features p { color: rgba(255, 255, 255, .7); margin-top: 2px; }
.login-copy { position: relative; z-index: 1; color: rgba(255, 255, 255, .5); font-size: 12.5px; }
.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: min(380px, 100%); }
.login-form h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.03em; }
.login-form > p.muted { margin-bottom: 26px; }
.login-form .btn { width: 100%; margin-top: 6px; }
.login-foot { display: flex; gap: 8px; align-items: flex-start; margin-top: 22px; color: var(--muted); font-size: 12.5px; }
.login-foot .icon { width: 15px; height: 15px; margin-top: 2px; }
.login-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; margin-bottom: 28px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-hero { display: none; } .login-mobile-brand { display: flex; } }

/* ================= carregando ================= */
.skeleton-page { display: flex; flex-direction: column; gap: 18px; }
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.sk-title { width: 260px; height: 30px; }
.sk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sk-kpi { height: 118px; }
.sk-block { height: 300px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ================= telefone ================= */
.phone { position: fixed; z-index: 50; right: 20px; top: 76px; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 92px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: toast-in .15s ease-out; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; color: #fff; background: linear-gradient(135deg, #6d5ef7, #3b2fc9); }
.phone-head .icon-btn { color: rgba(255, 255, 255, .8); }
.phone-head .icon-btn:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.phone-head-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.phone-head-text { display: flex; flex-direction: column; line-height: 1.25; }
.phone-head .presence { color: rgba(255, 255, 255, .8); font-size: 12px; }
.phone-head .presence .dot { background: rgba(255, 255, 255, .5); }
.phone-head .presence.on .dot { background: #4ade80; }
.phone-head .presence.on .dot::after { border-color: #4ade80; }
.phone-head .presence.busy .dot { background: #fbbf24; }
.phone-body { padding: 18px; }
.phone-form { display: flex; flex-direction: column; gap: 4px; }
.phone-form .btn { margin-top: 4px; }
.phone-note { display: flex; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 14px; }
.phone-note .icon { width: 14px; height: 14px; margin-top: 2px; }
.dial-wrap { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.dial { border: 0; font-size: 26px; font-weight: 600; text-align: center; letter-spacing: .04em; padding: 6px 0; box-shadow: none !important; background: none; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 8px; justify-items: center; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 62px; height: 62px; border-radius: 99px; border: 0; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; transition: background .1s; }
.key:hover { background: var(--surface-3); }
.key:active { background: var(--primary-soft); }
.key span { font-size: 22px; font-weight: 500; line-height: 1; }
.key small { font-size: 9px; letter-spacing: .12em; color: var(--muted); height: 11px; margin-top: 2px; }
.call-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 16px; }
.call-card .peer { font-size: 22px; letter-spacing: -0.02em; }
.call-card .timer { color: var(--muted); font-variant-numeric: tabular-nums; }
.call-card.ringing .avatar { animation: ring-av 1.2s ease-in-out infinite; }
@keyframes ring-av { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--ok-solid) 20%, transparent); } }
.call-actions { display: flex; justify-content: center; gap: 28px; margin-top: 8px; }
.round-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; }
.round-btn .icon { box-sizing: content-box; width: 22px; height: 22px; padding: 17px; border-radius: 99px; background: var(--surface-2); color: var(--text); transition: transform .1s, filter .1s; }
.round-btn:hover .icon { filter: brightness(1.08); transform: scale(1.04); }
.round-btn.ok .icon { background: var(--ok-solid); color: #fff; }
.round-btn.bad .icon { background: var(--bad-solid); color: #fff; }
.round-btn.on .icon { background: var(--warn-soft); color: var(--warn); }
.muted-link { display: block; margin: 14px auto 0; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; }

/* telefone: lista de agentes para testar */
.phone-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 2px 0 10px; }
.agent-list { display: flex; flex-direction: column; gap: 8px; }
.agent-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.agent-row .agent-id strong { font-size: 14px; }
.agent-avatar.small { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
.agent-avatar.small .icon { width: 16px; height: 16px; }
.agent-avatar.xl { width: 64px; height: 64px; border-radius: 99px; }
.agent-avatar.xl .icon { width: 26px; height: 26px; }
.sk-row-56 { height: 56px; }
.phone-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.phone-foot .switch-label { font-weight: 600; color: var(--text); }
.phone-body .notice p { margin-bottom: 4px; }

/* equipe: seção de aparelhos recolhível */
details.advanced { margin-top: 6px; }
details.advanced > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 16px; border-radius: var(--radius); border: 1px dashed var(--line-strong); color: var(--text-2); font-weight: 600; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary:hover { background: var(--surface); }
details.advanced > summary .muted { font-weight: 400; }
details.advanced[open] > summary { margin-bottom: 14px; }
