:root {
  --dourado: #D29D18;
  --azul: #1B2F52;
  --texto: #1D1D1D;
  --fundo: #F2F2F2;
  --branco: #FFFFFF;
  --erro: #c0392b;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--fundo);
  color: var(--texto);
  min-height: 100vh;
}

.state { display: none; }
.state.active { display: block; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.container.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ── HEADER ── */
.app-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--dourado);
}

.logo-img {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-img--processing {
  height: 80px;
  margin-bottom: 1.5rem;
}

.app-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--azul);
  font-weight: 700;
}

.app-subtitle {
  font-size: 0.8rem;
  color: #666;
  font-weight: 400;
  margin-top: 0.2rem;
}

/* ── CARDS ── */
.upload-card, .result-card {
  background: var(--branco);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(27,47,82,0.08);
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--azul);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

/* ── FORM ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--azul);
  margin-bottom: 0.4rem;
}

input[type="text"], select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: var(--texto);
  transition: border-color 0.2s;
}

input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--dourado);
}

/* ── DROP ZONE ── */
.drop-zone {
  border: 2px dashed #ccc;
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--dourado);
  background: #fffbf0;
}

.drop-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

.drop-text {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.3rem;
}

.drop-link { color: var(--dourado); font-weight: 600; cursor: pointer; }

.drop-hint { font-size: 0.75rem; color: #999; }

.file-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f7f0;
  border: 1.5px solid #27ae60;
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.file-selected button {
  background: none;
  border: none;
  cursor: pointer;
  color: #c0392b;
  font-size: 1rem;
  font-weight: 700;
}

/* ── BUTTONS ── */
.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: var(--azul);
  color: var(--branco);
  border: none;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) { background: #243d6b; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 0.9rem;
  background: transparent;
  color: var(--azul);
  border: 1.5px solid var(--azul);
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.75rem;
}

.btn-secondary:hover { background: var(--fundo); }

/* ── PROCESSING ── */
.processing-card {
  background: var(--branco);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(27,47,82,0.1);
  max-width: 480px;
  width: 100%;
}


.processing-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--azul);
  margin-bottom: 1.5rem;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  background: var(--dourado);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-message {
  font-size: 0.875rem;
  color: var(--azul);
  font-weight: 500;
  min-height: 1.4em;
  margin-bottom: 0.75rem;
}

.processing-hint {
  font-size: 0.75rem;
  color: #999;
}

/* ── RESULT ── */
.result-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--azul);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.result-score-box { text-align: center; }

.result-score {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--dourado);
  line-height: 1;
}

.result-score-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

.result-conceito {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--branco);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.result-prontidao { font-size: 0.85rem; color: var(--dourado); margin-bottom: 0.3rem; }
.result-genre { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-bottom: 0.2rem; }
.result-pages { font-size: 0.8rem; color: rgba(255,255,255,0.6); }

.result-price-box { text-align: right; }
.result-price-label { font-size: 0.7rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.3rem; }
.result-price { font-family: 'Cinzel', serif; font-size: 1.1rem; color: var(--dourado); font-weight: 700; }

/* ── MISC ── */
.hidden { display: none !important; }
.error-msg { color: var(--erro); font-size: 0.85rem; margin-top: 0.75rem; text-align: center; }

.rejection-notice {
  background: #fdf0f0;
  border: 1px solid #e8b4b4;
  border-left: 4px solid var(--erro);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
  color: #7b1d1d;
}
.rejection-notice strong { display: block; font-size: 0.95rem; margin-bottom: 0.4rem; }
.rejection-notice p { font-size: 0.85rem; line-height: 1.5; margin: 0; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; text-align: center; }
  .result-price-box { text-align: center; }
}
