:root {
  --bg: #eef1f3;
  --ink: #1d2329;
  --muted: #58616b;
  --line: #d4dbe1;
  --gold: #ffb612;
  --gold-soft: #ffd36a;
  --gold-dark: #735000;
  --panel: #ffffff;
  --panel-soft: #f7f8f8;
  --control-bg: #fbfcfc;
  --black: #101010;
  --charcoal: #1b2025;
  --danger: #a33a33;
  --success: #2f7452;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(27, 32, 37, 0.035), transparent 260px),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(16, 16, 16, 0.72), rgba(16, 16, 16, 0.88)),
    url("./assets/reside-global-login-bg.jpg") center/cover;
}

.login-panel {
  width: min(440px, 100%);
  background: rgba(16, 16, 16, 0.9);
  border: 1px solid rgba(255, 182, 18, 0.42);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  color: #fff;
}

.login-logo {
  display: block;
  width: min(250px, 100%);
  height: auto;
  margin: 0 auto 20px;
}

.login-panel h1,
.workspace h2,
.workspace h3 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel h1 {
  margin-top: 18px;
  font-size: clamp(1.55rem, 7vw, 2.35rem);
  color: #fff;
}

.login-panel p {
  margin: 4px 0 24px;
  color: #d7d7d7;
}

.login-form,
.form-grid {
  display: grid;
  gap: 14px;
}

.password-control {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--ink);
  padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(255, 182, 18, 0.22);
}

.primary-button,
.login-form button {
  border: 0;
  border-radius: var(--radius);
  background: var(--gold);
  color: #151515;
  padding: 11px 16px;
  font-weight: 800;
  min-height: 42px;
}

.login-form button {
  box-shadow: 0 8px 26px rgba(255, 182, 18, 0.2);
}

.login-panel input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

.login-panel label {
  color: #f5f5f5;
}

.password-control input {
  min-width: 0;
}

.password-toggle {
  width: 72px;
  flex: 0 0 72px;
  border: 1px solid rgba(255, 182, 18, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
}

.login-error {
  margin: -2px 0 2px;
  padding: 10px 12px;
  border: 1px solid rgba(163, 58, 51, 0.55);
  border-radius: var(--radius);
  background: rgba(163, 58, 51, 0.14);
  color: #ffd7d4;
  font-size: 0.86rem;
}

.portal-load-banner {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 182, 18, 0.42);
  border-radius: var(--radius);
  background: #fff7df;
  color: #4d3500;
  font-weight: 800;
}

.ghost-button,
.nav-item,
.icon-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--ink);
  padding: 10px 13px;
  font-weight: 700;
  min-height: 40px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ghost-button:hover,
.nav-item:hover,
.icon-button:hover {
  border-color: rgba(255, 182, 18, 0.65);
  transform: translateY(-1px);
}

.demo-users {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.app-shell {
  min-height: 100vh;
  padding-left: 276px;
}

.sidebar {
  background:
    linear-gradient(rgba(18, 22, 26, 0.96), rgba(14, 16, 18, 0.98)),
    url("./assets/reside-global-sidebar-bg.jpg") center/cover;
  color: #fff;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  gap: 14px;
  min-height: auto;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 276px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 182, 18, 0.22);
}

.brand-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius);
}

.brand-row span {
  display: block;
  color: #d9d9d9;
  font-size: 0.82rem;
  margin-top: 2px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-auto-rows: minmax(44px, auto);
}

.nav-item {
  background: rgba(255, 255, 255, 0.035);
  color: #f3f5f6;
  border-color: rgba(255, 255, 255, 0.12);
  text-align: left;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  line-height: 1.2;
}

.nav-item.active {
  background: rgba(255, 182, 18, 0.14);
  color: #ffffff;
  border-color: rgba(255, 182, 18, 0.72);
  box-shadow: inset 4px 0 0 var(--gold);
}

.sidebar-logout-button {
  width: 100%;
  margin: 0;
  background: var(--gold);
  color: #151515;
  border-color: rgba(255, 182, 18, 0.68);
}

.leader-only-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.meeting-log-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 182, 18, 0.25);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.meeting-log-panel .form-grid {
  margin: 12px 0 14px;
}

.eod-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.eod-status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--panel-soft);
  font-weight: 800;
}

.eod-status-row b {
  color: #1d2329;
}

.memo-ack-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.82)),
    url("./assets/reside-global-sidebar-bg.jpg") center/cover;
}

.memo-ack-dialog {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 182, 18, 0.58);
  border-radius: var(--radius);
  background: #141820;
  color: #fff;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.memo-ack-dialog h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.03;
}

.memo-issued {
  margin: 0 0 18px;
  color: #d8dbe1;
}

.memo-ack-body {
  max-height: 270px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  line-height: 1.65;
}

.memo-ack-check {
  display: flex;
  grid-template-columns: none;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 10px;
  border: 1px solid rgba(46, 116, 83, 0.7);
  border-radius: var(--radius);
  background: rgba(46, 116, 83, 0.16);
  padding: 14px;
  color: #fff;
}

.memo-ack-check input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.memo-ack-dialog .primary-button {
  width: 100%;
  margin-top: 14px;
}

.activity-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.activity-status-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-status-row span,
.activity-status-row small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.activity-status-row b {
  color: var(--gold-dark);
}

.activity-status-row b.presence-active {
  color: var(--success);
}

.activity-status-row b.presence-idle {
  color: var(--warning);
}

.activity-status-row b.presence-offline {
  color: #8a1f2d;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar,
.section-heading,
.dialog-head,
.dialog-actions,
.toolbar,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar,
.section-heading,
.dialog-head,
.dialog-actions {
  justify-content: space-between;
}

.topbar {
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(18, 22, 26, 0.94), rgba(43, 48, 53, 0.82)),
    url("./assets/reside-global-banner.png") center/cover;
  color: #fff;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid rgba(255, 182, 18, 0.28);
  box-shadow: 0 18px 50px rgba(16, 16, 16, 0.12);
}

.topbar .eyebrow {
  color: var(--gold);
}

.topbar .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.view-panel {
  display: grid;
  gap: 18px;
}

.metric-grid,
.report-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.split-layout section,
.settings-grid section,
.queue-item,
.report-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--gold);
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.15;
}

.metric span,
.queue-item p,
.report-card p,
.section-heading span {
  color: var(--muted);
  font-size: 0.86rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compact-list,
.queue-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.internal-ticket-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
}

.internal-ticket-card h4,
.internal-ticket-card p {
  margin: 6px 0 0;
}

.internal-ticket-card details {
  margin-top: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.list-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ranking-row {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.ranking-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ranking-row strong {
  color: var(--ink);
}

.ranking-row span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.leader-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(255, 182, 18, 0.34);
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(16, 16, 16, 0.94), rgba(16, 16, 16, 0.78)),
    url("./assets/reside-global-banner.png") center/cover;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.13);
}

.leader-command-panel h3 {
  margin: 4px 0 8px;
  font-size: 1.65rem;
}

.leader-command-panel p {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.78);
}

.leader-command-metrics,
.end-day-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.leader-command-metrics article,
.end-day-summary article {
  border: 1px solid rgba(255, 182, 18, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.end-day-summary article {
  background: #fff8e3;
}

.leader-command-metrics strong,
.end-day-summary strong {
  display: block;
  font-size: 1.45rem;
}

.leader-command-metrics span,
.end-day-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leader-command-metrics span {
  color: rgba(255, 255, 255, 0.72);
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f9;
}

.segmented-control button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 900;
}

.segmented-control button.active {
  background: var(--gold);
  color: #151515;
}

.ranking-row-rich {
  grid-template-columns: auto minmax(0, 1fr) repeat(3, minmax(88px, auto));
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.ranking-row-rich.top-rank {
  border-color: rgba(255, 182, 18, 0.6);
  background: #fff9e8;
}

.rank-medal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #151515;
  color: var(--gold);
  font-weight: 900;
}

.rank-numbers {
  text-align: right;
}

.rank-numbers b {
  display: block;
  font-size: 1.2rem;
  color: var(--ink);
}

.rank-numbers small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.end-day-panel,
.memo-compose-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.audience-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  padding: 12px 14px;
}

.audience-preview strong {
  display: block;
  color: var(--ink);
}

.audience-preview p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ticket-employee-picker {
  display: grid;
  gap: 10px;
}

.picker-head {
  display: grid;
  gap: 4px;
}

.picker-head span {
  color: var(--muted);
  font-size: 0.86rem;
}

.ticket-picker-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipient-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.branch-checkbox-panel {
  display: grid;
  gap: 8px;
}

.branch-checkbox-panel > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.branch-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
}

.branch-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 182, 18, 0.42);
  border-radius: 8px;
  background: #fff8e6;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.branch-check-row input {
  width: auto;
  height: auto;
}

.employee-checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  padding: 10px;
}

.employee-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
  color: var(--ink);
}

.employee-check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.employee-check-row strong,
.employee-check-row small {
  display: block;
}

.employee-check-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.lead-meta-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.lead-meta-summary article {
  border: 1px solid rgba(255, 182, 18, 0.28);
  border-radius: 8px;
  background: #fffaf0;
  padding: 11px 12px;
}

.lead-meta-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-meta-summary strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.eod-row {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.eod-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.eod-row span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.smart-checklist-workbench,
.ai-sales-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.smart-checklist-workbench textarea {
  width: 100%;
  margin-top: 12px;
  min-height: 360px;
  font-size: 0.9rem;
}

.ai-sales-panel {
  margin-top: 16px;
  background: #101010;
  border-color: rgba(255, 182, 18, 0.32);
  color: #fff;
}

.ai-sales-panel .section-heading {
  margin-bottom: 10px;
}

.ai-sales-panel .section-heading h4 {
  margin: 0;
  color: #fff;
}

.ai-sales-insight {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 182, 18, 0.2);
  border-radius: 8px;
  background: rgba(255, 182, 18, 0.08);
  padding: 12px;
}

.ai-sales-insight strong {
  color: var(--gold);
}

.ai-sales-insight p,
.ai-sales-insight span {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.toolbar {
  flex-wrap: wrap;
}

.toolbar input {
  flex: 1 1 260px;
}

.toolbar select {
  max-width: 210px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.lead-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.lead-pagination-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-pagination-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #eef1f3;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #41474d;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff1c8;
  color: #5f4100;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.warning {
  background: #fff5df;
  border: 1px solid #e0b55d;
  color: #6f4c00;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 700;
}

dialog {
  width: min(900px, calc(100vw - 24px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  background: var(--panel);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

#leadForm {
  padding: 20px;
}

.dialog-head {
  border-bottom: 1px solid var(--line);
  margin: -20px -20px 0;
  padding: 16px 20px;
  background: #eef1f3;
}

.dialog-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.required-field {
  position: relative;
  color: var(--ink);
}

.required-field::after {
  content: " *";
  position: absolute;
  top: 0;
  right: 0;
  color: var(--danger);
  font-weight: 900;
}

.required-field input,
.required-field select,
.required-field textarea {
  border-color: rgba(255, 182, 18, 0.72);
  background: #fffdf7;
}

.required-field input:invalid,
.required-field select:invalid,
.required-field textarea:invalid {
  border-color: rgba(163, 58, 51, 0.78);
  outline-color: rgba(163, 58, 51, 0.16);
}

.destination-other-field {
  animation: fieldReveal 160ms ease;
}

.interview-field {
  animation: fieldReveal 160ms ease;
}

@keyframes fieldReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.wide {
  grid-column: 1 / -1;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
}

.dialog-actions {
  margin-top: 18px;
}

.handover-fieldset {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.handover-fieldset legend {
  padding: 0 8px;
  color: #55400d;
  font-weight: 900;
}

.quick-disposition-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.quick-disposition-panel span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-disposition-button {
  border: 1px solid rgba(186, 134, 0, 0.38);
  background: #fff7df;
  color: #3d2b07;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

.quick-disposition-button:hover {
  border-color: var(--gold);
  background: #ffe9a5;
}

.template-panel,
.history-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.lead-save-notice {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf7f1;
  color: #1f5a3e;
  font-weight: 800;
}

.lead-save-notice.warning {
  background: #fff7df;
  border-color: #e0b55d;
  color: #5c430d;
}

.primary-button.is-saved {
  background: #2f7452;
  color: #fff;
}

.history-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 900;
}

.history-panel summary small {
  color: var(--muted);
  font-weight: 700;
}

.history-panel .section-heading,
.template-panel .section-heading {
  margin-bottom: 8px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.template-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.template-grid h5 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.template-grid textarea {
  min-height: 132px;
  font-size: 0.84rem;
  resize: vertical;
}

.template-grid select {
  margin-bottom: 8px;
}

.template-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.template-actions button {
  width: 100%;
}

.checklist-card textarea {
  min-height: 220px;
}

.checklist-actions {
  grid-template-columns: 1fr auto;
}

.assistance-toggle {
  width: 100%;
  margin-top: 8px;
}

.assistance-selector {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.assistance-selector p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

#assistanceChecklist {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.assistance-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
}

.assistance-option input {
  margin-top: 3px;
}

.assistance-option span {
  font-weight: 900;
  color: var(--ink);
}

.assistance-option small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 700;
}

.email-review-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: 92vh;
  border: 1px solid rgba(255, 182, 18, 0.55);
  border-radius: var(--radius);
  padding: 0;
}

.email-review-dialog form {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.transfer-dialog {
  width: min(720px, calc(100vw - 28px));
  border: 1px solid rgba(255, 182, 18, 0.48);
  border-radius: var(--radius);
  padding: 0;
  background: var(--panel);
  color: var(--ink);
}

.transfer-dialog form {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.dialog-eyebrow {
  margin: 0 0 4px;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transfer-warning {
  border: 1px solid rgba(163, 58, 51, 0.25);
  border-radius: var(--radius);
  background: #fff1ee;
  padding: 12px;
}

.transfer-warning strong,
.transfer-warning p {
  margin: 0;
}

.transfer-warning strong {
  color: var(--danger);
}

.transfer-warning p {
  margin-top: 4px;
  color: #6b2d27;
  font-weight: 700;
}

.transfer-summary {
  margin: 0;
}

.email-review-dialog textarea {
  min-height: 330px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  line-height: 1.45;
}

.email-review-warning {
  border: 1px solid rgba(255, 182, 18, 0.42);
  border-radius: var(--radius);
  background: #fff7df;
  padding: 12px;
}

.email-review-warning strong,
.email-review-warning p {
  margin: 0;
}

.email-review-warning p {
  margin-top: 4px;
  color: #5f4a10;
  font-weight: 700;
}

.email-lead-summary {
  margin: 0;
}

.email-signature-box {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.email-signature-box strong,
.email-signature-box small {
  display: block;
}

.email-signature-box small {
  color: var(--muted);
  font-weight: 700;
}

.email-signature-preview {
  min-height: 42px;
  display: grid;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.email-signature-preview img,
.email-signature-review img {
  display: block;
  max-width: 220px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.email-signature-review {
  border: 1px solid rgba(255, 182, 18, 0.42);
  border-radius: var(--radius);
  background: #fffaf0;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.email-signature-review p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.muted-panel {
  background: #f7f8fa;
  border-color: var(--line);
}

.upload-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

select:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  background: #eef1f4;
  color: #5b6470;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.queue-item h4,
.queue-item p {
  margin: 0;
}

.danger-text {
  color: var(--danger);
  font-weight: 800;
}

.success-text {
  color: var(--success);
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .app-shell {
    padding-left: 0;
  }

  .sidebar {
    min-height: auto;
    position: static;
    width: auto;
  }

  .sidebar nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-grid,
  .report-grid,
  .settings-grid,
  .template-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .topbar,
  .top-actions,
  .queue-item {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    background-position: center;
  }

  .lead-meta-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace,
  .sidebar {
    padding: 14px;
  }

  .sidebar nav,
  .form-grid,
  .demo-users {
    grid-template-columns: 1fr;
  }

  .toolbar select {
    max-width: none;
  }

  .lead-meta-summary {
    grid-template-columns: 1fr;
  }
}
