/* SSI Live Agent — staff dashboard.

   Read at 8am by people who need one thing: who to call back. The phone number
   is the largest element on every card because calling is the action. Cyrillic
   coverage is a hard requirement — transcripts are Ukrainian and Russian — which
   is why Golos Text and IBM Plex Mono, not the usual UI faces. */

:root {
  --paper: #f6f7f9;
  --card: #ffffff;
  --ink: #131820;
  --body: #2a313c;
  --muted: #5c6675;
  --rule: #e2e6ec;
  --urgent: #c8102e;
  --urgent-tint: #fdf0f2;
  --done: #0f6e4f;
  --focus: #1b3a6b;
  --shadow: 0 1px 2px rgba(19, 24, 32, .04), 0 8px 24px -16px rgba(19, 24, 32, .18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: "Golos Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--focus); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* --- header ------------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top-inner {
  max-width: 760px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap;
}
.wordmark {
  font-weight: 600; font-size: 1rem; color: var(--ink);
  letter-spacing: -.01em; margin-right: auto; text-decoration: none;
}
.wordmark span { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 18px; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: .9rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

main { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }

/* --- page heading ------------------------------------------------------- */

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px;
}
h1 {
  font-size: 1.75rem; font-weight: 600; color: var(--ink);
  letter-spacing: -.02em; margin: 0 0 28px;
}
h1 .count {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500; color: var(--muted); font-size: 1.1rem; margin-left: 8px;
}

/* --- callback slips ----------------------------------------------------- */

.slip {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px;
  border-left: 3px solid var(--rule);
}
.slip.urgent { border-left-color: var(--urgent); background: linear-gradient(90deg, var(--urgent-tint), var(--card) 240px); }
.slip.done { opacity: .55; }

.slip-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
/* Without a separator these fields read as one run-on phrase. */
.slip-meta > :not(:first-child)::before {
  content: "·"; margin-right: 10px; color: #b6bec9;
}
.flag { color: var(--urgent); font-weight: 500; }
.tag-done { color: var(--done); font-weight: 500; }

.slip-name {
  font-size: 1.2rem; font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; margin: 8px 0 2px;
}
.slip-phone {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.65rem; font-weight: 500; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; margin: 2px 0 10px;
  border-bottom: 2px solid transparent;
}
.slip-phone:hover { border-bottom-color: var(--ink); }
.slip.urgent .slip-phone { color: var(--urgent); }
.slip-reason { margin: 0 0 14px; }
.slip-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 12px;
}

/* --- buttons and forms -------------------------------------------------- */

button, .button {
  font: inherit; font-size: .9rem; font-weight: 500;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
}
button:hover { background: #000; }
button.quiet, .button.quiet { background: #fff; color: var(--body); border-color: var(--rule); }
button.quiet:hover, .button.quiet:hover { background: var(--paper); color: var(--ink); }
button[disabled] { opacity: .45; cursor: default; }

select, input[type="password"], input[type="tel"], textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px;
}
textarea {
  width: 100%; min-height: 420px; line-height: 1.6;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .85rem;
}

/* --- call archive ------------------------------------------------------- */

.call { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.call:last-child { border-bottom: 0; }
.call-summary { margin: 8px 0; color: var(--body); }
.call-next { margin: 8px 0; color: var(--ink); }
details summary {
  cursor: pointer; font-size: .85rem; color: var(--focus);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.turn { margin: 8px 0; padding-left: 76px; position: relative; }
.turn b {
  position: absolute; left: 0; top: 2px; width: 64px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.turn.agent { color: var(--muted); }

/* --- panels, notices, empty states -------------------------------------- */

.panel {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px;
}
.panel h2 { font-size: 1rem; color: var(--ink); margin: 0 0 4px; font-weight: 600; }
.panel p.hint { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }

.notice {
  border: 1px solid var(--urgent); background: var(--urgent-tint);
  color: var(--urgent); border-radius: 10px; padding: 12px 16px; margin-bottom: 22px;
  font-size: .92rem;
}
.empty {
  border: 1px dashed var(--rule); border-radius: 12px; padding: 44px 20px;
  text-align: center; color: var(--muted);
}

/* --- login -------------------------------------------------------------- */

.login-wrap { max-width: 380px; margin: 14vh auto; padding: 0 20px; }
.login-wrap h1 { font-size: 1.35rem; margin-bottom: 6px; }
.login-wrap p { color: var(--muted); margin-top: 0; font-size: .92rem; }
.login-wrap input { width: 100%; margin-bottom: 12px; }
.login-wrap button { width: 100%; }
.login-error { color: var(--urgent); font-size: .9rem; margin-bottom: 12px; }

@media (max-width: 560px) {
  .slip-phone { font-size: 1.45rem; }
  .turn { padding-left: 0; }
  .turn b { position: static; display: block; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Settings: who may receive handoffs to a colleague. */
.directory { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: .95rem; }
.directory th, .directory td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--rule); vertical-align: top; }
.directory thead th { border-top: none; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.directory small { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: .8rem; }
.directory input[type="text"] { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink); }
input.short { width: 5em; font: inherit; padding: 4px 6px; border: 1px solid var(--rule); border-radius: 6px; }
@media (max-width: 720px) { .directory { display: block; overflow-x: auto; } }
