:root {
  --bg: #090a0c;
  --panel: #0f1115;
  --panel-2: #151820;
  --line: #242832;
  --muted: #8d95a5;
  --text: #eef1f7;
  --soft: #c8ced8;
  --green: #52c178;
  --amber: #d6a84f;
  --red: #e05d5d;
  --blue: #73a7ff;
  --focus: #f1f5ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  color: var(--soft);
  background: #11141a;
  border-radius: 7px;
  min-height: 34px;
  padding: 0 11px;
  cursor: pointer;
}

button:hover, button:focus-visible {
  border-color: #3a4150;
  color: var(--text);
  outline: none;
}

.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #0b0d11;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font-weight: 650;
}

.mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #eef1f7;
  color: #090a0c;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.nav button.active {
  background: #151820;
  color: var(--text);
}

.main {
  padding: 20px 24px 40px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.title h1 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 680;
}

.title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.primary {
  background: var(--focus);
  color: #0b0d11;
  border-color: var(--focus);
  font-weight: 650;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  min-height: 88px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.metric strong {
  font-size: 24px;
  line-height: 1;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 14px;
  margin-top: 14px;
}

.section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section h2 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 135px 120px 115px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
}

.row:last-child { border-bottom: 0; }
.row.header {
  color: var(--muted);
  font-size: 12px;
  min-height: 36px;
  background: #0c0e12;
}

.name {
  min-width: 0;
}

.name strong {
  display: block;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--soft);
  background: #101319;
}

.pill.present { color: var(--green); border-color: rgba(82, 193, 120, .35); }
.pill.absent { color: var(--red); border-color: rgba(224, 93, 93, .35); }
.pill.excused { color: var(--amber); border-color: rgba(214, 168, 79, .35); }
.pill.submitted { color: var(--blue); border-color: rgba(115, 167, 255, .35); }

.stack {
  display: grid;
  gap: 10px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.notice strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.register {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
  gap: 14px;
}

.session-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.session {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  text-align: left;
  min-height: 64px;
  padding: 10px 12px;
}

.session.active { background: var(--panel-2); }
.session:last-child { border-bottom: 0; }

.register-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
}

.register-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.progress {
  height: 7px;
  width: 180px;
  border-radius: 999px;
  background: #20242d;
  overflow: hidden;
}

.progress div {
  height: 100%;
  background: var(--green);
}

.yp-row {
  display: grid;
  grid-template-columns: 34px minmax(160px, 1fr) 260px minmax(120px, .7fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.yp-row.selected {
  outline: 1px solid #596273;
  outline-offset: -1px;
  background: #171a22;
}

.state-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.state-buttons button {
  padding: 0 8px;
  white-space: nowrap;
  font-size: 13px;
}

.state-buttons .selected-state {
  color: #0b0d11;
  background: var(--focus);
  border-color: var(--focus);
}

.reason {
  width: 100%;
  background: #0c0e12;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 32px;
  padding: 0 9px;
}

.kbd {
  border: 1px solid var(--line);
  border-bottom-color: #3a4150;
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--soft);
  background: #11141a;
  font-size: 12px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.search {
  min-height: 36px;
  background: #0c0e12;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  padding: 0 11px;
  min-width: 260px;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout, .register { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main { padding: 16px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: minmax(150px, 1fr) 90px; }
  .row > :nth-child(3), .row > :nth-child(4) { display: none; }
  .yp-row { grid-template-columns: 28px minmax(130px, 1fr); }
  .state-buttons, .reason { grid-column: 2; }
}
