/* Meeting Assist: shared styles for the login, dashboard and stream pages. Light and dark follow the system. */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f0f2f5; --line: #e2e5ea; --line-2: #d3d8df;
  --text: #121620; --muted: #5f6b7d; --faint: #8b95a5;
  --accent: #2d5be3; --accent-hover: #2149c4; --accent-ink: #ffffff; --accent-soft: #e9effd;
  --ok: #138a4b; --ok-soft: #e2f5ea; --warn: #a15c07; --warn-soft: #fdf1df; --bad: #c8312a; --bad-soft: #fbe8e6;
  --help: #e8590c; --help-hover: #c94d0a; --purple: #7c3aed; --purple-soft: #f1eafe;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --radius: 12px; --radius-sm: 8px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e12; --panel: #14171d; --panel-2: #1a1e26; --line: #242a34; --line-2: #313846;
    --text: #e8ebf0; --muted: #9aa4b4; --faint: #6c7586;
    --accent: #5b82f6; --accent-hover: #7395f8; --accent-ink: #ffffff; --accent-soft: #1b2440;
    --ok: #3ccf7e; --ok-soft: #11281c; --warn: #f2a93b; --warn-soft: #2c2111; --bad: #f47067; --bad-soft: #321716;
    --help: #f76b1c; --help-hover: #ff8540; --purple: #a78bfa; --purple-soft: #261c3d;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
kbd { font: 11px var(--mono); padding: 1px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .7; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; font-size: 15px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.crumb { color: var(--faint); }
.crumb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; text-decoration: none !important; }
.btn:hover { background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.done { color: var(--ok); border-color: var(--ok); }
input[type=text], input[type=password], input:not([type]) { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 8px 12px; min-width: 0; }
input:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.field { display: grid; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }

/* Layout */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.section { margin-top: 36px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.live { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.live::before { animation: pulse 1.6s ease-in-out infinite; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
@keyframes pulse { 50% { opacity: .25; } }

/* Copy field: a value in monospace + a Copy button */
.copy-field { display: flex; gap: 8px; align-items: stretch; }
.copy-field code { flex: 1; min-width: 0; font: 13px/1.4 var(--mono); padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2);
  border: 1px solid var(--line); overflow-x: auto; white-space: nowrap; user-select: all; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; transition: .18s; z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* Menu (details/summary) */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; padding: 6px; display: grid; gap: 2px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
details.menu .menu-list button { text-align: left; justify-content: flex-start; border: 0; width: 100%; }

@media (max-width: 640px) {
  .topbar { padding: 8px 16px; gap: 8px; }
  .page { padding: 20px 16px 48px; }
  .who { display: none; }
}
