:root {
  --bg: #070b09;
  --panel: #0d1511;
  --line: rgba(16, 185, 129, 0.22);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #34d399;
  --danger: #f87171;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #123528 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(0,0,0,.35);
  padding: 1.25rem 1rem;
  position: sticky; top: 0; height: 100vh;
}
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; margin-top: 1.25rem; }
.sidebar nav a {
  color: #d4d4d8; padding: .55rem .7rem; border-radius: .5rem;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(52, 211, 153, .12); color: #fff;
}
.logout { display: inline-block; margin-top: 1.5rem; color: #fca5a5; }
.main { padding: 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
h1 { margin: 0 0 .25rem; font-size: 1.5rem; }
.subtitle { margin: 0 0 1.25rem; color: var(--muted); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.card {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1rem;
}
.stat { font-size: 1.4rem; font-weight: 800; }
label { display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); margin-top: .75rem; }
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  margin-top: .35rem;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.5);
  color: #fff;
  border-radius: .5rem;
  padding: .55rem .7rem;
}
textarea { min-height: 90px; }
.btn, button[type=submit], .actions button {
  border: 1px solid var(--line);
  background: linear-gradient(90deg, #10b981, #d4d4d8);
  color: #000;
  font-weight: 700;
  border-radius: .5rem;
  padding: .55rem .9rem;
  cursor: pointer;
}
.btn.ghost, .actions .ghost {
  background: transparent;
  color: var(--accent);
}
.actions .danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(248,113,113,.35);
}
.actions .warn {
  background: transparent;
  color: var(--warn);
  border-color: rgba(251,191,36,.35);
}
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.flash {
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-radius: .6rem;
  border: 1px solid var(--line);
  background: rgba(16,185,129,.12);
}
.flash.erro { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.35); color: #fecaca; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; }
.badge {
  display: inline-block; padding: .15rem .45rem; border-radius: .35rem;
  border: 1px solid var(--line); font-size: .75rem;
}
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-card {
  width: min(420px, 100%);
  background: rgba(0,0,0,.5);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem;
}
.login-card button { width: 100%; margin-top: 1rem; }
.thumb { max-width: 96px; max-height: 96px; border-radius: .4rem; object-fit: cover; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; }
details.card { cursor: default; }
details summary { cursor: pointer; font-weight: 700; }
