:root {
  color-scheme: light;
  --bg: #fff7fc;
  --bg-2: #eafaff;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.72);
  --ink: #25152d;
  --muted: #7d6b8c;
  --line: #f0dff6;
  --row-border: #f0edf7;
  --input-bg: #ffffff;
  --status-bg: #fff3fb;
  --blue: #35b7ff;
  --blue-soft: #ecf9ff;
  --pink: #ff67c8;
  --pink-soft: #fff0fa;
  --purple: #a45cff;
  --purple-soft: #f5ecff;
  --green: #13b886;
  --green-soft: #e9fff6;
  --amber: #a86400;
  --amber-soft: #fff4d8;
  --red: #c4362f;
  --red-soft: #ffeceb;
  --secondary-ink: #7440e8;
  --interim-ink: #226c92;
  --shadow: 0 18px 44px rgba(140, 72, 170, 0.13);
  --soft-shadow: 0 12px 32px rgba(172, 97, 151, 0.12);
  --meter-bg: rgba(139, 92, 246, 0.12);
  --modal-overlay: rgba(39, 30, 58, 0.5);
  --modal-shadow: 0 26px 72px rgba(50, 35, 74, 0.26);
  --modal-body: #5d576d;
  --cute-yellow: #ffe890;
  --cute-mint: #aef7df;
  --cute-rose: #ffd7ef;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15121c;
  --bg-2: #10222a;
  --panel: #201b2a;
  --panel-soft: rgba(39, 32, 52, 0.72);
  --ink: #f3eefb;
  --muted: #afa7bd;
  --line: #393245;
  --row-border: #2d2738;
  --input-bg: #181321;
  --status-bg: #282236;
  --blue: #6fd0ff;
  --blue-soft: rgba(111, 208, 255, 0.12);
  --pink: #ff7acb;
  --pink-soft: rgba(255, 122, 203, 0.12);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.14);
  --green: #4fdfac;
  --green-soft: rgba(79, 223, 172, 0.12);
  --amber: #ffc85a;
  --amber-soft: rgba(255, 200, 90, 0.13);
  --red: #ff7f78;
  --red-soft: rgba(255, 127, 120, 0.13);
  --secondary-ink: #c5b8ff;
  --interim-ink: #8bdcff;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  --soft-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  --meter-bg: rgba(167, 139, 250, 0.16);
  --modal-overlay: rgba(0, 0, 0, 0.66);
  --modal-shadow: 0 26px 72px rgba(0, 0, 0, 0.48);
  --modal-body: #cdc5da;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -8%, rgba(255, 219, 244, 0.74), transparent 28%),
    radial-gradient(circle at 2% 68%, rgba(205, 244, 255, 0.78), transparent 32%),
    linear-gradient(145deg, var(--bg) 0%, #fff7fd 42%, var(--bg-2) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 200ms ease, color 200ms ease;
}

[data-theme="dark"] body {
  background:
    linear-gradient(145deg, var(--bg) 0%, #1d1726 46%, var(--bg-2) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

h1,
h2,
p {
  margin: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  min-height: 100vh;
  padding: 14px;
}

.dashboard-sidebar {
  position: sticky;
  top: 14px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100vh - 28px);
  min-height: 560px;
  padding: 12px;
  border: 1px solid rgba(232, 227, 242, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.dashboard-main {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 2px 2px 9px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand > div:last-child {
  display: grid;
  min-width: 0;
}

.sidebar-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.1;
}

.sidebar-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-menu {
  display: grid;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 780;
  transition: transform 120ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.menu-item:hover,
.menu-item.active {
  color: var(--secondary-ink);
  border-color: rgba(139, 92, 246, 0.16);
  background: var(--purple-soft);
}

.menu-item.active {
  box-shadow: 0 10px 22px rgba(139, 92, 246, 0.12);
}

.menu-item:hover {
  transform: translateY(-1px);
}

.menu-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.sidebar-note {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 11px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(245, 236, 255, 0.9), rgba(236, 249, 255, 0.88));
}

.sidebar-note span,
.overview-kicker {
  color: var(--secondary-ink);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-note strong {
  font-size: 14px;
  line-height: 1.25;
}

.sidebar-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(232, 227, 242, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.overview-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.overview-copy h2 {
  font-size: 20px;
  line-height: 1.08;
}

.overview-copy p {
  max-width: 540px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 8px;
  color: var(--secondary-ink);
  background: var(--purple-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 780;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.dashboard-link.primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 12px 24px rgba(236, 91, 189, 0.22);
}

.dashboard-link:hover {
  transform: translateY(-1px);
}

.dashboard-link svg {
  width: 16px;
  height: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(232, 227, 242, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  transition: background 200ms ease, border-color 200ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

h1 {
  font-size: 20px;
  line-height: 1.08;
}

h2 {
  font-size: 16px;
  line-height: 1.2;
}

.brand p,
.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.minutes-actions,
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-pill {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  max-width: min(320px, 100%);
  min-height: 42px;
  padding: 5px 6px 5px 9px;
  border: 1px solid rgba(232, 227, 242, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(139, 92, 246, 0.1);
}

.user-pill[hidden] {
  display: none;
}

.user-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-pill span {
  display: grid;
  min-width: 0;
}

.user-pill strong,
.user-pill small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill strong {
  font-size: 12px;
  line-height: 1.2;
}

.user-pill small {
  color: var(--muted);
  font-size: 11px;
}

[data-theme="dark"] .user-pill {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(32, 27, 42, 0.78);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(252px, 276px) minmax(378px, 1fr) minmax(310px, 0.92fr);
  gap: 14px;
  width: 100%;
  margin: 0;
}

.panel {
  height: calc(100vh - 222px);
  min-height: 500px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 227, 242, 0.92);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  scroll-margin-top: 14px;
}

@media (min-width: 1181px) {
  .app-shell[data-focus="recording"] .workspace,
  .app-shell[data-focus="history"] .workspace {
    grid-template-columns: minmax(304px, 342px) minmax(352px, 1fr) minmax(286px, 0.78fr);
  }

  .app-shell[data-focus="transcript"] .workspace {
    grid-template-columns: minmax(238px, 260px) minmax(440px, 1.34fr) minmax(286px, 0.74fr);
  }

  .app-shell[data-focus="minutes"] .workspace {
    grid-template-columns: minmax(238px, 260px) minmax(342px, 0.86fr) minmax(392px, 1.26fr);
  }
}

.app-shell[data-focus="recording"] #recordingPanel,
.app-shell[data-focus="history"] #recordingPanel,
.app-shell[data-focus="transcript"] #transcriptPanel,
.app-shell[data-focus="minutes"] #minutesPanel {
  border-color: rgba(139, 92, 246, 0.34);
  box-shadow: 0 18px 46px rgba(139, 92, 246, 0.17);
}

.app-shell[data-focus="history"] #historyPanel {
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.controls-panel {
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(150deg, rgba(238, 228, 255, 0.95) 0%, rgba(228, 248, 255, 0.95) 66%, rgba(255, 240, 250, 0.9) 100%);
}

[data-theme="dark"] .controls-panel {
  background:
    linear-gradient(180deg, rgba(58, 45, 82, 0.94) 0%, rgba(24, 53, 65, 0.94) 56%, rgba(64, 35, 58, 0.94) 100%);
}

.assistant-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 12px;
  text-align: center;
}

.assistant-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: var(--purple);
  background: linear-gradient(135deg, #ffffff, #eee9ff);
  box-shadow: 0 16px 32px rgba(113, 87, 161, 0.15);
}

[data-theme="dark"] .assistant-avatar {
  color: var(--pink);
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #30263f, #1f3340);
}

.assistant-avatar svg {
  width: 26px;
  height: 26px;
}

.assistant-card span,
.history-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.assistant-card strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.control-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(95, 73, 136, 0.08);
}

[data-theme="dark"] .control-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(32, 27, 42, 0.74);
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.field-label.stacked {
  margin-top: 12px;
}

.text-input {
  width: 100%;
  height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--input-bg);
  outline: 0;
  transition: background 200ms ease, border-color 160ms ease, color 200ms ease, box-shadow 160ms ease;
}

.select-input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 17px,
    calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.text-input:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-soft);
}

.control-group {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 740;
}

[data-theme="dark"] .toggle-row {
  background: rgba(24, 19, 33, 0.72);
}

.toggle-row span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.toggle-row svg {
  width: 16px;
  height: 16px;
  color: var(--purple);
  flex: 0 0 auto;
}

.toggle-row input {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
  background: #d9d4e6;
  transition: background 160ms ease;
}

.toggle-row input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(64, 48, 86, 0.22);
  transition: transform 160ms ease;
}

.toggle-row input:checked {
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.toggle-row input:checked::before {
  transform: translateX(16px);
}

.meter-wrap {
  width: 100%;
  height: 9px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--meter-bg);
}

.meter-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--pink));
  transition: width 80ms linear;
}

.primary-button,
.secondary-button,
.icon-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  width: 100%;
  height: 48px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 14px 28px rgba(236, 91, 189, 0.24);
  font-weight: 780;
}

.primary-button.recording {
  background: linear-gradient(135deg, var(--red), #f57a5c);
  box-shadow: 0 14px 28px rgba(196, 54, 47, 0.22);
}

.secondary-button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--secondary-ink);
  background: var(--purple-soft);
  border: 1px solid rgba(139, 92, 246, 0.14);
  font-weight: 760;
  font-size: 13px;
}

.secondary-button.accent {
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
}

.icon-button,
.theme-toggle {
  width: 36px;
  height: 36px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
}

.icon-button.small {
  width: 30px;
  height: 30px;
}

.icon-button.small#signOutBtn:hover {
  color: var(--red);
  border-color: rgba(196, 54, 47, 0.4);
  background: var(--red-soft);
}

.danger-button {
  color: var(--red);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--status-bg);
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.status-pill.ok {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.pending {
  color: var(--secondary-ink);
  background: var(--purple-soft);
}

.status-pill.danger {
  color: var(--red);
  background: var(--red-soft);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.dashboard-stats {
  align-content: stretch;
  grid-template-columns: repeat(7, minmax(68px, 1fr));
  margin: 0;
}

.stats-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .stats-grid div {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(32, 27, 42, 0.7);
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stats-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.2;
}

.dashboard-stats div {
  display: grid;
  align-content: space-between;
  min-height: 70px;
  padding: 10px;
}

.dashboard-stats strong {
  font-size: 16px;
}

.status-log {
  display: grid;
  gap: 8px;
}

.draft-status {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.35;
}

[data-theme="dark"] .draft-status {
  background: rgba(32, 27, 42, 0.52);
}

.status-item {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.35;
}

[data-theme="dark"] .status-item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(32, 27, 42, 0.64);
}

.status-item.ok {
  color: var(--green);
  background: var(--green-soft);
}

.status-item.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-item.error {
  color: var(--red);
  background: var(--red-soft);
}

.history-block {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.64);
}

[data-theme="dark"] .history-block {
  border-color: rgba(255, 255, 255, 0.1);
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.history-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

[data-theme="dark"] .history-search {
  background: rgba(32, 27, 42, 0.62);
}

.history-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.history-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  outline: 0;
  font-size: 13px;
}

.history-search input::placeholder {
  color: var(--muted);
}

.saved-meetings-list {
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
  padding-right: 2px;
}

.history-empty {
  padding: 10px;
  border: 1px dashed rgba(139, 92, 246, 0.32);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  line-height: 1.4;
}

[data-theme="dark"] .history-empty {
  background: rgba(32, 27, 42, 0.54);
}

.saved-meeting {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
}

[data-theme="dark"] .saved-meeting {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(32, 27, 42, 0.62);
}

.saved-meeting.active {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.saved-meeting-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.saved-meeting-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.25;
}

.saved-meeting-main span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.saved-meeting-main small {
  color: var(--secondary-ink);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
}

.saved-meeting .icon-button {
  align-self: center;
  margin-right: 6px;
}

.transcript-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.minutes-panel {
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr) auto auto;
}

.panel-head {
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82));
}

[data-theme="dark"] .panel-head {
  background: linear-gradient(180deg, rgba(37, 31, 48, 0.96), rgba(32, 27, 42, 0.82));
}

.panel-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-icon,
.empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
}

.section-icon {
  width: 36px;
  height: 36px;
}

.section-icon.blue,
.empty-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.section-icon.pink {
  color: var(--pink);
  background: var(--pink-soft);
}

.section-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.transcript-list {
  min-height: 0;
  overflow: auto;
  padding: 18px 16px 14px;
  background: #fffefe;
}

[data-theme="dark"] .transcript-list {
  background: #201b2a;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 220px;
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}

.empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.empty-state p {
  max-width: 270px;
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}

.empty-icon svg {
  width: 21px;
  height: 21px;
}

.transcript-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(232, 227, 242, 0.72);
  border-bottom-color: rgba(232, 227, 242, 0.72);
  border-radius: 12px;
  background: var(--status-bg);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.transcript-row:hover {
  margin: 0 0 10px;
  padding: 14px 16px 12px;
  border-color: rgba(139, 92, 246, 0.22);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.transcript-row time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: 54px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.transcript-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.speaker-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--purple);
  background: var(--purple-soft);
}

.speaker-label[hidden] {
  display: none;
}

.transcript-row[data-speaker="1"] .speaker-label {
  color: var(--blue);
  background: var(--blue-soft);
}

.transcript-row[data-speaker="2"] .speaker-label {
  color: var(--pink);
  background: var(--pink-soft);
}

.transcript-row[data-speaker="3"] .speaker-label {
  color: var(--green);
  background: var(--green-soft);
}

.transcript-row[data-speaker="4"] .speaker-label {
  color: var(--amber);
  background: var(--amber-soft);
}

.transcript-row[data-speaker="5"] .speaker-label {
  color: var(--red);
  background: var(--red-soft);
}

.transcript-row[data-speaker="6"] .speaker-label {
  color: var(--secondary-ink);
  background: var(--purple-soft);
}

.transcript-row p {
  grid-column: 2;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  cursor: text;
}

.transcript-row:not(.final) p {
  color: var(--interim-ink);
}

.transcript-row.important {
  border-color: rgba(255, 200, 90, 0.54);
  background:
    linear-gradient(90deg, var(--amber-soft), transparent 42%),
    var(--status-bg);
}

.transcript-row.important time {
  color: var(--amber);
  background: #fff8e2;
}

.row-actions {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.transcript-row .edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease, background 120ms ease;
}

.transcript-row:hover .edit-btn {
  opacity: 1;
}

.transcript-row .edit-btn:hover {
  color: var(--purple);
  background: var(--purple-soft);
}

.transcript-row .important-toggle.active {
  color: var(--amber);
  background: var(--amber-soft);
  opacity: 1;
}

.transcript-row .edit-btn svg {
  width: 14px;
  height: 14px;
}

.transcript-row .edit-btn i {
  width: 14px;
  height: 14px;
}

.transcript-row.editing {
  padding: 8px;
  border-radius: 8px;
  background: var(--purple-soft);
}

.transcript-row.editing p {
  display: none;
}

.transcript-row .edit-input {
  display: none;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--purple);
  border-radius: 8px;
  color: var(--ink);
  background: var(--input-bg);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  outline: 0;
  resize: vertical;
}

.transcript-row.editing .edit-input {
  display: block;
}

.transcript-row.editing .edit-btn {
  color: var(--green);
  opacity: 1;
}

textarea {
  width: 100%;
  min-height: 0;
  overflow: auto;
  resize: none;
  padding: 22px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 240, 250, 0.46), rgba(255, 255, 255, 0) 190px),
    var(--panel);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  transition: background 200ms ease, color 200ms ease, box-shadow 160ms ease;
}

[data-theme="dark"] textarea {
  background:
    linear-gradient(180deg, rgba(255, 122, 203, 0.08), rgba(32, 27, 42, 0) 160px),
    var(--panel);
}

.followups-block {
  min-height: 124px;
  max-height: 170px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(233, 255, 246, 0.7), rgba(255, 255, 255, 0.9));
}

[data-theme="dark"] .followups-block {
  background: linear-gradient(180deg, rgba(79, 223, 172, 0.08), rgba(32, 27, 42, 0.92));
}

.followups-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 16px 8px;
}

.followups-head strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.followups-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.followups-list {
  display: grid;
  gap: 7px;
  max-height: 104px;
  overflow: auto;
  padding: 0 16px 12px;
}

.followups-empty {
  padding: 9px 10px;
  border: 1px dashed rgba(19, 184, 134, 0.24);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.4;
}

.followup-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(19, 184, 134, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.42;
}

[data-theme="dark"] .followup-item,
[data-theme="dark"] .followups-empty {
  background: rgba(32, 27, 42, 0.7);
}

.followup-item input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.followup-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.followup-item strong {
  font-size: 12px;
  line-height: 1.35;
}

.followup-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.followup-item:has(input:checked) span,
.followup-item:has(input:checked) small {
  color: var(--muted);
  text-decoration: line-through;
}

.minutes-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.live-cue {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  margin: 0 16px 16px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--status-bg);
  font-size: 13px;
}

.live-cue[hidden] {
  display: none;
}

.live-cue strong {
  color: var(--green);
  font-size: 12px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--modal-overlay);
  backdrop-filter: blur(7px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.closing {
  opacity: 0;
  transition: opacity 140ms ease;
}

.welcome-modal {
  position: relative;
  width: min(520px, 100%);
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--modal-shadow);
}

.modal-kicker {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--secondary-ink);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 780;
}

.welcome-modal h2 {
  margin: 0 42px 11px 0;
  font-size: 22px;
  line-height: 1.2;
}

.welcome-modal p {
  color: var(--modal-body);
  font-size: 15px;
  line-height: 1.65;
}

.consent-backdrop {
  z-index: 55;
}

.consent-modal {
  max-width: 520px;
}

.consent-list {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--modal-body);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.consent-check input {
  margin-top: 3px;
}

.consent-accept {
  width: 100%;
}

.stats-grid strong.reconnecting {
  color: var(--amber);
}

.login-backdrop {
  z-index: 60;
}

.login-modal {
  position: relative;
  width: min(440px, 100%);
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--modal-shadow);
  text-align: center;
  animation: modalPop 360ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.login-modal h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.login-modal p {
  color: var(--modal-body);
  font-size: 14px;
  line-height: 1.55;
}

.login-mascot {
  display: grid;
  place-items: center;
  width: 92px;
  height: 78px;
  margin: 0 auto 12px;
}

.mascot.tiny {
  width: 56px;
  height: 44px;
  transform: translate(-50%, -48%) scale(0.82);
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(164, 92, 255, 0.12);
  cursor: pointer;
  font-weight: 780;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.google-login-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(164, 92, 255, 0.16);
}

.google-login-button:disabled {
  cursor: wait;
  opacity: 0.8;
  filter: grayscale(80%);
}

.google-login-button svg {
  width: 18px;
  height: 18px;
}

.login-status {
  min-height: 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* ===== Halaman login khusus (/login.html) ===== */
.login-page-body {
  margin: 0;
  min-height: 100vh;
}

.login-gate.login-page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100vh;
}

.login-gate[hidden] {
  display: none;
}

html.hide-login-gate-initial .login-gate {
  display: none !important;
}

body.login-gate-open {
  overflow: hidden;
}

html.hide-login-gate-initial body.login-gate-open {
  overflow: auto;
}

.login-page {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, var(--purple-soft), transparent 46%),
    radial-gradient(circle at 82% 88%, var(--blue-soft), transparent 48%),
    linear-gradient(150deg, var(--bg), var(--bg-2));
}

.login-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  filter: blur(52px);
}

.aurora-blob {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  opacity: 0.5;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora-blob.one {
  top: -14vmax;
  left: -10vmax;
  background: radial-gradient(circle, var(--purple), transparent 66%);
  animation: auroraDrift1 17s ease-in-out infinite;
}

.aurora-blob.two {
  bottom: -18vmax;
  right: -12vmax;
  background: radial-gradient(circle, var(--blue), transparent 66%);
  animation: auroraDrift2 21s ease-in-out infinite;
}

.aurora-blob.three {
  top: 32%;
  left: 46%;
  width: 30vmax;
  height: 30vmax;
  background: radial-gradient(circle, var(--pink), transparent 68%);
  animation: auroraDrift3 25s ease-in-out infinite;
}

[data-theme="dark"] .aurora-blob {
  opacity: 0.38;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 40px 34px 32px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--modal-shadow);
  text-align: center;
  animation: modalPop 460ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.login-stage {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}

.login-hero-logo {
  max-width: 240px;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: modalPop 500ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.login-stage .mascot-stage {
  width: 150px;
  height: 122px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(245, 236, 255, 0.86)),
    radial-gradient(circle at 70% 20%, var(--cute-yellow), transparent 34%);
  box-shadow: 0 22px 46px rgba(164, 92, 255, 0.24);
  animation: mascotBob 2.6s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot {
  width: 92px;
  height: 76px;
  border-radius: 28px 28px 24px 24px;
  box-shadow: 0 12px 24px rgba(164, 92, 255, 0.2);
  animation: mascotTilt 3.8s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot-antenna {
  top: -22px;
  height: 22px;
}

.login-stage .mascot-stage .mascot-antenna::after {
  width: 14px;
  height: 14px;
  box-shadow: 0 0 0 5px rgba(255, 232, 144, 0.32);
  animation: antennaPulse 1.8s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot-eye {
  top: 27px;
  width: 11px;
  height: 14px;
  animation: mascotBlink 5s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot-eye.left {
  left: 28px;
}

.login-stage .mascot-stage .mascot-eye.right {
  right: 28px;
}

.login-stage .mascot-stage .mascot-mouth {
  top: 47px;
  width: 26px;
  height: 13px;
}

.login-stage .mascot-stage .mascot-cheek {
  top: 46px;
  width: 13px;
  height: 8px;
}

.login-stage .mascot-stage .mascot-cheek.left {
  left: 14px;
}

.login-stage .mascot-stage .mascot-cheek.right {
  right: 14px;
}

.login-stage .mascot-stage .mascot-arm {
  display: block;
  top: 40px;
  width: 30px;
  height: 11px;
}

.login-stage .mascot-stage .mascot-arm.left {
  left: -22px;
  animation: leftWave 2.2s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot-arm.right {
  right: -22px;
  animation: rightWave 1.8s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot-sparkle {
  display: block;
  width: 16px;
  height: 16px;
  animation: sparklePop 2.8s ease-in-out infinite;
}

.login-stage .mascot-stage .mascot-sparkle.one {
  right: -6px;
  top: 4px;
}

.login-stage .mascot-stage .mascot-sparkle.two {
  left: -6px;
  bottom: 8px;
  animation-delay: 900ms;
}

.login-stage-shadow {
  display: block;
  width: 96px;
  height: 14px;
  margin: 12px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 64, 232, 0.28), transparent 70%);
  animation: loginShadowPulse 2.6s ease-in-out infinite;
}

.login-heading {
  margin: 6px 0 10px;
  font-size: 26px;
  line-height: 1.2;
}

.login-lede {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--modal-body);
  font-size: 14px;
  line-height: 1.6;
}

.login-card .google-login-button {
  margin-top: 24px;
  min-height: 48px;
  border-radius: 14px;
}

.login-highlights {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 16px 0 0;
  border-top: 1px dashed var(--line);
  list-style: none;
  text-align: left;
}

.login-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.login-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 0 0 4px var(--purple-soft);
}

@keyframes auroraDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.12); }
}

@keyframes auroraDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-5vmax, -4vmax) scale(0.95); }
}

@keyframes auroraDrift3 {
  0%, 100% { transform: translate(-50%, 0) scale(1); opacity: 0.42; }
  50% { transform: translate(-42%, -6vmax) scale(1.15); opacity: 0.58; }
}

@keyframes loginShadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  45% { transform: scale(0.82); opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .login-page *,
  .login-card {
    animation: none !important;
  }
}

[data-theme="dark"] .google-login-button {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(24, 19, 33, 0.92);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.28);
  background-clip: padding-box;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.32);
  background-clip: padding-box;
}

/* Cute animated redesign layer */
body {
  background:
    linear-gradient(125deg, #fff7fc 0%, #f4efff 34%, #eafaff 66%, #fff5fb 100%);
  background-size: 220% 220%;
  animation: candySky 18s ease-in-out infinite;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(8deg, rgba(255, 103, 200, 0.06) 0 2px, transparent 2px 46px);
  animation: confettiDrift 24s linear infinite;
}

.app-shell {
  animation: appFloatIn 560ms ease both;
}

.topbar {
  animation: softDrop 620ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.panel {
  animation: panelFloatIn 700ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.controls-panel {
  animation-delay: 80ms;
}

.transcript-panel {
  animation-delay: 150ms;
}

.minutes-panel {
  animation-delay: 220ms;
}

.minutes-panel.generating {
  position: relative;
}

.minutes-panel.generating textarea {
  opacity: 0.6;
  pointer-events: none;
}

.minutes-panel.generating .minutes-actions {
  opacity: 0.32;
  pointer-events: none;
}

.minutes-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: none;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 3px solid rgba(164, 92, 255, 0.22);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: minutesSpin 0.9s linear infinite;
}

.minutes-panel.generating .minutes-spinner {
  display: block;
}

@keyframes minutesSpin {
  to { transform: rotate(360deg); }
}

.brand-mark {
  position: relative;
  overflow: hidden;
  animation: mascotGlow 3.8s ease-in-out infinite;
}

.brand-mark::after,
.primary-button::after,
.secondary-button.accent::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.72) 48%, transparent 74%);
  transform: translateX(-72%) rotate(8deg);
  animation: shineSweep 3.4s ease-in-out infinite;
}

.brand-initial {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 850;
}

.assistant-card {
  position: relative;
}

.mascot-stage {
  position: relative;
  overflow: visible;
  width: 96px;
  height: 78px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(245, 236, 255, 0.82)),
    radial-gradient(circle at 70% 20%, var(--cute-yellow), transparent 34%);
  animation: mascotBob 2.6s ease-in-out infinite;
}

.mascot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 48px;
  border: 2px solid rgba(116, 64, 232, 0.18);
  border-radius: 18px 18px 16px 16px;
  background: linear-gradient(145deg, #ffffff, #f2e9ff 52%, #ffe5f6);
  box-shadow: 0 12px 24px rgba(164, 92, 255, 0.2);
  transform: translate(-50%, -46%);
  animation: mascotTilt 3.8s ease-in-out infinite;
}

.mascot-antenna {
  position: absolute;
  left: 50%;
  top: -14px;
  width: 2px;
  height: 14px;
  background: var(--purple);
  transform: translateX(-50%);
}

.mascot-antenna::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cute-yellow);
  box-shadow: 0 0 0 4px rgba(255, 232, 144, 0.32);
  transform: translateX(-50%);
  animation: antennaPulse 1.8s ease-in-out infinite;
}

.mascot-eye {
  position: absolute;
  top: 17px;
  width: 7px;
  height: 9px;
  border-radius: 999px;
  background: #332142;
  animation: mascotBlink 5s ease-in-out infinite;
}

.mascot-eye.left {
  left: 18px;
}

.mascot-eye.right {
  right: 18px;
}

.mascot-mouth {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 16px;
  height: 8px;
  border-bottom: 2px solid #332142;
  border-radius: 0 0 16px 16px;
  transform: translateX(-50%);
}

.mascot-cheek {
  position: absolute;
  top: 29px;
  width: 8px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 103, 200, 0.34);
}

.mascot-cheek.left {
  left: 9px;
}

.mascot-cheek.right {
  right: 9px;
}

.mascot-arm {
  position: absolute;
  top: 25px;
  width: 19px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
}

.mascot-arm.left {
  left: -14px;
  transform-origin: right center;
  transform: rotate(-18deg);
  animation: leftWave 2.2s ease-in-out infinite;
}

.mascot-arm.right {
  right: -14px;
  transform-origin: left center;
  transform: rotate(18deg);
  animation: rightWave 1.8s ease-in-out infinite;
}

.mascot-sparkle {
  position: absolute;
  width: 11px;
  height: 11px;
  color: var(--pink);
  animation: sparklePop 2.8s ease-in-out infinite;
}

.mascot-sparkle::before,
.mascot-sparkle::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  border-radius: 999px;
}

.mascot-sparkle::before {
  width: 11px;
  height: 3px;
}

.mascot-sparkle::after {
  width: 3px;
  height: 11px;
}

.mascot-sparkle.one {
  right: 8px;
  top: 10px;
}

.mascot-sparkle.two {
  left: 8px;
  bottom: 12px;
  color: var(--blue);
  animation-delay: 900ms;
}

.primary-button,
.secondary-button.accent {
  position: relative;
  overflow: hidden;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.theme-toggle:hover:not(:disabled) {
  box-shadow: 0 12px 24px rgba(164, 92, 255, 0.16);
}

.primary-button.recording {
  animation: recordingPulse 1.4s ease-in-out infinite;
}

.meter-bar {
  background-size: 180% 100%;
  animation: meterCandy 1.6s linear infinite;
}

.live-dot {
  animation: livePulse 1.9s ease-in-out infinite;
}

.status-item {
  animation: toastSlide 260ms ease both;
}

.saved-meeting,
.stats-grid div,
.control-card,
.toggle-row {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.saved-meeting:hover,
.stats-grid div:hover,
.control-card:hover,
.toggle-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(164, 92, 255, 0.1);
}

.transcript-row {
  animation: bubblePop 320ms ease both;
}

.empty-icon {
  animation: mascotBob 3.4s ease-in-out infinite;
}

.section-icon {
  animation: iconFloat 4.2s ease-in-out infinite;
}

.live-cue {
  overflow: hidden;
  position: relative;
}

.live-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.54), transparent);
  transform: translateX(-100%);
  animation: cueSweep 4s ease-in-out infinite;
}

.welcome-modal {
  animation: modalPop 360ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes candySky {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes confettiDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 120px 80px, -90px 120px; }
}

@keyframes appFloatIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes softDrop {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelFloatIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  50% { transform: translateY(-7px); }
  60% { transform: translateY(-8px); }
}

@keyframes mascotTilt {
  0%, 100% { transform: translate(-50%, -46%) rotate(-3deg); }
  25% { transform: translate(-50%, -48%) rotate(3deg); }
  50% { transform: translate(-50%, -50%) rotate(-1deg); }
  75% { transform: translate(-50%, -48%) rotate(2deg); }
}

@keyframes antennaPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.25); }
  70% { transform: translateX(-50%) scale(0.9); }
}

@keyframes mascotBlink {
  0%, 44%, 48%, 52%, 100% { transform: scaleY(1); }
  46%, 50% { transform: scaleY(0.1); }
}

@keyframes leftWave {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(4deg); }
}

@keyframes rightWave {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: rotate(-4deg); }
}

@keyframes sparklePop {
  0%, 100% { opacity: 0.34; transform: scale(0.72) rotate(0deg); }
  45% { opacity: 1; transform: scale(1.08) rotate(24deg); }
}

@keyframes shineSweep {
  0%, 38% { transform: translateX(-82%) rotate(8deg); }
  58%, 100% { transform: translateX(82%) rotate(8deg); }
}

@keyframes mascotGlow {
  0%, 100% { box-shadow: 0 10px 22px rgba(164, 92, 255, 0.22); }
  50% { box-shadow: 0 12px 28px rgba(255, 103, 200, 0.32); }
}

@keyframes meterCandy {
  from { background-position: 0% 50%; }
  to { background-position: 180% 50%; }
}

@keyframes livePulse {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.35) brightness(1.04); }
}

@keyframes recordingPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.012); }
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bubblePop {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes cueSweep {
  0%, 60% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Dark mode refinements ────────────────────────── */
[data-theme="dark"] .topbar {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(32, 27, 42, 0.88);
}

[data-theme="dark"] .dashboard-sidebar,
[data-theme="dark"] .dashboard-overview {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(32, 27, 42, 0.84);
}

[data-theme="dark"] .sidebar-brand {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .menu-item:hover,
[data-theme="dark"] .menu-item.active {
  border-color: rgba(167, 139, 250, 0.24);
  background: rgba(167, 139, 250, 0.14);
}

[data-theme="dark"] .sidebar-note {
  border-color: rgba(167, 139, 250, 0.2);
  background:
    linear-gradient(145deg, rgba(49, 39, 68, 0.92), rgba(30, 52, 62, 0.88));
}

[data-theme="dark"] .panel {
  border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .transcript-row {
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .transcript-row:hover {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(111, 208, 255, 0.08);
}

[data-theme="dark"] .saved-meeting {
  border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .saved-meeting.active {
  border-color: var(--purple);
  background: rgba(167, 139, 250, 0.12);
}

[data-theme="dark"] .live-cue {
  background: rgba(32, 27, 42, 0.82);
}

[data-theme="dark"] .live-cue::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

[data-theme="dark"] .history-empty {
  border-color: rgba(167, 139, 250, 0.18);
}

[data-theme="dark"] .welcome-modal,
[data-theme="dark"] .login-modal {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .empty-state {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .transcript-row time {
  background: rgba(24, 19, 33, 0.72);
}

[data-theme="dark"] .transcript-row.important time {
  color: var(--amber);
  background: rgba(255, 200, 90, 0.14);
}

[data-theme="dark"] .minutes-actions {
  background: rgba(32, 27, 42, 0.92);
}

/* ── Focus states ─────────────────────────────────── */
.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.theme-toggle:focus-visible,
.google-login-button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.text-input:focus-visible,
textarea:focus-visible {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Live transcript: source preflight, quality feedback, and operational visibility. */
.audio-preflight {
  display: grid;
  gap: 12px;
  margin: 16px 0 14px;
  padding: 14px;
  border: 1px solid rgba(77, 91, 215, 0.18);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(77, 91, 215, 0.07), transparent 55%),
    var(--status-bg);
}

.audio-preflight-head,
.audio-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.control-eyebrow {
  display: block;
  color: var(--secondary-ink);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.audio-preflight-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.audio-health-badge,
.audio-level-status,
.live-cue-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-size: 10px;
  font-weight: 740;
  line-height: 1;
  white-space: nowrap;
}

.audio-health-badge svg {
  width: 12px;
  height: 12px;
}

.audio-health-badge[data-state="ready"],
.audio-health-badge[data-state="healthy"],
.audio-health-badge[data-state="active"],
.audio-level-status[data-state="good"],
.audio-level-status[data-state="healthy"],
.live-cue-status[data-state="active"] {
  border-color: rgba(12, 146, 112, 0.26);
  color: var(--green);
  background: var(--green-soft);
}

.audio-health-badge[data-state="warning"],
.audio-level-status[data-state="warning"],
.live-cue-status[data-state="warning"] {
  border-color: rgba(162, 103, 7, 0.26);
  color: var(--amber);
  background: var(--amber-soft);
}

.audio-health-badge[data-state="error"],
.audio-health-badge[data-state="danger"],
.audio-level-status[data-state="error"],
.audio-level-status[data-state="danger"],
.live-cue-status[data-state="error"] {
  border-color: rgba(207, 77, 66, 0.26);
  color: var(--red);
  background: var(--red-soft);
}

.audio-preflight-copy {
  margin: -3px 0 1px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.control-group.source-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.toggle-row.audio-source-option {
  min-height: 74px;
  padding: 10px;
  border-color: var(--line);
  background: var(--panel);
  box-shadow: none;
}

.toggle-row.audio-source-option:hover {
  transform: translateY(-1px);
  border-color: rgba(77, 91, 215, 0.34);
  box-shadow: 0 8px 18px rgba(26, 38, 63, 0.06);
}

.toggle-row.audio-source-option:has(input:checked) {
  border-color: rgba(77, 91, 215, 0.38);
  background: linear-gradient(135deg, rgba(77, 91, 215, 0.1), rgba(77, 91, 215, 0.03));
}

.audio-source-option .audio-source-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.audio-source-option .audio-source-copy > span:last-child {
  display: grid;
  align-items: initial;
  gap: 3px;
  min-width: 0;
}

.audio-source-option .audio-source-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-source-option .audio-source-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.28;
}

.audio-source-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
}

.audio-source-icon.mic {
  color: var(--secondary-ink);
  background: var(--purple-soft);
}

.audio-source-icon svg,
.toggle-row .audio-source-icon svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.audio-source-option input {
  width: 36px;
  height: 21px;
}

.audio-monitor {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.audio-monitor-head > div {
  display: grid;
  gap: 3px;
}

.audio-monitor-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.audio-monitor-head strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 730;
}

.audio-monitor-head .audio-level-status {
  color: var(--muted);
}

.audio-meter {
  height: 7px;
  margin: 0;
  background: var(--meter-bg);
}

.audio-quality-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding-top: 2px;
  color: var(--muted);
}

.audio-quality-tip svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--secondary-ink);
}

.audio-quality-tip p {
  margin: 0;
  font-size: 10px;
  line-height: 1.42;
}

.audio-quality-tip strong {
  color: var(--ink);
  font-weight: 720;
}

.transcript-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.live-observability {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(77, 91, 215, 0.035), transparent);
}

.live-observability-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--panel);
}

.live-observability-item > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.live-observability-item > div > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-observability-item strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-observability-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-observability-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: var(--secondary-ink);
  background: var(--purple-soft);
}

.live-observability-icon.queue {
  color: var(--blue);
  background: var(--blue-soft);
}

.live-observability-icon.latency {
  color: var(--amber);
  background: var(--amber-soft);
}

.live-observability-icon.quality {
  color: var(--green);
  background: var(--green-soft);
}

.live-observability-icon svg {
  width: 14px;
  height: 14px;
}

.live-observability-item[data-state="ready"],
.live-observability-item[data-state="active"],
.live-observability-item[data-state="healthy"] {
  border-color: rgba(12, 146, 112, 0.24);
}

.live-observability-item[data-state="ready"] .live-observability-icon,
.live-observability-item[data-state="active"] .live-observability-icon,
.live-observability-item[data-state="healthy"] .live-observability-icon {
  color: var(--green);
  background: var(--green-soft);
}

.live-observability-item[data-state="warning"],
.live-observability-item[data-state="reconnecting"] {
  border-color: rgba(162, 103, 7, 0.3);
  background: var(--amber-soft);
}

.live-observability-item[data-state="warning"] .live-observability-icon,
.live-observability-item[data-state="reconnecting"] .live-observability-icon {
  color: var(--amber);
  background: var(--panel);
}

.live-observability-item[data-state="error"],
.live-observability-item[data-state="danger"] {
  border-color: rgba(207, 77, 66, 0.3);
  background: var(--red-soft);
}

.live-observability-item[data-state="error"] .live-observability-icon,
.live-observability-item[data-state="danger"] .live-observability-icon {
  color: var(--red);
  background: var(--panel);
}

.live-cue {
  gap: 9px;
}

.live-cue-copy {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  gap: 7px;
}

.live-cue-copy > span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-cue-status {
  margin-left: auto;
}

@media (max-width: 980px) {
  .live-observability {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .audio-preflight {
    padding: 12px;
  }

  .control-group.source-mode-grid {
    grid-template-columns: 1fr;
  }

  .toggle-row.audio-source-option {
    min-height: 64px;
  }

  .live-observability {
    gap: 7px;
    padding: 10px 12px;
  }

  .live-observability-item {
    padding: 8px;
  }

  .live-observability-item small {
    display: none;
  }

  .live-cue {
    min-height: 42px;
    margin: 0 12px 12px;
    padding: 0 12px;
  }

  .live-cue-copy > span {
    display: none;
  }
}

/* ── Safe actions ────────────────────────────────────────────────────── */
.confirm-backdrop {
  z-index: 80;
}

.confirm-modal {
  width: min(460px, 100%);
}

.confirm-modal h2 {
  margin-right: 0;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.confirm-actions .primary-button {
  width: auto;
  min-width: 136px;
}

.danger-confirm {
  background: linear-gradient(135deg, #bf4b43, #dc6558);
  box-shadow: 0 12px 24px rgba(191, 75, 67, 0.22);
}

.danger-confirm:hover:not(:disabled) {
  background: linear-gradient(135deg, #ad413a, #cb554b);
  box-shadow: 0 14px 28px rgba(191, 75, 67, 0.28);
}

.undo-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: min(420px, calc(100vw - 32px));
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  animation: undoToastIn 180ms ease both;
}

.undo-toast[hidden] {
  display: none;
}

.undo-toast > span {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.undo-toast .secondary-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
}

.undo-toast .icon-button {
  flex: 0 0 auto;
}

@keyframes undoToastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .secondary-button,
  .confirm-actions .primary-button {
    width: 100%;
  }

  .undo-toast {
    right: 10px;
    bottom: 10px;
    min-width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
}

/* ── Workspace views ───────────────────────────────────────────────────
   Sidebar links are application views, not scroll shortcuts. */
[data-workspace-view][hidden] {
  display: none !important;
}

.workspace {
  display: block;
  width: 100%;
  margin: 0;
}

.app-shell[data-view="dashboard"] .workspace {
  display: none;
}

.app-shell[data-view]:not([data-view="dashboard"]) .dashboard-overview {
  display: none;
}

.app-shell[data-view]:not([data-view="dashboard"]) .workspace {
  display: block;
  width: min(100%, 1160px);
  margin: 0 auto;
}

/* Dashboard is now a proper home screen: status, next action, and flow. */
.app-shell[data-view="dashboard"] .dashboard-overview {
  display: grid;
  grid-template-areas:
    "copy stats"
    "flow flow"
    "usage usage";
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  align-items: stretch;
  gap: 20px;
  min-height: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
}

.app-shell[data-view="dashboard"] .overview-copy {
  grid-area: copy;
  align-content: start;
  padding: 4px 0;
}

.app-shell[data-view="dashboard"] .overview-copy h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

.app-shell[data-view="dashboard"] .overview-copy p {
  max-width: 430px;
  margin-top: 2px;
}

.app-shell[data-view="dashboard"] .dashboard-stats {
  grid-area: stats;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: stretch;
  margin: 0;
}

#dashboardOverview .dashboard-stats > div:nth-child(4) {
  display: block;
}

.app-shell[data-view="dashboard"] .dashboard-stats div {
  display: grid;
  align-content: center;
  min-height: 86px;
  padding: 14px;
}

.dashboard-workflow {
  grid-area: flow;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workflow-card {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 104px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  color: #f6f8ff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.workflow-card::before {
  content: "";
  position: absolute;
  inset: auto -20px -45px auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(161, 176, 255, 0.08);
  pointer-events: none;
}

.workflow-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.workflow-card > * {
  position: relative;
  z-index: 1;
}

.workflow-card > svg {
  width: 16px;
  height: 16px;
  color: #c9d1ff;
}

.workflow-step {
  align-self: start;
  color: #aeb9fb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.workflow-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.workflow-icon svg {
  width: 16px;
  height: 16px;
}

.workflow-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-copy strong {
  font-size: 13px;
  font-weight: 760;
}

.workflow-copy small {
  color: #bfc8dc;
  font-size: 11px;
  line-height: 1.38;
}

.dashboard-ai-usage {
  grid-area: usage;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-ai-usage > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c7d0e7;
  font-size: 11px;
  font-weight: 680;
}

.dashboard-ai-usage > span svg {
  width: 15px;
  height: 15px;
}

.dashboard-ai-usage > div {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px 8px;
  flex-wrap: wrap;
}

.dashboard-ai-usage strong {
  color: #ffffff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.dashboard-ai-usage small {
  color: #b7c1d8;
  font-size: 10px;
}

/* Dedicated work surfaces. */
.app-shell[data-view="recording"] #recordingPanel {
  display: block;
  width: min(100%, 660px);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding: 26px;
  overflow: visible;
}

.app-shell[data-view="recording"] #recordingPanel .assistant-card {
  margin-bottom: 20px;
}

.app-shell[data-view="recording"] #recordingPanel .control-card {
  padding: 19px;
}

.app-shell[data-view="recording"] #recordingPanel .status-log {
  margin-top: 16px;
}

.app-shell[data-view="transcript"] #transcriptPanel,
.app-shell[data-view="minutes"] #minutesPanel,
.app-shell[data-view="history"] #historyPanel {
  width: 100%;
  height: min(760px, calc(100svh - 128px));
  min-height: 560px;
  margin: 0 auto;
}

.app-shell[data-view="transcript"] #transcriptPanel {
  display: grid;
  max-width: 1160px;
}

.app-shell[data-view="minutes"] #minutesPanel {
  display: grid;
  max-width: 1080px;
}

.app-shell[data-view="history"] #historyPanel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-width: 980px;
  overflow: hidden;
}

.history-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 25px 19px;
  border-bottom: 1px solid var(--line);
}

.history-page-head > div {
  display: grid;
  gap: 5px;
}

.history-page-head span {
  color: var(--secondary-ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-page-head h2 {
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.history-page-head p {
  max-width: 540px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-page-head .icon-button {
  flex: 0 0 auto;
}

.history-page-search {
  height: 44px;
  margin: 16px 25px 12px;
  padding: 0 13px;
}

.history-page-list {
  max-height: none;
  min-height: 0;
  gap: 9px;
  padding: 0 25px 24px;
}

.history-page-list .saved-meeting {
  min-height: 74px;
}

.history-page-list .saved-meeting-main {
  padding: 13px 14px;
}

.history-page-list .saved-meeting-main strong {
  font-size: 13px;
}

.history-page-list .saved-meeting-main span {
  font-size: 11px;
}

.history-page-list .history-empty {
  min-height: 100px;
  display: grid;
  place-items: center;
  text-align: center;
}

/* The header reflects the route instead of repeating a generic dashboard. */
#pageTitle {
  font-size: 18px;
}

@media (max-width: 1180px) {
  .app-shell[data-view="dashboard"] .dashboard-overview {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    padding: 23px;
  }

  .dashboard-workflow {
    gap: 8px;
  }

  .workflow-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 92px;
    gap: 9px;
  }

  .workflow-step {
    display: none;
  }

  .app-shell[data-view]:not([data-view="dashboard"]) .workspace {
    width: min(100%, 1000px);
  }
}

@media (max-width: 760px) {
  .sidebar-menu .menu-item {
    flex-direction: column;
    gap: 2px;
    min-height: 48px;
    padding: 5px 1px;
  }

  .sidebar-menu .menu-item span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell[data-view="dashboard"] .dashboard-overview {
    grid-template-areas:
      "copy"
      "stats"
      "flow"
      "usage";
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px 16px;
  }

  .app-shell[data-view="dashboard"] .overview-copy h2 {
    font-size: 28px;
  }

  .app-shell[data-view="dashboard"] .overview-copy p {
    display: block;
    font-size: 12px;
  }

  .app-shell[data-view="dashboard"] .overview-actions {
    display: flex;
    margin-top: 10px;
  }

  .app-shell[data-view="dashboard"] .dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .app-shell[data-view="dashboard"] .dashboard-stats div {
    min-height: 64px;
    padding: 10px;
  }

  .dashboard-workflow {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .workflow-card {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    min-height: 73px;
    padding: 11px;
  }

  .workflow-step {
    display: block;
    align-self: center;
  }

  .workflow-copy small {
    font-size: 10px;
  }

  .dashboard-ai-usage {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 11px 0 0;
  }

  .dashboard-ai-usage > div {
    justify-content: flex-start;
  }

  .app-shell[data-view]:not([data-view="dashboard"]) .workspace {
    width: 100%;
  }

  .app-shell[data-view="recording"] #recordingPanel {
    width: 100%;
    padding: 17px;
  }

  .app-shell[data-view="transcript"] #transcriptPanel,
  .app-shell[data-view="minutes"] #minutesPanel,
  .app-shell[data-view="history"] #historyPanel {
    height: calc(100svh - 138px);
    min-height: 500px;
  }

  .history-page-head {
    padding: 18px 16px 14px;
  }

  .history-page-head h2 {
    font-size: 20px;
  }

  .history-page-search {
    margin: 12px 16px 10px;
  }

  .history-page-list {
    padding: 0 16px 16px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: relative;
    top: auto;
    flex-direction: row;
    align-items: stretch;
    height: auto;
    min-height: 0;
  }

  .sidebar-brand {
    flex: 0 0 210px;
    padding: 2px 12px 2px 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .sidebar-menu {
    flex: 1 1 auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-content: center;
  }

  .menu-item {
    justify-content: center;
    padding: 0 8px;
  }

  .sidebar-note {
    flex: 0 0 230px;
    margin-top: 0;
  }

  .dashboard-overview {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workspace {
    grid-template-columns: 288px minmax(0, 1fr);
  }

  .panel {
    height: 600px;
    min-height: 520px;
  }

  .minutes-panel {
    grid-column: 1 / -1;
    min-height: 540px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    gap: 10px;
    padding: 10px;
  }

  .dashboard-sidebar {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .sidebar-brand {
    flex: none;
    padding: 0 0 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .menu-item {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .sidebar-note {
    display: none;
  }

  .dashboard-overview {
    padding: 12px;
  }

  .overview-copy h2 {
    font-size: 21px;
  }

  .dashboard-stats {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dashboard-stats div {
    flex: 0 0 126px;
    min-height: 70px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .user-pill {
    width: 100%;
    max-width: 100%;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .panel,
  .minutes-panel {
    height: auto;
    min-height: auto;
  }

  .controls-panel {
    min-height: auto;
  }

  .transcript-panel {
    height: 530px;
    min-height: 530px;
  }

  .minutes-panel {
    height: 570px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .minutes-actions {
    justify-content: flex-start;
  }

  .transcript-row {
    grid-template-columns: 94px minmax(0, 1fr) auto;
  }

  .transcript-row .edit-btn {
    opacity: 0.72;
  }
}

/* ── Workspace redesign ────────────────────────────────────────────────
   A calmer, task-focused visual system layered over the existing markup.
   The component hooks above stay intact because app.js creates several
   transcript, history, and follow-up elements dynamically. */
:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-2: #e8edf7;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.82);
  --ink: #172033;
  --muted: #69758a;
  --line: #e5eaf2;
  --row-border: #e9edf4;
  --input-bg: #f8fafc;
  --status-bg: #f8fafc;
  --blue: #3875e8;
  --blue-soft: #edf4ff;
  --pink: #de6b53;
  --pink-soft: #fff0ed;
  --purple: #4d5bd7;
  --purple-soft: #eef0ff;
  --green: #0c9270;
  --green-soft: #e9faf4;
  --amber: #a26707;
  --amber-soft: #fff5db;
  --red: #cf4d42;
  --red-soft: #ffefed;
  --secondary-ink: #3e4bc3;
  --interim-ink: #35629f;
  --shadow: 0 18px 50px rgba(26, 38, 63, 0.09);
  --soft-shadow: 0 10px 32px rgba(26, 38, 63, 0.07);
  --meter-bg: #e2e8f4;
  --modal-overlay: rgba(15, 23, 42, 0.56);
  --modal-shadow: 0 28px 70px rgba(15, 23, 42, 0.25);
  --modal-body: #5e6c82;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101827;
  --bg-2: #172235;
  --panel: #182235;
  --panel-soft: rgba(24, 34, 53, 0.88);
  --ink: #edf2fb;
  --muted: #a7b2c6;
  --line: #2b3951;
  --row-border: #28364c;
  --input-bg: #111a2a;
  --status-bg: #141f31;
  --blue: #7ca8ff;
  --blue-soft: rgba(124, 168, 255, 0.13);
  --pink: #ff9d86;
  --pink-soft: rgba(255, 157, 134, 0.13);
  --purple: #94a2ff;
  --purple-soft: rgba(148, 162, 255, 0.14);
  --green: #5ed3ae;
  --green-soft: rgba(94, 211, 174, 0.13);
  --amber: #f1be59;
  --amber-soft: rgba(241, 190, 89, 0.14);
  --red: #ff9288;
  --red-soft: rgba(255, 146, 136, 0.14);
  --secondary-ink: #b1bcff;
  --interim-ink: #a5c5ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  --soft-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  --meter-bg: #2c3a53;
  --modal-overlay: rgba(2, 6, 23, 0.74);
  --modal-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  --modal-body: #b4c0d4;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 88% -8%, rgba(109, 137, 233, 0.16), transparent 31rem),
    radial-gradient(circle at 8% 100%, rgba(64, 181, 166, 0.1), transparent 30rem),
    var(--bg);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: none;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 88% -8%, rgba(115, 133, 255, 0.14), transparent 31rem),
    radial-gradient(circle at 8% 100%, rgba(39, 158, 140, 0.1), transparent 30rem),
    var(--bg);
}

body::before {
  display: none;
}

.app-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  min-height: 100svh;
  padding: 18px;
  animation: none;
}

.dashboard-sidebar {
  position: sticky;
  top: 18px;
  gap: 20px;
  height: calc(100svh - 36px);
  min-height: 540px;
  padding: 20px 14px 14px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 8% 0%, rgba(121, 141, 255, 0.42), transparent 13rem),
    linear-gradient(165deg, #1d2941 0%, #111a2b 58%, #0d1422 100%);
  box-shadow: 0 18px 44px rgba(17, 26, 43, 0.2);
  backdrop-filter: none;
}

.dashboard-sidebar::before {
  content: "";
  position: absolute;
  right: -54px;
  bottom: 104px;
  width: 155px;
  height: 155px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.025), 0 0 0 61px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.sidebar-brand,
.sidebar-menu,
.sidebar-note {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  gap: 11px;
  padding: 1px 7px 18px;
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-brand strong {
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.sidebar-brand span {
  color: #aab7cf;
  font-size: 11px;
  font-weight: 650;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #7081ff, #a3aeff);
  box-shadow: 0 10px 22px rgba(111, 128, 255, 0.3);
  animation: none;
}

.brand-mark::after,
.primary-button::after,
.secondary-button.accent::after {
  display: none;
}

.brand-initial {
  font-size: 12px;
  letter-spacing: 0.05em;
}

.sidebar-menu {
  gap: 5px;
}

.menu-item {
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #aebbd0;
  font-size: 13px;
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.menu-item svg {
  width: 17px;
  height: 17px;
}

.menu-item:hover,
.menu-item.active {
  border-color: transparent;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(123, 140, 255, 0.4), rgba(123, 140, 255, 0.15));
}

.menu-item:hover {
  transform: translateX(2px);
}

.sidebar-note {
  gap: 7px;
  margin: auto 3px 2px;
  padding: 14px;
  border: 1px solid rgba(169, 187, 255, 0.2);
  border-radius: 15px;
  background: rgba(125, 143, 255, 0.12);
}

.sidebar-note span,
.overview-kicker {
  color: #b9c2ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.sidebar-note strong {
  color: #ffffff;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.sidebar-note p {
  color: #bac5d7;
  font-size: 11px;
  line-height: 1.5;
}

.dashboard-main {
  gap: 18px;
}

.topbar {
  min-height: 68px;
  padding: 11px 15px 11px 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--panel-soft);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
  animation: none;
}

.topbar .brand-mark {
  width: 40px;
  height: 40px;
}

h1 {
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.brand p,
.panel-head p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
}

.top-actions {
  gap: 8px;
}

.status-pill {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--status-bg);
  font-size: 11px;
  font-weight: 720;
}

.status-pill.ok {
  border-color: rgba(12, 146, 112, 0.18);
}

.user-pill {
  min-height: 39px;
  padding: 4px 5px 4px 8px;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: none;
}

.user-pill strong {
  font-size: 11px;
}

.user-pill small {
  font-size: 10px;
}

.icon-button,
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--panel);
  box-shadow: none;
}

.icon-button.small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.icon-button:hover:not(:disabled),
.theme-toggle:hover:not(:disabled) {
  color: var(--secondary-ink);
  border-color: rgba(77, 91, 215, 0.32);
  background: var(--purple-soft);
  box-shadow: none;
  transform: translateY(-1px);
}

.dashboard-overview {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(300px, 0.92fr) minmax(420px, 1.08fr);
  gap: 24px;
  min-height: 172px;
  padding: 24px 26px;
  overflow: hidden;
  border: 0;
  border-radius: 23px;
  color: #f7f9ff;
  background:
    radial-gradient(circle at 12% 0%, rgba(145, 158, 255, 0.46), transparent 15rem),
    linear-gradient(115deg, #273456 0%, #1e2947 53%, #25356f 100%);
  box-shadow: 0 18px 44px rgba(29, 43, 79, 0.18);
  backdrop-filter: none;
}

.dashboard-overview::after {
  content: "";
  position: absolute;
  right: -78px;
  top: -116px;
  z-index: -1;
  width: 305px;
  height: 305px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px rgba(255, 255, 255, 0.045),
    0 0 0 65px rgba(255, 255, 255, 0.03);
}

.dashboard-overview > * {
  position: relative;
  z-index: 1;
}

.overview-kicker {
  color: #c8d0ff;
}

.overview-copy {
  gap: 8px;
}

.overview-copy h2 {
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.overview-copy p {
  max-width: 480px;
  color: #c8d0e4;
  font-size: 13px;
  line-height: 1.5;
}

.overview-actions {
  gap: 9px;
  margin-top: 6px;
}

.dashboard-link {
  min-height: 38px;
  padding: 0 13px;
  border-color: rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  color: #eef1ff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 720;
}

.dashboard-link.primary {
  color: #1e2a48;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(9, 15, 31, 0.18);
}

.dashboard-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.dashboard-link.primary:hover {
  color: #15213c;
  background: #f3f5ff;
}

.dashboard-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-stats > div:nth-child(n + 4):nth-child(-n + 6) {
  display: none;
}

.stats-grid div {
  min-height: 60px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(5px);
  transition: background 150ms ease, transform 150ms ease;
}

.stats-grid div:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  transform: translateY(-1px);
}

.stats-grid span {
  color: #b9c4da;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.07em;
}

.stats-grid strong {
  margin-top: 6px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 720;
}

.workspace {
  grid-template-columns: minmax(274px, 300px) minmax(390px, 1.15fr) minmax(335px, 0.9fr);
  gap: 18px;
}

.panel {
  height: clamp(500px, calc(100svh - 286px), 780px);
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: none;
}

@media (min-width: 1181px) {
  .app-shell[data-focus="recording"] .workspace,
  .app-shell[data-focus="history"] .workspace {
    grid-template-columns: minmax(314px, 0.92fr) minmax(380px, 1.08fr) minmax(318px, 0.85fr);
  }

  .app-shell[data-focus="transcript"] .workspace {
    grid-template-columns: minmax(260px, 0.72fr) minmax(480px, 1.42fr) minmax(315px, 0.86fr);
  }

  .app-shell[data-focus="minutes"] .workspace {
    grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 0.87fr) minmax(410px, 1.4fr);
  }
}

.app-shell[data-focus="recording"] #recordingPanel,
.app-shell[data-focus="history"] #recordingPanel,
.app-shell[data-focus="transcript"] #transcriptPanel,
.app-shell[data-focus="minutes"] #minutesPanel {
  border-color: rgba(77, 91, 215, 0.4);
  box-shadow: 0 18px 48px rgba(57, 70, 169, 0.16);
}

.app-shell[data-focus="history"] #historyPanel {
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(77, 91, 215, 0.26);
}

.controls-panel {
  padding: 18px;
  background: var(--panel);
}

.assistant-card {
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  padding: 2px 2px 0;
  text-align: left;
}

.assistant-card > div:last-child {
  min-width: 0;
}

.assistant-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.assistant-card strong {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.assistant-avatar,
.mascot-stage {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #eef0ff, #dfe5ff);
  box-shadow: none;
  animation: none;
}

.mascot-stage .mascot {
  width: 38px;
  height: 32px;
  border-radius: 12px;
  box-shadow: none;
  animation: none;
}

.mascot-stage .mascot-antenna {
  top: -10px;
  height: 10px;
}

.mascot-stage .mascot-antenna::after {
  width: 7px;
  height: 7px;
  box-shadow: none;
  animation: none;
}

.mascot-stage .mascot-eye {
  top: 11px;
  width: 5px;
  height: 7px;
  animation: none;
}

.mascot-stage .mascot-eye.left {
  left: 11px;
}

.mascot-stage .mascot-eye.right {
  right: 11px;
}

.mascot-stage .mascot-mouth {
  top: 21px;
  width: 12px;
  height: 5px;
}

.mascot-stage .mascot-cheek {
  top: 20px;
  width: 6px;
  height: 4px;
}

.mascot-stage .mascot-cheek.left {
  left: 6px;
}

.mascot-stage .mascot-cheek.right {
  right: 6px;
}

.mascot-stage .mascot-arm,
.mascot-stage .mascot-sparkle {
  display: none;
}

.control-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: none;
}

.control-card:hover {
  transform: none;
  box-shadow: none;
}

.field-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.field-label.stacked {
  margin-top: 15px;
}

.text-input {
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--input-bg);
  font-size: 13px;
}

.text-input:focus,
textarea:focus {
  border-color: rgba(77, 91, 215, 0.72);
  box-shadow: 0 0 0 3px rgba(77, 91, 215, 0.12);
}

.select-input {
  background-color: var(--input-bg);
}

.control-group {
  gap: 8px;
  margin: 15px 0;
}

.toggle-row {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--input-bg);
  font-size: 12px;
  font-weight: 650;
}

.toggle-row:hover {
  transform: none;
  box-shadow: none;
}

.toggle-row svg {
  color: var(--secondary-ink);
}

.toggle-row input {
  width: 34px;
  height: 20px;
  background: #cbd5e1;
}

.toggle-row input::before {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.toggle-row input:checked {
  background: var(--purple);
}

.toggle-row input:checked::before {
  transform: translateX(14px);
}

.meter-wrap {
  height: 7px;
  margin: 17px 0 13px;
  border-radius: 99px;
  background: var(--meter-bg);
}

.meter-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #54c59b);
}

.primary-button,
.secondary-button {
  border-radius: 11px;
  font-weight: 720;
}

.primary-button {
  height: 46px;
  color: #ffffff;
  background: linear-gradient(135deg, #4857d6, #5969e7);
  box-shadow: 0 12px 24px rgba(72, 87, 214, 0.22);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #3d4bc7, #4f5edb);
  box-shadow: 0 14px 28px rgba(72, 87, 214, 0.28);
  transform: translateY(-1px);
}

.primary-button.recording {
  background: linear-gradient(135deg, #ca554a, #e56a57);
  box-shadow: 0 12px 24px rgba(207, 77, 66, 0.23);
  animation: recordingPulse 1.8s ease-in-out infinite;
}

.secondary-button {
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid var(--line);
  color: var(--secondary-ink);
  background: var(--panel);
  font-size: 12px;
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(77, 91, 215, 0.35);
  color: var(--secondary-ink);
  background: var(--purple-soft);
  box-shadow: none;
  transform: translateY(-1px);
}

.secondary-button.accent {
  color: #ffffff;
  border-color: transparent;
  background: var(--purple);
}

.secondary-button:disabled,
.primary-button:disabled,
.icon-button:disabled {
  opacity: 0.45;
}

.status-log {
  gap: 7px;
  margin-top: 14px;
}

.status-item {
  padding: 9px 10px;
  border-color: var(--line);
  border-radius: 10px;
  background: var(--status-bg);
  font-size: 11px;
}

.draft-status {
  margin-top: 8px;
  padding: 8px 10px;
  border-color: var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--status-bg);
  font-size: 11px;
}

.history-block {
  margin-top: 18px;
  padding-top: 17px;
  border-color: var(--line);
}

.history-head {
  margin-bottom: 11px;
}

.history-head span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.history-head h2 {
  margin-top: 3px;
  font-size: 15px;
}

.history-search {
  height: 39px;
  margin-bottom: 10px;
  border-color: var(--line);
  border-radius: 11px;
  background: var(--input-bg);
}

.saved-meetings-list {
  max-height: 262px;
  gap: 7px;
}

.history-empty {
  border-color: #d7deea;
  border-radius: 11px;
  background: var(--status-bg);
  font-size: 12px;
}

.saved-meeting {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.saved-meeting:hover {
  border-color: rgba(77, 91, 215, 0.35);
  box-shadow: none;
  transform: none;
}

.saved-meeting.active {
  border-color: rgba(77, 91, 215, 0.54);
  background: var(--purple-soft);
}

.saved-meeting-main {
  padding: 10px;
}

.saved-meeting-main strong {
  font-size: 12px;
}

.saved-meeting-main span {
  font-size: 10px;
}

.transcript-panel,
.minutes-panel {
  background: var(--panel);
}

.panel-head {
  min-height: 74px;
  padding: 15px 17px;
  border-color: var(--line);
  background: var(--panel);
}

.panel-title {
  gap: 11px;
}

.panel-title h2 {
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.panel-actions {
  gap: 6px;
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.section-icon.blue {
  color: #3d72dd;
  background: #edf4ff;
}

.section-icon.pink {
  color: #c95c47;
  background: #fff0ed;
}

.section-icon.green {
  color: #0b8a69;
  background: #e8f8f1;
}

.transcript-list {
  padding: 16px;
  background: var(--panel);
}

.empty-state {
  min-height: 265px;
  border-color: #dce3ee;
  border-radius: 16px;
  color: var(--muted);
  background: linear-gradient(145deg, var(--status-bg), var(--panel));
}

.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
}

.transcript-row {
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 8px;
  padding: 13px 13px 12px;
  border-color: var(--row-border);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
}

.transcript-row:hover {
  margin: 0 0 8px;
  padding: 13px 13px 12px;
  border-color: rgba(77, 91, 215, 0.3);
  background: #fbfcff;
  transform: none;
}

[data-theme="dark"] .transcript-row:hover {
  background: #1c2940;
}

.transcript-row time {
  min-height: 23px;
  width: 54px;
  color: var(--muted);
  background: var(--status-bg);
  font-size: 11px;
}

.transcript-meta {
  gap: 5px;
}

.speaker-label {
  width: max-content;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.transcript-row p {
  font-size: 13px;
  line-height: 1.58;
}

.transcript-row.important {
  border-color: rgba(190, 127, 19, 0.38);
  background: linear-gradient(90deg, rgba(255, 244, 210, 0.56), transparent 48%), var(--panel);
}

[data-theme="dark"] .transcript-row.important {
  background: linear-gradient(90deg, rgba(241, 190, 89, 0.11), transparent 48%), var(--panel);
}

.transcript-row .edit-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.transcript-row .edit-btn:hover,
.transcript-row .important-toggle.active {
  color: var(--secondary-ink);
  border-color: rgba(77, 91, 215, 0.35);
  background: var(--purple-soft);
}

.edit-input {
  border-color: var(--line);
  border-radius: 9px;
  background: var(--input-bg);
}

.live-cue {
  min-height: 44px;
  padding: 0 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel);
  font-size: 11px;
}

.live-cue::after {
  display: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.live-cue strong {
  color: var(--green);
}

.minutes-panel {
  grid-template-rows: auto minmax(190px, 1fr) auto auto;
}

.minutes-panel textarea {
  margin: 14px 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--input-bg);
  font-size: 13px;
  line-height: 1.62;
}

.followups-block {
  min-height: 124px;
  max-height: 182px;
  margin: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.followups-head {
  padding: 12px;
  border-color: var(--line);
}

.followups-head strong {
  font-size: 12px;
}

.followups-head p {
  font-size: 10px;
}

.followups-list {
  padding: 6px 8px 9px;
}

.followup-item {
  padding: 8px 6px;
  border-color: var(--row-border);
}

.followup-item input {
  accent-color: var(--purple);
}

.followup-item strong {
  font-size: 11px;
}

.followup-item small {
  margin-top: 3px;
  font-size: 10px;
}

.followups-empty {
  color: var(--muted);
  font-size: 11px;
}

.minutes-actions {
  gap: 7px;
  justify-content: flex-start;
  padding: 14px 16px 16px;
  border-color: var(--line);
  background: var(--panel);
}

.minutes-spinner {
  border-color: rgba(77, 91, 215, 0.18);
  border-top-color: var(--purple);
}

.welcome-modal,
.login-modal {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--modal-shadow);
}

.modal-kicker {
  color: var(--secondary-ink);
  letter-spacing: 0.08em;
}

.welcome-modal h2,
.login-modal h2 {
  color: var(--ink);
  letter-spacing: -0.03em;
}

.welcome-modal p,
.login-modal p,
.consent-list {
  color: var(--modal-body);
}

[data-theme="dark"] .user-pill,
[data-theme="dark"] .controls-panel,
[data-theme="dark"] .control-card,
[data-theme="dark"] .history-search,
[data-theme="dark"] .saved-meeting,
[data-theme="dark"] .transcript-list,
[data-theme="dark"] .panel-head,
[data-theme="dark"] .minutes-actions {
  border-color: var(--line);
  background: var(--panel);
}

[data-theme="dark"] .assistant-avatar,
[data-theme="dark"] .mascot-stage {
  background: linear-gradient(145deg, #273653, #1d2a43);
}

[data-theme="dark"] .toggle-row,
[data-theme="dark"] .history-empty {
  border-color: var(--line);
  background: var(--input-bg);
}

[data-theme="dark"] .transcript-row:hover {
  border-color: rgba(148, 162, 255, 0.36);
}

[data-theme="dark"] .section-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

[data-theme="dark"] .section-icon.pink {
  color: var(--pink);
  background: var(--pink-soft);
}

[data-theme="dark"] .section-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.google-login-button {
  border-color: var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--panel);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.theme-toggle:focus-visible,
.google-login-button:focus-visible,
.menu-item:focus-visible,
.dashboard-link:focus-visible,
.toggle-row:focus-within {
  outline: 3px solid rgba(77, 91, 215, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 222px minmax(0, 1fr);
    padding: 14px;
    gap: 14px;
  }

  .dashboard-sidebar {
    top: 14px;
    height: calc(100svh - 28px);
  }

  .dashboard-overview {
    grid-template-columns: minmax(250px, 0.78fr) minmax(365px, 1.22fr);
    padding: 22px;
  }

  .workspace {
    grid-template-columns: minmax(256px, 0.82fr) minmax(340px, 1.08fr) minmax(300px, 0.85fr);
    gap: 14px;
  }

  .panel {
    height: clamp(500px, calc(100svh - 274px), 760px);
  }

  .panel-actions .secondary-button {
    padding: 0 9px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    display: block;
    padding: 14px;
  }

  .dashboard-sidebar {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 20px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 18px;
  }

  .sidebar-brand {
    padding: 0;
    border: 0;
  }

  .sidebar-menu {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    overflow-x: auto;
  }

  .menu-item {
    flex: 0 0 auto;
    min-height: 37px;
    padding: 0 10px;
  }

  .menu-item:hover {
    transform: none;
  }

  .sidebar-note {
    display: none;
  }

  .dashboard-main {
    gap: 14px;
  }

  .workspace {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 14px;
  }

  .controls-panel {
    grid-column: 1 / -1;
  }

  .panel {
    height: 590px;
  }

  .controls-panel {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .dashboard-sidebar {
    display: block;
    padding: 13px;
    margin-bottom: 10px;
  }

  .sidebar-brand {
    margin-bottom: 12px;
    padding: 0 2px;
  }

  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    overflow: visible;
    padding-bottom: 0;
  }

  .menu-item {
    justify-content: center;
    min-height: 35px;
    padding: 0;
  }

  .menu-item svg {
    width: 15px;
    height: 15px;
  }

  .menu-item span {
    display: none;
  }

  .dashboard-main {
    gap: 10px;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
    border-radius: 17px;
  }

  .top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .status-pill {
    order: -1;
  }

  .user-pill {
    max-width: calc(100% - 144px);
  }

  .dashboard-overview {
    display: block;
    min-height: 0;
    padding: 17px 18px;
    border-radius: 19px;
  }

  .overview-copy h2 {
    font-size: 22px;
  }

  .overview-copy p {
    display: none;
  }

  .overview-actions,
  .dashboard-stats {
    display: none;
  }

  .stats-grid div {
    min-height: 57px;
    padding: 10px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel,
  .transcript-panel,
  .minutes-panel {
    height: auto;
    min-height: 0;
    border-radius: 18px;
  }

  .controls-panel {
    padding: 15px;
  }

  .transcript-panel {
    height: 520px;
  }

  .minutes-panel {
    height: 560px;
  }

  .panel-head {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .panel-actions .secondary-button {
    min-height: 33px;
  }

  .transcript-list {
    padding: 12px;
  }

  .transcript-row {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 11px;
  }

  .transcript-row:hover {
    padding: 11px;
  }

  .transcript-row p {
    font-size: 12px;
  }

  .transcript-row .edit-btn {
    width: 26px;
    height: 26px;
  }

  .minutes-panel textarea {
    margin: 12px;
  }

  .followups-block {
    margin: 0 12px;
  }

  .minutes-actions {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Admin Panel Styles */
.admin-panel {
  display: flex;
  flex-direction: column;
}
.admin-panel .panel-body {
  flex: 1;
  overflow-y: auto;
}

.admin-form { padding: 1.5rem; } .admin-form .form-group { margin-bottom: 1.5rem; }
.admin-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.admin-form .checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }

.admin-form .field-hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.admin-form .form-feedback { font-size: 0.9rem; font-weight: 500; }
#adminMenuBtn[hidden] { display: none !important; }
