:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-grad-1: rgba(99, 102, 241, 0.22);
  --bg-grad-2: rgba(34, 197, 94, 0.13);
  --card: rgba(17, 24, 39, 0.72);
  --card-solid: #111827;
  --accent: #6366f1;
  --success: #22c55e;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(15, 23, 42, 0.6);
  --pill-bg: rgba(17, 24, 39, 0.55);
  --card-bg: linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.62));
  --card-header-bg: rgba(17, 24, 39, 0.55);
  --surface-bg: rgba(17, 24, 39, 0.35);
  --surface-border: rgba(255, 255, 255, 0.06);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(900px 550px at 15% 10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 550px at 85% 0%, var(--bg-grad-2), transparent 60%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 18px 28px;
}

header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(99, 102, 241, 0.95), rgba(99, 102, 241, 0.15));
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-family: Poppins, Inter, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title strong {
  font-family: Poppins, Inter, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.1;
}

.brand-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pill-bg);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  color: var(--muted);
}

.pill-btn {
  appearance: none;
  background: var(--pill-bg);
  cursor: pointer;
  user-select: none;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.pill-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  border-color: rgba(99, 102, 241, 0.22);
}

.pill-btn:active {
  transform: translateY(0px);
}

.pill-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.pill strong {
  color: var(--text);
  font-weight: 500;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(156, 163, 175, 0.6);
  box-shadow: 0 0 0 0 rgba(156, 163, 175, 0.0);
}

.dot.is-live {
  background: var(--success);
  animation: pulse 1.4s ease-out infinite;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-header-bg);
}

.card-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.card-title h2 {
  margin: 0;
  font-family: Poppins, Inter, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.subtle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(99, 102, 241, 0.14);
  color: rgba(199, 210, 254, 0.95);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.badge.success {
  background: rgba(34, 197, 94, 0.14);
  color: rgba(187, 247, 208, 0.95);
}

.card-body {
  padding: 14px 16px 16px;
}

.scroll {
  max-height: 52vh;
  overflow: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.45) rgba(17, 24, 39, 0.3);
}

.scroll::-webkit-scrollbar {
  width: 8px;
}

.scroll::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.25);
  border-radius: 999px;
}

.scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.45);
  border-radius: 999px;
}

.transcript-line {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  padding: 10px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface-bg);
  margin-bottom: 10px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.transcript-line:hover {
  border-color: rgba(99, 102, 241, 0.22);
}

.ts {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.text {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--text);
  word-break: break-word;
}

.speaker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
}

.speaker .name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(199, 210, 254, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

mark {
  background: rgba(99, 102, 241, 0.18);
  color: var(--text);
  border: 1px solid rgba(99, 102, 241, 0.24);
  padding: 0 3px;
  border-radius: 6px;
}

.summary-block {
  display: grid;
  gap: 12px;
}

.summary-section h3 {
  margin: 0 0 8px;
  font-family: Poppins, Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: rgba(199, 210, 254, 0.9);
}

.summary-section ul {
  margin: 0;
  padding-left: 16px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.summary-section li {
  margin: 6px 0;
  color: rgba(229, 231, 235, 0.92);
}

.summary-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.summary-paragraph {
  color: rgba(229, 231, 235, 0.92);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.action-items {
  margin-top: 16px;
}

.action-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.danger-btn {
  appearance: none;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.12);
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.danger-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface-bg);
  transition: border-color 180ms ease, transform 180ms ease;
}

.check:hover {
  border-color: rgba(34, 197, 94, 0.22);
}

.check input {
  margin-top: 2px;
  accent-color: var(--success);
}

.check label {
  display: inline;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(229, 231, 235, 0.92);
  cursor: pointer;
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease;
}

.record-row:hover {
  border-color: rgba(99, 102, 241, 0.28);
}

.record-row.is-selected {
  border-color: rgba(99, 102, 241, 0.5);
}

.record-time {
  font-size: 12px;
  color: var(--muted);
}

.record-label {
  font-size: 13px;
  color: rgba(229, 231, 235, 0.92);
}

.record-delete {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}

.record-delete:hover {
  border-color: rgba(244, 63, 94, 0.35);
  color: rgba(244, 63, 94, 0.95);
}

.item-delete {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}

.item-delete:hover {
  border-color: rgba(244, 63, 94, 0.35);
  color: rgba(244, 63, 94, 0.95);
}

.muted-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.floating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.92), rgba(99, 102, 241, 0.72));
  color: #0b1022;
  box-shadow: 0 16px 45px rgba(99, 102, 241, 0.28);
  cursor: pointer;
  user-select: none;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
  font-family: Poppins, Inter, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.floating-group {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  display: inline-flex;
  gap: 10px;
}

.floating.danger {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.92), rgba(239, 68, 68, 0.72));
  box-shadow: 0 16px 45px rgba(239, 68, 68, 0.22);
}

.floating.danger:hover {
  filter: brightness(1.02);
}

.floating.secondary {
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.92), rgba(71, 85, 105, 0.72));
  box-shadow: 0 16px 45px rgba(71, 85, 105, 0.22);
}

.floating.secondary:hover {
  filter: brightness(1.02);
}

.floating:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.floating:active {
  transform: translateY(0px);
}

.floating[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.floating .icon {
  width: 18px;
  height: 18px;
}

.floating.is-recording {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.92), rgba(34, 197, 94, 0.72));
  box-shadow: 0 16px 45px rgba(34, 197, 94, 0.22);
}

.status-text {
  color: var(--muted);
  font-size: 12px;
}