:root {
  --ink: #18243c;
  --ink-soft: #35425d;
  --muted: #6d7890;
  --cream: #faf7f1;
  --tint: #f3eee4;
  --white: #ffffff;
  --navy: #1b2b4b;
  --navy-deep: #142039;
  --accent: #b58642;
  --accent-dark: #8f652c;
  --gold-soft: #f4e8d3;
  --green: #2f7d5b;
  --green-soft: #e7f4ed;
  --red: #b44842;
  --red-soft: #fbeceb;
  --border: #e6ded2;
  --shadow: 0 18px 45px rgba(27, 43, 75, .09);
  --shadow-sm: 0 6px 18px rgba(27, 43, 75, .07);
  --radius: 18px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.015em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.3vw, 2.7rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 14px; color: var(--ink-soft); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.container { width: min(100% - 40px, var(--max)); margin: 0 auto; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
/* Разделы не должны прятаться под липкой шапкой при переходе по меню. */
section[id] { scroll-margin-top: 92px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #f7e9cf; font-family: Georgia, serif; font-size: 22px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: Georgia, serif; font-size: 17px; }
.brand__text small { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a { text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 500; transition: color .2s; }
.main-nav a:hover { color: var(--accent-dark); }
.main-nav__auth { display: none; gap: 8px; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--border); }
.main-nav__auth[hidden] { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--white); color: var(--ink-soft); font-size: 18px; line-height: 1; transition: background .2s, color .2s, border-color .2s; }
.theme-toggle:hover { background: var(--tint); color: var(--accent-dark); border-color: var(--accent); }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.user-bar { background: var(--navy); color: #fff; font-size: 14px; }
.user-bar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 42px; }
.user-bar__links { display: flex; gap: 18px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: #f2e7d4; font-size: 14px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #fff; }
.link-btn--muted { color: #a9b6cc; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 13px 22px; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(27,43,75,.18); }
.btn--primary:hover { background: var(--navy-deep); }
.btn--outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { background: var(--tint); }
.btn--small { padding: 9px 16px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--danger { background: var(--red-soft); color: var(--red); }
.btn--success { background: var(--green-soft); color: var(--green); }
.inline-btn { background: none; border: 0; padding: 0; color: var(--accent-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Общие блоки ---------- */
.eyebrow { display: inline-block; color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.section { padding: 90px 0; }
.section--tint { background: var(--tint); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 36px; }
.section-head p { max-width: 440px; margin: 0; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.cards-grid { display: grid; gap: 20px; }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; }
.pill--green { background: var(--green-soft); color: var(--green); }
.pill--amber { background: var(--gold-soft); color: var(--accent-dark); }
.pill--red { background: var(--red-soft); color: var(--red); }
.count { font-family: inherit; font-size: 13px; color: var(--muted); font-weight: 500; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 11px; font-weight: 800; line-height: 1; }
.nav-badge[hidden] { display: none; }
.user-bar__links [data-action="nav-my"],
.user-bar__links [data-action="nav-admin"],
.main-nav__auth [data-action="nav-my"],
.main-nav__auth [data-action="nav-admin"],
.admin-tabs [data-action="admin-tab"] { display: inline-flex; align-items: center; gap: 7px; }
.main-nav__auth [data-action="nav-my"] .nav-badge,
.main-nav__auth [data-action="nav-admin"] .nav-badge { margin-left: auto; }

/* ---------- Демо-баннер ---------- */
.demo-banner { background: #fff8e8; border-bottom: 1px solid #eddfc0; color: #6d5426; font-size: 13px; }
.demo-banner__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; }
.demo-banner code { background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; }
.demo-banner__close { background: none; border: 0; font-size: 22px; line-height: 1; color: inherit; }

/* ---------- Герой ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #fdfaf4 0%, #f4eee3 100%); padding: 88px 0 78px; }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.hero__glow--one { width: 460px; height: 460px; right: -120px; top: -180px; background: radial-gradient(circle, rgba(181,134,66,.16), transparent 68%); }
.hero__glow--two { width: 360px; height: 360px; left: -140px; bottom: -200px; background: radial-gradient(circle, rgba(27,43,75,.10), transparent 68%); }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.25fr .85fr; gap: 60px; align-items: center; }
.hero__side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.hero-media { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.hero-media img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.hero-media figcaption { padding: 10px 14px; text-align: center; font-size: 12px; color: var(--muted); }
.hero h1 em { color: var(--accent-dark); font-style: italic; }
.hero__lead { font-size: 17px; max-width: 620px; margin-bottom: 28px; }
.hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: 13px; }
.hero__card { background: var(--white); border: 1px solid var(--border); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.hero-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.hero-card__label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.hero-card__body { min-height: 108px; margin-bottom: 20px; }
.hero-card__body h3 { margin-bottom: 8px; }
.hero-card__body p { font-size: 14px; margin: 0 0 4px; }
.hero-card__hint { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.skeleton { background: linear-gradient(90deg, #eee8dd, #f7f3eb, #eee8dd); border-radius: 6px; animation: pulse 1.5s infinite; }
.skeleton--line { height: 18px; margin-bottom: 12px; }
.skeleton--short { width: 60%; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- Статистика ---------- */
.stats { border-bottom: 1px solid var(--border); background: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__grid > div { padding: 28px 18px; text-align: center; border-right: 1px solid var(--border); }
.stats__grid > div:last-child { border-right: 0; }
.stats__grid strong { display: block; font-family: Georgia, serif; font-size: 28px; color: var(--navy); }
.stats__grid span { font-size: 13px; color: var(--muted); }

/* ---------- Обо мне ---------- */
.about__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { background: var(--tint); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--ink-soft); }
.about__card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.about__card h3 { color: #fff; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 28px; font-size: 14px; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }
.about__card .check-list li { color: #dfe6f2; }
.about__card .check-list li::before { color: #e0bb7b; }
.check-list--compact { margin: 18px 0 24px; }
.about__signature { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); font-family: Georgia, serif; font-style: italic; color: #dfe6f2; }

/* ---------- Услуги ---------- */
.service-card { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card p { font-size: 14px; flex: 1; }
.icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; background: var(--gold-soft); color: var(--accent-dark); }
.icon--school { background: #e8eef8; color: var(--navy); }
.icon--chat { background: var(--green-soft); color: var(--green); }
.icon--pen { background: #f2e6ea; color: #9a4f66; }
.card__foot { font-size: 13px; font-weight: 700; color: var(--accent-dark); margin-top: 16px; }

/* ---------- Шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 26px; border-top: 2px solid var(--border); }
.step::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.step__num { font-family: Georgia, serif; font-size: 32px; color: var(--gold-soft); display: block; margin-bottom: 8px; }
.step p { font-size: 14px; margin: 0; }

/* ---------- Цены ---------- */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card--featured { border-color: var(--accent); box-shadow: var(--shadow); }
.price-card__badge { position: absolute; top: -13px; right: 22px; background: var(--accent); color: #fff; border-radius: 999px; padding: 5px 13px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.price { font-family: Georgia, serif; font-size: 30px; color: var(--navy); margin-bottom: 6px; }
.price small { display: block; font-family: inherit; font-size: 12px; color: var(--muted); margin-top: 2px; }
.price-card .btn { margin-top: auto; }

/* ---------- Расписание ---------- */
.booking { background: var(--white); border: 1px solid var(--border); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-sm); }
.booking__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.date-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-tab { flex: 0 0 auto; min-width: 74px; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 9px 12px; text-align: center; color: var(--ink-soft); transition: .2s; }
.date-tab small { display: block; font-size: 11px; color: var(--muted); }
.date-tab strong { font-size: 15px; }
.date-tab:hover { border-color: var(--accent); }
.date-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.date-tab.is-active small { color: #c8d3e6; }
.booking__legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; min-height: 90px; }
.slot { border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.slot__time { font-family: Georgia, serif; font-size: 22px; color: var(--navy); }
.slot__title { font-size: 14px; font-weight: 600; }
.slot__meta { font-size: 12px; color: var(--muted); }
.slot__footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.slot__price { font-weight: 700; color: var(--accent-dark); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 34px 18px; color: var(--muted); background: #fbf9f5; border: 1px dashed var(--border); border-radius: 14px; }
.booking__note { font-size: 13px; color: var(--muted); margin: 20px 0 0; }

/* ---------- Отзывы ---------- */
.review-card { display: flex; flex-direction: column; gap: 10px; }
.stars { color: #d59b31; letter-spacing: 2px; font-size: 15px; }
.review-card p { font-size: 14px; overflow-wrap: anywhere; }
.review-card__author { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.review-card__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; color: var(--accent-dark); font-weight: 700; }
.review-card__date { color: var(--muted); font-weight: 400; }
.review-card__source { font-size: 12px; color: var(--muted); }
.review-card__source a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.review-card__image { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.review-card__image img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.review-image-modal { text-align: center; }
.review-image-modal img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 12px; }
.reviews-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.reviews-controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.reviews-controls select { width: auto; min-width: 150px; padding: 9px 32px 9px 11px; }
.reviews-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.reviews-carousel { position: relative; }
.reviews-track { display: flex; align-items: flex-start; gap: 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 4px 20px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.reviews-track > .review-card { flex: 0 0 auto; scroll-snap-align: start; }
.reviews-track > .review-card--short { width: clamp(240px, 26%, 300px); }
.reviews-track > .review-card--medium { width: clamp(280px, 32%, 360px); }
.reviews-track > .review-card--long { width: clamp(340px, 40%, 440px); }
.reviews-track > .empty-state { flex: 1 0 100%; }
.reviews-nav { position: absolute; top: calc(50% - 8px); z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--white); color: var(--accent-dark); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 24px; line-height: 1; }
.reviews-nav--prev { left: -10px; }
.reviews-nav--next { right: -10px; }
.reviews-nav:disabled { opacity: .3; cursor: default; }
.review-form { margin-top: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; }
.faq__hint { font-size: 14px; }
.faq-list details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-list details:first-child { border-top: 1px solid var(--border); }
.faq-list summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent-dark); font-size: 20px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 12px 0 0; font-size: 14px; }

/* ---------- Контакты ---------- */
.section--contact { background: var(--navy); color: #fff; }
.section--contact h2 { color: #fff; }
.section--contact p { color: #cbd6e8; }
.section--contact .eyebrow { color: #e0bb7b; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact__list { display: grid; gap: 14px; margin-top: 26px; }
.contact__list > div { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.contact__list > div > span:first-child { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.contact__list a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); }
.contact-form { background: #fff; }
.contact-form h3 { color: var(--ink); }

/* ---------- Формы ---------- */
label { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 14px; }
input, select, textarea { width: 100%; max-width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: #fff; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
input[type="date"], input[type="time"] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value { min-width: 0; text-align: left; }
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit { min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { width: 16px; height: 16px; margin: 0; flex: 0 0 16px; opacity: .8; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181,134,66,.14); }
textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.form-error { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; }
.form-success { background: var(--green-soft); color: var(--green); padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; }

/* ---------- Кабинет и админка ---------- */
.view { padding: 60px 0 90px; min-height: 70vh; background: var(--cream); }
.dashboard__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.dashboard__head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.dashboard__head p { margin: 0; }
.dashboard__tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.booking-list { display: grid; gap: 14px; }
.booking-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 15px; padding: 20px 24px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.booking-row__main h3 { margin-bottom: 4px; font-size: 18px; }
.booking-row__main p { margin: 0; font-size: 13px; }
.booking-row__side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.admin-stat { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.admin-stat strong { display: block; font-family: Georgia, serif; font-size: 26px; color: var(--navy); }
.admin-stat span { font-size: 12px; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.admin-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.admin-card--wide { margin-bottom: 20px; }
.admin-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.admin-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-card__head h2 { margin-bottom: 18px; }
.checkbox-label { display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; user-select: none; width: fit-content; max-width: 100%; margin: 4px 0 0; }
.checkbox-label input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; min-width: 20px; max-width: 20px; padding: 0; margin: 0; flex: 0 0 20px; border: 1.5px solid #cbd5e1; border-radius: 6px; background: #fff; display: grid; place-content: center; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s, transform .15s; }
.checkbox-label input[type="checkbox"]::before { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transform-origin: center; transition: transform .15s ease; margin-top: -2px; }
.checkbox-label input[type="checkbox"]:hover { border-color: var(--sage); }
.checkbox-label input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--sage-soft); }
.checkbox-label input[type="checkbox"]:checked { background: var(--sage); border-color: var(--sage); }
.checkbox-label input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.checkbox-label input[type="checkbox"]:active { transform: scale(.96); }
.stack-form { display: grid; gap: 0; }
.admin-list { display: grid; gap: 12px; max-height: 520px; overflow-y: auto; }
.admin-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px; font-size: 13px; }
.admin-item strong { display: block; font-size: 14px; margin-bottom: 4px; }
.admin-item p { font-size: 13px; margin: 0 0 8px; }
.admin-item__meta { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.admin-item__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn--tiny { padding: 6px 11px; font-size: 12px; border-radius: 8px; }

/* ---------- Вкладки панели и аккаунты ---------- */
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { width: auto; flex: 0 0 auto; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; background: transparent; border-radius: 0; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
.admin-tabs button:hover { background: transparent; color: var(--navy); }
.admin-tabs button.is-active { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- Календарь в панели репетитора ---------- */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.calendar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-month { min-width: 170px; text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; color: var(--navy); }
.calendar-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.calendar-legend__free::before { background: var(--green) !important; }
.calendar-legend__taken::before { background: var(--red) !important; }
.calendar-legend__closed::before { background: var(--muted) !important; }
.calendar-scroll { overflow-x: auto; padding-bottom: 4px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(88px, 1fr)); gap: 7px; min-width: 660px; }
.calendar-weekday { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.calendar-cell { min-height: 96px; border: 1px solid var(--border); border-radius: 11px; padding: 7px; background: var(--white); display: flex; flex-direction: column; gap: 5px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.calendar-cell:hover { border-color: var(--accent); }
.calendar-cell.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(181, 134, 66, .2); }
.calendar-cell--empty { border-style: dashed; opacity: .45; cursor: default; }
.calendar-cell--empty:hover { border-color: var(--border); }
.calendar-cell--other { background: var(--tint); }
.calendar-daynum { font-size: 12px; font-weight: 700; color: var(--ink); }
.calendar-cell.is-today .calendar-daynum { color: var(--accent-dark); }
.calendar-chips { display: grid; gap: 3px; }
.cal-chip { width: 100%; border: 0; border-radius: 6px; padding: 3px 5px; font-size: 10px; line-height: 1.25; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip--free { background: var(--green-soft); color: var(--green); }
.cal-chip--taken { background: var(--red-soft); color: var(--red); }
.cal-chip--closed { background: var(--tint); color: var(--muted); }
.calendar-more { font-size: 10px; color: var(--muted); }
.calendar-day-panel { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.calendar-day-panel h3 { font-size: 1.1rem; margin-bottom: 10px; }
.calendar-day-panel .admin-item { max-width: none; }
.calendar-item { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.calendar-item:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(181, 134, 66, .12); }
.info-list { display: grid; margin: 4px 0 20px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.info-list__row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-list__row:last-child { border-bottom: 0; }
.info-list__row dt { color: var(--muted); }
.info-list__row dd { margin: 0; overflow-wrap: anywhere; }
.info-list__muted { color: var(--muted); font-size: 12px; }
.modal-actions { display: grid; gap: 8px; }

/* ---------- Статистика посещений ---------- */
.visit-stats { margin-bottom: 18px; }
.visit-bars { display: grid; gap: 11px; }
.visit-bar { display: grid; grid-template-columns: 92px minmax(0, 1fr) 42px; align-items: center; gap: 10px; font-size: 13px; }
.visit-bar__track { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.visit-bar__fill { height: 100%; background: var(--navy); border-radius: 99px; min-width: 3px; }
.visit-bar__value { text-align: right; color: var(--muted); }
.visit-days { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 8px; }
.visit-day { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; font-size: 10px; color: var(--muted); }
.visit-day__bar { width: 100%; max-width: 28px; min-height: 2px; background: var(--navy); border-radius: 5px 5px 0 0; }
.visit-recent { display: grid; gap: 8px; }
.visit-recent__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.visit-recent__meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); }
.visit-recent__badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; line-height: 1.5; }
.visit-recent__badge--new { background: var(--green-soft); color: var(--green); }
.visit-recent__badge--repeat { background: var(--tint); color: var(--ink-soft); }
.visit-recent__badge--guest { background: var(--gold-soft); color: var(--accent-dark); }
.visit-recent__badge--student { background: #e8effc; color: #2c5282; }
.visit-recent__badge--tutor { background: var(--red-soft); color: var(--red); }
.visit-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--cream); }
.visit-reset__label { font-size: 13px; font-weight: 700; margin-right: 4px; }
@media (max-width: 520px) {
  .visit-bar { grid-template-columns: 78px minmax(0, 1fr) 36px; }
}

/* ---------- Задания с файлами (тестовый режим) ---------- */
.assignment-section { margin-bottom: 28px; }
.assignment-section__head { margin-bottom: 14px; }
.assignment-section__head h2 { font-size: 1.3rem; margin-bottom: 4px; }
.assignment-list { display: grid; gap: 14px; }
.assignment-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.assignment-admin-item { padding: 16px; }
.assignment-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.assignment-card__head h3 { margin: 0 0 3px; font-size: 17px; }
.assignment-card__meta { color: var(--muted); font-size: 12px; }
.assignment-note { margin: 0 0 14px; font-size: 13px; }
.assignment-block { margin-top: 12px; }
.assignment-block > strong { display: block; font-size: 13px; margin-bottom: 8px; }
.assignment-files { display: grid; gap: 6px; }
.assignment-file { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--tint); color: var(--ink); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.assignment-file:hover { border-color: var(--accent); }
.assignment-file__meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.assignment-file small { color: var(--muted); white-space: nowrap; }
.assignment-file__action { flex: 0 0 auto; color: var(--accent-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.assignment-file:hover .assignment-file__action { text-decoration: underline; }
.assignment-file--broken { color: var(--muted); }
.assignment-replies { display: grid; gap: 10px; }
.assignment-reply { border-left: 3px solid var(--accent); padding-left: 12px; }
.assignment-reply p { margin: 6px 0; font-size: 13px; }
.assignment-muted { color: var(--muted); font-size: 12px; }
.assignment-reply-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.assignment-reply-form input[type="file"] { font-size: 13px; }
.assignment-reply-form .btn { justify-self: start; }
@media (max-width: 520px) {
  .assignment-file { align-items: flex-start; flex-direction: column; gap: 2px; }
}

/* ---------- Тесты ---------- */
.quiz-builder { display: grid; gap: 12px; margin: 6px 0 16px; }
.quiz-question { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--cream); }
.quiz-question__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quiz-question__head strong { margin-right: auto; font-size: 14px; }
.quiz-question__head select { width: auto; min-width: 170px; }
.quiz-question textarea { width: 100%; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option-editor { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.quiz-option-editor input[type="radio"] { width: 16px; height: 16px; accent-color: var(--sage); }
.quiz-option-editor input[type="text"] { width: 100%; min-width: 0; }
.quiz-question-preview, .quiz-answers { display: grid; gap: 10px; }
.quiz-preview-question strong { display: block; font-size: 13px; margin-bottom: 5px; }
.quiz-option-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-option-chip { padding: 3px 8px; border: 1px solid var(--border); border-radius: 99px; background: var(--white); font-size: 12px; }
.quiz-option-chip--correct { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 700; }
.quiz-admin-item { padding: 16px; }
.quiz-admin-item__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.quiz-attempt { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--tint); }
.quiz-attempt + .quiz-attempt { margin-top: 10px; }
.quiz-attempt__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.quiz-grade-form { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.quiz-grade-form label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.quiz-grade-form select { width: auto; min-width: 120px; }
.quiz-card .quiz-questions { display: grid; gap: 14px; margin-bottom: 16px; }
.quiz-question-view { display: grid; gap: 8px; }
.quiz-question-view strong { font-size: 14px; }
.quiz-option-list { display: grid; gap: 6px; }
.quiz-option { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--tint); font-size: 13px; cursor: pointer; }
.quiz-option:hover { border-color: var(--accent); }
.quiz-option input { margin-top: 2px; accent-color: var(--sage); }
.quiz-answer { padding-left: 11px; border-left: 3px solid var(--accent); }
.quiz-answer strong { display: block; font-size: 13px; }
.quiz-answer p { margin: 5px 0; font-size: 13px; }
.quiz-answer-correct { margin: 4px 0; font-size: 12px; color: var(--green); }
@media (max-width: 520px) {
  .quiz-option-editor { grid-template-columns: auto minmax(0, 1fr); }
  .quiz-option-editor button { grid-column: 2; justify-self: start; }
}

@media (max-width: 520px) {
  .info-list__row { grid-template-columns: 1fr; gap: 3px; }
}
@media (max-width: 720px) {
  .calendar-grid { min-width: 620px; grid-template-columns: repeat(7, minmax(80px, 1fr)); }
  .calendar-cell { min-height: 84px; }
}

/* ---------- Редактирование главной страницы ---------- */
.home-group { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: #fff; }
.home-group > summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 700; color: var(--navy); font-size: 14px; }
.home-group > summary::-webkit-details-marker { display: none; }
.home-group > summary::after { content: "+"; float: right; color: var(--accent-dark); font-size: 18px; line-height: 1; }
.home-group[open] > summary::after { content: "−"; }
.home-group__fields { border-top: 1px solid var(--border); padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.home-group__fields label { min-width: 0; }
.home-group__fields .form-hint { margin-top: -6px; }
.home-group__wide { grid-column: 1 / -1; }
.hero-upload { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; background: #fffdf8; }
.hero-upload__preview { width: 100%; max-height: 180px; object-fit: contain; border-radius: 10px; background: #f4eee3; }
.hero-upload__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-upload__row input[type="file"] { max-width: 100%; font-size: 13px; }
.hero-upload__status { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .home-group__fields { grid-template-columns: 1fr; } }

.accounts-toolbar { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.accounts-toolbar h2 { margin-bottom: 6px; }
.accounts-toolbar input { width: min(100%, 280px); }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 12px; padding: 14px; font-size: 13px; }
.account-row + .account-row { margin-top: 10px; }
.account-row__main { display: flex; align-items: center; gap: 12px; min-width: 220px; flex: 1 1 260px; }
.account-row__avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: var(--tint); color: var(--accent-dark); display: grid; place-items: center; font-weight: 700; }
.account-row__main strong { display: block; font-size: 14px; }
.account-row__meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.account-row__side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Техническое обслуживание ---------- */
.app-loading .site-header,
.app-loading main,
.app-loading .site-footer { visibility: hidden; }
body.is-maintenance .site-header,
body.is-maintenance main,
body.is-maintenance .site-footer { display: none !important; }
.maintenance-view { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #fdfaf4 0%, #f2e9da 100%); }
.maintenance-view[hidden] { display: none; }
.maintenance-card { width: min(100%, 520px); text-align: center; background: var(--white); border: 1px solid var(--border); border-radius: 24px; padding: 46px 32px; box-shadow: var(--shadow); }
.maintenance-card__icon { width: 62px; height: 62px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--tint); color: var(--accent-dark); font-family: Georgia, serif; font-size: 28px; }
.maintenance-card h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 14px; }
.maintenance-card p { color: var(--muted); margin-bottom: 26px; }
.maintenance-card__actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.maintenance-card__actions .theme-toggle { width: 44px; height: 44px; flex-basis: 44px; }
.maintenance-card__auth { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.maintenance-card__auth[hidden] { display: none; }
.maintenance-user { font-size: 14px; color: var(--muted); }

/* ---------- Модалки и тосты ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,24,42,.6); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(100%, 460px); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal h2 { font-size: 1.7rem; }
.modal__close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); }
.auth-tabs { display: flex; gap: 4px; background: var(--tint); padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-tabs button.is-active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.toast { position: fixed; bottom: 24px; left: 24px; z-index: 120; max-width: min(90vw, 380px); background: var(--navy); color: #fff; padding: 14px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); }
.toast--error { background: var(--red); }
.toast--success { background: var(--green); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--navy-deep); color: #c5cfdf; padding: 36px 0; font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand .brand__mark { background: #2b3d61; }
.footer__brand strong { display: block; font-family: Georgia, serif; color: #fff; }
.footer__brand small { color: #8f9cb3; }
.footer__links { display: flex; gap: 18px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: #fff; }

/* ---------- Адаптив ---------- */
@media (max-width: 1050px) {
  .main-nav { gap: 16px; }
  .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { gap: 36px; }
  .about__grid, .faq__grid, .contact__grid { gap: 36px; }
}
@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .main-nav { position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 18px; display: none; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 0; }
  .main-nav__auth:not([hidden]) { display: grid; }
  .hero__inner, .about__grid, .faq__grid, .contact__grid, .admin-grid { grid-template-columns: 1fr; }
  .hero__card { max-width: 460px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid > div:nth-child(2) { border-right: 0; }
  .stats__grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .container { width: min(100% - 28px, var(--max)); }
  .cards-grid--3, .cards-grid--4 { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; gap: 14px; }
  .hero { padding: 56px 0 60px; }
  .hero__meta { flex-direction: column; gap: 6px; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row > label { min-width: 0; width: 100%; overflow: visible; }
  .field-row input[type="date"],
  .field-row input[type="time"] { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
  .reviews-controls select { min-width: 130px; }
  .reviews-count { width: 100%; margin-left: 0; }
  .reviews-track > .review-card--short { width: 74%; }
  .reviews-track > .review-card--medium { width: 84%; }
  .reviews-track > .review-card--long { width: 92%; }
  .reviews-nav { width: 34px; height: 34px; font-size: 20px; }
  .booking { padding: 16px; }
  .booking__toolbar { align-items: start; }
  .site-header__inner { min-height: 66px; }
  .main-nav { top: 66px; }
  #headerLogin { display: none; }
  .user-bar__inner { flex-direction: column; align-items: start; padding: 8px 0; gap: 6px; }
  .dashboard__head { flex-direction: column; align-items: start; }
  .dashboard__tools { justify-content: flex-start; }
  .admin-tabs { gap: 4px; margin-bottom: 18px; margin-inline: -4px; padding-inline: 4px; }
  .admin-tabs button { padding: 9px 11px; font-size: 13px; }
  .booking-row { flex-direction: column; align-items: start; }
  .footer__inner { flex-direction: column; align-items: start; }
  .theme-toggle { width: 36px; height: 36px; flex-basis: 36px; }
}

/* ---------- Тёмная тема ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9eef8;
  --ink-soft: #c5d0e2;
  --muted: #9aa8c0;
  --cream: #101827;
  --tint: #182338;
  --white: #141d2e;
  --navy: #2b3d62;
  --navy-deep: #0d1422;
  --accent: #d7a85f;
  --accent-dark: #e6c184;
  --gold-soft: #372b1c;
  --green: #71d0a4;
  --green-soft: #163527;
  --red: #f08b85;
  --red-soft: #3b2326;
  --border: #2c3a53;
  --shadow: 0 18px 45px rgba(0, 0, 0, .35);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] body { background: #0f1726; }
html[data-theme="dark"] .site-header { background: rgba(16, 24, 39, .95); }
html[data-theme="dark"] .hero { background: linear-gradient(135deg, #111a2b 0%, #1a2740 100%); }
html[data-theme="dark"] .hero__glow--two { background: radial-gradient(circle, rgba(120, 160, 230, .12), transparent 68%); }
html[data-theme="dark"] .stats,
html[data-theme="dark"] .date-tab,
html[data-theme="dark"] .slot,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .review-form,
html[data-theme="dark"] .booking-row,
html[data-theme="dark"] .assignment-card,
html[data-theme="dark"] .quiz-question,
html[data-theme="dark"] .quiz-attempt,
html[data-theme="dark"] .quiz-option-chip,
html[data-theme="dark"] .admin-stat,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .home-group,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .contact-form { background: var(--white); }
html[data-theme="dark"] .main-nav { background: #121b2c; }
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #1e293d, #2b3850, #1e293d); }
html[data-theme="dark"] .icon--school { background: #243457; color: #d5e3ff; }
html[data-theme="dark"] .icon--pen { background: #3b2834; color: #f1b3c8; }
html[data-theme="dark"] .hero-upload { background: var(--tint); }
html[data-theme="dark"] .hero-upload__preview { background: #0f1625; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: #101a2b; color: var(--ink); }
html[data-theme="dark"] .checkbox-label { color: var(--ink); }
html[data-theme="dark"] .checkbox-label input[type="checkbox"] { background: #101a2b; border-color: #46566f; }
html[data-theme="dark"] .checkbox-label input[type="checkbox"]:hover { border-color: var(--sage); }
html[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked { background: var(--sage); border-color: var(--sage); }
html[data-theme="dark"] .auth-tabs button.is-active { background: var(--navy); color: #fff; }
html[data-theme="dark"] .demo-banner { background: #33291c; border-color: #4a3a24; color: #e6c184; }
html[data-theme="dark"] .maintenance-view { background: linear-gradient(135deg, #0f1726 0%, #1b2740 100%); }
html[data-theme="dark"] .maintenance-card { background: var(--white); }
