/* Кабинет ведущей. Те же цвета и шрифты, что у сайта, но плотнее и проще. */

.cab { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.cab-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  padding: 12px var(--gutter); background: var(--ink); color: var(--bg);
}
.cab-brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--bg); text-decoration: none; }
.cab-brand:hover { color: #fff; }
.cab-nav {
  order: 3; width: 100%; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cab-nav a {
  flex: none; color: var(--dark-muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.cab-nav a:hover { color: #fff; }
.cab-nav a.active { background: var(--bg); color: var(--ink); }
.cab-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 15px; }
.cab-actions a, .cab-link-btn { color: var(--dark-muted); }
.cab-actions form { margin: 0; }
.cab-link-btn { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.cab-link-btn:hover, .cab-actions a:hover { color: #fff; }
@media (min-width: 1024px) {
  .cab-nav { order: 0; width: auto; flex: 1; }
}

.cab-main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px var(--gutter) 64px; display: flex; flex-direction: column; gap: 16px; }
.cab-head { display: flex; flex-direction: column; gap: 6px; }
.cab-head h1, .cab-login h1 { font-size: 34px; }
.cab-hint { font-size: 14px; color: var(--muted); font-weight: 400; }
.cab-empty { color: var(--muted); }

.cab-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px; }
.cab-card.is-hidden { opacity: .65; }
.cab-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cab-card-head b { font-size: 17px; }
.cab-list { display: flex; flex-direction: column; gap: 12px; }
.cab-form { display: flex; flex-direction: column; gap: 14px; }
.cab-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .cab-row { grid-template-columns: 1fr 1fr; } }

.cab-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.cab-field input, .cab-field textarea, .cab-signup select {
  font: inherit; font-weight: 400; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.cab-field textarea { resize: vertical; min-height: 80px; line-height: 1.45; }
.cab-field input:focus-visible, .cab-field textarea:focus-visible, .cab-signup select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.cab-check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.cab-check input { width: 18px; height: 18px; accent-color: var(--accent); }

.cab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: flex-start;
  font: inherit; font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.cab-btn:hover { background: var(--ink); color: var(--bg); }
.cab-btn--small { font-size: 14px; padding: 7px 14px; }
.cab-btn--ghost { border-color: var(--line); }
.cab-btn--danger { border-color: #E0B4AE; color: #8C1D18; }
.cab-btn--danger:hover { background: #8C1D18; border-color: #8C1D18; color: #fff; }
.cab-btn.is-busy { opacity: .6; pointer-events: none; }
.cab-btn:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cab-icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  font-size: 17px; cursor: pointer; color: var(--ink);
}
.cab-icon-btn:disabled { opacity: .35; cursor: default; }
.cab-icon-btn:not(:disabled):hover { border-color: var(--ink); }
.cab-sort { display: flex; gap: 6px; flex: none; }

.cab-save { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cab-save .btn { padding: 11px 22px; font-size: 15px; }
.cab-saved { color: #2E6B34; font-weight: 500; font-size: 14px; }
.cab-dirty { color: #8A5A2B; font-weight: 500; font-size: 14px; }

/* Картинки */
.cab-image { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-weight: 400; }
.cab-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--bg); }
.cab-thumb--round { width: 72px; height: 72px; border-radius: 50%; }
.cab-thumb--empty { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.cab-image-actions { display: flex; gap: 8px; }
.cab-gallery { display: grid; gap: 12px; }
@media (min-width: 640px) { .cab-gallery { grid-template-columns: 1fr 1fr; } }
.cab-gallery .cab-thumb { width: 100%; height: 180px; }
.cab-gallery .cab-image { flex-direction: column; align-items: stretch; }

/* Записи */
.cab-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cab-tab {
  flex: none; font: inherit; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.cab-tab span { color: var(--muted); margin-left: 4px; }
.cab-tab.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cab-tab.is-on span { color: var(--dark-muted); }
.cab-signup { display: flex; flex-direction: column; gap: 12px; }
.cab-signup.is-new { border-left: 4px solid var(--accent); }
.cab-signup-name { font-weight: 600; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cab-signup-contact { font-size: 17px; font-weight: 500; }
.cab-signup-meta { font-size: 14px; color: var(--muted); }
.cab-signup-actions { display: flex; align-items: center; gap: 10px; }
.cab-signup select { width: auto; padding: 7px 10px; font-size: 15px; }
.cab-badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #F6E3B4; color: var(--ink); }
@media (min-width: 768px) {
  .cab-signup { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Предпросмотр ближайшей игры */
.cab-preview { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 14px 16px; }
.cab-preview-title { font-size: 13px; color: var(--dark-muted); margin-bottom: 8px; }
.cab-preview dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cab-preview dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); }
.cab-preview dd { margin: 0; }

/* Вход */
.cab-login { width: 100%; max-width: 400px; margin: 40px auto; display: flex; flex-direction: column; gap: 16px; }
.cab-login .btn { align-self: stretch; }

.cab-ok { margin: 0; padding: 12px 14px; border-radius: 12px; background: #E3F1E4; color: #24562A; font-size: 15px; font-weight: 500; }
.cab-forgot { align-self: center; font-size: 15px; }
.cab-narrow { max-width: 480px; }
.cab-tg-link { align-self: flex-start; }
.cab-form code { font-size: 13px; word-break: break-all; background: var(--paper); padding: 2px 4px; border-radius: 4px; }

.cab-switch { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: #F9E3DF; border: 1px solid #E0B4AE; }
.cab-switch.is-on { background: #E3F1E4; border-color: #B9D9BC; }
.cab-warn { margin: 0; padding: 12px 14px; border-radius: 12px; background: #F6E3B4; font-size: 15px; }

.cab-device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cab-device:last-child { border-bottom: 0; }
.cab-qr ol { margin: 0; padding-left: 20px; }
.cab-qr-code svg { width: 220px; height: 220px; display: block; }
.cab-qr input { font-size: 13px !important; }
.cab-field select { font: inherit; font-weight: 400; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.cab-past { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 12px 16px; }
.cab-past summary { cursor: pointer; font-weight: 600; }
.cab-past ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }

/* Сворачиваемые карточки расписания */
.cab-session { gap: 0; }
.cab-session.is-open { gap: 14px; }
.cab-session-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
}
.cab-session-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.cab-session-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cab-session-title b { font-size: 17px; }
.cab-chevron {
  flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s;
}
.cab-session.is-open .cab-chevron { transform: rotate(-135deg); }
