/* Invasor Call Center — consola de operación. Oscuro por defecto; claro con el sistema o data-theme="light". */
:root {
  --bg: #0f1424; --surface: #171d33; --surface-2: #1f2742; --surface-3: #283153;
  --line: #2a3352; --line-strong: #3a4470; --text: #e8ecf8; --muted: #8a93b5;
  --accent: #f5b841; --accent-soft: rgba(245,184,65,.14); --accent-ink: #1a1200;
  --ok: #2fbf71; --ok-soft: rgba(47,191,113,.16); --danger: #e5484d; --danger-soft: rgba(229,72,77,.16);
  --warn: #f08a4b; --warn-soft: rgba(240,138,75,.16); --info: #4f8ff7; --info-soft: rgba(79,143,247,.16);
  --shadow: 0 18px 48px rgba(0,0,0,.45); --radius: 16px; --radius-sm: 10px;
  --font-ui: "Manrope", "Segoe UI", system-ui, sans-serif; --font-mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef0f7; --surface: #fff; --surface-2: #f3f5fb; --surface-3: #e6e9f4; --line: #d7dcec; --line-strong: #b9c1dc;
    --text: #171d33; --muted: #5c6588; --accent: #c98a0e; --accent-soft: rgba(201,138,14,.14); --accent-ink: #fffaf0;
    --ok: #1f9f5c; --ok-soft: rgba(31,159,92,.14); --danger: #d13b40; --danger-soft: rgba(209,59,64,.12);
    --warn: #d9702e; --warn-soft: rgba(217,112,46,.14); --info: #2f6fd8; --info-soft: rgba(47,111,216,.12);
    --shadow: 0 18px 48px rgba(23,29,51,.12); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef0f7; --surface: #fff; --surface-2: #f3f5fb; --surface-3: #e6e9f4; --line: #d7dcec; --line-strong: #b9c1dc;
  --text: #171d33; --muted: #5c6588; --accent: #c98a0e; --accent-soft: rgba(201,138,14,.14); --accent-ink: #fffaf0;
  --ok: #1f9f5c; --ok-soft: rgba(31,159,92,.14); --danger: #d13b40; --danger-soft: rgba(209,59,64,.12);
  --warn: #d9702e; --warn-soft: rgba(217,112,46,.14); --info: #2f6fd8; --info-soft: rgba(47,111,216,.12);
  --shadow: 0 18px 48px rgba(23,29,51,.12); color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; font-family: var(--font-mono); font-size: 13px; }
label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ===== Shell ===== */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
/* El menú mide la altura de la ventana; si hay más opciones de las que caben, se desplaza dentro de su propio fondo
   (sin overflow los botones sobrantes se dibujaban fuera del lateral, sobre el fondo gris de la página) */
.nav { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.nav > * { flex: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; flex: none; background:
  radial-gradient(circle at 30% 30%, var(--accent) 0 4px, transparent 5px), radial-gradient(circle at 70% 30%, var(--accent) 0 4px, transparent 5px),
  radial-gradient(circle at 30% 70%, var(--accent) 0 4px, transparent 5px), radial-gradient(circle at 70% 70%, var(--accent) 0 4px, transparent 5px), var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-strong); }
.brand h1 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.brand small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; text-align: left; width: 100%; }
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item .badge { margin-left: auto; }
.nav-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
/* ===== Marcador: resumen de campaña y mosaico de canales ===== */
.camp-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 14px; align-items: start; }
.camp-card { position: sticky; top: 16px; padding: 14px; }
.camp-main { display: grid; gap: 12px; min-width: 0; }
.camp-card .card-head { margin-bottom: 4px; }
.info-rows { display: grid; }
.info-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; min-width: 0; }
.stat-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 16px; }
.stat-strip .stat { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; }
.stat-strip .stat .l { grid-column: 1 / -1; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-strip .stat .v { font-family: var(--font-mono); font-size: 22px; font-weight: 600; line-height: 1.1; }
.stat-strip .stat .v.hot { color: var(--accent); } .stat-strip .stat .v.good { color: var(--ok); }
.stat-strip .stat .s { font-size: 11px; color: var(--muted); }
.stat-strip .progress-stat { flex: 1 1 320px; display: block; min-width: 0; }
.stat-strip .progress-stat .legend { margin-top: 6px; gap: 8px 12px; font-size: 11px; }
.chan-card { padding: 12px 14px; }
.chan-card .card-head { margin-bottom: 8px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; flex: none; }
.info-row .v { font-family: var(--font-mono); font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-big { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 10px; font-weight: 800; letter-spacing: .08em; font-size: 12px; background: var(--surface-3); color: var(--muted); }
.state-big.running { background: var(--ok-soft); color: var(--ok); }
.state-big.paused { background: var(--warn-soft); color: var(--warn); }
.state-big.finished { background: var(--info-soft); color: var(--info); }
.quick-settings { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.quick-settings summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.quick-settings .slider-row { grid-template-columns: 1fr 56px; padding: 4px 0; }
.quick-settings .slider-row label { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.camp-right .grid.kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.camp-right .kpi { padding: 12px 14px; }
.camp-right .kpi .v { font-size: 26px; }
.chan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 7px; }
.chan { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; height: 64px; box-sizing: border-box; display: grid; grid-template-rows: auto auto auto; gap: 1px; min-width: 0; }
.chan.live { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.chan.answered { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.chan.idle { opacity: .5; }
.chan.last { opacity: .8; }
.chan .top { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.chan .top span { overflow: hidden; text-overflow: ellipsis; }
.chan .num { font-family: var(--font-mono); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.chan .num small { font-family: var(--font-ui); font-weight: 500; font-size: 11px; color: var(--muted); margin-left: 6px; }
.chan .bot { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.chan .bot .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; padding: 2px 7px; display: inline-flex; }
.chan .acts { display: flex; gap: 3px; flex: none; }
.chan .acts .btn { padding: 1px 7px; font-size: 11px; line-height: 1.4; }
@media (max-width: 900px) { .camp-layout { grid-template-columns: 1fr; } .camp-card { position: static; } }

/* Consola (solo usuarios normales): bloque negro fijo en el hueco del menú lateral, bajo las opciones y encima de
   "Salir". Ocupa todo el espacio libre del menú y muestra la tabla MySQL `consola` en vivo. */
.nav .nav-console { flex: 1 1 140px; min-height: 140px; display: flex; flex-direction: column; margin: 8px -4px 4px; border-radius: 10px; background: #000; border: 1px solid #1f2a1f; color: #d9f5d9; overflow: hidden; }
.nav .nav-console[hidden] { display: none; }
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #1f2a1f; font-family: var(--font-mono); font-size: 11px; flex: none; }
.console-head .console-title { color: #9dff9d; font-weight: 700; letter-spacing: .04em; }
.console-head .btn { background: #0d140d; border-color: #1f2a1f; color: #9dff9d; padding: 2px 8px; font-size: 10.5px; }
.console { margin: 0; flex: 1; background: #000; color: #d9f5d9; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; padding: 8px 9px; overflow: auto; white-space: pre-wrap; word-break: break-word; min-height: 0; scrollbar-width: thin; }
.console .cl { display: block; }
.console .cl-id { color: #4c7a4c; margin-right: 10px; user-select: none; }
.console .cl-user { color: #7fc8ff; }
.console .cl-cursor::after { content: "█"; color: #9dff9d; animation: cursor-blink 1s steps(1) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
/* Botones de instalación en la pantalla de entrada */
.app-install { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.app-install .btn { font-size: 12px; padding: 6px 12px; }
.app-install[hidden] { display: none; }
.fs-state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 4px 10px; }
.fs-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.fs-state.on .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }

.main { padding: 20px 24px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Botones, pills ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.icon { padding: 6px; border-radius: 8px; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
/* Dentro de una tabla el texto largo de una etiqueta se parte en varias líneas en vez de ensanchar la columna */
td .pill { white-space: normal; max-width: 260px; text-align: left; line-height: 1.25; }
td .pill + .hint { margin-top: 4px; max-width: 320px; }
/* Tabla de canales del marcador: columnas de ancho fijo y filas de alto fijo, para que nada se mueva cuando cambia
   el texto (estado, nombre, botones). Lo que no cabe se corta con puntos suspensivos y se ve entero al pasar el ratón. */
.chan-table { table-layout: fixed; width: 100%; min-width: 1100px; }
.chan-table th, .chan-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-table td { height: 46px; padding-top: 0; padding-bottom: 0; }
.chan-table td .pill { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.chan-table td .pill + .hint { display: inline; margin: 0 0 0 8px; vertical-align: middle; }
.chan-table td .row-actions { flex-wrap: nowrap; justify-content: flex-start; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.pulse::before { animation: pulse 1.1s ease-in-out infinite; }
.badge { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
@keyframes pulse { 50% { opacity: .3; } }

/* ===== Tarjetas, tablas ===== */
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card-head .btns { display: flex; gap: 6px; }
.kpi { display: grid; gap: 4px; }
.kpi .v { font-family: var(--font-mono); font-size: 32px; font-weight: 500; line-height: 1; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.hot .v { color: var(--accent); }
.kpi.good .v { color: var(--ok); }
.section { margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 6px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.empty { color: var(--muted); font-size: 13px; padding: 14px 4px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; display: flex; }
.progress span { display: block; height: 100%; }
.progress .p-answered { background: var(--ok); } .progress .p-no { background: var(--warn); } .progress .p-busy { background: var(--info); } .progress .p-fail { background: var(--danger); } .progress .p-call { background: var(--accent); }
.slider-row { display: grid; grid-template-columns: 190px 1fr 56px; gap: 14px; align-items: center; padding: 8px 0; }
.slider-row label { margin: 0; font-size: 14px; color: var(--text); }
.slider-row input[type=range] { width: 100%; padding: 0; background: transparent; border: 0; accent-color: var(--accent); }
.slider-row .badge { text-align: center; padding: 4px 0; font-size: 13px; }
@media (max-width: 600px) { .slider-row { grid-template-columns: 1fr 56px; } .slider-row label { grid-column: 1 / -1; } }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0 2px; margin: 0; font-size: 14px; color: var(--text); cursor: pointer; }
.check-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.stat-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat-row:last-child { border-bottom: 0; }
.queue-board { display: grid; gap: 6px; }
.waiter { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13px; }
.waiter .t { font-family: var(--font-mono); color: var(--accent); }
.agent-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.agent-chip b { font-family: var(--font-mono); font-weight: 500; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.log { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; font-size: 13px; }
.log li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.log li span:first-child { font-family: var(--font-mono); color: var(--muted); font-size: 12px; }
.hint { font-size: 12px; color: var(--muted); }
.error { color: var(--danger); font-size: 13px; }
.form { display: grid; gap: 12px; }
.form .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; }
.check-list label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; margin: 0; cursor: pointer; }
.check-list input { width: auto; margin: 0; }
.opt-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: center; }
.audio-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.audio-row:last-child { border-bottom: 0; }
.audio-row .n { font-family: var(--font-mono); font-size: 13px; }
audio { height: 32px; max-width: 220px; }

/* ===== Diálogos ===== */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 20px; padding: 22px; width: min(640px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 8, 20, .6); backdrop-filter: blur(3px); }
dialog h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ===== Login ===== */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; padding: 16px; }
.login .card { width: min(380px, 100%); display: grid; gap: 12px; padding: 26px; }
.login h2 { font-size: 20px; font-weight: 800; }

/* ===== Teléfono (panel lateral) ===== */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(380px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .25s ease; z-index: 40; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 14px; font-weight: 800; }
.drawer-body { padding: 16px; overflow: auto; display: grid; gap: 14px; align-content: start; }
.ph-display { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; }
.ph-display .top { display: flex; justify-content: space-between; align-items: center; }
.ph-number { font-family: var(--font-mono); font-size: 30px; min-height: 1.2em; white-space: nowrap; overflow-x: auto; }
.ph-caller { font-size: 13px; color: var(--muted); min-height: 1.4em; }
.ph-incoming { background: var(--ok-soft); border: 1px solid var(--ok); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ph-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-key { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 0; font-family: var(--font-mono); font-size: 22px; }
.ph-key:active { background: var(--accent-soft); }
.ph-ctl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; }
.ph-ctl .ctl { display: grid; justify-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 2px; border-radius: 10px; }
.ph-ctl .ctl[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.ph-ctl .ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ph-call { width: 60px; height: 60px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; justify-self: center; box-shadow: 0 8px 20px rgba(47,191,113,.35); }
.ph-call svg { width: 26px; height: 26px; fill: currentColor; }
.ph-call.hangup { background: var(--danger); box-shadow: 0 8px 20px rgba(229,72,77,.35); }
.ph-call.hangup svg { transform: rotate(135deg); }
.ph-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-status-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.agent-status-btns .btn { justify-content: center; }
.agent-status-btns .btn.active { outline: 2px solid var(--accent); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; overflow: visible; }
  .nav .nav-console { flex: 1 1 100%; width: 100%; height: 160px; min-height: 160px; margin: 6px 0; }
  .brand { padding: 4px 8px; width: 100%; }
  .nav-item { width: auto; padding: 7px 10px; }
  .nav-item span.txt { display: none; }
  .nav-foot { margin: 0; padding: 0; border: 0; flex-direction: row; }
  .main { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } .pill.pulse::before { animation: none; } }
