/* Coleta Línguas Nacionais - Vanessa AI */
:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #243044;
  --text: #e6edf3;
  --text-muted: #8b9cb6;
  --accent: #f0b429;
  --accent-hover: #f5c654;
  --success: #3fb950;
  --error: #f85149;
  --radius: 12px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 1rem 6rem;
}

/* Progress */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 1rem 0;
  border-bottom: 1px solid var(--surface2);
}

.progress-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #e09b10);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-label {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Steps */
.main {
  flex: 1;
  padding: 1.5rem 0;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--text);
}

.hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.fields label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.fields label:first-of-type {
  margin-top: 0;
}

.fields input[type="text"],
.fields input[type="email"],
.fields select,
.fields textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
}

.fields input::placeholder,
.fields textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.fields input:focus,
.fields select:focus,
.fields textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(240, 180, 41, 0.2);
}

.fields .row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.fields .row .short {
  flex: 1;
  min-width: 140px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.checkbox input {
  width: auto;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
}

.phrase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.phrase-table th,
.phrase-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--surface2);
}

.phrase-table th {
  background: var(--surface2);
  color: var(--text-muted);
  font-weight: 500;
}

.phrase-table td:first-child {
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 120px;
}

.phrase-table input,
.phrase-table textarea {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 6px;
}

.phrase-table input:focus,
.phrase-table textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.numeros-table td:first-child {
  min-width: 80px;
}

/* Key-val (dias, meses) */
.keyval {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.keyval .key {
  flex: 0 0 140px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.keyval input {
  flex: 1;
  padding: 0.5rem 0.65rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.two-cols h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--accent);
}

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

/* Diálogos */
.dialogo-block {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
}

.dialogo-block h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--accent);
}

.dialogo-block label {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dialogo-block textarea {
  width: 100%;
  padding: 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--surface2);
  border-radius: 8px;
  min-height: 80px;
}

/* Gramática */
.verbo-group {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
}

.verbo-group h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.verbo-group label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.verbo-group input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--surface2);
  border-radius: 6px;
}

.fields h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text);
}

/* List items (expressões, provérbios) */
.list-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.list-item input {
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 8px;
}

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

/* Vocabulário por tema */
.vocab-tema {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
}

.vocab-tema h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--accent);
}

.caso-block {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
}

.caso-block label {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.caso-block textarea {
  width: 100%;
  padding: 0.6rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--surface2);
  border-radius: 8px;
  min-height: 60px;
}

.caso-block .caso-fixo {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.caso-block .caso-texto {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.caso-block .caso-texto:last-child {
  margin-bottom: 0;
}

/* Review */
.review-box {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.review-section {
  margin-bottom: 1rem;
}

.review-section:last-child {
  margin-bottom: 0;
}

.review-section h3 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  color: var(--accent);
}

.review-section ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.review-section p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.status {
  font-size: 0.9rem;
}

.status.pending {
  color: var(--text-muted);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

/* Footer / nav */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: var(--bg);
  border-top: 1px solid var(--surface2);
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface2);
}

.btn-outline:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
}
