:root {
  color-scheme: light;
  --teal: #0ae6dc;
  --teal-d: #06a19b;
  --teal-dd: #067b78;
  --ink: #15242b;
  --navy: #0c1a20;
  --muted: #5e7178;
  --line: #e4eef0;
  --surface: #f3fafb;
  --sky: #e7fbfa;
  --sky-line: #bff0ec;
  --danger: #9c2f45;
  --wrap: 1100px;
  --font-d: "Space Grotesk", sans-serif;
  --font-b: Manrope, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-b);
  line-height: 1.55;
}

main { flex: 1; }

a { color: inherit; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
}

.topbar-in, .wrap { width: min(var(--wrap), calc(100% - 36px)); margin-inline: auto; }

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand img { height: 46px; width: auto; }

.brand-tag {
  font-family: var(--font-d);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.langs { display: flex; gap: 6px; }

.langs a {
  text-decoration: none;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--sky-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--teal-dd);
}

.langs a.on { background: var(--teal); color: #04222a; border-color: var(--teal); }

.intro { padding: 28px 0 6px; }

.kicker {
  margin: 0;
  font-family: var(--font-d);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-d);
}

h1, .intro h1 {
  margin: 8px 0 0;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--navy);
}

h1 em { font-style: normal; color: var(--teal-dd); }

.bar { width: 56px; height: 4px; border-radius: 4px; background: var(--teal); margin: 16px 0; }

.lead { max-width: 38rem; color: var(--muted); font-size: 1.05rem; margin: 0; }

.status { min-height: 1.4rem; color: var(--danger); }

.layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin: 8px auto 56px;
}

.panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 14px 44px rgba(6, 120, 120, 0.08);
  padding: 22px;
  min-height: 420px;
}

.panel-head, .month-nav, .admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

h2 { margin: 0; font-family: var(--font-d); font-size: 1.25rem; font-weight: 700; color: var(--navy); }

.month-nav p { margin: 0; min-width: 9rem; text-align: center; text-transform: capitalize; font-weight: 600; }

.month-nav button, .ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--navy);
}

.month-nav button { width: 42px; padding: 0; }

.weekdays, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.weekdays { margin-top: 22px; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-align: center; }

.grid { margin-top: 8px; }

.day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-weight: 600;
}

.day[disabled] { color: #c5d4d6; cursor: default; }

.day.open { border-color: var(--sky-line); background: var(--sky); }

.day.selected, .times button[aria-pressed="true"] {
  background: var(--teal);
  color: #04222a;
  border-color: var(--teal);
}

.times { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

.times button {
  min-width: 88px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--sky-line);
  background: var(--sky);
  color: var(--teal-dd);
  font-weight: 700;
  cursor: pointer;
}

#submit, .save {
  background: var(--teal);
  color: #04222a;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 22px;
  font-family: var(--font-d);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 230, 220, 0.35);
}

.day:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--teal-d);
  outline-offset: 2px;
}

.muted { color: var(--muted); }

form { display: grid; gap: 12px; }

label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }

input, textarea, select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

textarea { min-height: 96px; resize: vertical; }

#submit[disabled], .save[disabled] { opacity: 0.55; cursor: wait; }

.form-error { margin: 0; color: var(--danger); min-height: 1.2rem; }

.done h3 { margin: 0 0 8px; font-family: var(--font-d); font-size: 1.8rem; font-weight: 700; color: var(--navy); }

.site-foot {
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  padding: 8px 16px 36px;
  font-size: 0.92rem;
}

.site-foot img { height: 42px; margin: 0 auto 12px; }

.site-foot a { color: var(--teal-dd); text-decoration: none; }

.site-foot p { margin: 6px 0; }

.top { width: min(var(--wrap), calc(100% - 36px)); margin: 18px auto 0; }
.admin { width: min(860px, calc(100% - 32px)); margin: 28px auto 64px; display: grid; gap: 16px; }

.admin h1, .login h1 { font-size: 2.2rem; }

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.window, .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }

.checks { display: flex; gap: 18px; align-items: center; }

.ghost { justify-self: start; }

.login { width: min(420px, calc(100% - 32px)); margin: 48px auto; }

[hidden] { display: none !important; }

@media (max-width: 800px) {
  .layout, .window, .row { grid-template-columns: 1fr; }
  .brand img, .site-foot img { height: 38px; }
  .panel { min-height: 0; }
  .brand-tag { display: none; }
}
