:root {
  --bg: #eef3f4;
  --ink: #16323a;
  --muted: #5f7a82;
  --line: #d5e1e5;
  --card: #fff;
  --accent: #0b6e99;
  --accent-ink: #073b52;
  --skip: #b42318;
  --shadow: 0 10px 30px rgba(22, 50, 58, .07);
  --radius: 14px;
  font-family: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; }

.shell {
  max-width: 1180px; margin: 0 auto; padding: 16px 16px 24px;
  min-height: 100vh; display: flex; flex-direction: column;
}
.top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 14px; box-shadow: var(--shadow);
}
.brand { font-weight: 750; color: var(--accent-ink); letter-spacing: -.03em; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav__link, .logout {
  color: var(--muted); padding: 8px 10px; border-radius: 10px; font-size: 14px;
}
.nav__link.is-active { background: #e7f4f8; color: var(--accent-ink); font-weight: 650; }
.logout { margin-left: auto; }

.main { margin-top: 18px; display: grid; gap: 14px; flex: 1; }

.site-foot {
  margin-top: 28px; padding: 16px 6px 4px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  color: var(--muted); font-size: 13px; line-height: 1.45;
}
.site-foot__made, .site-foot__contacts { margin: 0; }
.site-foot__contacts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.site-foot__link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-ink);
}
.site-foot__link:hover { color: var(--accent); }
.site-foot__icon { flex: none; }
.hero, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.hero { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.kicker, .login-kicker { margin: 0; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 16px; }
h3 { margin: 0 0 4px; font-size: 16px; }
.muted { color: var(--muted); }
.panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.quiet { color: var(--muted); font-size: 13px; }
.empty { margin: 0; color: var(--muted); }

.flash { background: #e8f7ee; color: #146c3a; border-radius: 12px; padding: 10px 14px; }

.grid-2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.cards, .list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border: 0; }
.muted-list { color: var(--muted); }

.pair {
  display: grid; gap: 10px; grid-template-columns: 120px 1fr;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.pair.is-now { box-shadow: inset 0 0 0 2px var(--accent); background: #f4fafc; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }
.pair__time { display: grid; align-content: start; gap: 6px; }
.pair__no {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  background: #e7f4f8; color: var(--accent-ink); font-weight: 700; font-size: 13px;
}
.tag { display: inline-flex; width: max-content; background: #f4eee4; color: #7a4e12; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.row-actions { display: flex; gap: 12px; align-items: center; margin: 8px 0 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.danger { color: var(--skip); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.chip, .tabs__item, button[type="submit"] {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
.chip.is-active { background: #e7f4f8; color: var(--accent-ink); }
.tabs__item.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
button[type="submit"] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 650; min-height: 36px; }
.danger-btn { background: #fff !important; color: var(--skip) !important; border-color: #f5c2c0 !important; }
.hint { margin: 0; color: var(--muted); }

.week {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .week { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .week { grid-template-columns: repeat(6, 1fr); } }
.week__day {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; min-height: 140px; box-shadow: var(--shadow);
}
.week__day.is-today { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.week__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.week__head h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.day-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.day-pairs a, .day-pair { display: grid; gap: 2px; color: inherit; padding: 8px; border-radius: 10px; background: #f8fbfc; }
.day-pairs a:hover { background: #e7f4f8; }

.teacher-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.teacher {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.teacher__room { text-align: right; }
.teacher__room strong { font-size: 22px; letter-spacing: -.04em; }
@media (max-width: 640px) { .teacher { grid-template-columns: 1fr auto; } }
.form { display: grid; gap: 12px; }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 700px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
}
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 650; }
input, select {
  border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 0 10px;
  background: #f8fbfc; color: var(--ink);
}
input:focus, select:focus { outline: 0; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11,110,153,.15); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; display: grid; gap: 12px; box-shadow: var(--shadow);
}
.login-card h1 { margin: 0; }
.error { color: var(--skip); margin: 0; }
.login-card button { width: 100%; }

.now {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 88% -10%, rgba(243, 210, 122, .35), transparent 42%),
    linear-gradient(135deg, #073b52 0%, #0b6e99 58%, #1788b5 100%);
  border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: var(--shadow);
}
.now .kicker { color: rgba(255,255,255,.72); }
.now__status {
  margin: 6px 0 0; font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: #f3d27a;
}
.now h2 { margin: 4px 0 6px; font-size: 30px; letter-spacing: -.04em; }
.now__note { margin: 0 0 10px; color: rgba(255,255,255,.78); font-size: 14px; }
.now__lead { margin: 0 0 16px; font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.92); max-width: 40em; }
.now__facts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .now__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.now__fact {
  background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; min-width: 0;
}
.now__fact span {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: rgba(255,255,255,.68); margin-bottom: 4px;
}
.now__fact strong {
  display: block; font-size: 18px; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis;
}
.now__bar { margin-top: 16px; height: 5px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; }
.now__bar i { display: block; height: 100%; background: #f3d27a; border-radius: 99px; }

.bells {
  display: grid; gap: 18px; align-items: center;
  background:
    radial-gradient(circle at 12% 20%, rgba(243, 210, 122, .35), transparent 42%),
    var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
@media (min-width: 700px) { .bells { grid-template-columns: 140px 1fr; } }
.bells__art { display: grid; place-items: center; }
.bells__body h2 { margin: 4px 0 12px; font-size: 22px; letter-spacing: -.03em; }
.bells__table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: 12px; }
.bells__table th, .bells__table td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: left;
}
.bells__table th { background: #f4eee4; color: #7a4e12; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bells__table td:last-child { font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.02em; }
.bells__table tbody tr:nth-child(odd) td { background: #fbfaf6; }
.bells__table tr.is-now td { background: #e7f4f8; color: var(--accent-ink); }
.bells__table em { font-style: normal; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
