/* MeetBitch — dark, mobile-first, one accent. */
:root {
  --bg: #15121b;
  --bg-2: #1e1a27;
  --bg-3: #272232;
  --line: #352e44;
  --text: #ece7f2;
  --muted: #a79fb8;
  --accent: #ff4d8d;
  --accent-ink: #1a0810;
  --ok: #5fd3a0;
  --warn: #ffb454;
  --err: #ff6b6b;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f2fa; --bg-2: #ffffff; --bg-3: #efe9f5; --line: #ddd4e8;
    --text: #1d1726; --muted: #6b6280; --accent: #d11d64; --accent-ink: #fff;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); min-height: 100dvh; }
a { color: inherit; }
h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; }
h2.h-small { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .error { color: var(--err); margin: .5rem 0; }
code, .code-block { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.code-block { display: block; background: var(--bg-3); padding: .5rem .75rem; border-radius: 8px; word-break: break-all; margin-bottom: .5rem; }

/* layout */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 16px; padding-top: max(.75rem, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; letter-spacing: -.01em; }
.brand--big { font-size: 1.6rem; }
.brand__dot { width: .7em; height: .7em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.nav { display: flex; gap: .25rem; }
.nav a { text-decoration: none; padding: .4rem .7rem; border-radius: 999px; color: var(--muted); font-size: .95rem; }
.nav a.is-active { color: var(--text); background: var(--bg-3); }
.page { max-width: 760px; margin: 0 auto; padding: 1rem 16px 4rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .5rem 0 1rem; flex-wrap: wrap; }
.page-head--stack { align-items: flex-start; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.flash { background: color-mix(in srgb, var(--ok) 15%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); padding: .6rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.empty { text-align: center; padding: 2rem 1rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row--center { align-items: center; }
.row--between { justify-content: space-between; }
.cta p { margin: 0 0 .75rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.danger { margin-top: 2rem; }

@media (max-width: 560px) {
  .top { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .nav { width: 100%; overflow-x: auto; }
}

/* buttons */
.btn { appearance: none; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: inherit; font-weight: 600; padding: .6rem 1rem; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn--danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.btn--small { padding: .35rem .8rem; min-height: 36px; font-size: .9rem; }
.btn--block { width: 100%; justify-content: center; }
.btn--rec { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-size: 1.1rem; padding: .9rem 1.6rem; }
.btn[disabled] { opacity: .5; cursor: default; }

/* forms */
.form label { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .95rem; }
.form label .muted { font-weight: 400; }
.form label > span.small { display: block; font-weight: 400; margin-bottom: .2rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; margin-top: .3rem; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: inherit; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.row > input[type=text] { flex: 1; margin-top: 0; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1rem; }
fieldset.field legend { font-weight: 600; margin-bottom: .3rem; padding: 0; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .4rem; margin-top: .4rem; }
.people-grid .check { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-3); }
.people-grid .check:has(input:checked) { border-color: var(--accent); }
.filters { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters input, .filters select { margin: 0; flex: 1; min-width: 140px; }
.login-body { display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 380px; }
.login .brand { margin-bottom: .25rem; }
.login__tagline { margin: 0 0 1.25rem; }
.login .error { margin: 0 0 .9rem; }
.login .btn { margin-top: .25rem; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.list--plain { gap: .25rem; }
.list__item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.list__link { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; text-decoration: none; }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 600; }
.list__meta { color: var(--muted); font-size: .85rem; }
.badge { font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--bg-3); color: var(--muted); white-space: nowrap; }
.badge--recording { background: color-mix(in srgb, var(--accent) 20%, var(--bg-3)); color: var(--accent); }
.badge--processing, .badge--transcribing, .badge--summarizing { color: var(--warn); }
.badge--labeling, .badge--review { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, var(--bg-3)); }
.badge--sent { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, var(--bg-3)); }
.badge--failed { color: var(--err); background: color-mix(in srgb, var(--err) 15%, var(--bg-3)); }
.avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--muted); flex: none; }
.avatar--sm { width: 1.6rem; height: 1.6rem; font-size: .65rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.chip { border: 1px solid var(--line); background: var(--bg-3); color: var(--text); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.chip--suggest { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.seg-control { display: inline-flex; background: var(--bg-3); border-radius: 999px; padding: .2rem; }
.seg-control a { text-decoration: none; padding: .35rem .9rem; border-radius: 999px; color: var(--muted); font-size: .9rem; }
.seg-control a.is-active { background: var(--bg-2); color: var(--text); }
.qr { width: 140px; height: 140px; background: #fff; padding: 6px; border-radius: 10px; }

/* tasks */
.tasklist { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task__main { display: flex; flex-direction: column; }
.task__title { font-weight: 600; }
.task__meta { color: var(--muted); font-size: .85rem; }
.task.is-done .task__title { text-decoration: line-through; color: var(--muted); }

/* recorder */
.recorder { text-align: center; }
.rec-display { padding: 1rem 0 .5rem; }
.rec-time { font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; }
.rec-state { color: var(--muted); margin: .4rem 0 .8rem; }
.rec-state.is-live { color: var(--accent); }
.rec-meter { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; max-width: 320px; margin: 0 auto; }
.rec-meter__bar { height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.rec-buttons { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: .5rem 0; }
.upload-alt { text-align: left; margin-top: 1rem; }
.upload-alt summary { cursor: pointer; color: var(--muted); }
.upload-alt form { margin-top: .5rem; }
.progress-steps { display: flex; flex-direction: column; gap: .4rem; }
.step { padding: .5rem .8rem; border-radius: 8px; background: var(--bg-3); color: var(--muted); }
.step.is-active { color: var(--text); border: 1px solid var(--accent); }
.step.is-done { color: var(--ok); }
@media (prefers-reduced-motion: no-preference) {
  .step.is-active { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { border-color: color-mix(in srgb, var(--accent) 30%, transparent); } }
}

/* transcript */
.player { width: 100%; margin-bottom: .75rem; }
.transcript { display: flex; flex-direction: column; gap: .5rem; max-height: 60vh; overflow: auto; }
.seg { display: grid; grid-template-columns: auto auto 1fr; gap: .5rem; align-items: baseline; font-size: .95rem; }
.seg__time { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; }
.seg__who { font-weight: 600; color: var(--accent); white-space: nowrap; }
@media (max-width: 560px) { .seg { grid-template-columns: auto 1fr; } .seg__text { grid-column: 1 / -1; } }

/* who is who */
.speaker__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.speaker__name { font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.samples { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .75rem; }
.sample { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: .92rem; cursor: pointer; }
.sample__play { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .7rem; }
.sample.is-playing { border-color: var(--accent); }
.sample.is-playing .sample__play::before { content: '❚❚'; }
.sample.is-playing .sample__play { font-size: 0; }
.sample.is-playing .sample__play::before { font-size: .6rem; }
.speaker label { display: block; font-weight: 600; }
.speaker select.is-dup { outline: 2px solid var(--warn); }
.newname { margin-top: .5rem; }

/* minutes review */
.minutes textarea { line-height: 1.45; }
.minutes h3.h-small { margin-top: 1.25rem; }
.taskedit { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .6rem; }
.taskedit__row { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; background: var(--bg-3); display: flex; flex-direction: column; gap: .4rem; }
.taskedit__row input, .taskedit__row select { margin: 0; background: var(--bg-2); }
.taskedit__row.is-done { opacity: .6; }
.taskedit__meta { display: grid; grid-template-columns: 1fr auto auto; gap: .4rem; align-items: center; }
.taskedit__meta input[type=date] { width: auto; }
.taskedit__details { font-size: .9rem; }
@media (max-width: 560px) { .taskedit__meta { grid-template-columns: 1fr 1fr; } .taskedit__meta .check { grid-column: 1 / -1; } }
.actions--sticky { position: sticky; bottom: 0; background: var(--bg-2); padding: .75rem 0 .25rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.regen { margin-top: 1rem; }
.regen p { margin: .5rem 0; }
.task__toggle { margin: 0; }
.tick { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--line); background: transparent; color: var(--accent-ink); cursor: pointer; font-size: .9rem; line-height: 1; display: grid; place-items: center; }
.tick.is-on { background: var(--ok); border-color: var(--ok); }
.mail-preview { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: .5rem; }
.filters--wrap input[type=date] { flex: 0 1 150px; }
.results li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.results li:last-child { border-bottom: 0; }
.results a { text-decoration: none; }
.snip { color: var(--muted); font-size: .92rem; }
mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.seg:target { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 6px; }
@media (max-width: 560px) { .nav a { padding: .4rem .5rem; font-size: .88rem; } }
.speaker__head .small { white-space: nowrap; }

/* chat */
.chat { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.bubble { padding: .75rem 1rem; border-radius: 16px; max-width: 92%; }
.bubble--q { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.bubble--a { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble--a p { margin: 0 0 .6rem; } .bubble--a p:last-child { margin-bottom: 0; }
.bubble--a ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.bubble--notfound { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.cite { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 .35rem; border-radius: 6px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); text-decoration: none; vertical-align: super; line-height: 1.4; margin: 0 1px; }
.sources { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.source { font-size: .85rem; text-decoration: none; color: var(--muted); }
.source:hover { color: var(--text); }
.source .cite { vertical-align: baseline; }
.debug { margin-top: .5rem; }
.chat-form textarea { margin: 0 0 .5rem; }
.chip--example { text-align: left; white-space: normal; }
.nav a { white-space: nowrap; flex: none; }
@media (max-width: 560px) {
  .nav { margin: 0 -16px; padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
}
