.admin { background: var(--cream-100); }
.login { min-height: 100svh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(100% 80% at 50% 0%, var(--plum-500), var(--plum-900)); }
.login .card { width: min(380px, 100%); text-align: center; }
.login .card label { text-align: left; }
.login .card .btn { width: 100%; }
.login img { margin: 0 auto 10px; }

.admin-app { display: grid; grid-template-columns: 240px 1fr; min-height: 100svh; }
.side { background: var(--plum-900); color: var(--cream-50); padding: 22px 16px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100svh; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav button, .logout { text-align: left; background: none; border: 0; color: var(--cream-50); font: 500 .95rem var(--font-body); padding: 11px 14px; border-radius: 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.side nav button:hover { background: rgba(255,255,255,.08); }
.side nav button.active { background: var(--rose-500); font-weight: 700; }
.logout { margin-top: auto; opacity: .7; }
.pill { background: var(--gold-500); color: var(--plum-900); font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }

.main { padding: clamp(20px, 4vw, 44px); min-width: 0; }
.main h1 { font-family: var(--font-display); color: var(--plum-700); font-size: 2rem; margin-bottom: 18px; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.row-head h1 { margin-bottom: 10px; }
.search { max-width: 320px; margin: 0 0 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.kpi strong { display: block; font-family: var(--font-display); font-size: 2.4rem; color: var(--plum-700); }
.kpi span { color: var(--muted); font-weight: 500; }
.kpi.alert strong { color: var(--rose-500); }

.table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f0e3df; vertical-align: top; }
th { background: var(--cream-50); color: var(--plum-700); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: .82rem; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.act { border: 1.5px solid var(--plum-700); background: transparent; color: var(--plum-700); border-radius: 999px; padding: 4px 11px; font: 700 .78rem var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.act:hover { background: var(--plum-700); color: var(--white); }
.act.ok { border-color: #1f9d55; color: #1f9d55; }
.act.ok:hover { background: #1f9d55; color: #fff; }
.act.danger { border-color: #b3261e; color: #b3261e; }
.act.danger:hover { background: #b3261e; color: #fff; }
.status { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.status.pendente { background: #fff1d6; color: #8a5a00; }
.status.aprovada { background: #dff3e7; color: #1c6b3f; }
.status.recusada { background: #fbe0de; color: #8c1d18; }
.code { font-family: ui-monospace, monospace; font-size: .82rem; }
.narrow { max-width: 520px; }
.dialog.wide { width: min(640px, 100% - 32px); }
.dialog textarea { resize: vertical; }
.empty { padding: 26px; color: var(--muted); }

@media (max-width: 800px) {
  .admin-app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side nav button { padding: 8px 10px; font-size: .85rem; }
  .logout { margin: 0 0 0 auto; }
}
