/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Dark theme tokens */
  --bg: #0a0a0f;
  --bg-2: #0e0e15;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.06);
  --surface-solid: #12121a;
  --surface-solid-2: #1a1a26;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #f0f0f5;
  --text-dim: rgba(240,240,245,0.72);
  --muted: rgba(255,255,255,0.40);
  --muted-2: rgba(255,255,255,0.28);

  --green: #22c55e;
  --green-bright: #4ade80;
  --green-dim: #16a34a;
  --green-glow: rgba(34,197,94,0.35);
  --green-glow-soft: rgba(34,197,94,0.18);

  --red: #ef4444;
  --red-glow: rgba(239,68,68,0.35);

  --violet: #8b5cf6;
  --blue: #3b82f6;

  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

/* Fonts (web only — does not affect WeasyPrint PDFs) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

html {
  height: 100%;
  height: -webkit-fill-available;
  background: var(--bg);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ── Background canvas ──────────────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Subtle radial vignette overlay above canvas, below content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(34,197,94,0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.05), transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* ── App Layout ─────────────────────────────────────── */
.app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
  height: 100dvh;
  padding: clamp(20px, 5vh, 40px) clamp(16px, 4vw, 32px) clamp(20px, 4vh, 32px);
}

/* ── Header ─────────────────────────────────────────── */
.app-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: var(--font-display);
}

.brand {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 32px rgba(255,255,255,0.08);
}

.brand--accent {
  background: linear-gradient(135deg, #22c55e 0%, #4ade80 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 16px rgba(34,197,94,0.35));
}

/* ── REC Button ─────────────────────────────────────── */
.app-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.rec-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.rec-btn {
  width: clamp(140px, 30vw, 170px);
  height: clamp(140px, 30vw, 170px);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 60%),
    radial-gradient(circle at 50% 50%, #1f1f2e 0%, #0e0e15 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  z-index: 2;
  transition: transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .3s, border-color .3s;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -20px 40px rgba(0,0,0,0.4);
}

.rec-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: grayscale(0.4);
}

.rec-btn:not(:disabled):hover {
  transform: scale(1.04);
}

.rec-btn:not(:disabled):active { transform: scale(0.97); }

/* Ready state — green glow ring */
.rec-btn.ready:not(:disabled) {
  border-color: rgba(34,197,94,0.4);
  background:
    radial-gradient(circle at 30% 30%, rgba(74,222,128,0.18), transparent 60%),
    radial-gradient(circle at 50% 50%, #14201a 0%, #0a0a0f 100%);
  box-shadow:
    0 0 0 1px rgba(34,197,94,0.25),
    0 0 32px rgba(34,197,94,0.35),
    0 0 80px rgba(34,197,94,0.18),
    inset 0 1px 0 rgba(74,222,128,0.2),
    inset 0 -20px 40px rgba(0,0,0,0.4);
  animation: pulse-ready 2.8s ease-in-out infinite;
}

@keyframes pulse-ready {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(34,197,94,0.25),
      0 0 32px rgba(34,197,94,0.35),
      0 0 80px rgba(34,197,94,0.18),
      inset 0 1px 0 rgba(74,222,128,0.2),
      inset 0 -20px 40px rgba(0,0,0,0.4);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(34,197,94,0.4),
      0 0 48px rgba(34,197,94,0.55),
      0 0 110px rgba(34,197,94,0.28),
      inset 0 1px 0 rgba(74,222,128,0.3),
      inset 0 -20px 40px rgba(0,0,0,0.4);
  }
}

/* Recording state — red glow with pulse */
.rec-btn.recording {
  border-color: rgba(239,68,68,0.5);
  background:
    radial-gradient(circle at 30% 30%, rgba(248,113,113,0.22), transparent 60%),
    radial-gradient(circle at 50% 50%, #2a1416 0%, #0e0a0a 100%);
  animation: pulse-rec 1.6s ease-in-out infinite;
}

@keyframes pulse-rec {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(239,68,68,0.4),
      0 0 0 0 rgba(239,68,68,0.5),
      0 0 40px rgba(239,68,68,0.4),
      inset 0 1px 0 rgba(248,113,113,0.3),
      inset 0 -20px 40px rgba(0,0,0,0.4);
  }
  60% {
    box-shadow:
      0 0 0 1px rgba(239,68,68,0.4),
      0 0 0 24px rgba(239,68,68,0),
      0 0 60px rgba(239,68,68,0.55),
      inset 0 1px 0 rgba(248,113,113,0.3),
      inset 0 -20px 40px rgba(0,0,0,0.4);
  }
}

.rec-label {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.22em;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.4));
}

.rec-btn.recording .rec-label {
  background: linear-gradient(180deg, #fecaca 0%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.rec-timer {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: #fecaca;
  margin-top: 2px;
  text-shadow: 0 0 12px rgba(239,68,68,0.4);
}

.rec-hint {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: opacity .3s;
}

/* ── Footer ─────────────────────────────────────────── */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: 720px;
  gap: 16px;
}

.panel { display: flex; flex-direction: column; gap: 10px; }
.panel--left { align-items: flex-start; max-width: 65%; }
.panel--right { align-items: flex-end; }

/* ── Chips ──────────────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #d1fae5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: chip-in .2s ease;
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  line-height: 1;
  padding: 0 1px;
  transition: color .15s;
}
.chip-remove:hover { color: var(--red); }

/* ── Panel trigger (glass) ──────────────────────────── */
.panel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s;
}

.panel-trigger:hover {
  border-color: rgba(34,197,94,0.45);
  color: var(--text);
  background: rgba(34,197,94,0.06);
  box-shadow: 0 0 24px rgba(34,197,94,0.12);
}
.panel-trigger svg { opacity: .7; }

/* ── Mic Panel ──────────────────────────────────────── */
.mic-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mic-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.mic-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mic-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background .4s, box-shadow .4s;
  flex-shrink: 0;
}
.mic-dot.active {
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
  animation: pulse-mic 2s ease-in-out infinite;
}
.mic-dot.error  { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }

@keyframes pulse-mic {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}

.mic-label { font-size: 12px; color: var(--muted); font-weight: 500; }

.mic-device-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: default;
  color: var(--text-dim);
  transition: color .15s;
  max-width: 140px;
}
.mic-device-btn:hover { color: var(--text); }

.mic-device-name {
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.equalizer { display: block; }

/* ── Device dropdown ────────────────────────────────── */
.device-dropdown {
  position: fixed;
  background: rgba(18,18,26,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  z-index: 500;
  min-width: 200px;
  max-width: 300px;
  animation: slide-up .15s ease;
}

.device-item {
  display: block;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  background: none;
  border: none;
  font-size: 12px;
  font-family: var(--font);
  color: var(--text-dim);
  cursor: pointer;
  transition: background .1s, color .1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.device-item.active { color: var(--green-bright); font-weight: 600; background: rgba(34,197,94,0.08); }

/* ── Participants Overlay ───────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,10,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 0 100px 28px;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in .2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.overlay-card {
  background: rgba(18,18,26,0.85);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  width: 340px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: slide-up .25s cubic-bezier(.34,1.4,.64,1);
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.overlay-header {
  padding: 14px 14px 0;
}

.search-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: rgba(255,255,255,0.03);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.search-input::placeholder { color: var(--muted-2); }

.search-input:focus {
  border-color: rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.04);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.overlay-body {
  overflow-y: auto;
  padding: 12px 14px 14px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.overlay-body::-webkit-scrollbar { width: 6px; }
.overlay-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.overlay-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 6px;
}

.recent-section { margin-bottom: 8px; }

.employee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .12s;
}

.employee-item:hover { background: rgba(255,255,255,0.04); }
.employee-item.selected { background: rgba(34,197,94,0.10); }

.employee-info { display: flex; flex-direction: column; gap: 1px; }
.employee-name { font-size: 13px; font-weight: 500; color: var(--text); }
.employee-pos  { font-size: 11px; color: var(--muted); }

.employee-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  transition: background .15s, border-color .15s, box-shadow .15s;
}

.employee-item.selected .employee-check {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(34,197,94,0.5);
}

/* ── Processing overlay ─────────────────────────────── */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.processing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 48px;
  background: rgba(18,18,26,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.processing-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-2);
  transition: color .3s;
}

.step.active { color: var(--text); }
.step.done   { color: var(--green-bright); }

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}

.step.active .step-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
  animation: pulse-dot 1s infinite;
}
.step.done   .step-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow-soft);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.done-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4ade80, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow:
    0 0 0 1px rgba(74,222,128,0.5),
    0 0 40px rgba(34,197,94,0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
  animation: pop-in .4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.done-subtitle { font-size: 14px; color: var(--text-dim); }

.done-btn {
  margin-top: 8px;
  padding: 11px 30px;
  background: linear-gradient(135deg, var(--green), var(--green-dim));
  color: #fff;
  border: 1px solid rgba(74,222,128,0.4);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform .1s, box-shadow .2s, filter .15s;
  box-shadow: 0 8px 24px rgba(34,197,94,0.3);
}

.done-btn:hover { filter: brightness(1.1); box-shadow: 0 10px 32px rgba(34,197,94,0.45); }
.done-btn:active { transform: scale(.97); }

/* ── Admin pages (LIGHT — separate pages, untouched theme) ── */
.admin-wrap, .login-wrap, .modal-backdrop {
  color: #111827;
}

.admin-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
  font-family: var(--font);
  background: #fafafa;
  min-height: 100vh;
}

/* Ensure admin overrides dark body */
body:has(.admin-wrap), body:has(.login-wrap) {
  background: #fafafa;
  overflow: auto;
}
body:has(.admin-wrap) .bg-canvas,
body:has(.login-wrap) .bg-canvas { display: none; }
body:has(.admin-wrap)::before,
body:has(.login-wrap)::before { display: none; }

.admin-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 16px;
}

.admin-nav a {
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: background .12s, color .12s;
}

.admin-nav a:hover, .admin-nav a.active {
  background: #f3f4f6;
  color: #111827;
}

.admin-nav .brand-nav {
  font-weight: 800;
  color: var(--green-dim);
  letter-spacing: .08em;
  margin-right: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #111827;
}

.admin-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.badge--green { background: #dcfce7; color: #166534; }
.badge--gray  { background: #f3f4f6; color: #6b7280; }

.btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s;
  font-family: var(--font);
}

.btn--primary { background: #111827; color: #fff; }
.btn--primary:hover { background: #374151; }
.btn--danger  { background: #fef2f2; color: #ef4444; }
.btn--danger:hover { background: #fee2e2; }
.btn--ghost   { background: #f3f4f6; color: #111827; }
.btn--ghost:hover { background: #e5e7eb; }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  font-size: 13px;
  font-family: var(--font);
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}

.form-input:focus { border-color: var(--green); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.modal {
  background: #ffffff;
  border-radius: 14px;
  padding: 28px;
  width: 420px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  color: #111827;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Login page */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #fafafa;
}

.login-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 36px 32px;
  width: 360px;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
}

.login-brand {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--green-dim);
  margin-bottom: 28px;
}

.login-error {
  padding: 10px 14px;
  background: #fef2f2;
  color: #ef4444;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .app-footer {
    align-items: flex-end;
    gap: 12px;
  }

  .panel--left { max-width: 60%; }

  .panel-trigger {
    padding: 8px 12px;
    font-size: 13px;
  }

  .chip { font-size: 12px; padding: 5px 10px; }

  .rec-label { font-size: 22px; }
  .rec-timer { font-size: 15px; }

  .mic-panel { padding: 7px 10px 7px 8px; }

  /* Overlay slides up from bottom full-width on mobile */
  .overlay {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }

  .overlay-card {
    width: 100%;
    max-height: 72dvh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  /* Safe area for notch / home indicator */
  .app {
    padding-bottom: max(clamp(20px, 4vh, 32px), env(safe-area-inset-bottom));
  }
}
