/* ReplyQuick app layout and components. Colors and fonts come from brand.css only. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--rq-font-body);
  background: var(--rq-bg);
  color: var(--rq-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--rq-font-heading); margin: 0; color: var(--rq-text); letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
a { color: var(--rq-accent); }
.muted { color: var(--rq-text-muted); }
.small { font-size: 12px; }
.num { font-family: var(--rq-font-numbers); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--rq-primary); color: var(--rq-primary-ink);
  padding: var(--rq-space-5) var(--rq-space-4); display: flex; flex-direction: column; gap: var(--rq-space-2);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--rq-font-heading); font-weight: 700; font-size: 19px; padding: 0 8px 18px; }
.brand-dot { width: 28px; height: 28px; border-radius: 8px; background: var(--rq-accent); display: grid; place-items: center; font-size: 14px; color: #fff; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; padding: 12px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.78); text-decoration: none;
  padding: 9px 10px; border-radius: var(--rq-radius-sm); font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.side-foot { margin-top: auto; font-size: 12px; opacity: 0.8; padding: 0 8px; }
.side-foot button { margin-top: 8px; width: 100%; }

.main { padding: var(--rq-space-6); min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: var(--rq-space-5); flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }

/* ---------- Cards / grid ---------- */
.card { background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius); box-shadow: var(--rq-shadow); padding: var(--rq-space-5); }
.card + .card { margin-top: var(--rq-space-4); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--rq-space-4); gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: var(--rq-space-4); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .grid-2, .grid-4 { grid-template-columns: 1fr; } .main { padding: 16px; } }
.stack > * + * { margin-top: var(--rq-space-4); }

.stat { background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius); padding: 18px 20px; box-shadow: var(--rq-shadow); }
.stat-label { color: var(--rq-text-muted); font-size: 12.5px; font-weight: 500; }
.stat-value { font-family: var(--rq-font-numbers); font-size: 30px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--rq-text-muted); margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--rq-text-muted); padding: 10px 12px; border-bottom: 1px solid var(--rq-border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--rq-border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--rq-surface-2); }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--rq-neutral-soft); color: var(--rq-text-muted); }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.success { background: var(--rq-success-soft); color: var(--rq-success); }
.pill.warning { background: var(--rq-warning-soft); color: var(--rq-warning); }
.pill.danger { background: var(--rq-danger-soft); color: var(--rq-danger); }
.pill.info { background: var(--rq-info-soft); color: var(--rq-info); }
.pill.accent { background: var(--rq-accent-soft); color: var(--rq-accent); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--rq-surface-2); border: 1px solid var(--rq-border); font-size: 12px; }

/* ---------- Forms / buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 13.5px var(--rq-font-body); padding: 9px 16px; border-radius: var(--rq-radius-sm);
  border: 1px solid var(--rq-border); background: var(--rq-surface); color: var(--rq-text); cursor: pointer;
}
.btn:hover { background: var(--rq-surface-2); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--rq-accent); border-color: var(--rq-accent); color: #fff; }
.btn.primary:hover { background: var(--rq-accent-hover); }
.btn.danger { background: var(--rq-danger); border-color: var(--rq-danger); color: #fff; }
.btn.success { background: var(--rq-success); border-color: var(--rq-success); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,0.25); color: #fff; }
.btn.lg { padding: 13px 22px; font-size: 15px; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.on { background: var(--rq-warning-soft); border-color: var(--rq-warning); color: var(--rq-warning); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

label.field { display: block; }
label.field > span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--rq-text); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=time], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; font: 400 14px var(--rq-font-body); color: var(--rq-text);
  padding: 9px 12px; border: 1px solid var(--rq-border); border-radius: var(--rq-radius-sm); background: var(--rq-surface);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rq-accent-soft); border-color: var(--rq-accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--rq-primary); }
.login-card { width: 100%; max-width: 410px; background: var(--rq-surface); border-radius: var(--rq-radius-lg); padding: 34px; box-shadow: var(--rq-shadow-lg); }
.login-card .brand { color: var(--rq-text); padding: 0 0 20px; }
.demo-accounts { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rq-border); }
.demo-accounts button { width: 100%; justify-content: space-between; margin-top: 8px; }
.error { color: var(--rq-danger); font-size: 13px; margin-top: 8px; }

/* ---------- Drawer / modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 50; display: flex; justify-content: flex-end; }
.overlay.center { align-items: center; justify-content: center; padding: 20px; }
.drawer { width: min(520px, 100%); height: 100%; background: var(--rq-surface); padding: 28px; overflow-y: auto; box-shadow: var(--rq-shadow-lg); }
.modal { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: var(--rq-surface); border-radius: var(--rq-radius-lg); padding: 28px; box-shadow: var(--rq-shadow-lg); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 14px 0; }
.kv dt { color: var(--rq-text-muted); font-size: 12.5px; }
.kv dd { margin: 0; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--rq-primary); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 99; box-shadow: var(--rq-shadow-lg); font-weight: 500; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rq-border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: none; padding: 10px 12px; font: 600 13px var(--rq-font-body); color: var(--rq-text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--rq-accent); border-bottom-color: var(--rq-accent); }

.list-item { padding: 12px 0; border-bottom: 1px solid var(--rq-border); display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.list-item:last-child { border-bottom: none; }
.empty { text-align: center; color: var(--rq-text-muted); padding: 28px 12px; }

/* ---------- Receptionist workspace ---------- */
.desk { min-height: 100vh; display: flex; flex-direction: column; }
.desk-bar { background: var(--rq-primary); color: #fff; display: flex; align-items: center; gap: 18px; padding: 12px 22px; flex-wrap: wrap; }
.desk-bar .brand { padding: 0; }
.desk-bar .spacer { flex: 1; }
.desk-bar select { width: auto; background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); }
.desk-bar select option { color: var(--rq-text); }
.desk-stats { display: flex; gap: 22px; font-size: 12px; }
.desk-stats b { display: block; font-family: var(--rq-font-numbers); font-size: 18px; }
.desk-body { flex: 1; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .desk-body { grid-template-columns: 1fr; } }

.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.st-available { background: var(--rq-success); }
.st-ringing { background: var(--rq-info); }
.st-on_call { background: var(--rq-danger); }
.st-after_call { background: var(--rq-warning); }
.st-break { background: #9aa4b2; }
.st-offline { background: #5b6472; }

.ring-card { border: 2px solid var(--rq-info); background: var(--rq-info-soft); border-radius: var(--rq-radius-lg); padding: 26px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,111,214,0.35); } 50% { box-shadow: 0 0 0 10px rgba(47,111,214,0); } }
.ring-firm { font-family: var(--rq-font-heading); font-size: 28px; font-weight: 700; margin: 6px 0 2px; }
.greeting-box { background: var(--rq-surface); border-left: 4px solid var(--rq-accent); padding: 14px 16px; border-radius: 8px; font-size: 16px; font-weight: 500; margin: 16px 0; }
.call-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.call-firm { font-family: var(--rq-font-heading); font-size: 22px; font-weight: 700; }
.timer { font-family: var(--rq-font-numbers); font-size: 26px; font-weight: 700; }
.idle { text-align: center; padding: 70px 20px; }
.idle .big { font-family: var(--rq-font-heading); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.transfer-state { padding: 14px; border-radius: 10px; margin-top: 12px; }
.transfer-state.ringing { background: var(--rq-info-soft); }
.transfer-state.failed { background: var(--rq-danger-soft); }
.transfer-state.accepted { background: var(--rq-success-soft); }

/* ---------- Onboarding ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.steps button { border: 1px solid var(--rq-border); background: var(--rq-surface); border-radius: 999px; padding: 6px 12px; font: 600 12.5px var(--rq-font-body); color: var(--rq-text-muted); cursor: pointer; }
.steps button.active { background: var(--rq-accent); border-color: var(--rq-accent); color: #fff; }
.steps button.done { color: var(--rq-accent); border-color: var(--rq-accent); }
pre.code { background: #0f1726; color: #d8e1ee; padding: 16px; border-radius: 10px; overflow: auto; font-size: 12px; max-height: 420px; white-space: pre; }
.checklist li { margin-bottom: 8px; }
.repeat-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.repeat-row.two { grid-template-columns: 1fr 2fr auto; }
@media (max-width: 800px) { .repeat-row, .repeat-row.two { grid-template-columns: 1fr; } }
.grid-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-21 { grid-template-columns: 1fr; } }

/* ---------- Firm pipeline ---------- */
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1.2fr; align-items: stretch; gap: 8px; }
.pipe-stage { background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius); padding: 20px; box-shadow: var(--rq-shadow); min-width: 0; }
.pipe-stage.money { background: var(--rq-primary); border-color: var(--rq-primary); }
.pipe-stage.money .stat-label, .pipe-stage.money .stat-sub { color: rgba(255,255,255,0.75); }
.pipe-stage.money .pipe-value { color: #fff; }
.pipe-value { font-family: var(--rq-font-numbers); font-size: 32px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pipe-arrow { display: grid; place-items: center; color: var(--rq-text-muted); font-size: 28px; }
@media (max-width: 1200px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe-arrow { display: none; } .pipe-stage.money { grid-column: 1 / -1; } }
.seg { display: inline-flex; background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius-sm); padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: 6px 12px; border-radius: 6px; font: 600 13px var(--rq-font-body); color: var(--rq-text-muted); cursor: pointer; }
.seg button.active { background: var(--rq-accent); color: #fff; }
.tabs a.tab-link { padding: 10px 12px; font: 600 13px var(--rq-font-body); color: var(--rq-text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.tab-link.active { color: var(--rq-accent); border-bottom-color: var(--rq-accent); }

/* ---------- Recording player ---------- */
.play-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rq-accent); background: var(--rq-accent-soft); color: var(--rq-accent); cursor: pointer; font-size: 11px; display: inline-grid; place-items: center; padding: 0; }
.play-btn:hover, .play-btn.playing { background: var(--rq-accent); color: #fff; }
.player-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 60; width: min(640px, calc(100% - 32px)); background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius-lg); box-shadow: var(--rq-shadow-lg); padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.player-info { flex: 1; min-width: 0; }
.player-track { height: 6px; border-radius: 3px; background: var(--rq-surface-2); margin: 8px 0 4px; cursor: pointer; overflow: hidden; }
.player-fill { height: 100%; background: var(--rq-accent); }

/* ---------- Without-us comparison ---------- */
.pipe-without { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rq-border); color: var(--rq-danger); font-size: 12.5px; font-weight: 600; }
.pipe-stage.money .pipe-without { border-top-color: rgba(255,255,255,0.25); color: #ff9b9b; }
.loss-banner { margin-top: 16px; background: var(--rq-danger-soft); border: 1px solid var(--rq-danger); border-radius: var(--rq-radius); padding: 18px 22px; color: var(--rq-danger); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.loss-banner .big { font-family: var(--rq-font-numbers); font-size: 28px; font-weight: 700; }
.loss-banner p { margin: 2px 0 0; color: var(--rq-text); }

/* ---------- Calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rq-border); border-left: 1px solid var(--rq-border); }
.cal-dow { font-size: 11.5px; font-weight: 600; color: var(--rq-text-muted); padding: 8px; border-right: 1px solid var(--rq-border); border-bottom: 1px solid var(--rq-border); background: var(--rq-surface-2); }
.cal-day { min-height: 96px; padding: 6px; border-right: 1px solid var(--rq-border); border-bottom: 1px solid var(--rq-border); font-size: 12px; }
.cal-day.other { background: var(--rq-surface-2); color: var(--rq-text-muted); }
.cal-day.today .cal-num { background: var(--rq-accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-num { font-weight: 600; margin-bottom: 4px; }
.cal-ev { display: block; width: 100%; text-align: left; background: var(--rq-accent-soft); color: var(--rq-accent); border: none; border-radius: 5px; padding: 3px 5px; margin-bottom: 3px; font: 600 11px var(--rq-font-body); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-connect { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rq-border); }
.cal-connect:last-child { border-bottom: none; }
.cal-logo { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }

/* ---------- Insights ---------- */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar { width: 100%; background: var(--rq-accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar.peak { background: var(--rq-primary); }
.bar-lbl { font-size: 10px; color: var(--rq-text-muted); margin-top: 4px; white-space: nowrap; }
.bar-val { font-size: 10px; color: var(--rq-text-muted); margin-bottom: 2px; }
.heat { display: grid; grid-template-columns: 44px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10px; }
.heat .h-lbl { color: var(--rq-text-muted); display: flex; align-items: center; }
.heat .h-cell { aspect-ratio: 1; border-radius: 3px; background: var(--rq-accent); }
.hbar { display: grid; grid-template-columns: 180px 1fr 60px; align-items: center; gap: 10px; margin-bottom: 10px; }
.hbar-track { height: 10px; background: var(--rq-surface-2); border-radius: 5px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--rq-accent); }

/* ---------- Cheat sheet ---------- */
.cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; background: var(--rq-surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.cs-block { margin-bottom: 12px; }
.cs-block h4 { font-family: var(--rq-font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rq-text-muted); margin: 0 0 6px; }
.cs-list { margin: 0; padding-left: 18px; }
.cs-list li { margin-bottom: 4px; }
.cs-urgent { background: var(--rq-danger-soft); border-radius: 10px; padding: 12px 14px; }
.cs-urgent h4 { color: var(--rq-danger); }
.cs-urgent-row { padding: 6px 0; border-top: 1px solid rgba(210,59,59,0.2); }
.cs-urgent-row:first-of-type { border-top: none; }
.cs-never h4 { color: var(--rq-danger); }
.cs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .cs-two { grid-template-columns: 1fr; } }
.firm-link { background: none; border: none; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--rq-text); }
.firm-link:hover b { color: var(--rq-accent); text-decoration: underline; }
.cs-h { font-family: var(--rq-font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rq-text-muted); margin: 6px 0; }
.grid > .card + .card, .grid > .stack + .stack { margin-top: 0; }
.desk .tabs button { padding: 9px 8px; }

/* ---------- Receptionist: firm accordion ---------- */
.acc { border: 1px solid var(--rq-border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.acc-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--rq-surface); border: 0; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: var(--rq-text); }
.acc-head:hover { background: var(--rq-surface-2); }
.acc-right { display: flex; align-items: center; gap: 8px; flex: none; }
.acc-chev { color: var(--rq-text-muted); transition: transform .2s; }
.acc.open .acc-chev { transform: rotate(180deg); }
.acc.open .acc-head { background: var(--rq-surface-2); border-bottom: 1px solid var(--rq-border); }
.acc-body { padding: 14px; animation: accIn .18s ease-out; }
@keyframes accIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Receptionist: Calls / Messages switch ---------- */
.seg.dark { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.seg.dark button { color: rgba(255,255,255,0.75); }
.seg.dark button.active { background: var(--rq-accent); color: #fff; }
.seg .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--rq-danger); color: #fff; font-size: 11px; line-height: 18px; margin-left: 4px; }
.desk-body.single { display: block; }

/* ---------- Receptionist: inbox ---------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; height: calc(100vh - 110px); min-height: 520px; }
.inbox > .card + .card { margin-top: 0; }
.inbox-list { display: flex; flex-direction: column; padding: 16px; min-height: 0; }
.conv-scroll { overflow-y: auto; flex: 1; margin: 0 -8px; }
.conv { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px 10px; cursor: pointer; font: inherit; color: var(--rq-text); }
.conv:hover { background: var(--rq-surface-2); }
.conv.active { background: var(--rq-accent-soft); }
.conv-top { display: flex; align-items: center; gap: 6px; }
.conv-top .num { margin-left: auto; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rq-danger); }
.conv-prev { font-size: 12.5px; color: var(--rq-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ch { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.ch.sms { background: var(--rq-accent-soft); color: var(--rq-accent); }
.ch.email { background: var(--rq-info-soft); color: var(--rq-info); }
.inbox-thread { display: flex; flex-direction: column; padding: 0; min-height: 0; overflow: hidden; }
.thread-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rq-border); flex-wrap: wrap; }
.thread-body { flex: 1; overflow-y: auto; padding: 20px; background: var(--rq-surface-2); display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; flex-direction: column; max-width: 70%; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.in { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.msg.out .bubble.sms { background: var(--rq-accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.in .bubble.sms { background: var(--rq-surface); border: 1px solid var(--rq-border); border-bottom-left-radius: 4px; }
.bubble.email { background: var(--rq-surface); border: 1px solid var(--rq-border); border-left: 4px solid var(--rq-info); border-radius: 10px; }
.msg-subj { font-weight: 700; margin-bottom: 4px; }
.msg-meta { font-size: 11px; color: var(--rq-text-muted); margin-top: 4px; }
.composer { border-top: 1px solid var(--rq-border); padding: 14px 20px; background: var(--rq-surface); }
.composer-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.composer-top .small { margin-left: auto; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; height: auto; } .inbox-thread { min-height: 560px; } }
.cal-logo-wrap { width: 36px; height: 36px; flex: none; display: inline-block; }
.cal-logo-img { width: 36px; height: 36px; object-fit: contain; display: block; }

/* ==========================================================
   Live Service 24/7 look (matches the website). Overrides above.
   ========================================================== */
h1, h2, h3 { font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: 30px; font-weight: 300; }
h2 { font-size: 20px; }
h3 { font-size: 15px; font-weight: 500; }
a { color: var(--rq-text); }
.page-head h1 { font-size: 32px; }

/* Logo: waveform mark tinted to the text color (same technique as the site) */
.mark { display: inline-block; width: 34px; height: 19px; background: currentColor; -webkit-mask: var(--rq-logo) center / contain no-repeat; mask: var(--rq-logo) center / contain no-repeat; flex: none; }
.brand { font-family: var(--rq-font-heading); font-weight: 300; font-size: 19px; letter-spacing: -0.01em; gap: 10px; white-space: nowrap; }

/* Grain texture on dark surfaces and primary buttons */
.sidebar, .desk-bar, .btn.primary, .pipe-stage.money, .login-side { position: relative; isolation: isolate; }
.sidebar::before, .desk-bar::before, .btn.primary::before, .pipe-stage.money::before, .login-side::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image: var(--rq-grain); background-size: 240px 180px; opacity: .18;
}
.btn.primary::before { opacity: .22; background-size: 120px 90px; }

/* Sidebar */
.sidebar { background: var(--rq-primary); }
.nav a { color: rgba(250,250,249,0.72); font-weight: 400; border-radius: 4px; }
.nav a.active { background: rgba(250,250,249,0.10); color: #fafaf9; }
.side-label { opacity: .45; }

/* Cards, stats */
.card, .stat, .pipe-stage { border-radius: 8px; box-shadow: none; border-color: var(--rq-border); }
.stat-label { color: var(--rq-text-muted); font-weight: 400; font-size: 13px; }
.stat-value, .pipe-value, .timer { font-weight: 300; letter-spacing: -0.02em; }
.stat-value { font-size: 36px; }
.pipe-value { font-size: 36px; }

/* Buttons: 4px, ink */
.btn { border-radius: 4px; font-weight: 500; border-color: var(--rq-border); }
.btn.primary { background: var(--rq-primary); border-color: var(--rq-primary); color: #fafaf9; }
.btn.primary:hover { background: var(--rq-accent-hover); }
.btn.success { background: var(--rq-primary); border-color: var(--rq-primary); }
.btn.ghost { border-color: rgba(250,250,249,0.28); color: #fafaf9; }
.btn.on { background: var(--rq-surface-2); border-color: var(--rq-text); color: var(--rq-text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rq-surface-2); border-color: var(--rq-text); }

/* Chips: gray with a status dot; dark chip for the wins (like the site's dashboard) */
.pill { border-radius: 4px; background: var(--rq-surface-2); color: var(--rq-text-2); font-weight: 500; padding: 3px 8px; }
.pill::before { background: var(--rq-chart-soft); }
.pill.success, .pill.warning, .pill.danger, .pill.info, .pill.accent { background: var(--rq-surface-2); color: var(--rq-text-2); }
.pill.success::before { background: var(--rq-live); }
.pill.warning::before { background: var(--rq-warning); }
.pill.danger::before { background: var(--rq-danger); }
.pill.info::before { background: var(--rq-info); }
.pill.accent::before { background: var(--rq-text); }
.pill.dark { background: var(--rq-primary); color: #fafaf9; }
.pill.dark::before { display: none; }
.tag { border-radius: 4px; background: var(--rq-surface-2); border-color: var(--rq-border); }

/* Segmented controls and tabs */
.seg { border-radius: 4px; }
.seg button { border-radius: 3px; font-weight: 500; }
.seg button.active { background: var(--rq-primary); color: #fafaf9; }
.seg.dark button.active { background: #fafaf9; color: var(--rq-primary); }
.tabs button.active, .tabs a.tab-link.active { color: var(--rq-text); border-bottom-color: var(--rq-text); }

/* Firm pipeline */
.pipe-stage.money { background: var(--rq-primary); border-color: var(--rq-primary); }
.pipe-arrow { font-weight: 200; }

/* Charts: soft gray bars, peak in ink */
.bar { background: var(--rq-chart-soft); border-radius: 3px 3px 0 0; }
.bar.peak { background: var(--rq-primary); }
.heat .h-cell { background: var(--rq-primary); border-radius: 2px; }
.hbar-fill { background: var(--rq-primary); }

/* Recording player */
.play-btn { border-color: var(--rq-text); background: transparent; color: var(--rq-text); }
.play-btn:hover, .play-btn.playing { background: var(--rq-primary); color: #fafaf9; }
.player-fill { background: var(--rq-primary); }
.player-bar { border-radius: 8px; }

/* Calendar */
.cal-ev { background: var(--rq-surface-2); color: var(--rq-text); border-left: 2px solid var(--rq-text); border-radius: 3px; }
.cal-day.today .cal-num { background: var(--rq-primary); color: #fafaf9; }

/* Receptionist desk */
.desk-bar { background: var(--rq-primary); }
.desk-bar select { border-radius: 4px; }
.st-available { background: var(--rq-live); }
.ring-card { border: 1px solid var(--rq-text); background: var(--rq-surface); border-radius: 8px; animation: ringPulse 1.4s infinite; }
@keyframes ringPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,181,159,.45); } 50% { box-shadow: 0 0 0 10px rgba(31,181,159,0); } }
.ring-firm { font-weight: 300; font-size: 34px; letter-spacing: -0.02em; }
.ring-card .pill.info { background: var(--rq-primary); color: #fafaf9; }
.ring-card .pill.info::before { background: var(--rq-live); }
.greeting-box { border-left-color: var(--rq-text); background: var(--rq-surface-2); border-radius: 4px; }
.call-firm { font-weight: 300; font-size: 26px; }
.idle .big { font-weight: 300; font-size: 26px; }
.transfer-state.ringing { background: var(--rq-surface-2); }

/* Inbox */
.msg.out .bubble.sms { background: var(--rq-primary); color: #fafaf9; }
.bubble.email { border-left-color: var(--rq-text); }
.conv.active { background: var(--rq-surface-2); }
.ch.sms { background: var(--rq-primary); color: #fafaf9; }
.ch.email { background: var(--rq-surface-2); color: var(--rq-text-2); border: 1px solid var(--rq-border); }

/* Accordion / cheat sheet */
.acc { border-radius: 8px; }
.cs-facts { border-radius: 4px; }
.cs-urgent { border-radius: 4px; }

/* Onboarding steps */
.steps button { border-radius: 4px; }
.steps button.active { background: var(--rq-primary); border-color: var(--rq-primary); color: #fafaf9; }
.steps button.done { color: var(--rq-text); border-color: var(--rq-text); }

/* Login: split layout like the site's hero */
.login-wrap { background: var(--rq-bg); display: grid; grid-template-columns: 1fr 1fr; padding: 0; place-items: stretch; }
.login-side { background: var(--rq-primary); color: #fafaf9; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-side .brand { color: #fafaf9; padding: 0; }
.login-side h2 { color: #fafaf9; font-weight: 300; font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; max-width: 440px; }
.login-side p { color: #cccac6; max-width: 400px; }
.login-main { display: grid; place-items: center; padding: 32px; }
.login-card { box-shadow: none; border: 1px solid var(--rq-border); border-radius: 8px; }
.login-card h2 { font-weight: 300; font-size: 28px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } }

.toast { background: var(--rq-primary); border-radius: 4px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rq-live); margin-right: 8px; vertical-align: middle; }
