:root {
  --paper: #f5f1e8;
  --paper-deep: #ece6d9;
  --ink: #14271f;
  --ink-2: #294037;
  --muted: #6f7c76;
  --line: rgba(20, 39, 31, 0.14);
  --lime: #d9ff63;
  --mint: #cae7d8;
  --coral: #ff725e;
  --white: #fffdf8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 82% 5%, rgba(202, 231, 216, .62), transparent 22rem), var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: wait; opacity: .58; }
.app-shell { max-width: 1280px; margin: 0 auto; padding: 0 36px 42px; }

.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--lime); font-size: 18px; transform: rotate(-10deg); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.topbar-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4b9d64; box-shadow: 0 0 0 4px rgba(75,157,100,.12); }
.live-dot.sync-loading { background: #d0a12c; }
.live-dot.sync-error { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,114,94,.14); }
.date-label { color: var(--ink); text-transform: capitalize; padding-left: 18px; margin-left: 10px; border-left: 1px solid var(--line); }

.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .78fr); gap: 64px; padding: 66px 0 58px; align-items: center; }
.intro-copy { padding-left: 8px; }
.eyebrow { margin: 0 0 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 20px; height: 2px; background: var(--coral); display: inline-block; }
.intro h1 { font-size: clamp(48px, 6vw, 82px); line-height: .91; letter-spacing: -.075em; margin: 0; max-width: 760px; font-weight: 750; }
.intro h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--ink-2); }
.intro-lede { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 530px; margin: 27px 0 29px; }
.team-strip { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.team-person { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 650; background: rgba(255,253,248,.6); }
.team-person b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--lime); font-size: 10px; }
.team-person-2 b { background: var(--mint); }
.team-person-3 b { background: #f6c8bd; }

.add-card { background: var(--ink); color: var(--white); padding: 28px; border-radius: 28px 28px 8px 28px; box-shadow: 0 24px 64px rgba(20,39,31,.17); display: grid; grid-template-columns: 1.35fr .65fr; gap: 17px; position: relative; overflow: hidden; }
.add-card::after { content: ""; position: absolute; width: 140px; height: 140px; border: 34px solid rgba(217,255,99,.07); border-radius: 50%; right: -60px; top: -62px; pointer-events: none; }
.add-card-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; }
.add-card-heading > div { display: flex; align-items: center; gap: 10px; }
.add-card h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.step-number { font: 600 10px/1 monospace; color: var(--lime); border: 1px solid rgba(217,255,99,.36); border-radius: 99px; padding: 6px 8px; }
.queue-position { font-size: 11px; color: rgba(255,253,248,.58); }
.field { display: grid; gap: 8px; }
.field > span, .executive-picker legend { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,253,248,.58); font-weight: 650; }
.field input { width: 100%; height: 52px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.075); color: white; border-radius: 12px; outline: none; padding: 0 14px; color-scheme: dark; }
.field input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(217,255,99,.1); }
.input-wrap { display: flex; align-items: center; height: 52px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.075); border-radius: 12px; overflow: hidden; }
.input-wrap:focus-within { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(217,255,99,.1); }
.input-wrap > span { padding-left: 14px; color: var(--lime); font-weight: 750; }
.input-wrap input { border: 0; background: transparent; box-shadow: none; padding-left: 8px; }
.input-wrap input::placeholder { color: rgba(255,255,255,.38); }
.executive-picker { grid-column: 1 / -1; border: 0; padding: 2px 0 0; margin: 0; min-width: 0; }
.executive-picker legend { margin-bottom: 9px; }
.executive-picker > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.executive-picker button { border: 1px solid rgba(255,255,255,.14); background: transparent; color: rgba(255,253,248,.74); border-radius: 12px; height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; }
.executive-picker button span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: 9px; }
.executive-picker button.selected { background: var(--white); color: var(--ink); border-color: var(--white); font-weight: 700; }
.executive-picker button.selected span { background: var(--lime); }
.add-button { grid-column: 1 / -1; height: 54px; border: 0; border-radius: 13px; background: var(--lime); color: var(--ink); font-weight: 760; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, background .15s; }
.add-button:hover { background: #e3ff8b; transform: translateY(-1px); }
.add-button > span:first-child { font-size: 20px; }

.summary { display: grid; grid-template-columns: 1.25fr .8fr .8fr auto; align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 112px; }
.summary-main, .summary-item { border-right: 1px solid var(--line); }
.summary-main { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 15px; padding: 18px 28px 18px 8px; }
.summary-main > span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.summary-main strong { font: 700 46px/1 monospace; letter-spacing: -.07em; }
.summary-main small { color: var(--muted); font-size: 12px; max-width: 80px; line-height: 1.35; }
.summary-item { display: flex; gap: 13px; align-items: center; justify-content: center; padding: 20px; }
.summary-item div { display: grid; }
.summary-item strong { font-size: 22px; line-height: 1; }
.summary-item div span { margin-top: 5px; font-size: 11px; color: var(--muted); }
.summary-icon { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.summary-icon-done { background: var(--mint); }
.summary-icon-missed { background: rgba(255,114,94,.18); color: #bc493b; }
.refresh-button { margin: auto 0 auto 24px; border: 1px solid var(--line); border-radius: 99px; padding: 10px 15px; background: rgba(255,253,248,.55); color: var(--ink); font-size: 12px; font-weight: 650; }
.refresh-button:hover { border-color: var(--ink); }

.queue-section { padding-top: 66px; }
.queue-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.queue-heading h2 { font-size: 34px; letter-spacing: -.045em; margin: 0; }
.queue-heading .eyebrow { margin-bottom: 9px; }
.view-tabs { display: flex; background: var(--paper-deep); padding: 4px; border-radius: 999px; }
.view-tabs button { border: 0; background: transparent; color: var(--muted); padding: 9px 13px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.view-tabs button.active { background: var(--ink); color: white; }
.view-tabs button span { font: 650 10px/1 monospace; margin-left: 5px; opacity: .7; }
.queue-card { background: rgba(255,253,248,.68); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-height: 240px; }
.queue-columns, .call-row { display: grid; grid-template-columns: 74px 104px minmax(200px,1.3fr) minmax(135px,.8fr) minmax(140px,.85fr) minmax(126px,.75fr); align-items: center; }
.queue-columns[hidden] { display: none; }
.queue-columns { min-height: 46px; padding: 0 18px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.call-row { min-height: 82px; padding: 0 18px; border-bottom: 1px solid var(--line); transition: background .15s; }
.call-row:last-child { border-bottom: 0; }
.call-row:hover { background: rgba(255,255,255,.68); }
.order-cell { display: flex; align-items: center; gap: 10px; font: 700 12px/1 monospace; color: var(--muted); }
.order-cell i { height: 26px; width: 2px; border-radius: 9px; background: var(--lime); }
.status-calling .order-cell i { background: #67a9ff; }
.status-contacted .order-cell i { background: #6fbc83; }
.status-no_answer .order-cell i { background: var(--coral); }
.row-time input { width: 78px; border: 0; padding: 7px 4px; background: transparent; color: var(--ink); font: 700 14px/1 monospace; outline: none; }
.row-time input:focus { background: var(--paper-deep); border-radius: 7px; }
.row-time input::-webkit-calendar-picker-indicator { display: none; }
.phone-link { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 11px; min-width: 0; }
.phone-disc { width: 35px; height: 35px; flex: 0 0 auto; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-size: 13px; transform: rotate(-8deg); }
.phone-link strong { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.phone-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.row-select select, .status-select select { max-width: 132px; width: 100%; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 8px 28px 8px 11px; font-size: 11px; font-weight: 650; outline: none; }
.status-select select { max-width: 136px; }
.status-select-pending select { background: rgba(217,255,99,.32); }
.status-select-calling select { background: rgba(103,169,255,.16); }
.status-select-contacted select { background: rgba(111,188,131,.18); }
.status-select-no_answer select { background: rgba(255,114,94,.15); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.row-actions button { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 8px 10px; font-size: 10px; font-weight: 700; }
.row-actions button:hover { border-color: var(--ink); background: var(--ink); color: white; }
.row-actions .delete-button { width: 30px; height: 30px; padding: 0; font-size: 17px; color: var(--muted); }
.queue-note { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mobile-label { display: none; }

.empty-state, .loading-state { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px; }
.empty-state .eyebrow { margin: 17px 0 7px; }
.empty-state h3 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.empty-state > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.empty-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-size: 23px; transform: rotate(-8deg); }
.loading-state p { color: var(--muted); font-size: 13px; }
.loading-ring { width: 30px; height: 30px; border: 3px solid var(--paper-deep); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { display: flex; justify-content: space-between; align-items: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: 80px; padding: 25px 4px 0; font-size: 11px; }
footer span { color: var(--ink); font-weight: 700; }
footer p { margin: 0; }
.notice { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: min(380px,calc(100vw - 48px)); padding: 13px 17px; border-radius: 12px; box-shadow: 0 16px 45px rgba(20,39,31,.2); font-size: 13px; font-weight: 650; animation: notice-in .2s ease-out; }
.notice-ok { background: var(--ink); color: white; }
.notice-error { background: #a33e32; color: white; }
@keyframes notice-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 980px) {
  .intro { grid-template-columns: 1fr; gap: 40px; }
  .intro-copy { padding-left: 0; }
  .add-card { max-width: 680px; }
  .summary { grid-template-columns: 1fr 1fr 1fr; }
  .refresh-button { grid-column: 1 / -1; margin: 12px auto; }
  .queue-columns { display: none; }
  .call-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 12px; }
  .call-row { display: grid; grid-template-columns: 48px 1fr; gap: 15px 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; min-height: 0; }
  .call-row:last-child { border-bottom: 1px solid var(--line); }
  .order-cell { grid-row: 1 / 5; align-self: stretch; align-items: flex-start; flex-direction: column; }
  .order-cell i { width: 26px; height: 2px; }
  .row-time, .phone-link, .row-select, .status-select, .row-actions { grid-column: 2; }
  .row-time input { font-size: 20px; width: 110px; }
  .mobile-label { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
  .phone-link strong { font-size: 17px; }
  .row-select select, .status-select select { max-width: 100%; }
  .row-actions { justify-content: flex-start; }
}

@media (max-width: 650px) {
  .app-shell { padding: 0 18px 30px; }
  .topbar { min-height: 74px; }
  .topbar-meta > span:not(.live-dot):not(.date-label) { display: none; }
  .date-label { padding-left: 0; margin-left: 2px; border-left: 0; font-size: 10px; max-width: 100px; text-align: right; }
  .intro { padding: 47px 0 42px; }
  .intro h1 { font-size: 49px; }
  .intro-lede { font-size: 15px; }
  .team-person { padding-right: 8px; font-size: 10px; }
  .add-card { grid-template-columns: 1fr; padding: 22px; border-radius: 22px 22px 7px 22px; }
  .add-card-heading, .field, .executive-picker, .add-button { grid-column: 1; }
  .queue-position { display: none; }
  .executive-picker > div { gap: 5px; }
  .executive-picker button { font-size: 10px; }
  .executive-picker button span { display: none; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary-main { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); justify-content: center; padding-left: 0; }
  .summary-item:nth-child(3) { border-right: 0; }
  .queue-section { padding-top: 50px; }
  .queue-heading { align-items: flex-start; flex-direction: column; }
  .queue-heading h2 { font-size: 29px; }
  .view-tabs { width: 100%; }
  .view-tabs button { flex: 1; }
  .call-list { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
