:root{
  --bg:#0b0f1a;
  --panel:#0e1321;
  --accent:#f97316; /* laranja primário */
  --accent-2:#ea580c; /* laranja secundário */
  --text:#e5e7eb;
  --muted:#9ca3af;
  --danger:#ef4444;
  --success:#10b981;
  --warning:#f59e0b;
  --radius:14px;
  --shadow:0 10px 30px rgba(0,0,0,0.25);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell;
  color:var(--text);
  background: radial-gradient(1200px 800px at 80% 10%, rgba(249,115,22,.18), transparent),
              radial-gradient(900px 600px at 20% 80%, rgba(234,88,12,.14), transparent),
              var(--bg);
}
.layout{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:100vh;
}
.sidebar{
  background:
    radial-gradient(300px 180px at 30% 0%, rgba(249,115,22,.25), transparent),
    linear-gradient(180deg, rgba(14,19,33,.96), rgba(14,19,33,.8));
  backdrop-filter: blur(8px);
  border-right:1px solid rgba(255,255,255,.06);
  padding:24px 16px;
  position:sticky; top:0; height:100vh;
}
.brand{
  display:flex; align-items:center; gap:10px; margin-bottom:18px;
}
.brand .logo{
  width:36px;height:36px;border-radius:12px;
  background: conic-gradient(from 180deg at 50% 50%, var(--accent), var(--accent-2), var(--accent));
  box-shadow: var(--shadow);
  filter: drop-shadow(0 0 12px rgba(249,115,22,.45));
}
.brand h1{font-size:18px;margin:0}
.menu a{
  display:flex;align-items:center;gap:10px;
  color:var(--text);text-decoration:none;padding:12px 14px;border-radius:10px;
  transition: all .2s ease;
}
.menu a:hover{background:rgba(249,115,22,.08); transform: translateX(4px)}
.content{
  padding:24px;
}
.card{
  background:
    linear-gradient(180deg, rgba(14,19,33,.88), rgba(14,19,33,.65));
  border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:20px;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute; inset:-1px;
  border-radius:inherit;
  background: radial-gradient(300px 140px at 10% -10%, rgba(249,115,22,.12), transparent 60%);
  pointer-events:none;
}
.grid{display:grid;gap:16px}
.grid.cols-2{grid-template-columns:1fr 1fr}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.btn{
  appearance:none;border:none;border-radius:10px;padding:10px 14px;
  color:#fff;background:linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor:pointer;box-shadow:var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover{transform: translateY(-1px); opacity:.95}
.btn.secondary{background:rgba(255,255,255,.08)}
.btn.danger{background:linear-gradient(135deg, var(--danger), #b91c1c)}
.btn.success{background:linear-gradient(135deg, var(--success), #059669)}
.btn.small{padding:6px 10px; border-radius:8px; font-size:12px}
.btn.icon-btn{width:36px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.btn.icon-btn svg{width:16px;height:16px;display:block;fill:currentColor}
.icon-state-on{color:var(--success)}
.icon-state-off{color:var(--danger)}
input[type=text],input[type=password],input[type=email],input[type=url],input[type=search],input[type=number],input[type=date],input[type=time],input[type=datetime-local],select,textarea{
  width:100%;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04);color:var(--text);
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
  color-scheme: dark;
}
input[type=text]:focus,input[type=password]:focus,input[type=email]:focus,input[type=url]:focus,input[type=search]:focus,input[type=number]:focus,input[type=date]:focus,input[type=time]:focus,input[type=datetime-local]:focus,select:focus,textarea:focus{
  border-color: rgba(249,115,22,.6);
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}
select{
  background: rgba(255,255,255,.06);
}
option{
  background-color:#0e1321; color:var(--text);
}
/* checkboxes e radios não herdam o estilo de inputs de texto */
input[type=checkbox],input[type=radio]{
  width:auto;height:auto;padding:0;border:none;background:transparent;box-shadow:none;cursor:pointer;
  accent-color: var(--accent);
}
.table th input[type=checkbox], .table td input[type=checkbox]{vertical-align:middle}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.flash{padding:10px 14px;border-radius:10px;background:rgba(255,255,255,.06);margin-bottom:14px}
.table{width:100%;border-collapse:collapse}
.table-scroll{overflow-x:auto;width:100%}
.table{min-width:720px}
.table th,.table td{border-bottom:1px solid rgba(255,255,255,.06);padding:10px;text-align:left;word-break:break-word}
.filter-card details{border:1px solid rgba(255,255,255,.06); border-radius:12px; padding:0; background:rgba(255,255,255,.03)}
.filter-card details summary{list-style:none; cursor:pointer; padding:12px 14px; font-weight:600; color:var(--text)}
.filter-card details[open] summary{border-bottom:1px solid rgba(255,255,255,.06)}
.filter-form{padding:12px}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin:8px 0}
.chip{padding:6px 10px; border-radius:999px; background:rgba(255,255,255,.08); color:var(--text); font-size:12px}
.chip a{color:var(--text); text-decoration:none; opacity:.8; margin-left:6px}
.bulk-actions .btn{min-width:150px}
.edit-inline>summary{list-style:none; display:inline-flex}
.bulk-actions>.row{flex-wrap:nowrap; justify-content:flex-end}
.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.6); z-index:1000}
.modal.open{display:flex}
.modal .box{background:var(--surface); color:var(--text); border-radius:12px; padding:16px; width:90%; max-width:520px; box-shadow:0 8px 24px rgba(0,0,0,.4); border:1px solid rgba(255,255,255,.06); border-top:3px solid var(--primary)}
.modal .box h3{margin:0 0 10px 0}
.modal .box .row{justify-content:flex-end}
.stat-list p{margin:4px 0}
.stat-a{color:var(--success)}
.stat-aaaa{color:var(--primary)}
.stat-cname{color:var(--warning)}
.stat-ns{color:var(--muted)}
.actions{display:flex;gap:8px;flex-wrap:nowrap}
.muted{color:var(--muted)}
.mobile-only{display:none}
/* botão de menu móvel */
.menu-toggle{
  position:fixed; left:12px; top:12px; z-index:60;
  width:44px;height:44px;border-radius:12px;border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#fff;
  display:none; align-items:center; justify-content:center; font-size:22px; box-shadow:var(--shadow);
}
.overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:40; display:none;
}
body.menu-open .overlay{display:block}
/* hero */
.hero{
  padding:32px 24px;margin-bottom:16px;border-radius:var(--radius);
  background:
    linear-gradient(90deg, rgba(249,115,22,.12), rgba(249,115,22,.04) 30%, transparent 70%),
    linear-gradient(180deg, rgba(14,19,33,.88), rgba(14,19,33,.65));
  border:1px solid rgba(255,255,255,.06);
}
.hero h2{margin:0 0 6px 0;font-size:22px}
.hero p{margin:0;color:var(--muted)}
@media(max-width: 900px){
  .layout{grid-template-columns:1fr}
  .sidebar{
    position:fixed; left:0; top:0; height:100vh; z-index:50; width:260px;
    border-right:1px solid rgba(255,255,255,.06);
    transform: translateX(-110%); transition: transform .2s ease;
  }
  body.menu-open .sidebar{ transform: translateX(0) }
  body.menu-open{ overflow:hidden }
  .mobile-only, .menu-toggle{display:flex}
  .grid.cols-2{grid-template-columns:1fr}
  .grid.cols-3{grid-template-columns:1fr}
  .bulk-actions{flex-direction:column; align-items:stretch}
  .bulk-actions .btn{width:100%}
}

/* Modo "cards" para tabelas em smartphones (layout tipo aplicativo) */
@media(max-width: 600px){
  .bulk-actions>.row{display:grid; grid-template-columns:1fr 1fr; gap:8px}
  .bulk-actions .btn{min-width:0}
  .table td .btn{font-size:12px; padding:6px 10px}
  .btn.icon-btn{width:32px;height:32px}
  .table td .actions{flex-wrap:nowrap; justify-content:flex-start}
  .table{min-width:auto; display:block}
  .table thead{display:none}
  .table tbody{display:block}
  .table tr{
    display:block;
    padding:12px;
    margin-bottom:12px;
    border:1px solid rgba(255,255,255,.06);
    border-radius:12px;
    background: rgba(255,255,255,.03);
  }
  .table td{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:none;
    padding:6px 0;
  }
  .table td::before{
    content: attr(data-label);
    color: var(--muted);
    margin-right:12px;
    flex: 0 0 auto;
  }
  .table td .row{flex-wrap:wrap; justify-content:flex-end}
}
