/* РепетиторПоиск — единая таблица стилей.
   Палитру можно перекрасить целиком, поменяв переменные ниже. */
:root {
  --ink: #122b46;          /* основной текст — тёмно-синий, не чёрный */
  --ink-soft: #647186;     /* вторичный текст */
  --primary: #007cff;      /* фирменный синий */
  --primary-dark: #0062cc;
  --cta: #ef3e46;          /* красный акцент — badges, важные кнопки визарда */
  --cta-dark: #d12831;
  --ok: #1cd991;           /* зелёный — онлайн, успех */
  --warn: #f7ba45;
  --danger: #ef3e46;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e7e9ec;
  --chip: #eef0f3;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 100px;
  --shadow: 0 2px 16px rgba(18, 43, 70, .06);
  --font: "Golos Text", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.danger { color: var(--danger); }
.center { text-align: center; }
.pre { white-space: pre-line; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 440px; margin: 0 auto; padding: 0 16px; }
.narrow-lg { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- Шапка ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.logo { font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }
.logo span { color: var(--ink); }
.logo:hover { text-decoration: none; }
.header-city-wrap { position: relative; }
.header-city {
  display: flex; align-items: center; gap: 5px; background: var(--chip); border: 0; cursor: pointer;
  border-radius: var(--radius-pill); padding: 7px 14px 7px 10px; font: inherit; font-size: .9rem;
  font-weight: 500; color: var(--ink); white-space: nowrap;
}
.header-city:hover { background: #e2e6ec; }
.hc-pin { display: inline-flex; color: var(--primary); }
.city-popover {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 260px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 12px;
}
.city-popover input { margin: 0; }
.city-popover .suggest-list { position: static; margin-top: 6px; box-shadow: none; border-color: var(--line); }
.city-banner { background: #eef6ff; border-bottom: 1px solid var(--line); }
.city-banner-row { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; text-align: center; }
.city-banner-actions { display: flex; align-items: center; gap: 8px; }
.city-banner-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 0 2px; }
.top-nav { display: flex; gap: 22px; flex: 1; }
.top-nav a { color: var(--ink-soft); font-weight: 400; font-size: .95rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.top-nav a[aria-current] { border-color: var(--primary); color: var(--ink); font-weight: 500; }
.top-nav a:hover { text-decoration: none; color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions::before {
  content: ""; width: 1px; height: 24px; background: var(--line); margin-right: 2px;
}
.icon-link { color: var(--ink-soft); font-weight: 400; font-size: .95rem; position: relative; }
.icon-link:hover { color: var(--ink); text-decoration: none; }
.badge {
  background: var(--cta); color: #fff; border-radius: 99px; font-size: .7rem;
  padding: 1px 6px; margin-left: 4px; font-weight: 600; vertical-align: top;
}

/* ---------- Кнопки, формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: var(--radius-pill); padding: 10px 22px; transition: background .15s, transform .05s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--chip); color: var(--ink); }
.btn-ghost:hover { background: #e2e6ec; }
.btn-light { background: #fff; color: var(--primary); }
.btn-sm { padding: 7px 16px; font-size: .9rem; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

input[type=text], input[type=tel], input[type=password], input[type=email],
input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
label { display: block; font-weight: 500; margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
textarea { resize: vertical; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: 3px; }
.check.inline { display: inline-flex; margin: 0 14px 8px 0; }
.fieldset { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.fieldset legend { font-weight: 600; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-error { color: var(--danger); font-weight: 500; margin: 10px 0; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.stack-form > * { margin-bottom: 10px; }
.subject-checks { display: flex; flex-wrap: wrap; }

/* ---------- Карточки, алерты ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0; font-weight: 500; }
.alert-ok { background: #e2f7ee; color: #0d7a53; }
.alert-err { background: #fde8ec; color: #b01c3d; }

/* ---------- Главная ---------- */
.hero { background: var(--card); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; padding: 46px 16px; }
.hero-copy h1 { font-size: 2.6rem; margin-bottom: .4em; }
.hero-actions { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 8px; }
.hero-stats b { font-size: 1.5rem; display: block; }
.hero-stats span { color: var(--ink-soft); font-size: .9rem; }
.hero-art { display: flex; justify-content: center; }
.hero-board {
  width: 300px; height: 200px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0062cc, #007cff); color: #eaf4ff;
  font-size: 1.6rem; font-weight: 800; letter-spacing: .1em;
  box-shadow: inset 0 0 0 10px #eef0f3, var(--shadow); transform: rotate(-2deg);
}
.section { padding: 34px 0; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }
.section-title { margin-bottom: 18px; }
.section-title small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .95rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li b {
  display: flex; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  align-items: center; justify-content: center; margin-bottom: 8px; font-size: 1.05rem;
}
.cta-banner {
  background: linear-gradient(120deg, #0a2f57, #007cff); color: #fff;
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #d6ebff; max-width: 480px; }

/* ---------- Чипы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips-sm { gap: 6px; margin: 6px 0; }
.chip {
  background: var(--chip); border-radius: 99px; padding: 7px 15px; color: var(--ink);
  font-size: .92rem; font-weight: 500;
}
a.chip:hover { background: #e2e8f5; text-decoration: none; color: var(--primary); }
.chip-more { color: var(--primary); }
.chip-static { cursor: default; }
.chip-xs { padding: 2px 9px; font-size: .78rem; }

/* ---------- Предметы по категориям (главная) ---------- */
.subject-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px;
}
.subject-col-icon {
  width: 34px; height: 34px; color: var(--primary); margin-bottom: 6px;
}
.subject-col-icon svg { width: 100%; height: 100%; }
.subject-col h3 { font-size: 1.05rem; margin-bottom: 10px; }
.subject-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.subject-col a { color: var(--ink-soft); font-size: .95rem; }
.subject-col a:hover { color: var(--primary); text-decoration: none; }
.subject-col-more {
  display: inline-block; margin-top: 10px; font-weight: 700; color: var(--ink);
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left;
}
.subject-col-more:hover { color: var(--primary); text-decoration: none; }
.subject-grid + .btn { margin-top: 26px; }

/* ---------- Аватары ---------- */
.avatar {
  width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; position: relative;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 40px; height: 40px; font-size: 1rem; }
.avatar-md { width: 76px; height: 76px; font-size: 1.7rem; }
.avatar-lg { width: 110px; height: 110px; font-size: 2.4rem; border-radius: 18px; }
.online-dot {
  position: absolute; right: 2px; bottom: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid #fff;
}
.verified { color: var(--ok); font-size: .85em; }

/* ---------- Поиск ---------- */
.page-title { margin: 22px 0 14px; }
.h1-count { font-size: .6em; font-weight: 600; vertical-align: middle; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 18px;
}
.filter-bar select, .filter-bar input[type=text] { width: auto; min-width: 140px; }
.tutor-list { display: flex; flex-direction: column; gap: 4px; }
.tutor-card { display: flex; gap: 18px; position: relative; }
.tutor-card-actions { position: absolute; top: 14px; right: 16px; display: flex; align-items: center; gap: 6px; z-index: 2; }
.js-fav-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.js-fav-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.js-fav-btn:hover { background: #ffe1e6; color: var(--cta); }
.js-fav-btn.active { color: var(--cta); }
.js-fav-btn.active svg { fill: var(--cta); stroke: var(--cta); }
.tutor-card-menu { position: relative; }
.js-menu-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink-soft);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.js-menu-btn:hover { background: #e2e6ec; }
.tutor-card-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; min-width: 200px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 6px;
}
.tutor-card-dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: .9rem; padding: 9px 10px; border-radius: 6px; color: var(--ink);
}
.tutor-card-dropdown button:hover { background: var(--chip); }
.tutor-card-body { flex: 1; min-width: 0; }
.tutor-card-body h3 a { color: var(--ink); }
.tutor-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .9rem; margin-bottom: 4px; }
.rating { color: #e8a11c; font-weight: 600; }
.tutor-about { color: var(--ink-soft); font-size: .93rem; margin: 6px 0 0; }
.tutor-card-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 150px; }
.price { font-size: 1.15rem; font-weight: 800; text-align: right; }
.price span { font-size: .8rem; color: var(--ink-soft); font-weight: 400; }
.empty-state { text-align: center; padding: 40px 22px; }
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 20px 0; }
.page { padding: 7px 13px; border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow); }
.page.current { background: var(--primary); color: #fff; }
.page-ellipsis { padding: 0 4px; color: var(--ink-soft); }
.breadcrumbs { margin-top: 16px; }
.geo-cta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.seo-text { margin-top: 24px; }

/* подсказки городов */
.city-suggest { position: relative; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 260px; overflow: auto;
}
.suggest-list button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 12px; font: inherit; cursor: pointer;
}
.suggest-list button:hover { background: var(--chip); }

/* ---------- Профиль ---------- */
.profile-card { padding: 28px; position: relative; }
.profile-head { display: flex; gap: 22px; margin-bottom: 8px; }
.profile-head-body h1 { font-size: 1.6rem; margin-bottom: 4px; }
.profile-head-body .btn { margin-top: 10px; }
.rating-line { font-weight: 600; color: #e8a11c; }
.rating-line .muted { font-weight: 400; }
.profile-sec { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Лента миниатюр галереи анкеты */
.gallery-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery-thumb {
  position: relative; flex: none; width: 130px; height: 90px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--chip); border: 0; padding: 0; cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; background: rgba(18,43,70,.35);
}

/* Просмотрщик (лайтбокс): фото/видео/эмбед на весь экран, с перелистыванием */
.modal-lightbox { background: none; }
.modal-lightbox .modal-backdrop { background: rgba(10, 16, 26, .92); }
.lightbox-body {
  position: relative; z-index: 1; width: min(900px, 92vw); height: min(600px, 80vh);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-body img, .lightbox-body video { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); }
.lightbox-body iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; z-index: 2; border: 0; background: none;
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; border: 0; cursor: pointer;
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.8rem;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-size: .9rem; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table td { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.price-cell { text-align: right; font-weight: 600; white-space: nowrap; }
.review { border-bottom: 1px solid var(--line); padding: 12px 0; }
.review-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.stars { color: #e8a11c; letter-spacing: .1em; }
.review-form { margin-top: 16px; }
.star-input { display: inline-flex; flex-direction: row-reverse; font-size: 1.7rem; margin-bottom: 8px; }
.star-input input { display: none; }
.star-input label { color: #cfd8e6; cursor: pointer; margin: 0; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #e8a11c; }

/* ---------- Визард ---------- */
.wizard { max-width: 640px; margin: 26px auto; padding: 26px; }
.wizard-note { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.wizard-progress { height: 6px; background: var(--chip); border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.wizard-progress-fill { height: 100%; width: 10%; background: var(--primary); border-radius: 99px; transition: width .25s; }
.wz-step h1 { font-size: 1.7rem; margin-bottom: 18px; }
.wz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wz-opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; font-weight: 500;
  transition: border-color .12s, background .12s;
}
.wz-opt:hover { border-color: var(--primary); }
.wz-opt:has(input:checked) { border-color: var(--primary); background: #eef6ff; }
.wz-opt input { width: 18px; height: 18px; accent-color: var(--primary); }
.wz-city { margin-top: 6px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.wizard-done { text-align: center; padding: 30px 0; }
.done-ring {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  border: 5px solid var(--ok); color: var(--ok); font-size: 2.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
#wzSubjects { max-height: 320px; overflow: auto; }

/* ---------- Заявки (список) ---------- */
.order-list { display: flex; flex-direction: column; gap: 4px; }
.order-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.order-facts { list-style: none; padding: 0; margin: 6px 0; color: var(--ink-soft); font-size: .93rem; }
.order-comment { background: var(--chip); border-radius: var(--radius-sm); padding: 10px 13px; font-size: .93rem; }
.apply-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.apply-form textarea { flex: 1; min-width: 220px; }

/* ---------- Чат ---------- */
.dialog-list { display: flex; flex-direction: column; gap: 4px; }
.dialog-item { display: flex; gap: 14px; align-items: center; padding: 14px 18px; color: var(--ink); }
.dialog-item:hover { text-decoration: none; box-shadow: 0 2px 14px rgba(22,35,59,.13); }
.dialog-item.has-unread { border-left: 3px solid var(--cta); }
.dialog-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dialog-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 420px; padding: 0; overflow: hidden; margin-top: 18px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-back { font-size: 1.3rem; color: var(--ink); }
.chat-head-body { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 76%; align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-bubble {
  display: inline-block; background: #fff; border-radius: 14px 14px 14px 4px;
  padding: 9px 13px; box-shadow: var(--shadow); text-align: left;
}
.msg.mine .msg-bubble { background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg-time { font-size: .72rem; color: var(--ink-soft); margin-top: 2px; }
.chat-input { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; max-height: 120px; }

/* ---------- Модалка ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(22, 35, 59, .5); }
.modal-card {
  position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  width: min(520px, calc(100vw - 32px)); padding: 24px;
}
.modal-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); }
.modal-head { display: flex; gap: 12px; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Модалка «Все предметы»: слева категории, справа предметы */
.modal-card-lg { width: min(760px, calc(100vw - 32px)); padding: 0; display: flex; flex-direction: column; max-height: min(640px, calc(100vh - 64px)); }
.modal-card-lg h2 { padding: 22px 24px 12px; margin: 0; }
.subjects-modal-body { display: grid; grid-template-columns: 240px 1fr; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.subjects-modal-cats {
  overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg);
  border-radius: 0 0 0 var(--radius);
}
.subjects-modal-cat {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; padding: 10px 18px; color: var(--ink-soft); border-left: 3px solid transparent;
}
.subjects-modal-cat:hover { color: var(--ink); background: #fff; }
.subjects-modal-cat.active { color: var(--primary); background: #fff; border-left-color: var(--primary); font-weight: 600; }
.subjects-modal-list { overflow-y: auto; padding: 18px 24px; }
.subjects-modal-list h3 { margin-bottom: 12px; }
.subjects-modal-list ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.subjects-modal-list li { break-inside: avoid; margin-bottom: 8px; }
.subjects-modal-list a { color: var(--ink-soft); font-size: .93rem; }
.subjects-modal-list a:hover { color: var(--primary); text-decoration: none; }

/* ---------- Кабинет ---------- */
.cab-form h2 { margin-top: 18px; }
.cab-avatar-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.upload-label input { margin-top: 6px; }
.confirm-card { border-left: 4px solid var(--warn); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Админ ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { text-align: center; margin: 0; }
.stat b { display: block; font-size: 1.8rem; }
/* ---------- Админка: боковое меню ---------- */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }
.admin-sidebar {
  flex: none; width: 232px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 0; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .logo { padding: 0 20px 18px; display: block; }
.admin-nav-vertical { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-nav-vertical a {
  padding: 10px 20px; color: var(--ink-soft); font-weight: 500; border-left: 3px solid transparent;
}
.admin-nav-vertical a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.admin-nav-vertical a[aria-current] { background: var(--bg); color: var(--primary); border-left-color: var(--primary); }
.admin-sidebar-footer { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.admin-sidebar-footer .icon-link { padding: 10px 20px; color: var(--ink-soft); font-weight: 500; }
.admin-sidebar-footer .icon-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.admin-content { flex: 1; min-width: 0; overflow-x: auto; padding: 28px 0; }

/* ---------- Входящие (единый инбокс) ---------- */
.inbox-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.inbox-list { display: flex; flex-direction: column; gap: 4px; }
.inbox-row { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: var(--radius-sm); color: var(--ink); }
.inbox-row:hover { background: var(--bg); text-decoration: none; }
.inbox-row.has-unread { background: #fff8e6; }
.inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.inbox-row-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.channel-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.channel-card code { display: inline-block; background: var(--chip); padding: 2px 6px; border-radius: 4px; font-size: .82rem; word-break: break-all; }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--ink-soft); font-weight: 600; }
.table td, .table th { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.row-pending { background: #fff8e6; }

/* ---------- Футер и мобильная навигация ---------- */
.site-footer { background: var(--card); border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 90px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-copy { margin-top: 20px; font-size: .85rem; }
.logo-footer { margin-bottom: 8px; }
.bottom-nav { display: none; }
.center-page { text-align: center; padding: 60px 16px; }
.err-code { font-size: 4.5rem; color: var(--primary); }
.doc h2 { margin-top: 20px; }
.auth-card { margin-top: 30px; }
.role-switch { display: flex; gap: 10px; margin-bottom: 16px; }
.role-opt { flex: 1; margin: 0; cursor: pointer; }
.role-opt input { display: none; }
.role-opt span {
  display: block; text-align: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 8px; font-weight: 600;
}
.role-opt input:checked + span { border-color: var(--primary); background: #eef3ff; color: var(--primary); }
.feed-card h3 { margin-bottom: 2px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding: 30px 16px; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr; }
  .admin-cols, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }
  .hero-copy h1 { font-size: 2rem; }
  .top-nav { display: none; }
  /* Все пункты справа дублируются нижней навигацией — убираем, чтобы шапка не распирала экран */
  .header-actions { display: none; }
  .header-row { min-height: 56px; justify-content: center; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 0; overflow-x: auto; }
  .admin-sidebar .logo { padding: 0 12px; flex: none; }
  .admin-nav-vertical { flex-direction: row; flex: none; }
  .admin-nav-vertical a { padding: 8px 12px; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .admin-nav-vertical a[aria-current] { border-left-color: transparent; border-bottom-color: var(--primary); }
  .admin-sidebar-footer { flex-direction: row; border-top: 0; border-left: 1px solid var(--line); margin: 0; padding: 0 0 0 8px; }
  .tutor-card { flex-wrap: wrap; }
  .tutor-card-side { flex-direction: row; width: 100%; min-width: 0; align-items: center; }
  .tutor-card-side .price { margin-right: auto; }
  .profile-head { flex-direction: column; align-items: center; text-align: center; }
  .profile-head-body { display: flex; flex-direction: column; align-items: center; }
  .rating-line, .modal-head { justify-content: center; }
  .chat-box { height: calc(100vh - 270px); border-radius: var(--radius); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    color: var(--ink-soft); font-size: .68rem; font-weight: 500; position: relative;
  }
  .bottom-nav a[aria-current], .bottom-nav a:hover { color: var(--primary); text-decoration: none; }
  .bn-ico { font-size: 1.25rem; line-height: 1.1; }
  .bn-accent .bn-ico {
    background: var(--primary); color: #fff; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-top: -14px;
    box-shadow: 0 3px 8px rgba(0, 124, 255, .4);
  }
  .bottom-nav .badge { position: absolute; top: -2px; right: 16%; }
  .wizard { padding: 18px; margin: 10px auto; }
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav button { flex: 1; min-width: 0; }
  .filter-bar select, .filter-bar input[type=text] { min-width: calc(50% - 6px); flex: 1; }
  .cab-avatar-row { flex-direction: column; text-align: center; }
  .hero-stats { gap: 18px; }
  .modal-card { padding: 18px; }
  .modal-card-lg { padding: 0; max-height: calc(100vh - 32px); }
  .subjects-modal-body { grid-template-columns: 1fr; grid-template-rows: 140px 1fr; }
  .subjects-modal-cats { border-right: 0; border-bottom: 1px solid var(--line); }
  .subjects-modal-list ul { columns: 1; }
  .subject-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 400px) {
  .wizard-nav { flex-direction: column-reverse; }
  .wizard-nav button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* deploy-touch: 20260724091422 */
