:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dde3ea;
  --line-strong: #c6d0dc;
  --text: #18202b;
  --muted: #697586;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --amber: #b7791f;
  --red: #b42318;
  --indigo: #3949ab;
  --green: #18845b;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #17202c;
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #d7f3ee;
  color: var(--teal-dark);
  font-weight: 800;
}

.brand h1,
.brand p,
.page-header h2,
.page-header p,
.panel h3,
.result-header h2,
.result-header p,
.strategy-card h3,
.share-header h1,
.share-header p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p {
  color: #bac4d2;
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d9e2ee;
  padding: 12px 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.runtime-panel {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.06);
}

.runtime-panel p {
  margin: 4px 0 0;
  color: #bac4d2;
  font-size: 12px;
  line-height: 1.45;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8b98a8;
  margin-top: 5px;
  flex: 0 0 auto;
}

.status-dot.is-running {
  background: #21c18a;
  box-shadow: 0 0 0 5px rgba(33, 193, 138, 0.16);
}

.status-dot.is-error {
  background: #f04438;
  box-shadow: 0 0 0 5px rgba(240, 68, 56, 0.14);
}

.main {
  padding: 24px;
  overflow: auto;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.page-header,
.result-header,
.share-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-header h2,
.result-header h2 {
  font-size: 24px;
  line-height: 1.25;
}

.eyebrow {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.header-actions,
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  white-space: nowrap;
}

.btn.primary {
  background: var(--teal);
  color: #fff;
}

.btn.primary:hover {
  background: var(--teal-dark);
}

.btn.secondary {
  border-color: var(--line-strong);
  background: #edf7f5;
  color: var(--teal-dark);
}

.btn.ghost {
  border-color: var(--line);
  background: var(--surface);
}

.btn.danger {
  background: var(--red);
  color: #fff;
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.meeting-layout,
.people-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.workbench,
.panel,
.result-panel,
.strategy-panel,
.library-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.workbench {
  padding: 16px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.inline-field {
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.inline-field {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.inline-field input {
  width: 120px;
}

.capture-surface {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101820;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #243244;
}

.capture-surface video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101820;
}

.capture-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 13px;
}

.capture-overlay span {
  background: rgba(16, 24, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 7px 9px;
}

.toolbar {
  margin-top: 14px;
}

.manual-transcript {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
  align-items: end;
}

.side-panel {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-title h3 {
  font-size: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  background: #e6f4f1;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
}

.badge.muted {
  background: #eef1f5;
  color: var(--muted);
}

.badge.warn {
  background: #fff2d9;
  color: var(--amber);
}

.muted-text,
.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.interim-box {
  min-height: 74px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 10px;
  color: #344054;
  background: var(--surface-soft);
  line-height: 1.55;
}

.slide-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.slide-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.slide-item.is-current {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.slide-thumb {
  width: 92px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  background: #d8dee7;
}

.slide-meta {
  min-width: 0;
}

.slide-meta strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.slide-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.result-panel {
  margin-top: 18px;
  padding: 18px;
}

.note-grid {
  display: grid;
  gap: 14px;
}

.note-section,
.summary-band,
.transcript-block,
.strategy-card,
.library-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-band h3,
.note-section h3,
.transcript-block h3,
.strategy-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.summary-band ul,
.note-section ul,
.strategy-card ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.note-section {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.note-section img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.transcript-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.transcript-list div {
  border-left: 3px solid var(--line-strong);
  padding-left: 10px;
  line-height: 1.55;
}

.time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}

.people-grid {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.image-preview {
  margin-top: 14px;
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  overflow: hidden;
}

.image-preview img {
  max-width: 100%;
  max-height: 280px;
  display: block;
}

.strategy-panel {
  padding: 16px;
  min-height: 320px;
}

.strategy-card {
  background: #fff;
  margin-bottom: 12px;
}

.library-list {
  display: grid;
  gap: 12px;
}

.library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: none;
}

.library-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.library-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.share-body {
  background: #fff;
}

.share-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px;
}

.share-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

@media (max-width: 1180px) {
  .meeting-layout,
  .people-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    min-height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .runtime-panel {
    margin-top: 0;
  }

  .page-header,
  .result-header,
  .share-header {
    flex-direction: column;
  }

  .control-grid,
  .summary-band,
  .side-panel {
    grid-template-columns: 1fr;
  }

  .note-section {
    grid-template-columns: 1fr;
  }

  .manual-transcript {
    grid-template-columns: 1fr;
  }
}
