:root {
  --bg: #0f172a;
  --fg: #0f172a;
  --fg-muted: #334155;
  --surface: #ffffff;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --border: #e2e8f0;
  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: #f8fafc;
  color: var(--fg);
}

.hidden {
  display: none !important;
}

.credential-panel {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.credential-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 0.75rem;
}

.credential-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.credential-form input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font);
  font-size: 1rem;
}

.app-header,
.app-footer {
  background: var(--bg);
  color: #f8fafc;
}

.app-header {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header .app-shell {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-nav {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
}

.app-footer {
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.brand {
  font-weight: 600;
  color: #f8fafc;
  text-decoration: none;
  font-size: 1.2rem;
}

.tag {
  font-size: 0.85rem;
  margin-left: 0.75rem;
  opacity: 0.7;
}

.hero {
  padding: 3rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.primary-btn {
  background: var(--accent);
  color: #f8fafc;
  text-decoration: none;
}

.primary-btn:hover,
.primary-btn:focus {
  background: var(--accent-strong);
}

.secondary-btn {
  background: #e2e8f0;
  color: var(--fg);
}

.secondary-btn:disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.info-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}

.info-grid article,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.progress {
  text-align: right;
  font-size: 0.9rem;
}

.progress-bar {
  width: 180px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 0.25rem 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.prompt-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #f1f5f9;
  margin-bottom: 1.5rem;
}

.prompt-text {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.prompt-meta {
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.controls .buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timer {
  font-family: "Roboto Mono", monospace;
  color: var(--fg-muted);
}

.playback {
  margin-bottom: 1rem;
}

.playback audio {
  width: 100%;
}

.guidelines ul,
.info-grid ul {
  padding-left: 1.2rem;
}

.language-switch {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.language-switch select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-family: var(--font);
}

.prompt-status {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #f8fafc;
}

.prompt-status h3 {
  margin: 0 0 0.75rem;
}

.prompt-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.prompt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.prompt-item-recorded {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.prompt-item-active {
  box-shadow: 0 0 0 2px var(--accent) inset;
}

.prompt-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.prompt-item-info p {
  margin: 0;
  font-weight: 600;
}

.prompt-item-info span {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.prompt-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.status-badge.pending {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.recorded {
  background: #e0f2fe;
  color: #0369a1;
}

.status-message {
  min-height: 1.5rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.status-message.error {
  color: #dc2626;
}

.status-message.success {
  color: #16a34a;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
}

.field input,
.field select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font);
  font-size: 1rem;
}

.field-consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.form-error {
  color: #dc2626;
  font-weight: 500;
}

.form-success {
  color: #16a34a;
  font-weight: 500;
}

.reminder {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
}

.privacy {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

@media (max-width: 640px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-bar {
    width: 100%;
  }
}


/* Recording guidelines card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 8px 20px rgba(15,23,42,0.04); }
.guidelines { margin: 1rem 0; }

.guidelines-header h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.guidelines-header .muted { margin: 0; color: var(--fg-muted); font-size: 0.9rem; }

.guidelines-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 0.75rem; }
.guideline-block h4 { margin: 0 0 0.4rem; font-size: 0.98rem; }
.guideline-block ul { margin: 0; padding-left: 1.1rem; color: var(--fg); line-height: 1.4; }

.guidelines-footer { margin-top: 0.9rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.guidelines-footer .muted { margin: 0.25rem 0 0.5rem; color: var(--fg-muted); font-size: 0.9rem; }

.inline-list { display: flex; gap: 0.75rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.inline-list li { background: #fff; border: 1px solid var(--border); padding: 0.35rem 0.6rem; border-radius: 999px; font-size: 0.9rem; color: var(--fg); }

.guidelines-extra { margin-top: 0.75rem; color: var(--fg-muted); font-size: 0.95rem; }

/* small screens */
@media (max-width: 640px) {
  .guidelines-grid { grid-template-columns: 1fr; }
}
