/* Teambuilding, the page's styles (copied from the Talk Now lab's, trimmed). */
:root {
  --ink: #1d1b22;
  --muted: #6b6775;
  --line: #e4e1ea;
  --paper: #ffffff;
  --wash: #f7f5fa;
  --accent: #3a2150;
  --accent-soft: #b896d4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

h1 { font-size: 26px; margin: 0 0 4px; color: var(--accent); }

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

.top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead { font-size: 18px; margin: 0; }
.fine { font-size: 12.5px; color: var(--muted); margin: 0; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }

input[type=tel], input[type=text], input[type=time], select {
  font: inherit;
  color: var(--ink);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

input:focus-visible, button:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.55; cursor: default; }

button.primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
}

button.quiet {
  background: var(--paper);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}

button.link { background: none; border: 0; color: var(--accent); padding: 4px 0; text-decoration: underline; }

.notice { border-radius: 10px; padding: 10px 12px; background: #efe9f6; color: var(--accent); margin: 0 0 12px; }

.card + .card { margin-top: 12px; }
a.link { color: var(--accent); }

/* The conversation (member's page and the admin's views) and the admin page. */
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { border-radius: 12px; padding: 8px 12px; max-width: 90%; overflow-wrap: anywhere; }
.msg.member { align-self: flex-end; background: var(--accent); color: #fff; }
.msg.agent { align-self: flex-start; background: var(--wash); border: 1px solid var(--line); }
.msg .who { display: block; font-size: 11.5px; opacity: 0.75; }
.shell.wide { max-width: 980px; }
textarea, input[type=number] {
  font: inherit; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); width: 100%;
}
textarea { min-height: 7em; resize: vertical; }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
pre.prompt, pre.diff { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; background: var(--wash);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.tag { font-size: 12px; border-radius: 8px; padding: 1px 6px; background: #efe9f6; color: var(--accent); }
.bad { color: #9b1c31; }
.grow { flex: 1; }

/* The admin page's activity numbers and the reset buttons (MOD-2187). */
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 110px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted, #666); }
#analytics table.grid { margin-bottom: 14px; }
button.bad { background: #fff; color: #9b1c31; border: 1px solid #9b1c31; border-radius: 8px; padding: 8px 14px; cursor: pointer; }

/* What the host remembers (MOD-2188). */
ul.facts { list-style: none; padding: 0; margin: 0; }
ul.facts li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Feedback (MOD-2189). */
.planned { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.planned ul { margin: 4px 0 0; padding-left: 18px; }
td.actions button { margin-right: 6px; }
#team-feedback textarea { width: 100%; box-sizing: border-box; }

/* Invites (MOD-2208). */
.invite-text { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
a.button { display: inline-block; text-decoration: none; }

/* Pill buttons and the Links card (MOD-2228). */
.pill { display: inline-block; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600;
        background: var(--accent); color: #fff; border: 1px solid var(--accent); text-decoration: none; cursor: pointer; }
.pill.quiet { background: var(--paper); color: var(--accent); border-color: var(--line); }
.pill:disabled { opacity: 0.55; cursor: default; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
td.actions .pill { margin: 2px 4px 2px 0; }

/* Collapsible widgets on /chat (MOD-2238). */
details.fold > summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; padding: 2px 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸'; display: inline-block; width: 1.1em; color: var(--accent); }
details.fold[open] > summary::before { content: '▾'; }
details.fold[open] > summary { margin-bottom: 8px; }
