/* Advisor console. Token names follow apps/site/src/styles/tokens.css; :root is the console's one palette, the
   in-call panel (console.css) included. One-handed: actions sit in the bottom half of the screen, every target is at
   least 48px tall. Class names the in-call panel reuses (.actions, .big, .context, .dock) are scoped to .console. */
:root {
  --c-paper: #f2f3f0;
  --c-surface: #ffffff;
  --c-line: #d8dad3;
  --c-ink-muted: #5c6072;
  --c-ink: #1a1e33;
  --c-on-ink: #ffffff;
  --c-accent: #c4262e;
  --c-accent-tint: #f8e3e4;
  --c-on-accent: #ffffff;
  --c-link: #223f92;
  --c-line-strong: #8a8d98;
  --c-ok-ink: #14532d;
  --c-ok-tint: #dcf2e3;
  --c-warn-ink: #7a3e00;
  --c-warn-tint: #fdeccb;
  --c-focus: #223f92;
  --t-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --tap: 3.5rem;
}

* {
  box-sizing: border-box;
}
html,
body,
#root {
  height: 100%;
  margin: 0;
}
body {
  font: 1.0625rem/1.5 var(--t-body);
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + var(--s-3)) var(--s-4)
    calc(env(safe-area-inset-bottom) + var(--s-4));
}
.muted {
  color: var(--c-ink-muted);
}
.small {
  font-size: 0.875rem;
}

.signin {
  justify-content: flex-end;
  gap: var(--s-3);
}
.signin form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.signin label {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-weight: 600;
}
.signin input {
  min-height: var(--tap);
  padding: 0 var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9375rem;
}
.signin input[type='email'] {
  font-family: inherit;
  font-size: 1rem;
}
.error {
  color: var(--c-accent);
  margin: 0;
}

button {
  min-height: var(--tap);
  padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  font-weight: 650;
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
}
.primary {
  background: var(--c-ink);
  color: var(--c-on-ink);
}
.secondary {
  background: var(--c-surface);
  color: var(--c-ink);
  border-color: var(--c-ink);
}
.link {
  min-height: 3rem;
  padding: 0 var(--s-2);
  background: none;
  color: var(--c-ink-muted);
  text-decoration: underline;
}
.console .big {
  width: 100%;
  min-height: 4rem;
  font-size: 1.125rem;
}

.bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.bar .link {
  margin-left: auto;
}
.pill {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-pill);
  font-weight: 700;
  background: var(--c-line);
}
.pill[data-status='online'] {
  background: var(--c-ok-tint);
  color: var(--c-ok-ink);
}
.pill[data-status='away'] {
  background: var(--c-warn-tint);
  color: var(--c-warn-ink);
}
.banner {
  margin: var(--s-3) 0 0;
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--c-warn-tint);
  color: var(--c-warn-ink);
}

/* the queue grows from the bottom, so the newest call lands under the thumb */
.queue {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--s-3);
  padding: var(--s-4) 0;
}
.empty {
  text-align: center;
  margin: auto 0;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}
.card {
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}
.card h2 {
  margin: 0;
  font-size: 1.25rem;
}
.card p {
  margin: var(--s-2) 0 var(--s-4);
}
.offer {
  border: 2px solid var(--c-accent);
  background: var(--c-accent-tint);
}
.offer header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--c-accent);
}
.console .actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-3);
}
.offer .primary {
  min-height: 4rem;
  background: var(--c-accent);
}
.accepted button {
  width: 100%;
}
/* label above value: long product refs and paths wrap instead of squeezing the label */
.console .context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-3);
  margin: 0 0 var(--s-4);
}
.console .context div {
  min-width: 0;
}
.console .context dt {
  font-size: 0.8125rem;
  color: var(--c-ink-muted);
}
.console .context dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.console .dock {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  text-align: center;
}
.console .dock p {
  margin: 0;
}
.appointments {
  max-height: 40vh;
  overflow-y: auto;
  padding: var(--s-3) 0 0;
}
.appointments h2 {
  margin: 0 0 var(--s-2);
  font-size: 1rem;
}
.appointments h3 {
  margin: var(--s-3) 0 var(--s-2);
  font-size: 0.875rem;
}
.appointments h3::first-letter {
  text-transform: uppercase;
}
.appointments ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.appointments li {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--c-line);
}
.appointments .time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.appointments .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
.appointments a {
  color: var(--c-ink);
  font-weight: 600;
  padding: var(--s-2) 0;
}
