:root {
  --bg: #f4f3fb;
  --bg-glow-1: rgba(124, 92, 255, 0.18);
  --bg-glow-2: rgba(56, 189, 248, 0.14);
  --card: rgba(255, 255, 255, 0.84);
  --card-solid: #ffffff;
  --card-border: rgba(20, 16, 60, 0.08);
  --surface: #eeecf8;
  --text: #1a1830;
  --muted: #6d6a86;
  --faint: #a6a3bd;
  --accent: #6d4aff;
  --accent-2: #3aa8f0;
  --accent-soft: rgba(109, 74, 255, 0.1);
  --danger: #e23b58;
  --danger-soft: rgba(226, 59, 88, 0.1);
  --success: #12935f;
  --success-soft: rgba(18, 147, 95, 0.12);
  --warn: #b7791f;
  --warn-soft: rgba(214, 158, 46, 0.14);
  --speaker-l: 45%;
  --shadow: 0 1px 2px rgba(20, 16, 60, 0.04), 0 12px 32px -12px rgba(20, 16, 60, 0.16);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e17;
    --bg-glow-1: rgba(124, 92, 255, 0.22);
    --bg-glow-2: rgba(56, 189, 248, 0.1);
    --card: rgba(26, 24, 40, 0.8);
    --card-solid: #1c1a2b;
    --card-border: rgba(255, 255, 255, 0.08);
    --surface: #26243b;
    --text: #ecebf5;
    --muted: #a19eb8;
    --faint: #5f5c78;
    --accent: #8f74ff;
    --accent-2: #4cb6f5;
    --accent-soft: rgba(143, 116, 255, 0.15);
    --danger: #ff5c78;
    --danger-soft: rgba(255, 92, 120, 0.13);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.13);
    --warn: #f6c35c;
    --warn-soft: rgba(246, 195, 92, 0.13);
    --speaker-l: 72%;
    --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 100% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, var(--bg-glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-family: Vazirmatn, Tahoma, system-ui, sans-serif;
  line-height: 1.8;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i { display: inline-flex; flex-shrink: 0; }
.i svg { width: 1.15em; height: 1.15em; }

/* ---------- Layout ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.app {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 16px 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.boot { display: grid; place-items: center; min-height: 60vh; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand strong { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px -8px var(--accent);
}
.logo .i svg { width: 24px; height: 24px; stroke-width: 2.4; }
.logo.big { width: 72px; height: 72px; border-radius: 22px; }
.logo.big .i svg { width: 38px; height: 38px; }

/* ---------- User menu ---------- */

.user-menu { position: relative; }
.avatar-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback { font-weight: 700; text-transform: uppercase; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 16px;
  background: var(--card-solid);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.user-menu.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu-user { padding: 6px 10px 10px; border-bottom: 1px solid var(--card-border); margin-bottom: 6px; }
.menu-user strong { display: block; }
.menu-user span { color: var(--muted); font-size: 0.85rem; direction: ltr; display: block; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  text-align: right;
}
.menu-item:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Cards & common controls ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.actions { display: flex; gap: 4px; }

.input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { width: auto; padding-block: 6px; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: #fff; background: var(--danger); }
.btn.ghost { background: var(--surface); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.text-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }

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

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid var(--surface);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */

.login {
  max-width: 440px;
  margin: 5vh auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login h1 { margin: 16px 0 4px; font-size: 2rem; font-weight: 800; }
.login-sub { margin: 0 0 20px; color: var(--muted); }
.login-features { width: 100%; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: right; }
.login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
}
.login-features .i { color: var(--accent); }
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 26px;
  border-radius: 14px;
  background: var(--card-solid);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}
.google-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.google-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.g-logo svg { width: 22px; height: 22px; display: block; stroke: none; }
.auth-card { width: 100%; text-align: right; margin-bottom: 20px; padding: 22px; }
.auth-title { margin: 0 0 14px; font-size: 1.15rem; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.field-control { position: relative; }
.field-control .input { background: var(--card-solid); }
.field input[dir="ltr"] { text-align: left; }
.field-password .input { padding-left: 64px; }
.show-pass {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.show-pass:hover { background: var(--accent-soft); }
.field-hint { color: var(--faint); font-size: 0.8rem; }
.auth-form .login-error { margin: 0; }
.btn.block { width: 100%; padding-block: 11px; }
.btn:disabled { opacity: 0.7; cursor: progress; }
.spinner.light { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }
.auth-card .google-btn { width: 100%; justify-content: center; box-shadow: none; }
.switch-row { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 0.92rem; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.login-error { color: var(--danger); background: var(--danger-soft); padding: 8px 14px; border-radius: 12px; font-size: 0.92rem; }
.dev-login { margin-top: 16px; color: var(--muted); font-size: 0.85rem; }

/* ---------- New meeting ---------- */

.new-card .input#meetingTitle { margin-bottom: 14px; }

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border-radius: 14px;
  padding: 4px;
}
.tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 9px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}
.tab.active { color: var(--text); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: var(--card-solid);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tabs[data-active="upload"] .tab-indicator { transform: translateX(-100%); }
@media (prefers-color-scheme: dark) { .tab-indicator { background: #37344f; } }

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 0 6px;
  min-height: 270px;
  transition: opacity 0.2s;
}
.panel.dim { opacity: 0.35; pointer-events: none; }

.wave { width: 100%; height: 60px; margin-bottom: 12px; }

.rec-controls { display: flex; align-items: center; gap: 22px; }
.record-btn {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px -10px var(--accent);
  transition: transform 0.15s, background 0.3s;
}
.record-btn:hover { transform: scale(1.04); }
.record-btn:active { transform: scale(0.97); }
.record-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.record-btn .i svg { width: 36px; height: 36px; }
.record-btn .stop-square { display: none; width: 26px; height: 26px; border-radius: 7px; background: #fff; }
.record-btn.recording { background: var(--danger); animation: ring 1.6s infinite; }
.record-btn.recording .i { display: none; }
.record-btn.recording .stop-square { display: block; }
.record-btn.paused { animation: none; opacity: 0.8; }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(226, 59, 88, 0.45); }
  80%, 100% { box-shadow: 0 0 0 22px rgba(226, 59, 88, 0); }
}
.round-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}
.round-btn:hover { color: var(--accent); border-color: var(--accent); }
.round-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.timer { margin-top: 14px; direction: ltr; font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 700; }
.hint { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; text-align: center; }
.hint.error { color: var(--danger); }

.dropzone {
  position: relative;
  width: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  padding: 24px 16px;
  border: 2px dashed var(--faint);
  border-radius: 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone span { color: var(--muted); font-size: 0.93rem; }
.dropzone small { color: var(--faint); font-size: 0.82rem; margin-top: 6px; }
.drop-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  transition: transform 0.2s;
}
.dropzone.dragover .drop-icon { transform: translateY(-4px); }
.drop-icon .i svg { width: 26px; height: 26px; }

.upload-progress { margin: 4px 0 8px; }
.upload-progress .bar { height: 6px; border-radius: 6px; background: var(--surface); overflow: hidden; direction: ltr; }
.upload-progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.2s; }
.upload-progress p { margin: 6px 0 0; color: var(--muted); font-size: 0.88rem; text-align: center; }

.settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid var(--card-border);
}
.setting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.setting > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.chip input:checked + span { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- History list ---------- */

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 4px 10px; }
.section-head h2 { margin: 0; font-size: 1.1rem; }
.search-wrap { position: relative; flex: 1; max-width: 320px; min-width: 200px; }
.search-wrap .i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-wrap .input { padding-right: 38px; background: var(--card); }

.meeting-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.meeting-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.meeting-item:hover { border-color: var(--accent); }
.meeting-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meeting-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.meeting-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.meeting-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-snippet { color: var(--muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-snippet:empty { display: none; }
.meeting-meta { color: var(--faint); font-size: 0.8rem; }

.badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge.ok { color: var(--success); background: var(--success-soft); }
.badge.wait { color: var(--warn); background: var(--warn-soft); }
.badge.bad { color: var(--danger); background: var(--danger-soft); }
.dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.list-empty { text-align: center; color: var(--muted); padding: 36px 16px; border: 2px dashed var(--card-border); border-radius: 18px; }
.list-empty .i svg { width: 32px; height: 32px; color: var(--faint); }
.list-empty p { margin: 8px 0 0; }

/* ---------- Meeting page ---------- */

.loading-card, .empty-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; color: var(--muted); text-align: center; }
.loading-card { flex-direction: row; justify-content: center; }
.empty-card .i svg { width: 34px; height: 34px; }

.meeting-head { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 0.9rem; width: fit-content; }
.back-link:hover { color: var(--accent); }
.title-input {
  font-size: 1.6rem;
  font-weight: 800;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 2px 8px;
  margin: 0 -9px;
  width: calc(100% + 18px);
  outline: none;
}
.title-input:hover { border-color: var(--card-border); }
.title-input:focus { border-color: var(--accent); background: var(--card); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 0.88rem; }
.meta-row > span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row .text-btn { margin-inline-start: auto; }

.status-card .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--faint); font-size: 0.85rem; position: relative; }
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(-50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: var(--surface);
}
.steps li.done:not(:last-child)::after { background: var(--accent); }
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.steps li.done { color: var(--muted); }
.steps li.done .step-dot { background: var(--accent); color: #fff; }
.steps li.active { color: var(--text); font-weight: 600; }
.steps li.active .step-dot { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.5s infinite; }
.status-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 0; color: var(--muted); font-size: 0.92rem; text-align: center; }

.status-card.failed { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--danger-soft); }
.status-line { display: flex; gap: 12px; color: var(--danger); }
.status-line .i svg { width: 26px; height: 26px; }
.status-line p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; word-break: break-word; }

.audio-card { padding: 14px 16px; }
.audio-card audio { width: 100%; height: 42px; display: block; }
.audio-note { margin: 6px 4px 0; color: var(--faint); font-size: 0.8rem; }
.audio-gone { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: 0.88rem; }

.summary-card { border-color: var(--accent-soft); }
.summary-card .card-head h2 .i { color: var(--accent); }
.summary-text { white-space: pre-wrap; line-height: 2; }
.summary-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.summary-empty p { margin: 0; }

.transcript { display: flex; flex-direction: column; gap: 6px; }
.turn { --spk: var(--muted); padding: 10px 14px; border-radius: 14px; border-inline-start: 3px solid var(--spk); background: color-mix(in srgb, var(--spk) 6%, transparent); }
.turn p { margin: 0; font-size: 1.05rem; line-height: 2.05; white-space: pre-wrap; }
.turn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.speaker { font-weight: 700; font-size: 0.88rem; color: var(--spk); }
.time { border: 0; background: none; padding: 0; color: var(--faint); font-size: 0.8rem; direction: ltr; font-variant-numeric: tabular-nums; }
button.time { cursor: pointer; }
button.time:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Dialog & toast ---------- */

.dialog {
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 22px;
  width: min(400px, calc(100vw - 32px));
  background: var(--card-solid);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(10, 8, 30, 0.45); backdrop-filter: blur(3px); }
.dialog h3 { margin: 0 0 6px; }
.dialog p { margin: 0 0 18px; color: var(--muted); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  background: var(--text);
  color: var(--bg);
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .card { padding: 16px; border-radius: 20px; }
  .panel { min-height: 250px; }
  .title-input { font-size: 1.3rem; }
  .settings { flex-direction: column; align-items: stretch; }
  .setting { justify-content: space-between; }
  .search-wrap { max-width: none; flex-basis: 100%; }
  .steps li { font-size: 0.75rem; }
  .meeting-item { padding: 12px; gap: 10px; }
  .meeting-icon { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.privacy-link { margin-top: 20px; color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.privacy-link:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Maai brand ---------- */
.brand-mark { width: 42px; height: 42px; display: block; filter: drop-shadow(0 6px 12px rgba(109, 74, 255, 0.35)); }
.brand strong { font-family: Vazirmatn, system-ui, sans-serif; letter-spacing: 0.01em; }
.login-mark { width: 76px; height: 76px; filter: drop-shadow(0 10px 22px rgba(109, 74, 255, 0.4)); }
.login .login-wordmark { margin: 14px 0 0; line-height: 0; }
.login-wordmark img { height: 46px; width: auto; }
.login-tagline { margin: 10px 0 2px; font-weight: 700; color: var(--accent); }
.boot-logo { width: 64px; height: 64px; animation: pulse 1.4s infinite; }
