/* pages.css — componentes específicos para cadastro/login/painel
   Requer v3-styles.css carregado antes. */

/* ============================================================
   FORM — inputs, labels, checkboxes
============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row .field { margin-bottom: 0; }

.field label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.field label .req { color: var(--accent); margin-left: 2px; }

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font: 15px/1.4 var(--sans);
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--ink-muted); }
.input:hover { border-color: color-mix(in oklch, var(--rule) 60%, var(--accent) 20%); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-3);
}
.input.error { border-color: var(--danger); }

.input-wrap { position: relative; }
.input-wrap .toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.input-wrap .toggle:hover { color: var(--accent); }

.help { font-size: 12px; color: var(--ink-muted); }
.help.error { color: var(--danger); }

.check-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0;
  margin-bottom: 8px;
}
.check {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  display: grid; place-items: center;
  margin-top: 1px;
  transition: background .15s, border-color .15s;
}
.check.checked { background: var(--accent); border-color: var(--accent); }
.check.checked::after {
  content: ""; width: 10px; height: 6px;
  border-left: 1.5px solid var(--accent-ink);
  border-bottom: 1.5px solid var(--accent-ink);
  transform: rotate(-45deg) translate(1px, -1px);
}
.check-row label { font-size: 14px; color: var(--ink-soft); cursor: pointer; line-height: 1.5; }
.check-row label a { color: var(--accent); border-bottom: 1px solid var(--rule); padding-bottom: 1px; }

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 15px 22px;
}

.divider {
  text-align: center;
  position: relative;
  margin: 28px 0 22px;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%;
  width: calc(50% - 28px); height: 1px; background: var(--rule);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

/* ============================================================
   AUTH LAYOUT — cadastro / login
============================================================ */
.auth { padding: 64px 0 80px; }
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.auth-grid.narrow { grid-template-columns: 1fr 480px; max-width: 1080px; margin: 0 auto; }

.auth-marketing { position: sticky; top: 100px; }
.auth-marketing .eyebrow { margin-bottom: 22px; }
.auth-marketing h1 { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.012em; margin-bottom: 20px; }
.auth-marketing h1 em { color: var(--accent); font-style: italic; }
.auth-marketing .lead { color: var(--ink-soft); font-size: 17px; line-height: 1.55; max-width: 460px; margin-bottom: 32px; }

.bullet-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.bullet-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.bullet-list .bi {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  color: var(--accent);
}
.bullet-list .bi svg { width: 12px; height: 12px; }

.oab-card {
  margin-top: 36px;
  padding: 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  display: flex; align-items: center; gap: 16px;
}
.oab-card .ic {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--accent);
  display: grid; place-items: center;
}
.oab-card .ic svg { width: 22px; height: 22px; }
.oab-card b { display: block; font-family: var(--serif); font-size: 16px; color: var(--ink); margin-bottom: 4px; font-weight: 400; letter-spacing: -0.005em; }
.oab-card small { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.04em; }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow);
  position: relative;
}
.auth-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(196, 154, 75,0.16), transparent 50%);
  pointer-events: none; z-index: 0;
}
.auth-card > * { position: relative; z-index: 1; }
.auth-card h2 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 10px;
}
.auth-card .sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  line-height: 1.55;
}
.auth-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.auth-foot a { color: var(--accent); border-bottom: 1px solid var(--rule); padding-bottom: 1px; }

.security-strip {
  margin-top: 22px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px dashed var(--rule);
  border-radius: 12px;
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 12px; color: var(--ink-muted); line-height: 1.5;
}
.security-strip svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; margin-top: 2px; }

/* ============================================================
   PAINEL — sidebar + main + stepper + cards
============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--rule);
  padding: 28px 18px;
  display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  padding: 0 8px 4px;
}
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-label {
  padding: 0 12px 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
}
.sb-item:hover { background: var(--surface); color: var(--ink); }
.sb-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.sb-item.active::before {
  content: "";
  position: absolute; left: -18px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.sb-item svg { width: 16px; height: 16px; flex: 0 0 auto; }
.sb-item .badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.sb-foot {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.sb-foot .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 14px;
}
.sb-foot .who { line-height: 1.2; }
.sb-foot .who b { display: block; color: var(--ink); font-weight: 500; font-size: 13px; }
.sb-foot .who small { font-size: 11px; color: var(--ink-muted); }

.main {
  padding: 36px 40px 80px;
  max-width: 1180px;
  width: 100%;
}
.main-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap; gap: 18px;
}
.main-head h1 {
  font-family: var(--serif); font-size: 32px; font-weight: 400;
  line-height: 1.15; letter-spacing: -0.012em; color: var(--ink);
  margin-bottom: 6px;
}
.main-head h1 em { color: var(--accent); font-style: italic; }
.main-head .lead { color: var(--ink-soft); font-size: 14px; }
.main-head .step-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  border-radius: 999px;
  font-size: 12px; color: var(--accent);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* Banner success */
.banner {
  padding: 16px 22px;
  background: var(--ok-soft);
  border: 1px solid color-mix(in oklch, var(--ok) 30%, transparent);
  border-radius: 12px;
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--ok);
  margin-bottom: 28px;
}
.banner svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* Stepper horizontal */
.stepper {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 32px;
}
.stepper-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  position: relative;
}
.stepper-track::before {
  content: ""; position: absolute;
  left: 14px; right: 14px; top: 14px; height: 1px;
  background: var(--rule);
  z-index: 0;
}
.stepper-track::after {
  content: ""; position: absolute;
  left: 14px; top: 14px; height: 1px;
  width: calc((100% - 28px) * var(--progress, 0));
  background: var(--accent);
  z-index: 1;
  transition: width .4s ease;
}
.stepper-step {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  position: relative; z-index: 2;
}
.stepper-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-muted);
  position: relative;
}
.stepper-step.done .stepper-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-size: 0;
}
.stepper-step.done .stepper-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 5px;
  margin-top: -4px;
  margin-left: -5px;
  border-left: 1.5px solid var(--accent-ink);
  border-bottom: 1.5px solid var(--accent-ink);
  transform: rotate(-45deg);
}
.stepper-step.active .stepper-dot {
  background: var(--surface);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.stepper-label {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.3;
  padding-right: 12px;
}
.stepper-step.done .stepper-label,
.stepper-step.active .stepper-label { color: var(--ink); }
.stepper-step.active .stepper-label { color: var(--accent); }

/* Status cards (3 col) */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.status {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.status .label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex; align-items: center; gap: 10px;
}
.status .label svg { width: 12px; height: 12px; color: var(--accent); }
.status .val {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.status .val.muted { color: var(--ink-muted); }
.status .val.gold { color: var(--accent); }
.status .hint { font-size: 12px; color: var(--ink-muted); }

/* Action card (próximo passo) */
.action-card {
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(196, 154, 75,0.14), transparent 50%),
    var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 32px;
}
.action-card .head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.action-card .head .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  color: var(--accent);
  display: grid; place-items: center;
}
.action-card .head .ic svg { width: 18px; height: 18px; }
.action-card .head h3 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}
.action-card .head .tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.action-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; margin-bottom: 18px; max-width: 720px; }
.tips {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.tips .head {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.tips ul { list-style: none; }
.tips li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 6px 0;
}
.tips li svg { width: 12px; height: 12px; color: var(--accent); flex: 0 0 auto; margin-top: 4px; }

/* Document list */
.docs-section {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 32px;
}
.docs-section .docs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.docs-section h3 { font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 400; }
.docs-section .docs-head .meta {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.docs-list { display: flex; flex-direction: column; }
.doc {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.doc:last-child { border-bottom: none; }
.doc .ic {
  width: 40px; height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink-muted);
  display: grid; place-items: center;
}
.doc .ic svg { width: 16px; height: 16px; }
.doc .info b { display: block; font-size: 14px; color: var(--ink); font-weight: 500; margin-bottom: 2px; }
.doc .info small { font-size: 12px; color: var(--ink-muted); }
.doc.locked .info b { color: var(--ink-muted); }
.doc.locked .ic { background: var(--surface-2); border-style: dashed; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
}
.pill.pending { color: var(--ink-muted); border-color: var(--rule); background: var(--surface-2); }
.pill.locked { color: var(--ink-muted); border-style: dashed; }
.pill.locked svg { width: 11px; height: 11px; }
.pill.sent { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in oklch, var(--ok) 30%, transparent); }
.pill.sent svg { width: 11px; height: 11px; }
.pill.gold { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in oklch, var(--accent) 30%, transparent); }

/* Process / lawsuit info card */
.process-info {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 32px;
}
.process-info .info-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.process-info .info-head .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  color: var(--accent);
  display: grid; place-items: center;
}
.process-info .info-head .ic svg { width: 18px; height: 18px; }
.process-info h3 { font-family: var(--serif); font-size: 20px; color: var(--ink); font-weight: 400; }
.process-grid-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 4px;
}
.process-grid-2 .k {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.process-grid-2 .v {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .auth-grid, .auth-grid.narrow { grid-template-columns: 1fr; gap: 40px; }
  .auth-marketing { position: static; }
  .field-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px; }

  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
  .sb-group { flex-direction: row; gap: 8px; flex-wrap: wrap; }
  .sb-label { display: none; }
  .sb-foot { display: none; }
  .main { padding: 28px 20px 60px; }
  .stepper { padding: 20px 18px; }
  .stepper-track { grid-template-columns: repeat(3, 1fr); gap: 18px 8px; }
  .stepper-track::before, .stepper-track::after { display: none; }
  .status-grid { grid-template-columns: 1fr; }
  .process-grid-2 { grid-template-columns: 1fr; gap: 16px; }
}
