:root {
  --bg: #10131a;
  --panel: #181c26;
  --panel-2: #1f2432;
  --line: #2b3140;
  --text: #e9edf5;
  --muted: #9aa4b8;
  --accent: #6ee7b7;
  --accent-2: #7aa2f7;
  --danger: #f7768e;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.error { color: var(--danger); }

.login { max-width: 380px; margin: 12vh auto; }
.login h1 { font-size: 24px; }
#login-form { display: flex; gap: 8px; margin-top: 14px; }

input, select, button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
input:focus, select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }

button { cursor: pointer; }
button.primary { background: var(--accent); color: #0b1015; border-color: transparent; font-weight: 600; }
button.primary:hover { filter: brightness(1.05); }
button.ghost { background: transparent; }
button.book { background: var(--accent-2); border-color: transparent; color: #0b1015; font-weight: 600; }
button.cancel { background: transparent; color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }

.auto-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.auto-grid label { flex-direction: column; align-items: stretch; gap: 4px; }
.auto-grid label > span { font-size: 12px; }

.day { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.day:first-child { border-top: none; }
.day h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }

.class {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.class:first-of-type { border-top: none; }
.class .time { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.class .name { font-weight: 600; }
.class .meta { color: var(--muted); font-size: 13px; }
.class.mine { background: linear-gradient(90deg, rgba(110,231,183,.09), transparent 60%); }
.badge { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px; }
.free { color: var(--muted); font-size: 13px; }

@media (max-width: 620px) {
  .class { grid-template-columns: 68px 1fr; }
  .class button { grid-column: 2; justify-self: start; }
}
