:root{
  --bg:#0b1220;
  --card:#121b2f;
  --card2:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --brand:#22c55e;
  --brand2:#16a34a;
  --danger:#ef4444;
  --warning:#f59e0b;
  --border:rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --radius2:22px;
  --max: 1180px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(34,197,94,.18), transparent 60%),
              radial-gradient(900px 600px at 100% 10%, rgba(56,189,248,.10), transparent 50%),
              var(--bg);
  color:var(--text);
}

a{ color:#93c5fd; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 44px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.logo{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(34,197,94,.20));
  box-shadow: var(--shadow);
}
.brand h1{
  font-size: 18px;
  margin:0;
  letter-spacing:.4px;
}
.brand p{
  margin:2px 0 0;
  color:var(--muted);
  font-size: 13px;
}

.badges{
  display:flex; gap:10px; flex-wrap:wrap;
}
.badge{
  padding:8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
}

.grid{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  align-items:start;
}

.card{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .head{
  padding: 16px 16px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
  border-bottom: 1px solid var(--border);
}
.card .head h2{
  font-size: 16px;
  margin:0;
}
.card .head p{
  margin:6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.card .body{ padding: 16px; }

.row{
  display:grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
label{
  font-size: 12px;
  color: var(--muted);
}
input, select{
  width:100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.6);
  color: var(--text);
  outline:none;
}
input::placeholder{ color: rgba(156,163,175,.65); }
input:focus, select:focus{ border-color: rgba(34,197,94,.65); }

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}
.btn{
  border:0;
  padding: 11px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 600;
  font-size: 13px;
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.btn-primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#052e16;
}
.btn-secondary{
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-danger{
  background: rgba(239,68,68,.18);
  border: 1px solid rgba(239,68,68,.35);
  color: #fecaca;
}
.btn-warning{
  background: rgba(245,158,11,.16);
  border: 1px solid rgba(245,158,11,.35);
  color: #fde68a;
}

.alert{
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 13px;
}
.alert strong{ color: var(--text); }

.tablewrap{ padding: 0; }
.table-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.table-head h2{ margin:0; font-size:16px; }
.table-head p{ margin:6px 0 0; color:var(--muted); font-size:13px; }
.table-inner{ padding: 0 16px 16px; }

table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.35);
}
th, td{
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13px;
}
th{
  text-align:left;
  color: #c7d2fe;
  font-size: 12px;
  letter-spacing:.3px;
  text-transform: uppercase;
  background: rgba(255,255,255,.03);
}
tr:hover td{ background: rgba(255,255,255,.02); }
td small{ color: var(--muted); }

.ops{
  display:flex; gap:8px; flex-wrap:wrap;
}
.pill{
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  font-weight: 600;
  font-size: 12px;
}
.pill.edit{ color:#bbf7d0; border-color: rgba(34,197,94,.35); }
.pill.del{ color:#fecaca; border-color: rgba(239,68,68,.35); }

.footer-links{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}