:root{
  --bg: #06120d;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.55);
  --brand1: #10b981; /* emerald */
  --brand2: #06b6d4; /* cyan */
  --warn: #f59e0b;
  --danger: #ef4444;
  --ok: #22c55e;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --r: 18px;
  --r2: 22px;
}

*{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(1200px 500px at 20% -20%, rgba(16,185,129,.35), transparent 60%),
    radial-gradient(900px 450px at 90% 0%, rgba(6,182,212,.25), transparent 55%),
    radial-gradient(900px 600px at 40% 120%, rgba(16,185,129,.15), transparent 55%),
    linear-gradient(180deg, #04110c 0%, #06120d 40%, #050f0b 100%);
}

a{color:inherit;text-decoration:none}

.container{max-width:1200px;margin:0 auto;padding:16px}

.topbar{
  position:sticky;top:0;z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(3,10,7,.55);
  border-bottom: 1px solid var(--line);
}

.brand{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;
}

.logo{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 10px 30px rgba(16,185,129,.25);
  display:grid;place-items:center;
  font-weight:800;letter-spacing:.5px;
}

.brand h1{margin:0;font-size:16px;line-height:1.1}
.brand p{margin:2px 0 0;font-size:12px;color:var(--muted)}

.nav{
  display:flex;gap:10px;flex-wrap:wrap;
  padding:0 16px 14px 16px;
}

.nav a{
  padding:10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
  font-size:13px;
}

.nav a:hover{transform: translateY(-1px);border-color: rgba(255,255,255,.18)}
.nav a.active{
  color: #04110c;
  border-color: rgba(16,185,129,.55);
  background: linear-gradient(135deg, rgba(16,185,129,.95), rgba(6,182,212,.9));
  font-weight:700;
}

.pagehead{
  margin-top:16px;
  padding:16px;
  border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(6,182,212,.10));
  box-shadow: var(--shadow);
}

.pagehead h2{margin:0;font-size:20px}
.pagehead .sub{margin-top:6px;color:var(--muted);font-size:13px}

.filters{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:10px;
}

.field{grid-column: span 3; min-width: 160px;}
.field.w2{grid-column: span 2;}
.field.w4{grid-column: span 4;}

.label{font-size:12px;color:var(--muted);margin-bottom:6px}

select,input{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
select:focus,input:focus{border-color: rgba(16,185,129,.55)}

.chips{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap}
.chip{
  font-size:12px;color:var(--muted);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding:6px 10px;border-radius:999px
}
.chip strong{color:var(--text)}

.grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}

.card{
  grid-column: span 4;
  border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  padding:14px;
}

.card h3{margin:0 0 8px 0;font-size:14px;color:var(--muted)}
.card .big{font-size:22px;font-weight:800;letter-spacing:.2px}
.card .hint{margin-top:6px;color:var(--muted2);font-size:12px}

.tablewrap{
  grid-column: span 12;
  border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.tablehead{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px;
  background: linear-gradient(135deg, rgba(16,185,129,.20), rgba(6,182,212,.12));
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.tablehead .title{font-weight:800}

.actions{display:flex;gap:8px;flex-wrap:wrap}
.btn{
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  transition: transform .08s ease, border-color .12s ease;
  font-weight:700;
  font-size:13px;
}
.btn:hover{transform: translateY(-1px);border-color: rgba(255,255,255,.18)}
.btn.primary{
  color:#04110c;
  border-color: rgba(16,185,129,.55);
  background: linear-gradient(135deg, rgba(16,185,129,.95), rgba(6,182,212,.9));
}
.btn.warn{border-color: rgba(245,158,11,.6)}
.btn.danger{border-color: rgba(239,68,68,.6)}

.tabletools{padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.08);display:flex;gap:10px;flex-wrap:wrap}
.tabletools .field{grid-column:unset;min-width:unset;flex:1;max-width: 360px;}

.table{
  width:100%;
  border-collapse: collapse;
}
.table th, .table td{
  padding:12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-right: 1px solid rgba(255,255,255,.06);
  font-size:13px;
}
.table th:last-child, .table td:last-child{border-right:none}

.table th{
  text-align:left;
  color: #ffffff;
  background: rgba(6,182,212,.22);
  font-weight:800;
}

.badge{
  padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}
.badge.ok{border-color: rgba(34,197,94,.55)}
.badge.warn{border-color: rgba(245,158,11,.6)}
.badge.danger{border-color: rgba(239,68,68,.6)}

.modal{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;
  background: rgba(0,0,0,.55);
  z-index:100;
}
.modal.open{display:flex}
.modal .box{
  width:min(680px, calc(100% - 24px));
  border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,18,13,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal .box .head{padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.10);display:flex;align-items:center;justify-content:space-between}
.modal .box .body{padding:14px 16px;color:var(--muted)}

@media (max-width: 980px){
  .field{grid-column: span 6;}
  .card{grid-column: span 6;}
}
@media (max-width: 640px){
  .field{grid-column: span 12;}
  .card{grid-column: span 12;}
  .nav{gap:8px}
  .nav a{padding:9px 10px}
}
