/* ============================================================
   style.css — Calculadora de Rescisão Trabalhista CLT 2026
   Identidade visual: Francisco Ferreira Advocacia (Preto & Dourado)
   ============================================================ */

:root {
  --gold: #D4AF37;
  --gold-champagne: #C5A059;
  --gold-grad-start: #E5C158;
  --gold-grad-end: #9B782B;
  --bg-deep: #0A0A0C;
  --bg-mid: #121214;
  --bg-elevated: #18181B;
  --bg-elevated-2: #1F1F23;
  --text-primary: #F8F9FA;
  --text-secondary: #A1A1AA;
  --border-gold: rgba(212, 175, 55, 0.18);
  --border-gold-strong: rgba(212, 175, 55, 0.4);
  --gold-tint: rgba(212, 175, 55, 0.10);
  --danger: #E5484D;
  --danger-bg: rgba(229, 72, 77, 0.12);
  --warning-bg: rgba(212, 175, 55, 0.10);
  --warning-text: #E5C158;

  /* aliases usados nos componentes (mantidos p/ compatibilidade estrutural) */
  --color-primary: var(--gold);
  --color-primary-dark: var(--gold-grad-end);
  --color-primary-light: var(--gold-tint);
  --color-dark: var(--text-primary);
  --color-support: var(--border-gold);
  --color-support-dark: var(--border-gold-strong);
  --color-bg: var(--bg-elevated);
  --color-bg-muted: var(--bg-mid);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-secondary);
  --color-danger: var(--danger);
  --color-danger-bg: var(--danger-bg);
  --color-warning-bg: var(--warning-bg);
  --color-warning-text: var(--warning-text);

  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.5);
  --transition: 160ms ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(212, 175, 55, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 100%, rgba(212, 175, 55, 0.05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; color: var(--color-dark); font-weight: 700; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #14110A;
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------------- Header ---------------- */
.app-header {
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-gold);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-header__brand { display: flex; align-items: center; gap: 0.75rem; }
.app-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, var(--gold-grad-start), var(--gold-grad-end));
  color: #14110A;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  overflow: hidden;
}
.app-header__logo img { width: 100%; height: 100%; object-fit: cover; }
.app-header__title { font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.app-header__subtitle { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--color-text-muted); }
.app-header__back {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.2rem;
  transition: color var(--transition);
}
.app-header__back:hover { color: var(--gold); }

/* ---------------- Stepper ---------------- */
.stepper { background: rgba(10, 10, 12, 0.92); border-bottom: 1px solid var(--border-gold); position: sticky; top: 62px; z-index: 19; }
.stepper__list {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
}
.stepper__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}
.stepper__circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-gold);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.stepper__label { font-size: 0.82rem; font-weight: 500; white-space: nowrap; }
.stepper__item.is-active { background: var(--gold-tint); color: var(--gold); }
.stepper__item.is-active .stepper__circle { background: linear-gradient(120deg, var(--gold-grad-start), var(--gold-grad-end)); border-color: transparent; color: #14110A; }
.stepper__item.is-done .stepper__circle { background: var(--gold-grad-end); border-color: transparent; color: #14110A; }
.stepper__item.is-done .stepper__circle::after { content: "✓"; }
.stepper__item.is-done .stepper__circle { font-size: 0; }
.stepper__item.is-done .stepper__circle::after { font-size: 0.8rem; }

/* ---------------- Layout ---------------- */
.wizard { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 6rem; }
.step__title { font-size: 1.25rem; font-weight: 700; }
.step__desc { color: var(--color-text-muted); margin: 0.4rem 0 1.25rem; font-size: 0.92rem; }

.card {
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-mid));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.1rem 1.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}
.card__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.9rem; color: var(--gold-champagne); font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.82rem; }

.verba-card { padding: 0; overflow: hidden; }
.verba-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-primary);
}
.verba-card__header input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); flex-shrink: 0; }
.verba-card__body { padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--border-gold); padding-top: 1rem; }

/* ---------------- Grid & Fields ---------------- */
.grid { display: grid; gap: 0.9rem 1.1rem; grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.field .req { color: var(--danger); }

.field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.65rem;
  grid-column: 1 / -1;
}
.field--checkbox input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); margin-top: 0.1rem; flex-shrink: 0; }
.field--checkbox label { font-weight: 400; font-size: 0.9rem; color: var(--text-secondary); }

.field--inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.field--inline label { white-space: nowrap; }

input[type="text"], input[type="date"], input[type="number"], input[type="time"], input[type="month"], select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  min-height: 44px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  color-scheme: dark;
}
input::placeholder { color: rgba(161, 161, 170, 0.6); }
input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 0 3px var(--gold-tint);
}
input:disabled, select:disabled { background: rgba(255, 255, 255, 0.02); color: var(--text-secondary); }

.hint { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.hint strong { color: var(--text-primary); }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: linear-gradient(120deg, var(--gold-grad-start), var(--gold-grad-end)); color: #14110A; box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--secondary { background: var(--bg-elevated-2); color: var(--text-primary); border: 1px solid var(--border-gold); }
.btn--secondary:hover { border-color: var(--border-gold-strong); }
.btn--ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid rgba(255, 255, 255, 0.2); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--small { padding: 0.5rem 0.9rem; font-size: 0.82rem; min-height: 38px; border-radius: var(--radius-sm); }
.btn--danger { background: var(--danger-bg); color: #FF8A8D; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border-gold); }
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.table th {
  background: var(--bg-elevated-2);
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--gold-champagne);
  white-space: nowrap;
}
.table td { padding: 0.55rem 0.75rem; border-top: 1px solid var(--border-gold); vertical-align: middle; color: var(--text-primary); }
.table input, .table select { min-height: 38px; padding: 0.4rem 0.5rem; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table tfoot td { font-weight: 600; background: var(--gold-tint); }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 0.9rem; }

/* ---------------- Summary (Step 5) ---------------- */
.summary-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .summary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .summary-grid { grid-template-columns: repeat(4, 1fr); } }

.summary-tile {
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-mid));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-card);
}
.summary-tile--primary { background: linear-gradient(120deg, var(--gold-grad-start), var(--gold-grad-end)); border-color: transparent; }
.summary-tile--primary .summary-tile__label,
.summary-tile--primary .summary-tile__value { color: #14110A; }
.summary-tile__label { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.summary-tile__value { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; margin-top: 0.35rem; color: var(--text-primary); }

/* ---------------- Footer / Navigation ---------------- */
.wizard-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-gold);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 20;
}
.wizard-footer__status { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

/* ---------------- Validation ---------------- */
.field.is-invalid input,
.field.is-invalid select { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 0.8rem; }

/* ---------------- Alerts ---------------- */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 0.9rem; border: 1px solid transparent; }
.alert--warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--border-gold); }
.alert--danger { background: var(--danger-bg); color: #FF8A8D; border-color: rgba(229, 72, 77, 0.3); }

/* ---------------- Print (Exportação PDF) ---------------- */
@media print {
  .app-header, .stepper, .wizard-footer, .skip-link, .btn, #step-1, #step-2, #step-3, #step-4 { display: none !important; }
  body { background: #fff !important; color: #14181C !important; background-image: none !important; }
  h1, h2, h3, h4, .card__title, .summary-tile__value, .table td, .stepper__label { color: #14181C !important; }
  .wizard { max-width: 100%; padding: 0; margin: 0; }
  .card, .table-wrap { box-shadow: none; border-color: #ccc !important; break-inside: avoid; background: #fff !important; }
  .summary-tile, .summary-tile--primary { background: #fff !important; border: 1px solid #ccc !important; }
  .summary-tile__label { color: #5B6773 !important; }
  #step-5 { display: block !important; }
}

/* ---------------- Responsivo extra ---------------- */
@media (max-width: 480px) {
  .app-header__title { font-size: 0.85rem; line-height: 1.15; }
  .app-header__subtitle { font-size: 0.72rem; }
  .app-header__logo { width: 36px; height: 36px; font-size: 0.82rem; }
  .app-header__inner { padding: 0.65rem 1rem; }
  #btn-novo-calculo { padding: 0.55rem 0.75rem; font-size: 0.78rem; }
  .step__title { font-size: 1.1rem; }
  .wizard-footer .btn { padding: 0.7rem 0.9rem; font-size: 0.85rem; }
}

@media (max-width: 360px) {
  .app-header__title { font-size: 0.78rem; }
  #btn-novo-calculo { display: none; }
}
