:root {
  --ink: #251d2a;
  --muted: #6f6474;
  --paper: #fffdf8;
  --plum: #4b215f;
  --plum-dark: #351641;
  --gold: #d6a43b;
  --line: #e7dfe8;
  --danger: #9e2f36;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f5f0f5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(48, 22, 57, .14);
}
.brand-panel {
  min-height: 560px;
  padding: 68px;
  color: white;
  background:
    radial-gradient(circle at 18% 20%, rgba(214, 164, 59, .28), transparent 32%),
    linear-gradient(145deg, var(--plum), var(--plum-dark));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.brand-panel h1 { margin: 10px 0 16px; font-size: clamp(42px, 7vw, 72px); line-height: .95; }
.brand-panel p:last-child { max-width: 430px; color: #eee4f0; font-size: 18px; line-height: 1.55; }
.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: var(--plum-dark);
  background: var(--gold);
  font-weight: 900;
  letter-spacing: -.04em;
}
.login-card { padding: 68px 54px; align-self: center; }
.login-card h2 { margin: 8px 0 8px; font-size: 32px; }
.eyebrow { margin: 0; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.6; }
label { display: block; margin: 20px 0 7px; font-size: 14px; font-weight: 750; }
input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
input:focus { outline: 3px solid rgba(214, 164, 59, .28); border-color: var(--gold); }
button {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--plum);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--plum-dark); }
.alert { margin-top: 20px; padding: 12px 14px; color: var(--danger); background: #fff0f1; border-radius: 10px; }
.topbar { min-height: 72px; padding: 12px clamp(20px, 5vw, 72px); display: flex; gap: 24px; align-items: center; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar form { margin: 0; }
.topbar form:last-child { margin-left: auto; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--ink); font-weight: 900; text-decoration: none; }
.topnav { display: flex; gap: 18px; }
.topnav a { color: var(--plum); font-weight: 750; text-decoration: none; }
.topbar .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.button-quiet { width: auto; min-height: 40px; margin: 0; padding: 0 18px; color: var(--plum); background: #f0e8f1; }
.dashboard { width: min(1100px, calc(100% - 40px)); margin: 70px auto; }
.dashboard h1 { margin: 10px 0; font-size: clamp(38px, 6vw, 64px); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 42px 0; }
.stats article, .next-step { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.stats strong { display: block; font-size: 30px; color: var(--plum); }
.stats span { display: block; margin-top: 8px; color: var(--muted); }
.next-step h2 { margin-top: 0; }
.button-link { display: inline-flex; min-height: 44px; padding: 0 18px; align-items: center; justify-content: center; color: white; background: var(--plum); border-radius: 12px; font-weight: 800; text-decoration: none; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 48px auto 80px; }
.page-header { display: flex; gap: 20px; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { margin: 8px 0 0; font-size: clamp(34px, 5vw, 54px); }
.table-card, .form-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); background: #faf7fa; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table a { color: var(--plum); font-weight: 800; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eee8ef; font-size: 12px; font-weight: 850; }
.badge-ATIVO { color: #166534; background: #dcfce7; }
.badge-AGUARDANDO { color: #854d0e; background: #fef3c7; }
.badge-SUSPENSO, .badge-ENCERRADO { color: #991b1b; background: #fee2e2; }
.form-card { padding: clamp(24px, 5vw, 46px); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 30px; }
.form-actions button { width: auto; margin: 0; padding: 0 22px; }
.link-muted { color: var(--muted); font-weight: 700; }
.empty-state { padding: 52px 24px; text-align: center; color: var(--muted); }
.alert-success { color: #166534; background: #dcfce7; }
.alert-error { color: var(--danger); background: #fff0f1; }

@media (max-width: 760px) {
  .login-page { padding: 0; background: var(--paper); }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; box-shadow: none; }
  .brand-panel { min-height: 250px; padding: 32px 26px; }
  .brand-panel h1 { font-size: 48px; }
  .brand-panel p:last-child { margin-bottom: 0; font-size: 15px; }
  .login-card { width: 100%; padding: 38px 26px 52px; }
  .stats { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .table-card { overflow-x: auto; }
}
