:root {
  color-scheme: light;
  --ink: #172036;
  --muted: #6f788b;
  --soft: #f4f6f9;
  --surface: #ffffff;
  --line: #e2e6ed;
  --navy: #182239;
  --blue: #2f63f5;
  --blue-dark: #244fd0;
  --blue-soft: #edf2ff;
  --green: #16866a;
  --green-soft: #eaf8f3;
  --amber: #a56418;
  --amber-soft: #fff4df;
  --red: #c1444d;
  --red-soft: #fff0f1;
  --shadow: 0 18px 50px rgba(26, 36, 59, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--soft); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

[hidden] { display: none !important; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand strong { font-weight: 820; }

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--blue);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(47, 99, 245, .22);
  font-size: 15px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}

.primary-button {
  color: white;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 7px 16px rgba(47, 99, 245, .17);
}

.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled { opacity: .58; cursor: wait; transform: none; }
.primary-button.call-limit:disabled { cursor: not-allowed; }
.primary-button.compact { min-height: 37px; padding-inline: 14px; }

.secondary-button {
  color: #34405a;
  background: white;
  border: 1px solid #d9dfe9;
}

.secondary-button:hover { border-color: #b9c3d4; background: #f9fafc; }

.setup-screen {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 15%, rgba(47, 99, 245, .14), transparent 32rem),
    var(--soft);
}

.setup-card {
  width: min(100%, 520px);
  padding: 42px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.setup-card .brand-mark { margin: 0 auto 20px; }
.setup-card h1 { margin: 0 0 13px; font-size: 29px; letter-spacing: -.035em; }
.setup-card > p:not(.eyebrow) { margin: 0 auto 24px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.setup-card code { padding: 2px 5px; color: var(--navy); background: #edf0f5; border-radius: 5px; }
.setup-card .setup-hint { margin-top: 20px !important; font-size: 11px !important; }

.field { display: grid; gap: 7px; }
.field > span { color: #475168; font-size: 11px; font-weight: 760; }
.field input, .field textarea, .field select, .search-box input {
  width: 100%;
  color: var(--ink);
  background: white;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input, .field select { height: 43px; padding: 0 12px; }
.field textarea { padding: 11px 12px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus, .search-box input:focus { border-color: #8eabfa; box-shadow: 0 0 0 3px rgba(47, 99, 245, .1); }
input::placeholder, textarea::placeholder { color: #a2aaba; }
.form-status { min-height: 17px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-status.error { color: var(--red); }
.form-status.success { color: var(--green); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { min-height: 100vh; padding: 25px 18px 20px; display: flex; flex-direction: column; color: #c8d0df; background: var(--navy); position: sticky; top: 0; align-self: start; }
.sidebar-brand { padding: 0 9px; color: white; }
.main-nav { margin-top: 42px; display: grid; gap: 5px; }
.nav-item { min-height: 45px; padding: 0 12px; display: flex; align-items: center; gap: 12px; color: #aeb8cc; background: transparent; border: 0; border-radius: 9px; font-size: 13px; font-weight: 690; text-align: left; cursor: pointer; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.active { color: white; background: rgba(86, 128, 247, .18); box-shadow: inset 3px 0 #5d84fa; }
.nav-icon { width: 19px; color: #8da7ed; font-size: 16px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 18px 9px 3px; border-top: 1px solid rgba(255,255,255,.09); }
.sidebar-footer p { margin: 0 0 9px; overflow: hidden; color: #aeb8cc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer button, .sidebar-footer a { display: block; margin: 7px 0 0; padding: 0; color: #8793a9; background: transparent; border: 0; font-size: 10px; text-decoration: none; cursor: pointer; }
.sidebar-footer button:hover, .sidebar-footer a:hover { color: white; }

.main-area { min-width: 0; }
.topbar { height: 72px; padding: 0 clamp(20px, 3vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar-label { margin: 0 0 3px; color: #8a93a4; font-size: 9px; font-weight: 780; letter-spacing: .11em; text-transform: uppercase; }
.la-clock { margin: 0; font-size: 13px; font-weight: 760; font-variant-numeric: tabular-nums; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.sync-status i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.sync-status.syncing i { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.sync-status.error i { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.menu-button { display: none; background: transparent; border: 0; font-size: 20px; }

.view { display: none; padding: 35px clamp(20px, 3vw, 42px) 55px; }
.view.active { display: block; }
.page-heading { margin-bottom: 27px; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 3vw, 36px); line-height: 1.13; letter-spacing: -.045em; }
.page-heading > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.action-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }

.stats-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-height: 104px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; background: white; border: 1px solid var(--line); border-radius: 12px; }
.stat-card p { margin: 0; color: var(--muted); font-size: 10px; font-weight: 690; }
.stat-card strong { display: block; margin-top: 9px; font-size: 27px; line-height: 1; letter-spacing: -.045em; }
.stat-card span { color: #99a1b0; font-size: 9px; }

.workspace-grid { display: grid; grid-template-columns: minmax(285px, .78fr) minmax(520px, 1.8fr); gap: 16px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 2px 10px rgba(25,35,55,.025); }
.customer-queue { position: sticky; top: 88px; overflow: hidden; }
.panel-heading { padding: 19px 18px 14px; display: flex; justify-content: space-between; }
.panel-heading h2 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.search-box { min-height: 39px; display: flex; align-items: center; gap: 7px; position: relative; }
.search-box > span { margin-left: 11px; color: #8d96a8; position: absolute; z-index: 1; }
.search-box input { height: 39px; padding: 0 12px 0 34px; }
.customer-queue > .search-box { margin: 0 14px; }
.filter-row { padding: 12px 14px; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.filter-chip { min-height: 29px; padding: 0 10px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 730; cursor: pointer; }
.filter-chip.active { color: var(--blue); background: var(--blue-soft); border-color: #dce5ff; }
.customer-list { max-height: calc(100vh - 286px); min-height: 270px; overflow: auto; }
.customer-row { width: 100%; min-height: 85px; padding: 15px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; color: inherit; background: transparent; border: 0; border-bottom: 1px solid #edf0f4; text-align: left; cursor: pointer; }
.customer-row:hover { background: #fafbfc; }
.customer-row.active { background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: #385292; background: #e8eeff; border-radius: 9px; font-size: 11px; font-weight: 820; text-transform: uppercase; }
.customer-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.customer-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-row p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { padding: 4px 7px; flex: 0 0 auto; border-radius: 999px; font-size: 8px; font-weight: 750; }
.status-pill.not_contacted { color: #5e687b; background: #eef0f4; }
.status-pill.completed { color: var(--green); background: var(--green-soft); }
.status-pill.follow_up { color: var(--amber); background: var(--amber-soft); }
.status-pill.unreachable { color: var(--red); background: var(--red-soft); }
.list-empty { padding: 55px 25px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }

.call-workspace { min-height: 600px; }
.empty-state { min-height: 600px; padding: 40px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-icon { width: 56px; height: 56px; margin-bottom: 15px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 16px; font-size: 23px; }
.empty-state h2 { margin: 0; font-size: 17px; }
.empty-state p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.customer-summary { padding: 21px 24px; display: flex; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.summary-person { min-width: 0; display: flex; gap: 13px; }
.summary-person .avatar { width: 42px; height: 42px; }
.summary-person h2 { margin: 1px 0 5px; font-size: 17px; }
.summary-person p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.summary-actions { display: flex; align-items: start; gap: 7px; }
.summary-actions a, .summary-actions button { min-height: 32px; padding: 0 10px; color: #4d5870; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 9px; font-weight: 700; text-decoration: none; cursor: pointer; }
.compliance-note { margin: 18px 24px 0; padding: 11px 13px; display: flex; align-items: start; gap: 10px; color: #615231; background: #fff8e8; border: 1px solid #f0dfb5; border-radius: 9px; font-size: 10px; line-height: 1.55; }
.compliance-note strong { flex: 0 0 auto; color: #8b651d; }
.call-form { padding: 23px 24px; display: grid; gap: 15px; }
.section-title { margin-top: 2px; display: flex; align-items: center; justify-content: space-between; }
.section-title > div { display: flex; align-items: center; gap: 8px; }
.section-title span { width: 24px; height: 24px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 7px; font-size: 8px; font-weight: 820; }
.section-title h3 { margin: 0; font-size: 13px; }
.section-title p { margin: 0; color: #939baa; font-size: 9px; }
.form-grid { display: grid; gap: 13px; }
.two-columns { grid-template-columns: 1fr 1fr; }
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.choice-grid label { cursor: pointer; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span { min-height: 42px; display: grid; place-items: center; color: #596379; background: #fafbfc; border: 1px solid #dfe4ec; border-radius: 8px; font-size: 11px; font-weight: 720; transition: .15s; }
.choice-grid input:checked + span { color: var(--blue); background: var(--blue-soft); border-color: #8eabfa; box-shadow: 0 0 0 2px rgba(47,99,245,.09); }
.form-actions { display: flex; justify-content: space-between; gap: 10px; }
.history-section { padding: 0 24px 24px; }
.history-list { margin-top: 15px; display: grid; gap: 9px; }
.history-item { padding: 14px; display: grid; grid-template-columns: 90px 1fr; gap: 13px; background: #fafbfc; border: 1px solid #e8ebf0; border-radius: 9px; }
.history-time strong { display: block; font-size: 10px; }
.history-time span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.history-content { min-width: 0; }
.history-content-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.history-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.history-tags span { padding: 3px 6px; color: #596379; background: white; border: 1px solid var(--line); border-radius: 5px; font-size: 8px; }
.history-tags .extra-note-tag { color: var(--blue); background: var(--blue-soft); border-color: #cad8ff; font-weight: 780; }
.history-content p { margin: 8px 0 0; color: #555f73; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.history-content p strong { color: #354057; }
.history-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.history-edit { flex: 0 0 auto; padding: 3px 7px; color: var(--blue); background: white; border: 1px solid #cbd8fa; border-radius: 6px; font-size: 8px; font-weight: 760; cursor: pointer; }
.history-delete { flex: 0 0 auto; padding: 3px 7px; color: var(--red); background: white; border: 1px solid #efc9cc; border-radius: 6px; font-size: 8px; font-weight: 760; cursor: pointer; }

.database-panel { overflow: hidden; }
.database-toolbar { padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.database-toolbar .search-box { width: min(100%, 390px); }
.database-toolbar p { margin: 0; color: var(--muted); font-size: 10px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { padding: 11px 15px; color: #7d8799; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 760; text-align: left; white-space: nowrap; }
td { max-width: 270px; padding: 14px 15px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
tbody tr:hover { background: #fbfcfe; }
.table-primary { display: block; color: #303a50; font-size: 11px; font-weight: 740; }
.table-secondary { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.call-attempt-dots { min-height: 18px; display: inline-flex; align-items: center; gap: 6px; }
.call-attempt-dot { width: 10px; height: 10px; display: block; background: white; border: 1px solid #cfd5df; border-radius: 50%; box-shadow: 0 1px 2px rgba(23, 32, 54, .08); }
.call-attempt-dot.connected { background: var(--green); border-color: var(--green); }
.call-attempt-dot.unconnected { background: #9aa3b2; border-color: #9aa3b2; }
.call-attempt-dot.no-phone { background: var(--red); border-color: var(--red); }
.table-issue { max-width: 260px; overflow: hidden; color: #586176; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 5px; }
.row-action { padding: 4px 7px; color: var(--blue); background: transparent; border: 0; font-size: 9px; font-weight: 730; cursor: pointer; }
.row-action.danger { color: var(--red); }

.script-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.script-card { padding: 23px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.script-card-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.script-card h2 { margin: 0; font-size: 17px; }
.script-card .script-purpose { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.copy-button { min-height: 31px; padding: 0 10px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 7px; font-size: 9px; font-weight: 780; cursor: pointer; }
.script-body { margin-top: 18px; padding: 16px; color: #3f485d; background: #f8f9fb; border: 1px solid #e7eaf0; border-radius: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; line-height: 1.7; white-space: pre-wrap; }
.script-note { margin: 13px 0 0; padding-left: 12px; color: #7e6741; border-left: 2px solid #e3b656; font-size: 9px; line-height: 1.6; }

.phone-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .62fr); gap: 16px; align-items: start; }
.script-timeline { display: grid; gap: 11px; }
.phone-step { padding: 20px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.step-number { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-size: 10px; font-weight: 820; }
.phone-step h2 { margin: 1px 0 9px; font-size: 14px; }
.phone-step blockquote { margin: 0; padding: 12px 14px; color: #3e485e; background: #fafbfc; border-left: 3px solid #9eb6fb; border-radius: 0 7px 7px 0; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.phone-step p { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.call-tips { padding: 23px; position: sticky; top: 88px; }
.call-tips h2 { margin: 0; font-size: 17px; }
.call-tips ul { margin: 18px 0 0; padding: 0; display: grid; gap: 13px; list-style: none; }
.call-tips li { padding-left: 18px; color: #5c6679; font-size: 10px; line-height: 1.6; position: relative; }
.call-tips li::before { content: "✓"; color: var(--green); font-weight: 850; position: absolute; left: 0; }

.customer-dialog { width: min(680px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; background: transparent; border: 0; }
.customer-dialog::backdrop { background: rgba(15, 23, 39, .55); backdrop-filter: blur(3px); }
.dialog-card { padding: 27px; display: grid; gap: 14px; background: white; border-radius: 16px; box-shadow: 0 25px 70px rgba(15,25,45,.22); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; }
.dialog-heading h2 { margin: 0; font-size: 21px; }
.dialog-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.icon-button { width: 33px; height: 33px; display: grid; place-items: center; color: var(--muted); background: #f2f4f7; border: 0; border-radius: 8px; font-size: 20px; cursor: pointer; }
.dialog-actions { margin-top: 4px; display: flex; justify-content: end; gap: 8px; }

.paste-import-dialog { width: min(1100px, calc(100% - 28px)); }
.paste-import-card { max-height: calc(100vh - 40px); overflow: auto; }
.paste-import-help { margin: -4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
#paste-import-data { min-height: 170px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; line-height: 1.55; tab-size: 4; }
.paste-preview { padding: 15px; display: grid; gap: 11px; background: #f8faff; border: 1px solid #dfe6f8; border-radius: 11px; }
.paste-preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.paste-preview-heading h3 { margin: 0; font-size: 15px; }
.paste-preview-heading strong { color: var(--blue); font-size: 11px; }
.paste-preview-warnings { margin: 0; padding: 10px 12px 10px 28px; color: #775a24; background: #fff7e3; border: 1px solid #ecd9a9; border-radius: 8px; font-size: 9px; line-height: 1.6; }
.paste-preview-table { max-height: 340px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.paste-preview-table th { position: sticky; top: 0; z-index: 1; }
.paste-preview-table td { min-width: 105px; padding: 10px 11px; }
.paste-preview-table td:first-child { min-width: 42px; }
.paste-preview-table .paste-preview-text { width: 280px; max-height: 58px; overflow: hidden; display: -webkit-box; color: #586176; line-height: 1.55; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.paste-preview-link { color: var(--blue); font-weight: 720; text-decoration: none; white-space: nowrap; }
.paste-import-actions { position: sticky; bottom: -27px; padding: 12px 0 0; background: white; }

.toast-region { width: min(360px, calc(100% - 32px)); display: grid; gap: 8px; position: fixed; right: 18px; bottom: 18px; z-index: 100; }
.toast { padding: 13px 15px; color: white; background: #29344b; border-radius: 9px; box-shadow: 0 13px 35px rgba(15,25,45,.25); font-size: 11px; line-height: 1.5; animation: toast-in .22s ease-out; }
.toast.error { background: #9d3942; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1080px) {
  .workspace-grid { grid-template-columns: 300px minmax(460px, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .script-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { width: 224px; height: 100vh; position: fixed; left: -240px; z-index: 50; transition: left .2s; box-shadow: 16px 0 35px rgba(15,25,45,.17); }
  .sidebar.open { left: 0; }
  .menu-button { display: block; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .workspace-grid { grid-template-columns: 1fr; }
  .customer-queue { position: static; }
  .customer-list { max-height: 350px; }
  .phone-layout { grid-template-columns: 1fr; }
  .call-tips { position: static; }
  .paste-import-actions { flex-wrap: wrap; position: static; }
  .paste-import-actions button { flex: 1 1 150px; }
}

@media (max-width: 600px) {
  .view { padding-inline: 14px; }
  .topbar { padding-inline: 14px; }
  .sync-status { display: none; }
  .topbar-actions .compact { font-size: 0; }
  .topbar-actions .compact::first-letter { font-size: 15px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 92px; }
  .action-heading { align-items: start; flex-direction: column; }
  .heading-actions { width: 100%; justify-content: start; }
  .heading-actions .primary-button, .heading-actions .secondary-button { flex: 1 1 auto; }
  .two-columns, .choice-grid { grid-template-columns: 1fr 1fr; }
  .customer-summary { flex-direction: column; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions button { width: 100%; }
  .history-item { grid-template-columns: 1fr; }
  .script-card { padding: 18px; }
  .dialog-card { padding: 21px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
