:root{
  --bg:#070a12;
  --panel:rgba(17, 24, 39, .88);
  --panel2:rgba(15, 23, 42, .86);
  --text:#e5e7eb;
  --muted:#94a3b8;
  --line:rgba(148,163,184,.28);
  --accent:hsl(185 90% 55%);
  --good:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
  --shadow:0 18px 50px rgba(0,0,0,.45);
  --r:16px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-size:15.5px;
  color:var(--text);
  background:
    radial-gradient(900px 700px at 10% 5%, rgba(34,211,238,.12), transparent 55%),
    radial-gradient(900px 700px at 90% 15%, rgba(168,85,247,.10), transparent 55%),
    radial-gradient(900px 700px at 35% 95%, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(180deg, #070a12, #0b1020 45%, #060811);
  min-height:100vh;
}

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

header{
  position:sticky;
  top:0;
  z-index:10;
  padding:12px 14px;
  background:linear-gradient(90deg, rgba(7,10,18,.92), rgba(7,10,18,.75));
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}

h1{margin:0;font-size:18px;letter-spacing:.2px}

.toolbar,.actions,.row,.split,.chips,.kpi{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.split{justify-content:space-between}

.pill,.badge,.chip{
  border:1px solid var(--line);
  background:rgba(15,23,42,.55);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.pill{padding:6px 10px;font-size:12px}
.badge{padding:3px 8px;font-size:12px}
.chip{padding:2px 8px;font-size:12px}

.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 0 6px rgba(34,211,238,.10);
}

button,input,select,textarea{
  background:rgba(15,23,42,.65);
  border:1px solid var(--line);
  color:var(--text);
  border-radius:12px;
  padding:9px 10px;
  font-size:14px;
  outline:none;
}

textarea{
  width:100%;
  min-height:90px;
  resize:vertical;
}

button{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  user-select:none;
}

button:active{transform:translateY(1px)}

button.primary,
.primary{
  background:linear-gradient(135deg, var(--accent), rgba(34,211,238,.55));
  color:#05101c;
  border-color:transparent;
  font-weight:700;
  box-shadow:0 10px 26px rgba(34,211,238,.20);
}

button.ghost{
  background:rgba(15,23,42,.45);
  border:1px dashed rgba(148,163,184,.32);
  color:#cbd5e1;
}

button.danger{background:rgba(239,68,68,.14);border-color:rgba(239,68,68,.30);color:#fecaca}
button.good{background:rgba(34,197,94,.16);border-color:rgba(34,197,94,.30);color:#bbf7d0}
button.mini{padding:6px 8px;font-size:12px;border-radius:10px}
.full{width:100%;justify-content:center}

.wrap{
  display:grid;
  grid-template-columns:340px 1fr;
  gap:12px;
  padding:12px;
}

.panel,.login-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:12px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(10px);
}

.card{
  background:rgba(15,23,42,.72);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
}

.muted{color:var(--muted);font-size:13px}
.hint{font-size:12px;color:#9aa7be;line-height:1.55}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.classItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:14px;
  padding:10px;
  margin:8px 0;
  background:rgba(2,6,23,.12);
}

.classItem.active{
  border-color:rgba(34,211,238,.65);
  background:rgba(34,211,238,.06);
}

.className{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.className b{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tableWrap{overflow:auto;border-radius:14px}
table{width:100%;border-collapse:separate;border-spacing:0 8px;min-width:900px}

thead th{
  font-size:12.5px;
  color:#cbd5e1;
  text-transform:uppercase;
  letter-spacing:.08em;
  text-align:left;
  padding:8px 10px;
}

tbody tr{
  background:rgba(2,6,23,.35);
  border:1px solid var(--line);
}

tbody tr:hover{filter:brightness(1.08)}

tbody tr.row-y{
  background:linear-gradient(90deg, rgba(253,224,71,.55), rgba(15,23,42,.70) 62%);
  border-color:rgba(253,224,71,.70);
  box-shadow:inset 8px 0 0 rgba(253,224,71,.85);
}

tbody tr.row-o{
  background:linear-gradient(90deg, rgba(251,146,60,.58), rgba(15,23,42,.70) 62%);
  border-color:rgba(251,146,60,.75);
  box-shadow:inset 8px 0 0 rgba(251,146,60,.90);
}

tbody tr.row-r{
  background:linear-gradient(90deg, rgba(239,68,68,.60), rgba(15,23,42,.70) 62%);
  border-color:rgba(239,68,68,.78);
  box-shadow:inset 8px 0 0 rgba(239,68,68,.92);
}

tbody td{
  padding:10px;
  font-size:15.5px;
  line-height:1.25;
  border-top:1px solid rgba(148,163,184,.08);
  border-bottom:1px solid rgba(148,163,184,.08);
}

tbody tr td:first-child{
  border-left:1px solid rgba(148,163,184,.08);
  border-top-left-radius:14px;
  border-bottom-left-radius:14px;
}

tbody tr td:last-child{
  border-right:1px solid rgba(148,163,184,.08);
  border-top-right-radius:14px;
  border-bottom-right-radius:14px;
}

.name{
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
}

.name .flag{
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(148,163,184,.25);
  box-shadow:0 0 0 6px rgba(148,163,184,.06);
}

.name.y .flag{background:#fde047;box-shadow:0 0 0 6px rgba(253,224,71,.14)}
.name.o .flag{background:#fb923c;box-shadow:0 0 0 6px rgba(251,146,60,.14)}
.name.r .flag{background:#ef4444;box-shadow:0 0 0 6px rgba(239,68,68,.14)}
.name .txt{white-space:nowrap;font-size:16px;font-weight:700}

.err,.ok{
  margin:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  white-space:pre-wrap;
  box-shadow:var(--shadow);
  backdrop-filter:blur(10px);
  display:none;
}

.err{background:rgba(127,29,29,.35);border-color:rgba(239,68,68,.35);color:#fecaca}
.ok{background:rgba(20,83,45,.35);border-color:rgba(34,197,94,.35);color:#bbf7d0}
.err.show,.ok.show{display:block}

dialog{
  border:none;
  padding:0;
  border-radius:18px;
  width:min(980px,96vw);
  background:rgba(7,10,18,.96);
  color:var(--text);
  box-shadow:0 22px 70px rgba(0,0,0,.65);
}

dialog::backdrop{background:rgba(0,0,0,.65)}

.dlgHead{
  padding:12px 14px;
  border-bottom:1px solid rgba(148,163,184,.16);
  background:linear-gradient(90deg, rgba(7,10,18,.9), rgba(34,211,238,.08));
}

.dlgBody{padding:14px;max-height:70vh;overflow:auto}

.evt{
  display:grid;
  grid-template-columns:140px 140px 1fr 80px;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.16);
  background:rgba(15,23,42,.50);
  margin:8px 0;
}

.pill2{
  border:1px solid rgba(148,163,184,.18);
  background:rgba(15,23,42,.50);
  padding:10px;
  border-radius:16px;
}

.skillGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(220px, 1fr));
  gap:10px;
}

.login-page{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
}

.login-card{
  width:min(420px,92vw);
  padding:24px;
}

.login-card input{width:100%;margin-top:10px}

@media (max-width:980px){
  .wrap{grid-template-columns:1fr}
  table{min-width:760px}
  .grid2,.skillGrid{grid-template-columns:1fr}
  .evt{grid-template-columns:1fr;gap:8px}
}