@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #e1e9ff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, #e9edff, transparent 35%),
    radial-gradient(circle at 80% 0%, #e0f7ff, transparent 40%),
    var(--bg);
  color: var(--text);
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

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

.brand h1 {
  margin: 0;
  font-size: 24px;
}

.brand .eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand .dot {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.home-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.card h2,
.card h3 {
  margin: 0 0 4px 0;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meeting-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meeting-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.meeting-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.meeting-title {
  font-weight: 600;
}

.meeting-date {
  color: var(--muted);
  font-size: 13px;
}

.input-stack {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-weight: 600;
  font-size: 14px;
}

.upload-audio {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-stack select,
.input-stack textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 14px;
}

.input-stack textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}

.dict-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dict-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.dict-row input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.dict-header {
  font-weight: 600;
  color: var(--muted);
}

.dict-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.ghost.small {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.dict-remove {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.dict-remove:hover {
  background: #fecaca;
}

.dict-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-name {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paste-area {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 140px;
  background: #f8fafc;
  outline: none;
}

.paste-area:focus {
  border-color: var(--primary);
  background: #f1f5ff;
}

.paste-text {
  margin: 0 0 10px 0;
  color: var(--muted);
}

.slides-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.slides-preview img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.primary,
.ghost {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.ghost {
  background: #eef2ff;
  color: #1e293b;
}

.primary:hover:not(:disabled),
.ghost:hover {
  transform: translateY(-1px);
}

.loader {
  color: var(--muted);
  font-weight: 600;
}

.hidden {
  display: none;
}

.view.hidden {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.text-block {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

.slides-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slides-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.slide-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  background: #f8fafc;
}

.slide-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.slide-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.slide-card.active {
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.15);
}

.slide-label {
  margin: 6px 0 0 0;
  font-weight: 600;
  font-size: 13px;
}

.slide-viewer {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
}

.slide-viewer img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: white;
}

.slide-viewer .summary {
  margin-top: 8px;
  color: var(--text);
  line-height: 1.5;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

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

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .text-block {
    max-height: none;
  }
}
