/* VEXTELE PBX - VOISO-inspired UI, light + dark themes.
   Brand palette from the VEXTELE logo: navy #182430, steel #93a9bb,
   node blue #8fb3d9. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@400;600;700&display=swap');

:root, [data-theme="light"] {
  --primary: #2e5ce6;
  --primary-dark: #2449b8;
  --link: #2e63d9;
  --logo-text: #182430;
  --bg: #f2f4f9;
  --card: #ffffff;
  --topbar-bg: #ffffff;
  --border: #e4e8f1;
  --row-border: #eef1f7;
  --text: #31395a;
  --muted: #8b93ab;
  --input-bg: #ffffff;
  --hover: #f8faff;
  --menu-hover: #f3f6ff;
  --icon-btn-bg: #eef3ff;
  --green: #2fb344;
  --red: #e03131;
  --gray-dot: #b8bfce;
  --shadow: 0 6px 24px rgba(30, 40, 80, .12);
  --shadow-lg: 0 16px 50px rgba(20, 30, 70, .3);
  --backdrop: rgba(30, 35, 60, .35);
  --badge-green-bg: #e6f6e9; --badge-green-fg: #1e7e34;
  --badge-red-bg: #fdeaea;   --badge-red-fg: #e03131;
  --badge-blue-bg: #e8eeff;  --badge-blue-fg: #2e5ce6;
  --badge-gray-bg: #eef0f5;  --badge-gray-fg: #8b93ab;
  --hint-bg: #f6f8fd;
  --topbar-h: 52px;
  font-size: 14px;
}

[data-theme="dark"] {
  --primary: #5b8ef0;
  --primary-dark: #4370cf;
  --link: #82a9f5;
  --logo-text: #cfdce8;
  --bg: #0f1b26;
  --card: #1a2937;
  --topbar-bg: #14222e;
  --border: #2b3d4e;
  --row-border: #243646;
  --text: #d8e2ec;
  --muted: #8398aa;
  --input-bg: #13222e;
  --hover: #1e3040;
  --menu-hover: #20313f;
  --icon-btn-bg: #22394c;
  --green: #46c265;
  --red: #ef6060;
  --gray-dot: #5a6a7a;
  --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 50px rgba(0, 0, 0, .55);
  --backdrop: rgba(5, 10, 16, .55);
  --badge-green-bg: rgba(70,194,101,.16); --badge-green-fg: #6fd38c;
  --badge-red-bg: rgba(239,96,96,.16);    --badge-red-fg: #ef6060;
  --badge-blue-bg: rgba(91,142,240,.18);  --badge-blue-fg: #8db1f7;
  --badge-gray-bg: rgba(131,152,170,.16); --badge-gray-fg: #8398aa;
  --hint-bg: #16242f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .15s ease, color .15s ease;
}

/* ---------- Top bar ---------- */
#topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 28px;
}
#topbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
#topbar .logo img { width: 30px; height: 30px; border-radius: 4px; display: block; }
#topbar .logo .wordmark {
  font-weight: 300;
  letter-spacing: .34em;
  font-size: 15px;
  color: var(--logo-text);
  transform: translateY(1px);
}
#topbar .mode-badge {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--border);
  align-self: center;
}
#topbar nav { display: flex; gap: 4px; height: 100%; }
#topbar nav .nav-item { position: relative; height: 100%; display: flex; align-items: center; }
#topbar nav .nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
#topbar nav .nav-item.active > .nav-link,
#topbar nav .nav-link:hover { color: var(--primary); }
#topbar nav .nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 0; left: 8px; right: 8px;
  height: 2px;
  background: var(--primary);
}
#topbar nav .dropdown {
  display: none;
  position: absolute;
  top: var(--topbar-h);
  left: 0;
  min-width: 190px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 6px 0;
}
#topbar nav .nav-item:hover .dropdown { display: block; }
#topbar nav .dropdown a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
#topbar nav .dropdown a:hover { background: var(--menu-hover); color: var(--primary); }
#topbar .spacer { flex: 1; }
#topbar .clock { color: var(--muted); font-size: 12px; text-align: right; line-height: 1.3; }
#topbar .icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--icon-btn-bg); color: var(--primary);
  cursor: pointer; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
#topbar .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: none;
}
#topbar .user-menu {
  position: absolute; top: var(--topbar-h); right: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: var(--shadow); min-width: 170px; padding: 6px 0;
  display: none; z-index: 200;
}
#topbar .user-menu.open { display: block; }
#topbar .user-menu .u-name { padding: 8px 16px; font-weight: 600; border-bottom: 1px solid var(--border); }
#topbar .user-menu a { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; font-size: 13px; cursor: pointer; }
#topbar .user-menu a:hover { background: var(--menu-hover); color: var(--primary); }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.page-title { font-size: 22px; font-weight: 500; margin: 0 0 18px; display: flex; align-items: center; gap: 8px; }
.page-title .info { color: var(--muted); font-size: 13px; cursor: help; border: 1px solid var(--border); border-radius: 50%; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border);
  background: var(--card); color: var(--text);
  padding: 7px 14px; border-radius: 4px;
  font-size: 13px; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); background: var(--hover); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { border-color: var(--badge-red-bg); color: var(--red); }
.btn-danger:hover { background: var(--badge-red-bg); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }
.field label { font-size: 12px; color: var(--text); font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=date], input[type=time], select, textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(46,92,230,.15); }
[data-theme="dark"] input::-webkit-calendar-picker-indicator { filter: invert(.7); }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 14px; }
.filters .full { grid-column: 1 / -1; }
.search-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-top: 10px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.table td { padding: 9px 10px; border-bottom: 1px solid var(--row-border); vertical-align: middle; }
table.table tbody tr:hover { background: var(--hover); }
table.table a { color: var(--link); text-decoration: none; }
table.table a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* status dots */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.available { background: var(--green); }
.dot.on_call { background: var(--primary); }
.dot.unavailable { background: var(--red); }
.dot.logged_off { background: var(--gray-dot); }
.dot.registered { background: var(--green); }
.dot.offline { background: var(--gray-dot); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.badge.red { background: var(--badge-red-bg); color: var(--badge-red-fg); }
.badge.blue { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.badge.gray { background: var(--badge-gray-bg); color: var(--badge-gray-fg); }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; gap: 14px; margin: 12px 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 2px; align-items: center; }
.pager .pages a {
  min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--text); text-decoration: none; cursor: pointer; padding: 0 4px;
}
.pager .pages a.cur { background: var(--primary); color: #fff; }
.pager .pages a:not(.cur):hover { background: var(--menu-hover); }
.pager select { padding: 4px 6px; font-size: 12px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; top: 64px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--green);
  border-radius: 4px; padding: 10px 34px 10px 14px; min-width: 240px; max-width: 360px;
  box-shadow: var(--shadow); font-size: 13px; position: relative;
  animation: slidein .2s ease;
}
.toast.err { border-left-color: var(--red); }
.toast .x { position: absolute; right: 8px; top: 8px; cursor: pointer; color: var(--muted); border: none; background: none; font-size: 14px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--backdrop); z-index: 500;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 90px;
}
.modal {
  background: var(--card); border-radius: 6px; width: 460px; max-width: 94vw;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); padding: 20px 22px;
  max-height: 80vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 16px; font-size: 16px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal .field { margin-bottom: 12px; }

/* ---------- Dashboard widgets ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; }
.stat .num { font-size: 24px; font-weight: 600; }
.stat .lbl { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Detail key-value ---------- */
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; font-size: 13px; }
.kv .k { color: var(--muted); font-size: 11px; margin-bottom: 2px; }

/* ---------- Login ---------- */
/* ---- login: Voicetelo split-screen (dark aside + light form card) ---- */
.login-page {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  z-index: 200;
  font-family: 'Inter', system-ui, sans-serif;
}
.lg-shell { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); width: 100%; min-height: 100%; }
.lg-aside {
  position: relative; overflow: hidden;
  color: #e2e8f0; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  background: radial-gradient(900px 520px at 100% -10%, rgba(139,92,246,0.38), transparent 60%),
              radial-gradient(700px 480px at -10% 110%, rgba(34,211,238,0.22), transparent 60%),
              linear-gradient(160deg, #0b1220 0%, #111c38 100%);
}
.lg-aside::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse at 30% 40%, #000 15%, transparent 70%);
}
.lg-aside > * { position: relative; }
.lg-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.lg-brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.lg-word { font-family: 'Sora', system-ui, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.lg-word span { background: linear-gradient(90deg, #818cf8, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-hero h1 {
  margin: 0 0 14px; font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08;
  letter-spacing: -0.025em; color: #fff; font-weight: 600;
}
.lg-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #a5b4fc, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg-hero p, .lg-lede { margin: 0; max-width: 46ch; font-size: 16.5px; line-height: 1.65; color: rgba(226,232,240,0.82); }
.lg-points { display: grid; gap: 14px; }
.lg-point {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
}
.lg-ico {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: #e0e7ff;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(34,211,238,0.25));
}
.lg-point strong { display: block; color: #fff; font-size: 14.5px; margin-bottom: 2px; }
.lg-point span { font-size: 13.5px; color: rgba(226,232,240,0.75); line-height: 1.5; }
.lg-foot { font-size: 12.5px; color: rgba(226,232,240,0.55); margin: 0; }

.lg-form-col {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: #f1f5f9;
}
.lg-mobile-brand { display: none; margin-bottom: 24px; }
.lg-mobile-brand .lg-word { color: #0b1220; }
.lg-card {
  width: 100%; max-width: 420px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 36px 34px 30px;
  box-shadow: 0 24px 60px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
}
.lg-card h2 { margin: 0 0 6px; font-family: 'Sora', system-ui, sans-serif; font-size: 26px; letter-spacing: -0.02em; color: #0f172a; font-weight: 600; }
.lg-sub { margin: 0 0 26px; font-size: 14.5px; color: #64748b; }
.lg-field { margin-bottom: 16px; }
.lg-field label { display: block; font-size: 13.5px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.lg-input-wrap { position: relative; }
.lg-input-wrap .input {
  width: 100%; min-height: 46px; padding: 0 44px 0 42px;
  border: 1px solid #cbd5e1; border-radius: 12px;
  background: #f8fafc; font-size: 15px; color: #0f172a;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-input-wrap .input:focus, .lg-input-wrap .input:focus-visible {
  background: #fff; border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.14); outline: none;
}
.lg-input-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.lg-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: #64748b; cursor: pointer;
  display: grid; place-items: center;
}
.lg-eye:hover { background: #eef2ff; color: #4f46e5; }
.lg-submit {
  width: 100%; min-height: 48px; font-size: 15.5px; font-weight: 600;
  font-family: 'Sora', system-ui, sans-serif;
  border: 0; border-radius: 12px; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 60%, #4338ca 100%);
  box-shadow: 0 10px 24px rgba(79,70,229,0.30);
  transition: transform .15s, box-shadow .15s;
}
.lg-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(79,70,229,0.38); }
.lg-submit:disabled { opacity: .6; transform: none; cursor: not-allowed; }
.lg-flash { margin: 16px 0 0; border-radius: 12px; }
.vt-flash {
  padding: 12px 16px; font-size: 13.5px;
  border: 1px solid #e2e8f0;
}
.vt-flash-error { color: #8a2f2f; border-color: #8a2f2f; background: rgba(138,47,47,0.06); }
.lg-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; font-size: 12.5px; color: #64748b; }
.lg-note { margin: 18px 0 0; text-align: center; font-size: 13px; color: #64748b; }
.lg-note a { color: #4f46e5; font-weight: 600; text-decoration: none; }
.lg-hint { margin: 10px 0 0; font-size: 11.5px; color: #94a3b8; text-align: center; }
@media (max-width: 959px) {
  .lg-shell { grid-template-columns: 1fr; }
  .lg-aside { display: none; }
  .lg-mobile-brand { display: inline-flex; }
}
@media (max-width: 480px) {
  .lg-card { padding: 28px 22px 24px; border-radius: 16px; }
}

/* misc */
.flex { display: flex; align-items: center; gap: 10px; }
.right { margin-left: auto; }
.empty { color: var(--muted); text-align: center; padding: 34px 0; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.section-sub { color: var(--muted); font-size: 12px; margin: -6px 0 14px; }
.flag { margin-right: 5px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; max-height: 200px; overflow-y: auto; padding: 6px 0; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.check-row input { width: auto; margin: 0; accent-color: var(--accent); }

/* Language picker */
.lang-picker { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.lang-flag { width: 24px; height: 17px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 300;
  min-width: 155px; padding: 5px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.lang-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text); font-size: 12px; cursor: pointer; border-radius: 7px; text-align: left; }
.lang-item:hover { background: var(--hover); }
.lang-item.sel { color: var(--accent); }
.lg-lang { position: absolute; top: 22px; right: 26px; z-index: 5; }
.lg-lang .lang-flag { width: 34px; height: 24px; border-radius: 4px; }
.lg-lang .lang-btn { padding: 9px 11px; color: #64748b; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.lg-lang .lang-btn:hover { color: #4f46e5; border-color: #c7d2fe; }
.lg-lang .lang-menu { min-width: 170px; }
.lg-lang .lang-item .lang-flag { width: 24px; height: 17px; }
.lg-form-col { position: relative; }
.lang-compact .lang-btn { padding: 4px; }
.lang-compact .lang-btn { font-size: 0; }
.lang-compact .lang-menu { right: auto; left: 0; }

/* ---------- Softphone (VOISO Agent Workspace style) ---------- */
.dialer-page { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.dialer-side { flex: 1; min-width: 280px; }

.softphone {
  width: 300px;
  background: #1c2f45;
  border: 1px solid #2c4a6b;
  border-radius: 10px;
  color: #e8edf4;
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
  overflow: hidden;
  font-family: "Barlow", system-ui, sans-serif;
  position: relative;
}
.sp-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: #16273a;
  border-bottom: 1px solid #28405c;
}
.sp-grip { color: #5f7ea0; letter-spacing: -2px; font-size: 11px; }
.sp-bars { color: #7fa7d6; font-size: 11px; }
.sp-wordmark { font-weight: 600; letter-spacing: .18em; font-size: 13px; margin: 0 auto; }
.sp-close { background: none; border: 0; color: #8fa6c4; font-size: 18px; cursor: pointer; }
.sp-close:hover { color: #fff; }
.sp-input-row { padding: 10px 12px 4px; }
.sp-input {
  width: 100%; box-sizing: border-box;
  background: #152639; border: 0; border-radius: 6px;
  color: #fff; font-size: 15px; padding: 9px 12px; outline: none;
}
.sp-input::placeholder { color: #66809e; }
.sp-grid { display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 10px; }
.sp-key {
  background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  padding: 9px 0 6px; border-radius: 6px;
}
.sp-key:hover { background: #26405c; }
.sp-key-num { color: #f2f6fb; font-size: 21px; font-weight: 500; line-height: 1; }
.sp-key-sub { color: #7d9bc0; font-size: 9px; letter-spacing: .14em; margin-top: 3px; min-height: 11px; }
.sp-call-row { display: flex; justify-content: center; padding: 4px 0 12px; }
.sp-call {
  width: 118px; height: 38px; border: 0; border-radius: 19px;
  background: #2ea06a; color: #fff; font-size: 17px; cursor: pointer;
}
.sp-call:hover { background: #33b877; }
.sp-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: #16273a; border-top: 1px solid #28405c;
}
.sp-gear, .sp-cid-btn { background: none; border: 0; color: #8fa6c4; font-size: 13px; cursor: pointer; }
.sp-gear:hover, .sp-cid-btn:hover { color: #fff; }
.sp-cid-btn span { font-size: 11px; }
.sp-cid-pop {
  position: absolute; left: 8px; right: 8px; bottom: 46px; z-index: 20;
  background: #122034; border: 1px solid #2c4a6b; border-radius: 8px;
  max-height: 190px; overflow-y: auto;
}
.sp-cid-opt {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: #cfe0f2; padding: 9px 12px;
  font-size: 13px; cursor: pointer;
}
.sp-cid-opt:hover { background: #1e3450; }
.sp-cid-opt.sel { color: #4fc98a; }
.sp-status { margin-top: 14px; font-size: 13px; color: var(--muted); }
.sp-recent {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--border);
  color: var(--fg); text-align: left; padding: 9px 2px; cursor: pointer;
  font-size: 13px;
}
.sp-recent:hover { background: var(--hover); }

/* Recording Details modal (CDR) */
.rec-modal { width: 840px; max-width: 94vw; }
.rec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rec-x {
  background: none; border: 0; color: var(--muted); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 4px;
}
.rec-x:hover { color: var(--text); }
.rec-wave {
  display: flex; align-items: center; gap: 3px; height: 84px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.rec-wave-load { width: 100%; text-align: center; font-size: 13px; }
.rec-bar { flex: 1; background: #2aa8bd; border-radius: 2px; cursor: pointer; min-height: 8%; }
.rec-bar:hover { opacity: .8; }
.rec-seek { width: 100%; accent-color: var(--primary); margin-bottom: 6px; }
.rec-time { text-align: center; font-size: 13px; margin-bottom: 12px; }
.rec-controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.rec-btn {
  background: none; border: 0; color: var(--text); font-size: 15px;
  cursor: pointer; padding: 6px 4px; min-width: 28px;
}
.rec-btn:hover { color: var(--primary); }
.rec-lbl { font-size: 11px; letter-spacing: .05em; margin-left: 8px; }
.rec-speed {
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px;
}
.rec-vol { width: 110px; accent-color: var(--primary); }
.rec-controls .btn { margin-left: auto; }
.rec-details { padding: 0; overflow: hidden; }
.rec-row {
  display: flex; justify-content: space-between; padding: 11px 16px;
  border-bottom: 1px solid var(--row-border); font-size: 13px;
}
.rec-row:last-child { border-bottom: 0; }
