/* CallCenter OS v2 — interfeys uslubi */
:root {
  --bg: #F4F6F8; --panel: #FFFFFF; --panel-2: #F8FAFC; --line: #E2E8F0; --line-2: #CBD5E1;
  --ink: #0F172A; --ink-2: #475569; --muted: #64748B;
  --accent: #0F766E; --accent-2: #14B8A6; --accent-soft: #CCFBF1; --accent-ink: #FFFFFF;
  --ok: #16A34A; --ok-soft: #DCFCE7; --warn: #D97706; --warn-soft: #FEF3C7;
  --bad: #DC2626; --bad-soft: #FEE2E2; --info: #2563EB; --info-soft: #DBEAFE;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sb: 232px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1120; --panel: #111827; --panel-2: #0F172A; --line: #1F2937; --line-2: #334155;
    --ink: #E5E7EB; --ink-2: #A7B0C0; --muted: #7C8799;
    --accent: #14B8A6; --accent-2: #2DD4BF; --accent-soft: rgba(20,184,166,.15); --accent-ink: #042F2E;
    --ok-soft: rgba(22,163,74,.18); --warn-soft: rgba(217,119,6,.18); --bad-soft: rgba(220,38,38,.18);
    --info-soft: rgba(37,99,235,.18); --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1120; --panel: #111827; --panel-2: #0F172A; --line: #1F2937; --line-2: #334155;
  --ink: #E5E7EB; --ink-2: #A7B0C0; --muted: #7C8799;
  --accent: #14B8A6; --accent-2: #2DD4BF; --accent-soft: rgba(20,184,166,.15); --accent-ink: #042F2E;
  --ok-soft: rgba(22,163,74,.18); --warn-soft: rgba(217,119,6,.18); --bad-soft: rgba(220,38,38,.18);
  --info-soft: rgba(37,99,235,.18); --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-s { margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- karkas */
.shell { display: grid; grid-template-columns: var(--sb) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--panel) var(--sb), var(--bg) var(--sb)); }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.brand b { display: block; font-size: 14px; }
.brand span { display: block; font-size: 11.5px; color: var(--muted); max-width: 150px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 12px 10px 4px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2);
  font-weight: 500; }
.nav a:hover { background: var(--panel-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px;
  padding: 0 7px; font-weight: 700; }
.nav .dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; margin: 0 4px; }
.sb-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.me { display: flex; align-items: center; gap: 9px; padding: 6px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.me b { display: block; font-size: 13px; }
.me span { font-size: 11.5px; color: var(--muted); }
.status-select { margin: 6px 8px; width: calc(100% - 16px); }

.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 20; }
.btn.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 420px; }
.search input[type=search] { padding-left: 34px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--muted); }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; z-index: 50; max-height: 360px; overflow: auto; }
.search-results a { display: block; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results a:hover { background: var(--panel-2); text-decoration: none; }
.main { padding: 22px 24px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px;
  flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 3px; }

/* ---------- komponentlar */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
.g-work { grid-template-columns: 320px minmax(0, 1fr) 320px; }

.kpi { padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-call { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-call:hover { background: var(--ok); filter: brightness(1.08); }
.btn-danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-lg { padding: 12px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  font-weight: 600; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge .sw { width: 8px; height: 8px; border-radius: 50%; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.b-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.b-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.status-online { color: var(--ok); } .status-break { color: var(--warn); } .status-offline { color: var(--muted); }
.pill-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; background: var(--panel-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--panel-2); }
td.check, th.check { width: 34px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel);
  color: var(--ink); font: inherit; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; border-color: transparent; }
input.color-input { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--panel); }
input.w-num { width: 80px; }
input.w-icon { width: 56px; text-align: center; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 3px; }
.field .err, .errorlist { color: var(--bad); font-size: 12.5px; margin: 3px 0 0; padding: 0; list-style: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checks ul, ul.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label, ul.checks label { font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.checks div { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks div > div { display: inline-flex; }
.checks div label { font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); margin: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 12px 14px; }
.filters > div { min-width: 140px; }
.filters label { font-size: 11.5px; margin-bottom: 2px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg a { padding: 6px 12px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.seg a.active { background: var(--accent); color: var(--accent-ink); }
.seg a:hover { text-decoration: none; }

.messages { margin-bottom: 14px; display: grid; gap: 6px; }
.msg { padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.msg.success { background: var(--ok-soft); color: var(--ok); }
.msg.error { background: var(--bad-soft); color: var(--bad); }
.msg.warning { background: var(--warn-soft); color: var(--warn); }
.msg.info { background: var(--info-soft); color: var(--info); }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 14px; }

/* voronka */
.funnel-row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; padding: 4px 0; }
.funnel-row .name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; min-width: 4px; }
.chart .col .t { background: var(--line-2); border-radius: 3px 3px 0 0; }
.chart .col .a { background: var(--accent); border-radius: 3px 3px 0 0; position: absolute; bottom: 0; left: 0; right: 0; }
.chart-labels { display: flex; gap: 3px; font-size: 10.5px; color: var(--muted); }
.chart-labels span { flex: 1; text-align: center; overflow: hidden; min-width: 4px; }

/* kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.k-col { min-width: 270px; width: 270px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.k-head { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px;
  font-weight: 650; border-top: 3px solid var(--c, var(--line-2)); border-radius: var(--radius) var(--radius) 0 0; }
.k-head .n { margin-left: auto; color: var(--muted); font-weight: 600; }
.k-body { padding: 8px; overflow-y: auto; display: grid; gap: 8px; min-height: 60px; }
.k-body.over { background: var(--accent-soft); }
.k-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; cursor: grab;
  box-shadow: var(--shadow); }
.k-card:active { cursor: grabbing; }
.k-card.dragging { opacity: .5; }
.k-card a.name { color: var(--ink); font-weight: 600; }
.k-card .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; }

/* faoliyat lentasi */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: none; }
.timeline .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px;
  background: var(--panel-2); border: 1px solid var(--line); }
.timeline .txt { white-space: pre-line; }
.timeline .when { font-size: 12px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ish stoli */
.work-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.work-hero .big-phone { font-size: 24px; font-weight: 700; font-family: var(--mono); letter-spacing: .01em; }
.script { white-space: pre-line; line-height: 1.65; font-size: 14.5px; }
.disp-grid { display: grid; gap: 6px; }
.disp { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px;
  cursor: pointer; font-weight: 600; background: var(--panel); }
.disp input { position: absolute; opacity: 0; pointer-events: none; }
.disp:hover { background: var(--panel-2); }
.disp.sel { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: var(--panel-2); }
.disp .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.disp .to { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 500; }

.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.preset { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; cursor: pointer; display: block;
  background: var(--panel); }
.preset input { display: none; }
.preset.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.preset .ic { font-size: 26px; }
.preset b { display: block; margin-top: 6px; color: var(--ink); }
.preset span { font-size: 12.5px; color: var(--muted); font-weight: 400; }

.formset td { vertical-align: top; }
.formset td input[type=text], .formset td select { min-width: 120px; }
.formset tr.new-row td { background: var(--panel-2); }
.code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; overflow-x: auto; white-space: pre; }

/* popup */
.popup { position: fixed; right: 18px; bottom: 18px; width: 340px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--ok); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.2); z-index: 100;
  padding: 14px 16px; animation: slidein .25s ease-out; }
@keyframes slidein { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--panel);
  padding: 10px 16px; border-radius: 8px; z-index: 110; font-weight: 600; max-width: 90vw; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 380px; }

@media (max-width: 1200px) {
  .g-work { grid-template-columns: minmax(0, 1fr) 320px; }
  .g-work > .work-left { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g-side, .g-work { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .btn.menu-btn { display: inline-flex; }
  .shell { background: var(--bg); }
  .main { padding: 16px 16px 60px; }
  .topbar { padding: 10px 16px; }
  .g2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 110px 1fr; }
  .funnel-row { grid-template-columns: 110px 1fr 40px; }
  .popup { left: 16px; right: 16px; width: auto; }
}

/* ---------- Telefon (pastki o'ng burchak) */
.ph { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column;
  align-items: flex-end; gap: 12px; }
.ph-fab { width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer; background: var(--ok);
  color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(22,163,74,.35); position: relative;
  transition: transform .15s; }
.ph-fab:hover { transform: scale(1.06); }
.ph-fab svg { width: 26px; height: 26px; }
.ph-fab.open { background: var(--ink-2); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.ph-fab.ringing { background: var(--ok); animation: ph-ring 1s infinite; }
.ph-fab.ringing svg { animation: ph-shake .5s infinite; }
.ph-fab.incall { background: var(--accent); }
@keyframes ph-ring { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6); } 100% { box-shadow: 0 0 0 22px rgba(22,163,74,0); } }
@keyframes ph-shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.ph-badge { position: absolute; top: -6px; right: -4px; background: var(--ink); color: var(--panel); font: 600 11px var(--mono);
  padding: 2px 6px; border-radius: 999px; }
.ph-panel { width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,.22); overflow: hidden; animation: slidein .18s ease-out; }
.ph-head { display: flex; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.ph-title { font-weight: 700; color: var(--accent); }
.ph-x { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer;
  padding: 4px 8px; border-radius: 6px; }
.ph-x:hover { background: var(--panel-2); color: var(--ink); }
.ph-dial, .ph-live { padding: 12px 14px 14px; }
.ph-display { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 6px;
  text-align: center; }
.ph-number { border: none !important; outline: none !important; background: transparent !important; text-align: center;
  font: 600 24px var(--mono) !important; color: var(--accent) !important; padding: 2px 0 !important; letter-spacing: .03em; }
.ph-hint { font-size: 11.5px; color: var(--muted); min-height: 16px; }
.ph-match { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 12.5px; }
.ph-match b { display: block; color: var(--ink); font-size: 13.5px; }
.ph-match a { font-weight: 600; }
.ph-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.ph-keys button { height: 50px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font: 600 19px var(--font); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.05; }
.ph-keys button small { font-size: 8.5px; color: var(--muted); letter-spacing: .1em; font-weight: 600; }
.ph-keys button:hover { background: var(--panel-2); }
.ph-keys button:active, .ph-keys button.hit { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ph-call { width: 100%; margin-top: 10px; height: 46px; border: none; border-radius: 12px; background: var(--ok);
  color: #fff; font: 700 15px var(--font); cursor: pointer; }
.ph-call:disabled { opacity: .45; cursor: default; }
.ph-recent { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ph-recent button { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); border-radius: 999px;
  font: 500 11.5px var(--mono); padding: 3px 9px; cursor: pointer; }
.ph-state { text-align: center; font-weight: 700; font-size: 13px; padding: 4px 0 10px; }
.ph-state.in { color: var(--ok); } .ph-state.out { color: var(--info); } .ph-state.talk { color: var(--accent); }
.ph-state.end { color: var(--muted); }
.ph-who { text-align: center; }
.ph-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 22px; }
.ph-live.ringing .ph-avatar { animation: ph-ring 1.2s infinite; background: var(--ok-soft); color: var(--ok); }
.ph-name { font-weight: 700; font-size: 17px; }
.ph-phone { font-size: 18px; color: var(--accent); margin-top: 2px; }
.ph-meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.ph-meta span { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.ph-timer { font-size: 22px; font-weight: 600; margin-top: 8px; }
.ph-actions { display: grid; gap: 7px; margin-top: 14px; }
.ph-btn { display: block; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; }
.ph-btn:hover { background: var(--panel-2); text-decoration: none; }
.ph-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ph-primary:hover { background: var(--accent); filter: brightness(1.08); }
.main { padding-bottom: 100px; }
@media (max-width: 760px) {
  .ph { right: 14px; bottom: 14px; }
  .ph-panel { width: calc(100vw - 28px); max-width: 360px; }
}

/* brauzer telefoni holati (CRM paneli) */
.ph-soft { display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin-bottom: 10px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.ph-soft-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.ph-soft.ok .ph-soft-dot { background: var(--ok); } .ph-soft.ok { color: var(--ok); }
.ph-soft.bad .ph-soft-dot { background: var(--bad); } .ph-soft.bad { color: var(--bad); }
.ph-soft-btn { margin-left: auto; border: none; background: var(--accent); color: var(--accent-ink); border-radius: 8px;
  padding: 5px 10px; font: 700 12px var(--font); cursor: pointer; }
.ph-soft.ok .ph-soft-btn { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }
.ph-fab .ph-dot { position: absolute; bottom: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--panel); background: var(--muted); }
.ph-fab .ph-dot.ok { background: #4ADE80; } .ph-fab .ph-dot.bad { background: var(--bad); }
.callbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-top: 12px; }
.cb { height: 50px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  font: 600 12.5px var(--font); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.cb span { font-size: 17px; line-height: 1; }
.cb.green { background: var(--ok); border-color: var(--ok); color: #fff; }
.cb.red { background: var(--bad); border-color: var(--bad); color: #fff; }
.cb.on { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
