@font-face { font-family: "Onest"; font-weight: 500 800; font-display: swap; src: url("../fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 500 800; font-display: swap; src: url("../fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193; }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("../fonts/manrope-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193; }

:root {
  --ink: #263b4d;
  --muted: #5b6671;
  --paper: #eef1f4;
  --white: #ffffff;
  --line: rgba(38, 59, 77, .14);
  --navy: #0a578f;
  --navy-dark: #06467c;
  --orange: #f47b20;
  --orange-dark: #d8610d;
  --red: #b42318;
  --red-bg: #fdecea;
  --green: #1d6b3a;
  --green-bg: #e6f4ea;
  --amber-bg: #fff4e0;
  --radius: 10px;
  --display: "Onest", "Trebuchet MS", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.5 var(--body); }
a { color: var(--navy); }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); line-height: 1.15; letter-spacing: -.02em; }
h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { margin: 0 0 14px; font-size: 1.2rem; }
p { margin: 0 0 10px; }
code { padding: 1px 6px; border-radius: 4px; background: var(--paper); font-size: .92em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* Шапка */
.admin-header { position: sticky; top: 0; z-index: 10; color: var(--white); background: linear-gradient(112deg, var(--navy-dark), #126eb5 55%, var(--navy)); box-shadow: 0 4px 18px rgba(6, 70, 124, .2); }
.admin-header-inner { display: flex; align-items: center; gap: 24px; max-width: 1240px; min-height: 64px; margin: 0 auto; padding: 0 20px; }
.admin-brand { display: flex; flex-shrink: 0; align-items: center; gap: 12px; color: var(--white); font: 700 14px var(--display); text-decoration: none; white-space: nowrap; }
.admin-brand img { width: 120px; height: 44px; object-fit: contain; }
.admin-nav { display: flex; flex: 1; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; }
.link-button { padding: 0; border: 0; color: var(--navy); background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.admin-nav a, .admin-nav .link-button { padding: 8px 12px; border-radius: 8px; color: rgba(255, 255, 255, .9); text-decoration: none; white-space: nowrap; }
.admin-nav a:hover, .admin-nav .link-button:hover { color: var(--white); background: rgba(255, 255, 255, .14); }
.admin-nav a[aria-current="page"] { color: var(--white); background: rgba(255, 255, 255, .22); }
.admin-nav :focus-visible { outline-color: var(--white); }
.admin-nav-spacer { flex: 1; }

.admin-menu-toggle { display: none; margin-left: auto; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 8px; color: var(--white); background: transparent; font: 700 14px var(--body); cursor: pointer; }
.inline-form { display: inline-flex; gap: 6px; margin: 0; }

.admin-main { max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; }
.page-head { margin-bottom: 22px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head-row > div { max-width: 720px; }

/* Сообщения */
.flash { margin-bottom: 14px; padding: 12px 16px; border-left: 4px solid var(--navy); border-radius: 6px; background: #e3eef8; }
.flash-success { border-color: var(--green); background: var(--green-bg); }
.flash-error { border-color: var(--red); background: var(--red-bg); }
.flash-warning, .flash-info { border-color: var(--orange); background: var(--amber-bg); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font: 700 14px var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.btn:hover { border-color: rgba(38, 59, 77, .35); background: #f7f9fb; }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { border-color: var(--orange); color: var(--white); background: var(--orange); }
.btn-primary:hover { border-color: var(--orange-dark); background: var(--orange-dark); }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: var(--red-bg); }
.btn-icon { width: 38px; padding: 0; font-size: 17px; }

/* Панели и формы */
.panel { margin-bottom: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.panel-flush { padding: 0; overflow: hidden; }
.narrow-panel { max-width: 520px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.form-stack { display: grid; gap: 14px; }
.field, .form-stack > label { display: grid; align-content: start; gap: 6px; font-size: 13px; font-weight: 700; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 700; }
small { color: var(--muted); font-size: 12px; font-weight: 500; }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], input[type="date"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(38, 59, 77, .28); border-radius: 8px; color: var(--ink); background: var(--white); font: 500 15px/1.4 var(--body);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: 2px solid rgba(10, 87, 143, .18); outline-offset: 0; }
input::placeholder, textarea::placeholder { color: #9aa3ab; }
.check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
.check-grid { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.file-label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.file-label input { font: 14px var(--body); }
.input-with-button { display: flex; gap: 8px; }
.image-field { display: flex; align-items: flex-start; gap: 18px; }
.image-preview { flex: 0 0 auto; width: 180px; height: 120px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); object-fit: cover; }
.image-preview-contain { object-fit: contain; padding: 8px; }
.image-empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; margin: 0 -20px; padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(238, 241, 244, .94); backdrop-filter: blur(6px); }
.danger-zone { margin-top: 30px; padding-top: 20px; border-top: 1px dashed rgba(180, 35, 24, .35); }

/* Чипы, поиск */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--white); font-size: 13px; font-weight: 700; text-decoration: none; }
.chip span { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--navy); }
.chip[aria-current="page"] { border-color: var(--navy); color: var(--white); background: var(--navy); }
.chip[aria-current="page"] span { color: rgba(255, 255, 255, .8); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar .chips { margin: 0; }
.search-form { display: flex; gap: 8px; }
.search-form input { width: 240px; }

/* Обзор */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { display: grid; align-content: start; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--white); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.stat-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.stat-card strong { font: 600 15px/1.45 var(--display); }
.stat-label { color: var(--orange-dark); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat-link { margin-top: 6px; color: var(--navy); font-size: 13px; font-weight: 700; }

/* Таблицы */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 14px; color: var(--muted); background: #f7f9fb; font-size: 12px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr.is-hidden td { opacity: .55; }
.panel .table th:first-child, .panel .table td:first-child { padding-left: 0; }
.panel-flush .table th:first-child, .panel-flush .table td:first-child { padding-left: 20px; }
.badge { display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 11px; font-weight: 700; }
.role { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.role-admin { color: #7a2e00; background: #ffe2cc; }
.role-teacher { color: #0b4a7a; background: #dcebf8; }
.role-parent { color: #1d5b33; background: #dff1e5; }
.role-child { color: #5b3a8a; background: #ece4f7; }

/* Списки направлений и фото */
.item-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.item { display: flex; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.item.is-hidden { background: #f7f9fb; }
.item.is-hidden .item-thumb, .item.is-hidden .item-body > strong { opacity: .5; }
.item-thumb { flex: 0 0 auto; width: 120px; height: 80px; overflow: hidden; border-radius: 6px; background: var(--paper); }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb-contain img { padding: 6px; object-fit: contain; mix-blend-mode: multiply; }
.item-body { display: grid; flex: 1; gap: 2px; min-width: 0; }
.item-body .badge { justify-self: start; margin-top: 4px; }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.item-slide { align-items: flex-start; }
.item-slide .item-thumb { width: 160px; height: 160px; }
.slide-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.slide-form-row { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 12px; }

/* Пароль после создания */
.password-note { margin-bottom: 18px; padding: 18px 20px; border: 2px solid var(--orange); border-radius: var(--radius); background: var(--amber-bg); }
.password-note p { margin: 8px 0; font-size: 15px; }
.big-code { font-size: 1.25em; letter-spacing: .06em; user-select: all; }

/* Вход и установка */
.auth-card { max-width: 420px; margin: 7vh auto 0; padding: 32px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 18px 40px rgba(38, 59, 77, .08); }
.auth-logo { width: 220px; height: auto; margin: 0 auto 18px; padding: 10px 16px; border-radius: 10px; background: linear-gradient(112deg, var(--navy-dark), #126eb5); }
.auth-card h1 { margin-bottom: 18px; font-size: 1.5rem; text-align: center; }
.auth-card .btn-primary { width: 100%; min-height: 46px; margin-top: 6px; font-size: 15px; }
.auth-card .small { margin-top: 14px; text-align: center; }

@media (max-width: 680px) {
  .admin-main { padding: 20px 14px 80px; }
  .admin-brand span { display: none; }
  .page-head-row { display: grid; align-items: start; }
  .panel { padding: 18px 16px; }
  .form-grid, .form-grid-3, .slide-form { grid-template-columns: 1fr; }
  .image-field { flex-direction: column; }
  .item { flex-wrap: wrap; }
  .item-thumb { width: 88px; height: 64px; }
  .item-slide .item-thumb { width: 100%; height: 180px; }
  .item-actions { justify-content: flex-start; width: 100%; }
  .search-form, .search-form input { width: 100%; }
  .sticky-actions { margin: 0 -14px; padding: 12px 14px; }
  .table { font-size: 13px; }
  .auth-card { margin-top: 4vh; padding: 24px 20px; }
}

/* Приглашения и статусы */
.badge-active, .badge-ok { color: var(--green); background: var(--green-bg); }
.badge-revoked, .badge-expired, .badge-used { color: var(--muted); }
.badge-warn { color: #8a4b00; background: var(--amber-bg); }
.invite-item .item-body { gap: 8px; }
.invite-link { max-width: 640px; }
.invite-link input { font-size: 13px; }
.item.is-new { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244, 123, 32, .18); }
.attention { border-color: var(--orange); background: var(--amber-bg); }
.attention ul { margin: 0; padding-left: 20px; }

.text-danger { color: var(--red); font-weight: 700; }
.name-grid { margin-bottom: 0; }
.danger-zone + .danger-zone { margin-top: 16px; padding-top: 0; border-top: 0; }

/* Личные приглашения */
.invite-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 4px 6px; border-radius: 8px; }
.invite-controls.is-new { box-shadow: 0 0 0 2px var(--orange); background: var(--amber-bg); }
.invite-controls .invite-link { flex: 1 1 260px; max-width: 420px; }
.invite-controls .invite-link input { min-height: 34px; padding: 6px 8px; font-size: 12px; }
.invite-controls .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.invite-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.badge-expired { color: #8a4b00; background: #fde7d4; }
.invite-filter { align-items: center; margin: -6px 0 16px; }
.users-table td { vertical-align: top; }
.invite-panel h2 { margin-bottom: 8px; }

/* Список пользователей на телефоне — карточками */
@media (max-width: 680px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  .users-table tr:first-child { border-top: 0; }
  .users-table td, .panel-flush .users-table td:first-child { padding: 4px 0; border: 0; }
  .users-table td[data-label]::before { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; content: attr(data-label); }
  .users-table .row-actions { padding-top: 8px; }
  .invite-controls { padding: 0; }
  .invite-controls .invite-link { flex-basis: 100%; max-width: none; }
}

/* Родитель без детей */
.badge-danger { color: var(--white); background: var(--red); }
.users-table tr.no-children td { background: #fff5f4; }
.users-table tr.no-children td:first-child { box-shadow: inset 4px 0 0 var(--red); }
@media (max-width: 680px) {
  .users-table tr.no-children { background: #fff5f4; box-shadow: inset 4px 0 0 var(--red); }
  .users-table tr.no-children td, .users-table tr.no-children td:first-child { background: none; box-shadow: none; }
}

/* Дети, которых вписал родитель */
.request-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.request-list li { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.request-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.badge-info { color: #0b4a7a; background: #dcebf8; }

/* Короткий вид карточки: только то, что нужно подтвердить */
.focus-note { margin-top: 10px; padding: 10px 14px; border-left: 4px solid var(--orange); border-radius: 6px; background: var(--amber-bg); font-size: 14px; }
.summary-list { display: grid; grid-template-columns: 150px 1fr; gap: 8px 18px; margin: 0; }
.summary-list dt { color: var(--muted); font-size: 14px; }
.summary-list dd { margin: 0; font-weight: 600; }
@media (max-width: 680px) { .summary-list { grid-template-columns: 1fr; gap: 2px; } .summary-list dd { margin-bottom: 8px; } }

/* Группы */
.mode-switch, .weekdays { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; }
.mode-switch legend, .weekdays legend { margin-bottom: 8px; padding: 0; }
.weekday-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 42px; padding: 4px 10px; border-radius: 8px; }
.weekday-row.is-on { background: #f2f7fc; }
.weekday-row .check { min-width: 150px; }
.day-times { display: inline-flex; align-items: center; gap: 8px; }
.day-times[hidden] { display: none; }
.day-times input[type="time"] { width: 120px; min-height: 38px; padding: 6px 10px; border: 1px solid rgba(38, 59, 77, .28); border-radius: 8px; font: 500 15px var(--body); }
.same-times { display: grid; gap: 8px; }
.same-times[hidden] { display: none; }
.member-filter { max-width: 420px; margin-bottom: 14px; }
.check-grid .check[hidden] { display: none; }

/* Посмотреть как… */
.view-as-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.view-as-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.view-as-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.view-as-list li[hidden] { display: none; }
.view-as-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 18px; }
/* Полоса режима просмотра в кабинете */
.view-as-bar { position: sticky; top: 0; z-index: 9; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 10px 20px; color: #4a2600; background: #ffd9b3; border-bottom: 2px solid var(--orange); font-size: 14px; }
.view-as-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.view-as-actions .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
@media (max-width: 900px) { .view-as-grid { grid-template-columns: 1fr; } }

/* Годовой график */
.year-plan-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.year-plan-head h2 { margin-bottom: 4px; }
.year-plan-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.year-table th[scope="row"] { white-space: nowrap; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14px; background: none; }
.year-table td { line-height: 2; }
.year-table .num { width: 90px; text-align: center; }
.year-table tfoot th, .year-table tfoot td { border-top: 2px solid var(--line); }
.lesson-date { display: inline-block; margin: 0 4px 0 0; padding: 0 8px; border-radius: 6px; background: #e3eef8; color: var(--navy); font-weight: 700; font-size: 13px; line-height: 1.9; white-space: nowrap; }
.lesson-date.is-off { background: #fdecea; color: var(--red); font-weight: 600; }
.lesson-date.is-off small { color: var(--red); font-size: 11px; }
.year-switch { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.holiday-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.holiday-list li span:first-child { display: inline-block; min-width: 100px; color: var(--muted); }
.holiday-list li.is-work { color: var(--muted); text-decoration: line-through; }
.holiday-list li.is-work .badge { text-decoration: none; }
@media print {
  .admin-header, .admin-nav, .no-print, .view-as-bar, .sticky-actions, .flash { display: none !important; }
  body { background: #fff; }
  .admin-main { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  .lesson-date { border: 1px solid #c8d6e3; }
}

/* Суммы: долг, оплачено, переплата (журнал, оплаты) */
.money { font-weight: 700; white-space: nowrap; }
.money-debt { color: var(--red); }
.money-ok { color: var(--green); }
.money-over { color: #b25a00; }
.money-none { color: var(--muted); font-weight: 500; }
.finance-table .num { text-align: right; white-space: nowrap; }
.finance-table th.num { text-align: right; }
.finance-table tfoot td, .finance-table tfoot th { border-top: 2px solid var(--line); font-weight: 700; }
.finance-table tfoot th { color: var(--ink); background: none; }
.price-now { font: 700 16px var(--body); color: var(--ink); padding: 9px 0 2px; }

/* Коллекции карточек (админка) */
.admin-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.admin-card { display: grid; align-content: start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f9fafb; }
.admin-card .tcard { width: 150px; justify-self: center; }
.admin-card input[type="file"] { max-width: 100%; }

/* Тестовые аккаунты */
.badge-test { color: #6b3fa0; background: #efe3ff; }
.chip-test { border-style: dashed; }
.test-reset { display: grid; gap: 10px; border: 2px dashed #b99be0; }
.test-reset h2 { margin-bottom: 4px; }
.test-reset .btn { justify-self: start; }

/* Жетоны: разбивка, история в окне, сводка коллекции (админка и кабинет) */
.cards-panel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.cards-panel b { color: var(--orange-dark); font: 800 28px var(--display); }

/* Карточки: разбивка и история */
.cards-split { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.cards-split div { min-width: 150px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f9fafb; }
.cards-split dt { color: var(--muted); font-size: 13px; }
.cards-split dd { margin: 2px 0 0; font: 800 20px var(--display); }
.cards-box .btn { margin-top: 4px; }

/* Окно */
.modal { width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 720px); padding: 0; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 24px 60px rgba(6, 33, 60, .35); }
.modal::backdrop { background: rgba(20, 35, 50, .55); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--white); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 8px 20px 20px; }
.modal-body h3 { margin: 16px 0 6px; font: 700 15px var(--display); }
.history-list { display: grid; margin: 0; padding: 0; list-style: none; }
.history-list li { display: grid; grid-template-columns: 92px 1fr auto; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history-list li:last-child { border-bottom: 0; }
.history-date { color: var(--muted); font-size: 13px; }
.history-plus .history-text, .history-minus .history-text { font-weight: 600; }
.history-list b { font-size: 15px; }
@media (max-width: 680px) {
  .cards-split div { flex: 1 1 100%; }
  .history-list li { grid-template-columns: 80px 1fr auto; }
}

/* Сводка коллекции в профиле */
.set-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.set-chip-green { background: #1f9d55; }
.set-chip-blue { background: #2f6fe0; }
.set-chip-purple { background: #7c3aed; }
.set-chip-orange { background: #e8700f; }
.cards-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.history-list form { margin: 0; }
.history-actions { display: inline-flex; align-items: center; gap: 8px; }

/* Анкета пользователя — просмотр */
.user-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; }
.view-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.view-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.view-list li:last-child { border-bottom: 0; }
.view-list a:first-child { font-weight: 700; }
.user-name-link { color: var(--ink); text-decoration: none; }
.user-name-link:hover { color: var(--navy); text-decoration: underline; }
.page-head-row .item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-head-row .view-as-card { margin: 0; }

/* Карточка в «Коллекциях карточек»: всё содержимое — в пределах рамки */
.admin-card { min-width: 0; overflow: hidden; }
.admin-card > *, .admin-card .field, .admin-card .file-label { min-width: 0; max-width: 100%; }
.admin-card input[type="text"], .admin-card textarea { width: 100%; min-width: 0; }
.admin-card input[type="file"] { width: 100%; min-width: 0; font-size: 13px; }
.admin-card textarea { min-height: 96px; font-size: 14px; }
.admin-card small { display: block; }
.admin-card .btn { width: 100%; }
@media (max-width: 680px) { .admin-card-grid { grid-template-columns: 1fr; } }

/* ===== Элементы форм в стиле сайта (вместо стандартных браузерных) ===== */
input[type="time"], input[type="number"] {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(38, 59, 77, .28); border-radius: 8px; color: var(--ink); background: var(--white); font: 500 15px/1.4 var(--body);
}
input[type="time"]:focus, input[type="number"]:focus { border-color: var(--navy); outline: 2px solid rgba(10, 87, 143, .18); outline-offset: 0; }
input:hover:not(:disabled):not([type="checkbox"]):not([type="radio"]):not([type="file"]), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: rgba(38, 59, 77, .5); }

/* Галочки и переключатели */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none; display: inline-grid; flex: 0 0 auto; place-content: center; width: 20px; height: 20px; margin: 0;
  border: 2px solid rgba(38, 59, 77, .4); background: var(--white); cursor: pointer; vertical-align: -4px; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before { content: ""; width: 12px; height: 12px; background: var(--white); clip-path: polygon(14% 44%, 0 62%, 42% 100%, 100% 18%, 84% 4%, 41% 66%); transform: scale(0); transition: transform .15s ease; }
input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); transform: scale(0); transition: transform .15s ease; }
input[type="checkbox"]:checked { border-color: var(--orange); background: var(--orange); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="radio"]:checked { border-color: var(--orange); }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 123, 32, .14); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: default; opacity: .5; }
.check input { width: 20px; height: 20px; }

/* Выпадающие списки — своя стрелка */
select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23d8610d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select::-ms-expand { display: none; }

/* Числа без стрелок браузера (рядом свои кнопки «−» и «+») */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Дата и время: значок календаря и часов в цвет сайта */
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .75; filter: invert(43%) sepia(83%) saturate(1620%) hue-rotate(353deg) brightness(92%); }

/* Поиск: свой крестик очистки */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='%235b6671' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Выбор файла — кнопка как у сайта */
input[type="file"] { max-width: 100%; color: var(--muted); font: 500 13px var(--body); cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 8px 14px; border: 1px solid var(--orange); border-radius: 8px; color: var(--orange-dark); background: #fff4ea;
  font: 700 13px var(--body); cursor: pointer; transition: background .15s ease, color .15s ease;
}
input[type="file"]:hover::file-selector-button { color: var(--white); background: var(--orange); }

/* Раскрывающиеся блоки: своя стрелка */
details > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 8px; height: 8px; border-right: 2.5px solid var(--orange-dark); border-bottom: 2.5px solid var(--orange-dark); transform: rotate(-45deg); transition: transform .2s ease; }
details[open] > summary::before { transform: rotate(45deg); }

/* Полосы прокрутки и выделение текста */
* { scrollbar-width: thin; scrollbar-color: rgba(38, 59, 77, .3) transparent; }
::selection { color: var(--ink); background: rgba(244, 123, 32, .28); }

/* Красная кнопка подтверждения удаления в окне */
.btn-danger-solid { border-color: var(--red); color: var(--white); background: var(--red); }
.btn-danger-solid:hover { border-color: #8f1c13; background: #8f1c13; }

/* Окно подтверждения (вместо стандартного окна браузера) */
.ui-dialog { width: min(440px, calc(100vw - 24px)); }
.ui-dialog .modal-body { display: grid; gap: 16px; padding-top: 16px; }
.ui-dialog-text { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-line; }
.ui-dialog .confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
@media (max-width: 480px) { .ui-dialog .confirm-actions .btn { flex: 1; } }

/* Подсказка про размеры своей картинки карточки */
.card-image-hint ul { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 14px; }
.card-image-hint b { color: var(--ink); }

/* ===== Шапка и боковое выезжающее меню админки ===== */
.admin-header-inner { gap: 14px; min-height: 60px; }
.admin-brand img { width: 110px; height: 40px; }
.admin-current { overflow: hidden; color: rgba(255, 255, 255, .92); font: 700 15px var(--display); white-space: nowrap; text-overflow: ellipsis; }
.admin-site-link { margin-left: auto; padding: 8px 12px; border-radius: 8px; color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.admin-site-link:hover { color: var(--white); background: rgba(255, 255, 255, .14); }
.admin-menu-toggle { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; }
.admin-menu-toggle:hover { background: rgba(255, 255, 255, .14); }
.burger { display: grid; gap: 4px; width: 18px; }
.burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; }

.admin-nav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: min(300px, 86vw); padding: 0 12px 20px; overflow-y: auto; color: var(--white);
  background: linear-gradient(180deg, var(--navy-dark), #0b3f6e); box-shadow: 8px 0 30px rgba(6, 33, 60, .35); transform: translateX(-105%); visibility: hidden; transition: transform .28s cubic-bezier(.3, .8, .3, 1), visibility 0s linear .28s; }
.admin-nav.is-open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.3, .8, .3, 1); }
.admin-nav-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 60px; margin: 0 -12px 4px; padding: 0 12px 0 20px; background: var(--navy-dark); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.admin-nav-title { font: 800 16px var(--display); }
.admin-nav-close { width: 36px; height: 36px; border: 0; border-radius: 8px; color: var(--white); background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.admin-nav-close:hover { background: rgba(255, 255, 255, .14); }
.admin-nav-group { display: grid; gap: 2px; padding: 8px 0; }
.admin-nav-group + .admin-nav-group { border-top: 1px solid rgba(255, 255, 255, .12); }
.admin-nav-section { margin: 4px 10px 4px; color: rgba(255, 255, 255, .55); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-nav a, .admin-nav .link-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .92); font: 700 15px var(--body); text-align: left; text-decoration: none; white-space: nowrap; }
.admin-nav a:hover, .admin-nav .link-button:hover { color: var(--white); background: rgba(255, 255, 255, .12); }
.admin-nav a[aria-current="page"] { color: var(--white); background: rgba(244, 123, 32, .9); box-shadow: inset 3px 0 0 #fff; }
.admin-nav .inline-form { display: block; }
.nav-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, .12); font-size: 13px; }
.admin-nav a[aria-current="page"] .nav-icon { background: rgba(255, 255, 255, .25); }
.admin-nav-account { margin-top: auto; }
.admin-nav-spacer { display: none; }
.admin-nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(6, 20, 36, .5); }
.admin-nav-backdrop[hidden] { display: none; }
body.nav-open { overflow: hidden; }
@media (max-width: 680px) {
  .admin-menu-toggle span:last-child { display: none; }
  .admin-current { font-size: 14px; }
  .admin-brand img { width: 90px; }
}
@media (prefers-reduced-motion: reduce) { .admin-nav, .admin-nav.is-open { transition: none; } }

/* «Коллекции карточек»: просмотр списком по коллекциям */
.card-set-view { border-top: 4px solid var(--line); }
.card-set-green { border-top-color: #2bc46a; }
.card-set-blue { border-top-color: #3b82f6; }
.card-set-purple { border-top-color: #9b5cf6; }
.card-set-orange { border-top-color: #ff8c1a; }
.card-set-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; margin-bottom: 12px; }
.card-set-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.card-set-head p { margin: 0; }
.card-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.card-list-item { display: flex; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.card-list-thumb { flex: 0 0 auto; width: 64px; aspect-ratio: 5 / 7; border: 3px solid var(--line); border-radius: 8px; object-fit: cover; background: #16263a; }
.card-list-thumb.tier-green { border-color: #2bc46a; }
.card-list-thumb.tier-blue { border-color: #3b82f6; }
.card-list-thumb.tier-purple { border-color: #9b5cf6; }
.card-list-thumb.tier-orange { border-color: #ff8c1a; }
.card-list-body { display: grid; gap: 2px; min-width: 0; }
.card-list-body p { margin: 0; }
.card-list-title { font-size: 15px; }
.card-list-desc { font-size: 14px; line-height: 1.45; }
.set-name-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.set-name-form .field { flex: 1 1 280px; }
h1 .tier-tag { vertical-align: middle; font-size: 12px; }
@media (max-width: 680px) { .card-list-thumb { width: 52px; } .card-set-head .btn { width: 100%; } }

/* Переключатель вида и плитки по 4 в ряд */
.view-switch { display: inline-flex; gap: 0; margin: 12px 0 8px; border-radius: 10px; }
.view-switch .btn { border-radius: 0; }
.view-switch .btn:first-child { border-radius: 8px 0 0 8px; }
.view-switch .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.view-switch .btn.is-active { border-color: var(--navy); color: var(--white); background: var(--navy); }
.card-list.is-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card-list.is-tiles .card-list-item { flex-direction: column; align-items: stretch; gap: 8px; padding: 0; border-top: 0; }
.card-list.is-tiles .card-list-thumb { width: 100%; border-width: 3px; border-radius: 12px; }
.card-list.is-tiles .card-list-title { font-size: 16px; }
.card-list.is-tiles .card-list-desc { font-size: 13px; }
@media (max-width: 900px) { .card-list.is-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Печать карточек: панель и каталог на бумаге */
.print-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 6px 0 10px; padding: 12px 14px; border: 1px dashed rgba(38, 59, 77, .3); border-radius: 10px; background: var(--white); }
.print-panel-title { font-weight: 800; }
.print-panel .check { font-size: 13px; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card-set-view { break-inside: auto; margin-bottom: 8mm; border-top-width: 2mm; }
  .card-list-item { break-inside: avoid; }
  .card-list.is-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-set-head { break-after: avoid; }
}
@media print { body:not(.print-with-stats) .print-stats { display: none !important; } }

/* Чеки об оплате */
.nav-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 6px; border-radius: 999px; color: #fff; background: var(--red); font-size: 12px; font-weight: 800; }
.admin-menu-toggle .nav-count { margin-left: 4px; }
.receipt-item { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.receipt-item:first-child { border-top: 0; }
.receipt-thumb { flex: 0 0 auto; display: grid; place-items: center; width: 120px; height: 160px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f2f5f8; }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.receipt-pdf { padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--red); font-weight: 800; }
.receipt-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.receipt-body p { margin: 0; }
.receipt-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.receipt-actions { display: grid; gap: 10px; margin-top: 6px; }
.receipt-accept, .receipt-reject { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.receipt-accept .field { flex: 0 1 150px; }
.receipt-reject .field { flex: 1 1 260px; }
.receipt-new { background: linear-gradient(90deg, var(--amber-bg), transparent 40%); }
.pay-status-actions { margin: 14px 0 0; }
input[type="month"] { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(38, 59, 77, .28); border-radius: 8px; color: var(--ink); background: var(--white); font: 500 15px/1.4 var(--body); }
@media (max-width: 680px) { .receipt-item { flex-direction: column; } .receipt-thumb { width: 100%; height: 220px; } }

/* Филиал в шапке админки */
.branch-switch { margin-left: auto; }
.branch-switch label { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 700; }
.branch-switch select { width: auto; min-width: 160px; min-height: 36px; padding: 6px 36px 6px 12px; border-color: rgba(255, 255, 255, .5); color: var(--white); background-color: rgba(255, 255, 255, .12); font-weight: 700; }
.branch-switch select option { color: var(--ink); }
.branch-badge { margin-left: auto; padding: 6px 12px; border-radius: 999px; color: var(--white); background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 800; white-space: nowrap; }
.branch-switch + .admin-site-link, .branch-badge + .admin-site-link { margin-left: 0; }
@media (max-width: 680px) {
  .branch-switch label span, .admin-current { display: none; }
  .branch-switch select { min-width: 120px; }
}
.branch-list { margin-bottom: 20px; }
.staff-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.staff-add .field .check { margin-top: 6px; }
/* Цена группы: «Изменить» раскрывает форму месяца и суммы */
.price-edit summary { list-style: none; cursor: pointer; }
.price-edit summary::-webkit-details-marker { display: none; }
.price-edit[open] { flex-basis: 100%; }
.price-edit[open] form { margin-top: 8px; max-width: 360px; }
/* Магазин: подсказка к картинке товара */
.shop-image-field { display: grid; gap: 6px; }
.shop-image-tips { padding: 10px 12px; border-radius: 10px; background: #f3f7fc; font-size: 13px; font-weight: 400; line-height: 1.45; }
.shop-image-tips p { margin: 0; }
.shop-image-tips ul { margin: 6px 0 0; padding-left: 18px; }
.shop-image-check { margin-top: 8px !important; padding: 6px 10px; border-radius: 8px; font-weight: 700; }
.shop-image-check.is-ok { color: #2b8a3e; background: #ebfbee; }
.shop-image-check.is-warn { color: #b35c00; background: #fff4e5; }
/* Магазин: мини-редактор обрезки картинки (рамка 5:4 как в карточке товара) */
.shop-crop { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.shop-crop-title { margin: 0; font-size: 14px; }
.shop-crop-frame { position: relative; width: 100%; max-width: 500px; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 12px; outline: 2px dashed #339af0; outline-offset: 2px; cursor: grab; touch-action: none; user-select: none;
  background-color: #f3f6fa; background-image: linear-gradient(45deg, #e9eef5 25%, transparent 25%, transparent 75%, #e9eef5 75%), linear-gradient(45deg, #e9eef5 25%, transparent 25%, transparent 75%, #e9eef5 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.shop-crop-frame.is-dragging { cursor: grabbing; }
.shop-crop-frame img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.shop-crop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shop-crop-zoom { display: flex; align-items: center; gap: 8px; min-width: 220px; font-size: 13px; font-weight: 700; }
.shop-crop-zoom input { flex: 1; accent-color: var(--orange); }
.shop-crop-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.shop-crop-result p { margin: 0 0 8px; font-size: 14px; }
.shop-crop-preview { width: 250px; height: 200px; padding: 10px; box-sizing: border-box; border-radius: 12px; background: #f3f6fa; }
.shop-crop-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Приложение (PWA) и push-уведомления: блок в профиле, «Запомнить меня» на входе */
.app-panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 28px; }
.app-panel-grid p { margin: 0 0 10px; }
.app-installed { color: #2b8a3e; font-weight: 700; }
.app-push-status { font-weight: 700; }
.app-push-status.is-ok { color: #2b8a3e; }
.app-push-status.is-warn { color: #b35c00; }
.app-push-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.form-stack > .remember-check, .remember-check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; font-weight: 600; }
.remember-check small { flex-basis: 100%; color: var(--muted); font-weight: 400; }
/* Плашка «Установите приложение» вверху кабинета и инструкция по установке */
.app-banner { display: flex; align-items: center; gap: 12px; max-width: 1240px; margin: 12px auto 0; padding: 10px 14px; border: 1px solid #c5dcf0; border-radius: 14px; background: #eaf4fd; }
.app-banner[hidden] { display: none; }
.app-banner img { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.app-banner-text { display: grid; flex: 1; gap: 2px; font-size: 14px; }
.app-banner-text span { color: var(--muted); font-size: 13px; }
.app-banner .app-howto, .app-panel .app-howto { color: #8a4b00; font-weight: 600; }
.app-howto { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #fff4e5; line-height: 1.45; }
.app-banner-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.app-banner-close:hover { background: rgba(0, 0, 0, .06); }
@media (max-width: 520px) {
  .app-banner { flex-wrap: wrap; margin: 10px 12px 0; }
  .app-banner-text { flex-basis: calc(100% - 100px); }
  .app-banner .btn { order: 3; flex: 1 1 100%; }
  .app-banner-close { position: absolute; right: 18px; }
  .app-banner { position: relative; padding-right: 44px; }
}

/* Уведомления: колокольчик в шапке, форма отправки, список у получателя */
.nav-bell { position: relative; font-size: 17px; }
.nav-bell .nav-badge { position: absolute; top: 2px; right: 0; }
.admin-bell { position: relative; padding: 6px 8px; border-radius: 8px; color: var(--white); font-size: 18px; text-decoration: none; }
.admin-bell:hover { background: rgba(255, 255, 255, .14); }
.admin-bell .nav-count { position: absolute; top: -2px; right: -4px; }
.notice-form { display: grid; gap: 14px; max-width: 760px; }
.notice-form fieldset { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; border: 0; }
.notice-form legend { margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.notice-form fieldset .muted { flex-basis: 100%; margin: 0; }
.notice-form select[size] { min-height: 150px; }
.notice-children { padding: 10px 12px; border-radius: 10px; background: #f3f7fc; }
.notice-children p { margin: 0 0 6px; }
.notice-children div { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.notice-target { display: grid; gap: 10px; }
.notice-history-body { color: var(--muted); }
.notice-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.notice-card { margin: 0; }
.notice-card.is-new { border-left: 4px solid var(--orange); }
.notice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.notice-head h2 { margin: 0; font-size: 18px; }
.notice-body { margin: 8px 0; line-height: 1.55; overflow-wrap: anywhere; }
.notice-card > p { margin: 0; }
/* Узкий телефон: «Сайт ↗» убирается из шапки админки (есть в меню «Открыть сайт»), чтобы поместились филиал и 🔔 */
@media (max-width: 520px) {
  .admin-site-link { display: none; }
  .admin-bell { margin-left: auto; }
  .branch-switch + .admin-bell, .branch-badge + .admin-bell { margin-left: 0; }
}

/* Справки о болезни: несколько фото у одной справки */
.sicknote-photos { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.sicknote-photos .receipt-thumb { flex: none; }
@media (max-width: 680px) { .sicknote-photos { width: 100%; } .sicknote-photos .receipt-thumb { width: calc(50% - 3px); height: 200px; } .sicknote-photos .receipt-thumb:only-child { width: 100%; } }
