:root{
  --bg:#0b0b0d;
  --panel:#111114;
  --card:#13131a;
  --border:rgba(255,255,255,.08);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);

  --brand:#f5b301;
  --brand2:#ffd24d;

  --ok:#2bd576;
  --warn:#ffb020;
  --bad:#ff4d4d;

  --radius:18px;
  --pad:16px;
  --shadow:0 14px 36px rgba(0,0,0,.35);

  --h:44px;          /* altura padrão inputs/botões */
  --r:14px;          /* raio padrão */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(245,179,1,.14), transparent 55%),
    radial-gradient(900px 520px at 88% 0%, rgba(255,210,77,.10), transparent 60%),
    var(--bg);
}

a{color:inherit}
.small{font-size:13px;color:var(--muted)}
.h1{font-size:26px;margin:0}
.h2{font-size:16px;margin:0}
.muted{color:var(--muted)}

.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(10,10,12,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  max-width:1240px;
  margin:0 auto;
  padding:12px var(--pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}
.brand img{width:38px;height:38px;border-radius:14px}
.brand .title{font-weight:800; letter-spacing:.2px}
.brand .sub{font-size:12px;color:var(--muted); margin-top:1px}

.shell{
  max-width:1240px;
  margin:0 auto;
  padding:14px var(--pad) 22px;
}

/* Layout padrão: sidebar + conteúdo */
.layout{
  display:grid;
  grid-template-columns: 290px 1fr;
  gap:12px;
  align-items:start;
}
.side{position:sticky; top:86px}
.main{min-width:0}

/* Mobile: sidebar some e conteúdo ocupa tudo */
@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .side{display:none}
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 70%), var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}

.card .hd{
  padding:14px 14px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--border);
}
.card .bd{padding:14px}

.row{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

/* Botões padrão */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:var(--h);
  padding:0 14px;
  border-radius:var(--r);
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  transition: .15s ease;
  white-space:nowrap;
}
.btn:hover{transform:translateY(-1px); border-color:rgba(255,255,255,.16)}
.btn.primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-color: rgba(0,0,0,.2);
  color:#111;
  font-weight:800;
}
.btn.ghost{background:transparent}
.btn.danger{background:rgba(255,77,77,.10); border-color:rgba(255,77,77,.25)}

/* Badges */
.badge{
  display:inline-flex; align-items:center;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
  font-size:12px;
}
.badge.ok{background:rgba(43,213,118,.12); border-color:rgba(43,213,118,.25)}
.badge.warn{background:rgba(255,176,32,.12); border-color:rgba(255,176,32,.25)}
.badge.bad{background:rgba(255,77,77,.12); border-color:rgba(255,77,77,.25)}

/* Inputs padrão */
.input, select, textarea{
  width:100%;
  min-height:var(--h);
  padding:10px 12px;
  border-radius:var(--r);
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
  color:var(--text);
  outline:none;
}
textarea{min-height:120px; resize:vertical}
.input:focus, select:focus, textarea:focus{
  border-color: rgba(245,179,1,.55);
  box-shadow: 0 0 0 4px rgba(245,179,1,.12);
}

/* Checkbox/Radio */
input[type="checkbox"], input[type="radio"]{
  width:18px; height:18px;
  accent-color: var(--brand);
}

/* Flash */
.flash{
  padding:12px 14px;
  border-radius:var(--r);
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
}
.flash.ok{border-color:rgba(43,213,118,.25); background:rgba(43,213,118,.10)}
.flash.warn{border-color:rgba(255,176,32,.25); background:rgba(255,176,32,.10)}
.flash.bad{border-color:rgba(255,77,77,.25); background:rgba(255,77,77,.10)}

/* Tabela */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:16px;
}
.table th, .table td{
  padding:12px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
.table th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.table tr:last-child td{border-bottom:none}

/* Footer */
.footer{
  max-width:1240px;
  margin:0 auto 16px;
  padding:14px var(--pad);
  color:var(--muted);
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* Mobile menu */
.mbtn{
  display:none;
  width:44px; height:44px;
  border-radius:var(--r);
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
  color:var(--text);
}
@media (max-width: 980px){
  .mbtn{display:inline-flex; align-items:center; justify-content:center;}
}

.drawer{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  z-index:100;
}
.drawer.open{display:block}
.drawer-panel{
  width:320px; max-width:86vw;
  height:100%;
  background:var(--panel);
  border-right:1px solid var(--border);
  padding:14px;
}
.drawer-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px}
.xbtn{
  width:44px;height:44px;border-radius:var(--r);
  border:1px solid var(--border);
  background:rgba(255,255,255,.02);
  color:var(--text);
  cursor:pointer;
}
.nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius:var(--r);
  text-decoration:none;
  color:rgba(255,255,255,.86);
}
.nav a:hover{background:rgba(255,255,255,.04); color:#fff}
.nav .sep{height:1px;background:var(--border);margin:10px 0}
.nav .hint{font-size:12px;color:var(--muted)}
