/* =================== v2: menus, agent stats, wallboard, dialer =================== */
.sidebar { overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; }
.nav-toggle { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #33415c; font-weight: 500; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.nav-toggle:hover { background: #f2f5fa; }
.nav-toggle svg { width: 19px; height: 19px; flex: none; }
.nav-toggle svg:last-child { margin-left: auto; width: 15px; height: 15px; transition: transform .2s; color: #94a3b8; }
.nav-group.open .nav-toggle svg:last-child { transform: rotate(180deg); }
.nav-group.has-active > .nav-toggle { color: var(--primary); }
.nav-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-group.open .nav-sub { display: flex; }
.nav a.sub { padding: 8px 10px; font-size: 13.5px; }
.sub-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; flex: none; }
.nav a.sub.active .sub-dot { background: var(--primary); }
.sidebar-backdrop { display: none; }
.row-between { display: flex; justify-content: space-between; }
.plan-link { display: block; margin-top: 10px; font-weight: 600; font-size: 12.5px; }
.scope { display: flex; align-items: center; gap: 8px; }
.scope[hidden] { display: none; }
.scope select { padding: 7px 10px; font-weight: 600; background: var(--primary-50); border-color: #c9d8fb; color: var(--primary); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.min0 { min-width: 0; }
.nowrap { white-space: nowrap; }
.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-row td { opacity: .55; }
.notice { border-color: #fcd34d; background: #fffbeb; }
.head-date { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; }
.head-date svg { width: 20px; color: var(--muted); }
.link-more { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 13px; }
.bg-gray { background: #94a3b8; }
.dot.break { background: var(--amber); }
.dot.away { background: var(--purple); }

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: #475569; white-space: nowrap; }
.status-chip.available { background: var(--green-50); color: #15803d; }
.status-chip.on-call { background: var(--red-50); color: #b91c1c; }
.status-chip.break { background: var(--amber-50); color: #b45309; }
.status-chip.away { background: var(--purple-50); color: #6d28d9; }

.mini-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mini-stat { display: flex; gap: 12px; align-items: center; padding: 6px 4px; }
.mini-stat .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.mini-stat .ic svg { width: 18px; }
.mini-stat .val { font-size: 22px; font-weight: 700; line-height: 1; }
.mini-stat .label { font-size: 12px; color: var(--muted); margin-top: 3px; }
.card.mini { display: flex; flex-direction: column; gap: 2px; }
.card.mini b { font-size: 24px; }
.card.mini span { color: var(--muted); font-size: 12.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips span { display: inline-flex; align-items: center; gap: 6px; background: #f6f8fc; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: #475569; }
.chips svg { width: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; }
.donut-list.small { font-size: 12px; }

.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); }
.qa-btn:hover { border-color: #c9d8fb; background: #f8faff; }
.qa-btn .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.qa-btn .ic svg { width: 16px; }

.my-card { background: linear-gradient(160deg, #fff, #f4f8ff); }
.my-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.my-grid div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.my-grid b { font-size: 20px; }
.my-grid span { color: var(--muted); font-size: 12px; }

.range { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.range button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.range button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.range input { padding: 6px 10px; font-size: 13px; }

.status-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.status-tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: #475569; cursor: pointer; }
.status-tabs button span { background: #eef2f7; border-radius: 10px; padding: 1px 8px; font-size: 11.5px; margin-left: 4px; }
.status-tabs button.on { background: var(--primary-50); color: var(--primary); }
.status-tabs button.on span { background: var(--primary); color: #fff; }
.bulk { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--primary-50); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.bulk select { padding: 6px 10px; }
select.lstatus, select.lassign, select.nclient { padding: 5px 8px; font-size: 13px; }
select.lstatus { font-weight: 600; border-radius: 20px; }
.st-New { background: var(--green-50); color: #15803d; }
.st-Contacted { background: var(--amber-50); color: #b45309; }
.st-Interested, .st-Converted { background: #dcfce7; color: #166534; }
.st-Qualified { background: var(--primary-50); color: var(--primary); }
.st-Callback { background: var(--purple-50); color: #6d28d9; }
.st-Not-Interested, .st-DNC { background: var(--red-50); color: #b91c1c; }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-state svg { width: 42px; height: 42px; color: #94a3b8; }
.empty-state h3 { margin: 10px 0 6px; }
.empty-state .btn { margin-top: 12px; }

/* wallboard */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.wall-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); border-top: 4px solid #cbd5e1; display: flex; flex-direction: column; gap: 12px; }
.wall-card.available { border-top-color: var(--green); }
.wall-card.on-call { border-top-color: var(--red); }
.wall-card.break { border-top-color: var(--amber); }
.wall-card.away { border-top-color: var(--purple); }
.wall-status { display: flex; justify-content: space-between; align-items: center; }
.wall-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; }
.wall-call { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.wall-call svg { width: 16px; color: var(--primary); }
.wall-call.muted { color: #cbd5e1; }
.wall-stats, .client-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.client-stats { grid-template-columns: repeat(4, 1fr); border: 0; padding: 4px 0 10px; }
.wall-stats div, .client-stats div { display: flex; flex-direction: column; }
.wall-stats b, .client-stats b { font-size: 17px; }
.wall-stats span, .client-stats span { font-size: 11.5px; color: var(--muted); }
.client-card.disabled { opacity: .6; }
.client-card h3 { font-size: 16px; }

/* dialer */
.dialer-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.lead-card h2 { font-size: 22px; }
.lead-phone { font-size: 17px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.lead-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.lead-meta div { background: #f8fafd; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lead-meta span { font-size: 11.5px; color: var(--muted); }
.lead-notes { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.5; margin-bottom: 18px; max-height: 180px; overflow: auto; }
.dial-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 11px; }
.chips-select { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-check { flex-direction: row; align-items: center; gap: 5px; background: #f6f8fc; border-radius: 20px; padding: 5px 10px; font-weight: 500; cursor: pointer; }
.chip-check input { margin: 0; }
.queue { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow: auto; }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; width: 100%; }
.queue-item:hover { background: #f6f8fc; }
.queue-item.on { border-color: #c9d8fb; background: var(--primary-50); }
.qi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qi-main small { color: var(--muted); }

/* numbers / users forms */
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.num-pick { border: 1px solid var(--border); border-radius: 10px; padding: 10px; align-items: flex-start; }
.num-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.num-pick span { display: flex; flex-direction: column; gap: 2px; }
.num-pick small { color: var(--muted); font-weight: 400; }
.row-input { display: flex; gap: 8px; }
.row-input select { flex: 1; }

.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.flow-step { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.flow-step .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; margin-bottom: 6px; }
.flow-step .ic svg { width: 18px; }
.flow-step small { color: var(--muted); }
.flow-step:not(:last-child)::after { content: "\2192"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-weight: 700; }
.setup-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.setup-steps div { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 30px; padding: 6px 14px 6px 6px; font-weight: 600; font-size: 13px; }
.setup-steps b { width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; display: grid; place-items: center; font-size: 12px; }
.setup-steps .done b { background: var(--green); color: #fff; }
.tips { padding-left: 18px; line-height: 1.8; margin: 0; }

@media (max-width: 1100px) {
  .mini-stats { grid-template-columns: repeat(3, 1fr); }
  .dialer-grid { grid-template-columns: 1fr; }
  .lead-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15, 27, 45, .35); z-index: 70; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .flow-step::after { display: none; }
  .scope .hint { display: none; }
  .scope select { max-width: 140px; }
  .qa { grid-template-columns: 1fr; }
}

/* billing */
.banner-red { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.banner-red.small { padding: 8px 10px; border-radius: 8px; font-size: 12.5px; margin-top: 8px; border: 1px solid #fca5a5; }
.pill.overdue, .pill.blocked { background: var(--red-50); color: #b91c1c; }
.pill.paid, .pill.topup, .pill.sent { background: var(--green-50); color: #15803d; }
.pill.unpaid { background: var(--amber-50); color: #b45309; }
.pill.call, .pill.transfer, .pill.invoice { background: #eef2f7; color: #475569; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; font-size: 13.5px; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }
.err-detail { font-size: 11.5px; color: #b91c1c; background: #fef2f2; border-radius: 6px; padding: 3px 6px; margin-top: 4px; max-width: 280px; white-space: normal; word-break: break-word; }
.evt { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.evt td { padding: 6px 8px; }
.inv-line { display: grid; grid-template-columns: 1fr 80px 110px auto; gap: 8px; margin-bottom: 8px; }

/* parking & presets */
.parked-box { background: #f0f7ff; border: 1px solid #c9d8fb; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.parked-box .party { background: #fff; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.chip-btn { border: 1px solid #c9d8fb; background: var(--primary-50); color: var(--primary); border-radius: 20px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { background: var(--primary); color: #fff; }
.ctrls { grid-template-columns: repeat(4, 1fr); }
.footer a { color: var(--primary); font-weight: 600; }
.login-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted); }
.login-foot a { color: var(--primary); font-weight: 600; }
.party-btns { display: flex; gap: 6px; }

/* wrap-up & monitoring */
.dot.wrapup { background: #06b6d4; }
.status-chip.wrapup { background: #ecfeff; color: #0e7490; }
.wall-card.wrapup { border-top-color: #06b6d4; }
.wrap-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #ecfeff; color: #0e7490; }
.wrap-box .btn { margin-left: auto; }
.info-i { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #fff; color: var(--primary); border: 1px solid #c9d8fb; font-size: 11px; font-weight: 700; cursor: help; vertical-align: 1px; margin-left: 3px; }
.owner-ip { font-size: 11.5px; color: #92400e; opacity: .85; margin-top: 3px; font-family: ui-monospace, Consolas, monospace; }

/* agent monitor detail */
.bg-cyan { background: #06b6d4; }
.mini-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.wall { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.wall-callbox { background: #f8fafd; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.wall-callbox b { display: inline-flex; align-items: center; gap: 6px; }
.wall-callbox b svg { width: 15px; color: var(--primary); }
.wall-card.on-call .wall-callbox { background: #fff5f5; border-color: #fecaca; }
.wall-callbox.idle { color: var(--muted); justify-content: center; font-size: 13px; }
.mon-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.wall-stats-6 { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
.wall-stats small { font-size: 11px; color: var(--muted); font-weight: 600; }
.wall-meta { font-size: 12px; color: #475569; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 1100px) { .mini-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .mini-stats { grid-template-columns: repeat(2, 1fr); } }

/* sales & transfer stats */
.sales-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sale-box { background: #f8fafd; border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.sale-box b { font-size: 22px; }
.sale-box span { font-size: 12px; color: var(--muted); }
.sale-box.yes { background: var(--green-50); border-color: #bbf7d0; } .sale-box.yes b { color: #15803d; }
.sale-box.no { background: var(--red-50); border-color: #fecaca; } .sale-box.no b { color: #b91c1c; }
.pill.Sale, .st-Sale { background: #dcfce7; color: #166534; }
.pill.No-Sale, .st-No-Sale { background: var(--red-50); color: #b91c1c; }
@media (max-width: 860px) { .sales-row { grid-template-columns: 1fr 1fr; } }

/* sale approvals */
.pill.pending-review, .pill.Pending-Review, .st-Pending-Review { background: #fff7e6; color: #b45309; }
.sales-row-5 { grid-template-columns: repeat(5, 1fr); }
.sale-box.pend { background: #fff7e6; border-color: #fde68a; text-decoration: none; color: inherit; } .sale-box.pend b { color: #b45309; }
@media (max-width: 1100px) { .sales-row-5 { grid-template-columns: repeat(3, 1fr); } }

/* webphone details popup */
button.info-i { padding: 0; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; font-size: 11px; line-height: 1; cursor: pointer; transition: all .15s; }
button.info-i:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.wp-pop { position: absolute; z-index: 300; width: 320px; max-width: calc(100vw - 20px); background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 48px rgba(15, 27, 45, .18), 0 2px 6px rgba(15, 27, 45, .06); padding: 14px 16px 12px; animation: wpIn .14s ease-out; }
@keyframes wpIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.wp-pop.above { animation-name: wpInUp; }
@keyframes wpInUp { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.wp-arrow { position: absolute; top: -7px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: translateX(-50%) rotate(45deg); }
.wp-pop.above .wp-arrow { top: auto; bottom: -7px; transform: translateX(-50%) rotate(225deg); }
.wp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.wp-who { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.wp-who b { font-size: 14.5px; }
.wp-head .x { font-size: 20px; align-self: flex-start; }
.wp-title { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--primary); margin: 10px 0 6px; }
.wp-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.wp-row + .wp-row { border-top: 1px dashed #eef2f7; }
.wp-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex: none; font-size: 14px; }
.wp-ic svg { width: 16px; height: 16px; }
.wp-l { font-size: 11.5px; color: var(--muted); }
.wp-v { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wp-sub { font-weight: 500; color: var(--muted); font-size: 12px; }
.wp-copy { padding: 2px 8px; font-size: 11px; }
.wp-foot { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* customer location / local time */
.loc-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 20px; padding: 1px 8px; white-space: nowrap; }
.loc-badge.late { color: #b45309; background: #fff7e6; border-color: #fde68a; }
.incall .loc-badge, .dial-loc .loc-badge { font-size: 12.5px; padding: 3px 10px; }
.dial-loc { min-height: 24px; text-align: center; margin-top: 6px; }
.local-banner { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #f0fdfa; border: 1px solid #ccfbf1; color: #0f766e; font-size: 13.5px; }
.local-banner.late { background: #fff7e6; border-color: #fde68a; color: #92400e; }
.wp-credit { margin-top: 6px; font-size: 10.5px; opacity: .8; }
.wp-credit a { color: inherit; text-decoration: underline; }

/* recording player */
.rec-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fafbfd; }
.rec-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.rec-item audio { width: 100%; }
.rec-actions { margin-top: 8px; display: flex; gap: 6px; }
.rec-btn { color: var(--primary); font-weight: 700; }

/* recording cost popup */
.rec-price { display: flex; align-items: baseline; gap: 8px; background: var(--primary-50); border: 1px solid #c9d8fb; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.rec-price b { font-size: 26px; color: var(--primary); }
.rec-price span { color: #475569; font-weight: 600; }
.rec-examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.rec-examples div { background: #f8fafd; border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.rec-examples b { font-size: 16px; }
.rec-examples span { font-size: 11.5px; color: var(--muted); }

/* blue / green sales, bulk assign */
.pill.Blue-Sale, .st-Blue-Sale { background: #dbeafe; color: #1d4ed8; }
.pill.Green-Sale, .st-Green-Sale { background: #dcfce7; color: #15803d; }
.bulk-assign { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }

/* meta lead ads */
.meta-logo { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #1877f2, #0a5bd3); color: #fff; font: 800 26px/46px Georgia, serif; text-align: center; flex: none; }
.meta-logo.big { width: 64px; height: 64px; font-size: 36px; line-height: 64px; margin: 0 auto 10px; border-radius: 18px; }
.meta-status { display: flex; gap: 14px; align-items: flex-start; }
.meta-connect-cta { text-align: center; padding: 34px 20px; }
.meta-connect-cta p { max-width: 460px; margin: 6px auto 14px; }
.meta-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.meta-kpi { background: #f8fafd; border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meta-kpi span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.meta-kpi b { font-size: 21px; }
.meta-kpi small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-kpi.glee { background: #f0fdfa; border-color: #ccfbf1; }
.meta-kpi.sale { background: var(--green-50); border-color: #bbf7d0; } .meta-kpi.sale b { color: #15803d; }
.meta-steps { background: #f8fafd; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.meta-steps ol { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
@media (max-width: 1100px) { .meta-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .meta-kpis { grid-template-columns: repeat(2, 1fr); } }

/* rate plan */
.deck-active { background: var(--green-50); border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.upload-row input[type=file] { flex: 1; min-width: 200px; }
.quote { background: #f8fafd; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.quote-grid div { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.quote-grid span { font-size: 11.5px; color: var(--muted); }
.quote-grid b { font-size: 19px; }
.quote-grid small { font-size: 11px; color: var(--muted); }
.quote-grid .sell { background: var(--primary-50); border-color: #c9d8fb; } .quote-grid .sell b { color: var(--primary); }

/* ---- voicemail */
.vm-list { display: flex; flex-direction: column; gap: 12px; }
.vm-item { display: flex; flex-direction: column; gap: 10px; }
.vm-item.vm-new { border-left: 4px solid var(--primary); }
.vm-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vm-meta { text-align: right; }
.vm-item audio { width: 100%; height: 38px; }
.vm-text { font-style: italic; color: #475569; }
@media (max-width: 700px) { .vm-meta { text-align: left; } }

/* ---- call scripts */
.script-card.muted { opacity: .6; }
.script-body { font-size: 14px; line-height: 1.55; color: #1e293b; }
.script-body p { margin: 0 0 10px; }
.script-body ul { margin: 0 0 10px; padding-left: 20px; }
.script-body .ph { background: #eef2ff; color: #4338ca; border-radius: 4px; padding: 0 3px; font-size: 12.5px; }
.script-body mark { background: #fef3c7; border-radius: 4px; padding: 0 2px; }
code { background: #f1f5f9; border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* ---- SMS */
.sms-wrap { display: grid; grid-template-columns: 320px 1fr; padding: 0; min-height: 560px; overflow: hidden; }
.sms-convs { border-right: 1px solid var(--border); overflow-y: auto; max-height: 70vh; }
.sms-conv { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: none; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.sms-conv:hover { background: #f8fafd; } .sms-conv.on { background: var(--primary-50); }
.sms-conv > div { flex: 1; min-width: 0; } .sms-conv small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sms-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sms-side .badge { position: static; }
.sms-thread { display: flex; flex-direction: column; min-width: 0; }
.sms-thead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sms-msgs { flex: 1; overflow-y: auto; max-height: 56vh; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f8fafd; }
.sms-msg { max-width: 75%; display: flex; flex-direction: column; gap: 3px; }
.sms-msg .bubble { padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid var(--border); }
.sms-msg.out { align-self: flex-end; align-items: flex-end; } .sms-msg.out .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.sms-msg small { font-size: 11px; color: var(--muted); }
.sms-reply { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.sms-reply textarea { flex: 1; resize: none; }
@media (max-width: 900px) { .sms-wrap { grid-template-columns: 1fr; } .sms-convs { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--border); } }

/* ---- profit */
.margin-bar { position: relative; background: #f1f5f9; border-radius: 6px; height: 20px; min-width: 90px; overflow: hidden; }
.margin-bar i { position: absolute; inset: 0 auto 0 0; background: #bbf7d0; } .margin-bar i.neg { background: #fecaca; }
.margin-bar span { position: relative; font-size: 12px; font-weight: 600; padding-left: 6px; line-height: 20px; }

/* ---- system status */
.sys-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sys-banner.ok { background: var(--green-50); border-color: #86efac; } .sys-banner.bad { background: var(--red-50); border-color: #fca5a5; }
.sys-check { display: flex; gap: 12px; align-items: flex-start; }
.sys-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--green); box-shadow: 0 0 0 4px var(--green-50); }
.sys-check.bad .sys-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-50); }

/* ---- business hours */
.bh-days { display: flex; flex-direction: column; gap: 6px; }
.bh-day { display: grid; grid-template-columns: 90px 1fr auto 1fr; gap: 8px; align-items: center; }
.bh-day input[type=time] { padding: 6px 8px; }
.rate-note { background: var(--primary-50); border: 1px solid #c9d8fb; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* ---- rate browser */
.rc-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.rc-list input { width: 100%; margin-bottom: 8px; }
.rc-countries { max-height: 520px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.rc-c { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: none; padding: 8px 10px; cursor: pointer; font: inherit; font-size: 13px; color: inherit; }
.rc-c span:first-child { flex: 1; } .rc-c small { color: var(--muted); }
.rc-c:hover { background: #f8fafd; } .rc-c.on { background: var(--primary-50); }
.rc-view { min-width: 0; }
@media (max-width: 900px) { .rc-wrap { grid-template-columns: 1fr; } .rc-countries { max-height: 220px; } }

/* ---- Facebook button */
.btn-fb { background: #1877f2; border-color: #1877f2; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.btn-fb:hover { background: #166fe5; border-color: #166fe5; color: #fff; }
.btn-lg { padding: 12px 22px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12.5px; }

/* ---- Meta Ads workspace */
.mk-head h1 { margin-bottom: 4px; }
.mk-health { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.mk-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.mk-dot.bad { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.mk-acc { min-width: 170px; }
.mk-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 16px; overflow-x: auto; }
.mk-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 16px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mk-tabs button:hover { color: inherit; }
.mk-tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.mk-section { margin-bottom: 16px; }
.mk-section h3 { font-size: 14px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.mk-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mk-kpis.mb { margin-bottom: 16px; }
.mk-kpi { background: var(--card, #fff); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.mk-kpis.glee .mk-kpi { border-top: 3px solid #14b8a6; }
.mk-kpis:not(.glee) .mk-kpi { border-top: 3px solid #1877f2; }
.mk-kpi span { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.mk-kpi b { font-size: 22px; line-height: 1.2; }
.mk-kpi small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-delta { font-weight: 700; margin-right: 6px; font-size: 11px; }
.mk-delta.good { color: #15803d; } .mk-delta.bad { color: #dc2626; } .mk-delta.flat { color: var(--muted); }
.mk-alert { display: flex; gap: 10px; align-items: center; border-left: 4px solid #f59e0b; }
.notice.warn { border-left: 4px solid #dc2626; }
.mk-funnel { display: flex; flex-direction: column; gap: 9px; }
.mk-frow { display: grid; grid-template-columns: 130px 1fr 60px 48px; gap: 8px; align-items: center; font-size: 12.5px; }
.mk-frow small { color: var(--muted); text-align: right; }
.mk-frow b { text-align: right; }
.mk-fbar { background: #eef2f7; border-radius: 6px; height: 10px; overflow: hidden; }
.mk-fbar i { display: block; height: 100%; background: linear-gradient(90deg, #1877f2, #14b8a6); border-radius: 6px; }
.mk-pipe-mini { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.mk-pipe-mini > div { display: contents; }
.mk-pipe-mini small { color: var(--muted); text-align: right; }
.mk-stage { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.mk-stage-sel { border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); font-weight: 700; border-radius: 8px; padding: 4px 6px; font-size: 12.5px; }
.mk-money { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; width: 110px; }
.mk-money span { padding: 0 7px; color: var(--muted); font-size: 12px; background: #f8fafd; align-self: stretch; display: flex; align-items: center; }
.mk-money input { border: 0; width: 100%; padding: 5px 6px; font: inherit; font-size: 13px; background: transparent; min-width: 0; }
.mk-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.mk-col { position: relative; overflow: hidden; text-align: left; background: var(--card, #fff); border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 10px; padding: 10px 12px 14px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.mk-col span { font-size: 11.5px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .03em; }
.mk-col b { font-size: 20px; }
.mk-col small { color: var(--muted); font-size: 12px; }
.mk-col i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); opacity: .45; }
.mk-col.on { box-shadow: 0 0 0 2px var(--c); }
.mk-pipe-note { margin: 0 0 12px; font-size: 12.5px; }
.mk-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; }
.mk-filter .lb-search { flex: 1 1 220px; }
.mk-filter select { max-width: 220px; }
.mk-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.mk-table th[data-sort]:hover { color: var(--primary); }
.mk-table th.sorted { color: var(--primary); }
.mk-table th.sorted::after { content: " \2195"; font-size: 10px; }
.mk-click { cursor: pointer; }
.mk-click:hover td { background: #f8fafd; }
.mk-sub { margin-top: 3px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.mk-src { max-width: 260px; }
.mk-kind { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: #eef2f7; color: #334155; white-space: nowrap; }
.mk-kind.mk-call { background: #f3e8ff; color: #7e22ce; } .mk-kind.mk-form { background: #e0f2fe; color: #0369a1; } .mk-kind.mk-offer { background: #fef3c7; color: #b45309; } .mk-kind.mk-message { background: #dcfce7; color: #15803d; }
.mk-status { font-size: 12px; font-weight: 700; white-space: nowrap; text-transform: capitalize; }
.mk-status.on { color: #16a34a; } .mk-status.off { color: #94a3b8; } .mk-status.warn { color: #d97706; }
.na { display: inline-block; font-size: 11px; color: #94a3b8; border: 1px dashed #cbd5e1; border-radius: 5px; padding: 0 5px; cursor: help; }
.mk-mini { width: 100%; font-size: 13px; }
.mk-mini td, .mk-mini th { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.mk-mini th { font-size: 11.5px; color: var(--muted); }
.mk-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mk-stat-line { margin: 8px 0; font-size: 13px; }
.mk-hero { display: flex; gap: 22px; align-items: flex-start; padding: 28px; }
.mk-hero h2 { margin: 0 0 10px; }
.mk-bullets { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: 14px; }
.mk-dhead { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.mk-dinfo { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 10px 12px; background: #f8fafd; border-radius: 10px; margin-bottom: 12px; }
.mk-dinfo b { color: var(--text, #0f172a); }
.mk-dsec h4 { margin: 14px 0 8px; font-size: 13px; }
.mk-dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-dm { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-dm span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mk-dm b { font-size: 17px; }
.mk-dm small { font-size: 11.5px; color: var(--muted); }
.mk-dfoot { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
.mpick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mpick-col { border: 1px solid var(--border); border-radius: 12px; padding: 10px; min-width: 0; }
.mpick-head { display: flex; flex-direction: column; margin-bottom: 6px; }
.mpick-q { width: 100%; margin-bottom: 6px; }
.mpick-tools { font-size: 12px; margin-bottom: 6px; }
.mpick-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.mpick-item { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 8px; cursor: pointer; font-weight: 400; }
.mpick-item:hover { background: #f8fafd; }
.mpick-item span { display: flex; flex-direction: column; min-width: 0; }
.mpick-item b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.warn-t { color: #d97706; }
@media (max-width: 1200px) { .mk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mk-board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .mk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mpick { grid-template-columns: 1fr; } .mk-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-hero { flex-direction: column; } .mk-frow { grid-template-columns: 100px 1fr 50px 40px; } }
/* dark */
[data-theme=dark] .mk-kpi, [data-theme=dark] .mk-col, [data-theme=dark] .mk-dm, [data-theme=dark] .mpick-col { background: var(--card); border-color: var(--border); }
[data-theme=dark] .mk-dinfo, [data-theme=dark] .mk-money span, [data-theme=dark] .mk-click:hover td, [data-theme=dark] .mpick-item:hover, [data-theme=dark] .mk-fbar { background: rgba(148,163,184,.1); }
[data-theme=dark] .mk-dinfo b { color: inherit; }
[data-theme=dark] .mk-kind { background: rgba(148,163,184,.15); color: inherit; }

.mk-empty { padding: 28px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }

.mk-fx { margin: -4px 0 12px; font-size: 12.5px; }
.mk-fxf { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; flex-wrap: wrap; }
.mk-fxf input { width: 120px; padding: 4px 6px; }

/* suspend button */
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

/* suspended company screen */
.sus-wrap { display: grid; place-items: center; min-height: 60vh; padding: 16px; }
.sus-card { max-width: 560px; width: 100%; text-align: center; padding: 32px 28px; }
.sus-ic { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.sus-card h1 { margin: 0 0 8px; color: #b91c1c; }
.sus-msg { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.sus-reason { display: inline-flex; gap: 8px; align-items: center; background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; }
.sus-reason span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.sus-inv { text-align: left; margin: 16px 0 4px; border-top: 1px solid var(--border, #e5e7eb); padding-top: 12px; }
.sus-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border, #e5e7eb); }
.sus-btns { justify-content: center; margin-top: 18px; flex-wrap: wrap; }
[data-theme="dark"] .sus-reason { background: rgba(220, 38, 38, .12); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }
[data-theme="dark"] .sus-card h1 { color: #f87171; }
@media (max-width: 520px) { .sus-row { grid-template-columns: 1fr auto; } }

/* call recordings page */
.rc-player td { background: var(--bg-soft, #f8fafc); padding: 8px 12px; }
.rc-player audio { width: 100%; max-width: 640px; height: 36px; }
[data-theme="dark"] .rc-player td { background: rgba(255,255,255,.03); }
.rc-play { min-width: 34px; }
