/* ==========================================
   РайДа Даты — Хозяин (новый дизайн)
   Главная: заявки, авто-предложение, календарь
   Стили вынесены из прототипа raida_host_redesign.html
   ========================================== */

/* ── Глобальные сбросы и Montserrat ── */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100vh; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc; color: #1d1d21;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

/* Screens */
.screen { min-height: 100vh; display: flex; flex-direction: column; }

/* ==========================================
   LOGIN
   ========================================== */
#login-screen {
  justify-content: center; align-items: center;
  background: #f8fafc;
  padding: 24px;
}
.login-container {
  width: 100%; max-width: 400px;
  padding: 40px 28px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px -15px rgba(15,23,42,0.18);
  border: 1px solid #f0f2f5;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo h1 {
  font-size: 26px; font-weight: 800;
  margin-top: 14px; letter-spacing: -0.6px; color: #0F1B3D;
}
.login-logo .accent { color: #0271ee; }
.login-subtitle { color: #5b6280; font-size: 14px; margin-top: 6px; }

.input-group { margin-bottom: 16px; }
.input-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: #5b6280; margin-bottom: 6px;
}
.input-group input {
  width: 100%; height: 48px;
  background: #f6f8fb;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 0 16px; font-size: 15px;
  color: #0F1B3D;
  transition: border-color .18s, background .18s;
  outline: none;
}
.input-group input:focus {
  border-color: #0271ee; background: white;
  box-shadow: 0 0 0 4px rgba(2,113,238,0.08);
}

.btn-primary {
  width: 100%; height: 48px;
  background: #0271ee; color: #fff;
  font-size: 15px; font-weight: 600;
  border: none; border-radius: 12px;
  cursor: pointer; transition: background .18s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 1px 3px rgba(2,113,238,0.25);
}
.btn-primary:hover { background: #0263cf; box-shadow: 0 4px 12px -2px rgba(2,113,238,0.35); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.link-btn {
  background: none; border: none; color: #0271ee;
  cursor: pointer; font-size: 14px; padding: 6px;
}
.link-btn:hover { color: #0263cf; }

/* Login divider «или» */
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px;
  color: #94a3b8; font-size: 12px; font-weight: 500;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: #ebedf0;
}

/* Yandex login button */
.btn-yandex {
  width: 100%; height: 48px;
  background: #FC3F1D; color: white;
  font-size: 15px; font-weight: 600;
  border: none; border-radius: 12px;
  cursor: pointer; transition: background .18s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-yandex:hover { background: #e8351a; }
.btn-yandex:active { transform: scale(0.98); }
.btn-yandex svg { color: #FC3F1D; }

.error-msg { margin-top: 14px; color: #c83a3a; font-size: 13px; text-align: center; }

.btn-loader {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================
   HOTEL SELECTOR (топбар) — для выбора объекта из /api/my_hotels/
   ========================================== */
.hotel-select {
  height: 38px; padding: 0 32px 0 38px;
  border-radius: 11px; border: 1px solid #ebedf0;
  background-color: white; color: #0F1B3D;
  font-size: 13px; font-weight: 700; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6280' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230271ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 21h18'/><path d='M5 21V7l8-4v18'/></svg>");
  background-repeat: no-repeat, no-repeat;
  background-position: right 12px center, left 12px center;
  max-width: 220px; letter-spacing: -0.1px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.hotel-select:hover { border-color: #d4d7dc; }
.hotel-select:focus { outline: none; border-color: #0271ee; box-shadow: 0 0 0 4px rgba(2,113,238,0.10); }
#edit-hotel-btn { color: #5b6280; text-decoration: none; }
#edit-hotel-btn:hover { color: #0271ee; }
@media (max-width: 800px) {
  .hotel-select { max-width: 130px; font-size: 12px; padding: 0 24px 0 10px; }
  #edit-hotel-btn { width: 32px; height: 32px; }
}

/* Sticky PWA install bar — sticky сверху, видна пока не закроют или не установят */
.pwa-bar {
  position: sticky; top: 0; z-index: 80;
  background: linear-gradient(135deg, #0271ee, #4f8df9);
  color: white;
}
.pwa-bar-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  max-width: 1100px; margin: 0 auto;
}
.pwa-bar-text {
  flex: 1; min-width: 0;
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pwa-bar-cta {
  background: white; color: #0271ee;
  border: none; padding: 6px 12px; border-radius: 9px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.pwa-bar-cta:hover { background: #f0f7ff; }
.pwa-bar-close {
  background: rgba(255,255,255,0.18); border: none;
  color: white; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.pwa-bar-close:hover { background: rgba(255,255,255,0.30); }

/* Notification preferences rows */
.np-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  background: #f8fafc; border: 1px solid #ebedf0;
  border-radius: 12px; margin-bottom: 8px;
}
.np-row .icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: white; border: 1px solid #ebedf0;
  flex-shrink: 0;
}
.np-row .icon svg { width: 18px; height: 18px; }
.np-row .info { flex: 1; min-width: 0; }
.np-row .info b { display: block; font-size: 13.5px; font-weight: 700; color: #0F1B3D; }
.np-row .info small { display: block; font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.np-row .switch { flex-shrink: 0; }

/* Accordion row in Settings (Документы и согласия) */
.accordion-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 14px;
  background: #f8fafc; border: 1px solid #ebedf0;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 700; color: #0F1B3D;
  cursor: pointer; transition: background .15s, border-color .15s;
  letter-spacing: -0.1px;
}
.accordion-row:hover { background: #eef3fb; border-color: #c2dafe; }
.accordion-row .accordion-label { flex: 1; text-align: left; }
.accordion-row .accordion-chev { color: #94a3b8; transition: transform .2s; flex-shrink: 0; }
.accordion-row.open .accordion-chev { transform: rotate(180deg); }
.accordion-row.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.accordion-body {
  background: white; border: 1px solid #ebedf0; border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 10px 12px 4px;
  margin-top: -1px;
}

/* Documents list rows */
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: white; border: 1px solid #ebedf0; border-radius: 12px;
  cursor: pointer; transition: border-color .15s;
}
.doc-row:hover { border-color: #c2dafe; }
.doc-row .icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: #f6f8fb; display: flex; align-items: center; justify-content: center;
  color: #0271ee; flex-shrink: 0;
}
.doc-row .info { flex: 1; min-width: 0; }
.doc-row .info b { display: block; font-size: 13.5px; font-weight: 700; color: #0F1B3D; }
.doc-row .info small { display: block; font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.doc-row .badge-signed {
  font-size: 10.5px; font-weight: 700; padding: 3px 8px;
  background: #e8f7ee; color: #02a85a; border-radius: 999px; flex-shrink: 0;
}
.doc-row .badge-missing {
  font-size: 10.5px; font-weight: 700; padding: 3px 8px;
  background: #fdecec; color: #c83a3a; border-radius: 999px; flex-shrink: 0;
}

/* Reminder host — фиксированная позиция.
   Раньше use :has(.reminder-banner) для переключения pointer-events,
   но в старом Android WebView / iOS Safari <15.4 :has() не работает →
   host оставался pointer-events:none → кнопка «Подключить» не кликалась.
   Сейчас: host всегда auto, а :empty (пустой DOM) — none, чтобы не блокировать
   контент за ним. :empty работает везде. */
.reminder-host {
  position: fixed;
  left: 14px; right: 14px;
  bottom: 90px;           /* выше bottom-tabs (которые ~70px) на мобиле */
  z-index: 65;
  max-width: 560px;
  margin: 0 auto;
  pointer-events: auto;
}
.reminder-host:empty { pointer-events: none; }
@media (min-width: 801px) {
  .reminder-host { bottom: 24px; }
}

/* Reminder banners — TG, PWA, Auto-propose, Push */
.reminder-banner {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1px solid #e6e9ee;
  border-radius: 14px; padding: 13px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px -2px rgba(15,23,42,0.06);
}
.reminder-banner .icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.reminder-banner .icon svg { width: 18px; height: 18px; }
.reminder-banner .info { flex: 1; min-width: 0; }
.reminder-banner .info b { display: block; font-size: 14px; font-weight: 700; color: #0F1B3D; letter-spacing: -0.2px; }
.reminder-banner .info small { display: block; font-size: 12px; color: #5b6280; margin-top: 2px; line-height: 1.4; }
.reminder-banner .cta {
  padding: 8px 14px; border-radius: 9px;
  background: #0271ee; color: white;
  font-size: 12.5px; font-weight: 600; border: none;
  cursor: pointer; transition: background .15s;
  white-space: nowrap;
}
.reminder-banner .cta:hover { background: #0263cf; }
.reminder-banner .dismiss {
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: none;
  color: #cbd5e1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.reminder-banner .dismiss:hover { color: #5b6280; background: #f5f7fb; }
.reminder-banner .dismiss svg { width: 12px; height: 12px; }
.reminder-banner.auto .icon { background: linear-gradient(135deg, #0271ee, #4f8df9); }
.reminder-banner.tg .icon { background: linear-gradient(135deg, #2aabee, #0098e2); }
.reminder-banner.pwa .icon { background: linear-gradient(135deg, #1d1d21, #3a3a4a); }
.reminder-banner.push .icon { background: linear-gradient(135deg, #fa742d, #ea5a0c); }

/* Validity picker — выбор времени действия предложения (1/3/6/12/24 ч) */
.validity-picker {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  background: #f5f7fb; border-radius: 11px; padding: 4px;
}
.vp-btn {
  padding: 9px 4px;
  background: transparent; border: none; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #5b6280;
  cursor: pointer; transition: all 0.15s;
}
.vp-btn:hover { color: #0F1B3D; }
.vp-btn.active {
  background: white; color: #0271ee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Список броней в sheet (мобильные табы) */
.booking-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: white; border: 1px solid #f0f2f5;
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.booking-row:hover { border-color: #c2dafe; box-shadow: 0 2px 8px -2px rgba(15,23,42,0.05); }
.booking-row .req-avatar { width: 36px; height: 36px; font-size: 13px; }

/* ===== Mobile bottom tab bar ===== */
.bottom-tabs {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: white;
  border-top: 1px solid #ebedf0;
  /* 2026-05-29: safe-area по бокам тоже (landscape с notch слева/справа). */
  padding: 8px max(4px, env(safe-area-inset-right, 4px)) calc(8px + env(safe-area-inset-bottom, 0)) max(4px, env(safe-area-inset-left, 4px));
  box-shadow: 0 -4px 12px rgba(15,23,42,0.04);
}
.bottom-tabs .btab {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 4px;
  background: transparent; border: none;
  font-size: 11px; font-weight: 600; color: #94a3b8;
  cursor: pointer; transition: color .15s;
  position: relative;
}
.bottom-tabs .btab svg { width: 22px; height: 22px; flex-shrink: 0; }
.bottom-tabs .btab span { line-height: 1.15; }
.bottom-tabs .btab-auto span { font-size: 10px; }
/* С 5 табами немного теснее — уменьшаем шрифты */
.bottom-tabs .btab { font-size: 10.5px; padding: 6px 2px; }
.bottom-tabs .btab svg { width: 20px; height: 20px; }

/* Desktop topbar nav (Мои объекты + История) — скрыто на мобиле */
.topbar-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 24px;
}
.topbar-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  background: transparent; border: none;
  font-size: 13px; font-weight: 600; color: #5b6280;
  cursor: pointer; transition: background .15s, color .15s;
  letter-spacing: -0.1px;
}
.topbar-nav-btn:hover { background: #f5f7fb; color: #0F1B3D; }
.topbar-nav-btn.active { background: #eef5ff; color: #0271ee; }
.topbar-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: #fa742d; color: white;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  margin-left: 2px;
}
.topbar-nav-badge[hidden] { display: none; }

/* Поддержка-иконка в topbar — показываем только на мобильных
   (≤800px), где скрыта текстовая кнопка из topbar-nav.
   Используем .icon-btn.icon-btn-mobile (2 класса) — иначе позднее .icon-btn
   из секции topbar перебивает display:none при ширине >800px. */
.icon-btn.icon-btn-mobile { display: inline-flex; }
@media (min-width: 801px) {
  .icon-btn.icon-btn-mobile { display: none !important; }
}
@media (max-width: 800px) {
  .topbar-nav { display: none; }
}

/* Support sheet — список каналов с цветными аватарами иконок.
   Единый стиль с гостевой /last-room/SupportModal — чтобы хозяева видели
   привычный «канальный» layout, а не голые текстовые кнопки. */
.support-list { display: flex; flex-direction: column; gap: 8px; }
.support-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  background: #F4F6FA; color: #1d1d21;
  text-decoration: none; transition: background .15s, transform .05s;
}
.support-row:hover { background: #E8ECF3; }
.support-row:active { transform: scale(0.99); }
.support-ico {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.support-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.support-text b { font-size: 14px; font-weight: 600; color: #1d1d21; }
.support-text small { font-size: 12px; color: #5b6280; margin-top: 2px; }

/* Select-room sheet — нативные карточки с фото объекта/номера */
.srt-section-label {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.srt-row {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 6px;
  background: white; border: 1.5px solid #ebedf0;
  border-radius: 14px; cursor: pointer;
  text-align: left; font: inherit; color: #0F1B3D;
  transition: border-color .15s, background .15s;
}
.srt-row:hover { border-color: #c9d6f0; background: #f9fbff; }
.srt-row.active { border-color: #0271ee; background: #f3f8ff; }
.srt-thumb {
  flex-shrink: 0; border-radius: 10px;
  background-size: cover; background-position: center;
  background-color: #eef0f4;
}
.srt-thumb-fallback {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #5b6280;
  background: linear-gradient(135deg, #eef5ff, #f5f7fb);
}
.srt-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  line-height: 1.3;
}
.srt-text b { font-size: 14px; font-weight: 700; color: #0F1B3D; }
.srt-text small {
  font-size: 11.5px; color: #94a3b8;
  margin-top: 2px; font-weight: 500;
}
.srt-price {
  flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: #5b6280;
  white-space: nowrap;
}
.srt-row.active .srt-price { color: #0271ee; }
.srt-check { flex-shrink: 0; }

/* History tabs — iOS segmented control стиль.
   Равная ширина (grid вместо flex для точно одинаковых колонок),
   мелкий шрифт, счётчик отделён мини-точкой. На узких экранах
   «Предложения» уменьшается до 10.5px чтобы не выглядеть cramped. */
.history-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #f5f7fb; padding: 3px;
  border-radius: 10px; margin-bottom: 14px;
}
.history-tabs.sticky {
  position: sticky; top: 0; z-index: 5;
  margin: -4px -4px 14px;
  background: white;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f2f5;
}
.history-tabs.sticky {
  background: white; padding: 6px 4px 10px;
}
.history-tab {
  border: none; background: transparent;
  padding: 8px 2px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: #5b6280;
  cursor: pointer; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s, color .15s;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 3px;
  letter-spacing: -0.2px;
  min-width: 0;
}
.history-tab:hover { color: #0F1B3D; }
.history-tab.active {
  background: #eef5ff; color: #0271ee;
  box-shadow: 0 1px 2px rgba(2,113,238,0.06);
}
.history-tabs.sticky .history-tab.active { background: #eef5ff; }
.history-tab .ht-count {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  color: #94a3b8;
  background: #eef0f4;
  padding: 1px 5px; border-radius: 999px;
  min-width: 14px; text-align: center;
  line-height: 1.4;
}
.history-tab.active .ht-count {
  color: white; background: #0271ee;
}
.history-tab .ht-count:empty { display: none; }
/* На узких экранах (<420px) дополнительно уменьшаем чтобы 4 таба влезали комфортно */
@media (max-width: 420px) {
  .history-tab { font-size: 11px; padding: 8px 2px; gap: 2px; }
  .history-tab .ht-count { font-size: 9.5px; padding: 1px 4px; min-width: 12px; }
}

/* Back button (на отдельных страницах вроде истории) — text+icon pill */
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: white; border: 1px solid #ebedf0;
  font-size: 13px; font-weight: 600; color: #5b6280;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.back-btn:hover { background: #f5f7fb; border-color: #d4d7dc; color: #0F1B3D; }
.back-btn:active { transform: scale(0.98); }
.back-btn svg { color: inherit; }

.history-header { margin-bottom: 22px; }

/* Cal context — объединённый блок «Отель + Номер» над календарём */
.cal-context {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: linear-gradient(135deg, #f6f8fb 0%, #eef3fb 100%);
  border: 1px solid #e6e9ee; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 12px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s;
  text-align: left;
}
.cal-context:hover {
  border-color: #c2dafe;
  box-shadow: 0 4px 12px -4px rgba(2,113,238,0.12);
}
.cal-context:active { transform: scale(0.99); }
.cal-context-photo {
  width: 44px; height: 44px; min-width: 44px; border-radius: 11px;
  background-color: white;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  border: 1px solid #e6e9ee;
  display: flex; align-items: center; justify-content: center;
  color: #cbd5e1; flex-shrink: 0; overflow: hidden;
}
.cal-context-photo svg { width: 20px; height: 20px; }
.cal-context-info { flex: 1; min-width: 0; overflow: hidden; }
.cal-context-hotel {
  font-size: 11.5px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-context-room {
  font-size: 15px; font-weight: 700; color: #0F1B3D;
  letter-spacing: -0.2px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-context-chev {
  color: #5b6280; flex-shrink: 0;
}

/* 2026-06-01: горизонтальные tabs выбора типа номера в шапке календаря.
   Pill с фото-превью + название + цена. Активный — синяя рамка + светлый фон.
   Если pills не помещаются — горизонтальная прокрутка с тонким скроллом.
   Срабатывает мгновенно по клику (без модалки).
   .cal-hotel-tabs — точно такой же ряд для переключения объектов, появляется
   если у хозяина 2+ отеля. Стили одни и те же — переиспользуем .rt-tab pill'ы. */
.cal-rt-tabs, .cal-hotel-tabs {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding: 8px 2px 10px; margin: 6px 0 12px;
  scrollbar-width: thin; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.cal-hotel-tabs { margin-bottom: 4px; padding-bottom: 6px; }
.cal-rt-tabs::-webkit-scrollbar, .cal-hotel-tabs::-webkit-scrollbar { height: 4px; }
.cal-rt-tabs::-webkit-scrollbar-thumb, .cal-hotel-tabs::-webkit-scrollbar-thumb { background: #d4dae3; border-radius: 4px; }
.cal-rt-tabs:empty, .cal-hotel-tabs:empty { display: none; }
.rt-tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 7px;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 14px;
  cursor: pointer; transition: all .15s ease;
  font-family: inherit; color: inherit;
  position: relative;
}
.rt-tab:hover { border-color: #c9d6f0; background: #f9fbff; }
.rt-tab.active {
  border-color: #0271ee; background: #f3f8ff;
  box-shadow: 0 1px 6px rgba(2,113,238,.08);
}
.rt-tab-thumb {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px; object-fit: cover;
  background: #f5f7fb;
}
.rt-tab-thumb-fallback {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #94a3b8; font-size: 16px;
}
.rt-tab-info { display: flex; flex-direction: column; gap: 1px; text-align: left; min-width: 0; }
.rt-tab-name {
  font-weight: 700; font-size: 13px; color: #1f2937;
  white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.rt-tab.active .rt-tab-name { color: #0271ee; }
.rt-tab-price { font-size: 11.5px; color: #5b6280; white-space: nowrap; }
.rt-tab-check {
  position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #0271ee; color: white;
  display: flex; align-items: center; justify-content: center;
}
.rt-tab:not(.active) .rt-tab-check { display: none; }

/* 2026-06-01: мобильная адаптация шапки календаря.
   На <=600px:
   • cal-context-btn скрывается, если есть хотя бы один ряд табов —
     активный выбор уже виден прямо в табах с синей рамкой и галочкой,
     дублировать его широкой плашкой сверху бессмысленно и отнимает 70px высоты.
   • pill'ы становятся компактнее: 30px фото, 12px текст, узкий padding,
     11px border-radius — ряды не доминируют над календарём.
   • межрядовые margin'ы ужимаются с 6/10px до 2/4px. */
@media (max-width: 600px) {
  /* CSS :has() для модерн-браузеров + JS fallback (body.has-cal-tabs) */
  .panel:has(.cal-hotel-tabs:not(:empty)) > .cal-context,
  .panel:has(.cal-rt-tabs:not(:empty)) > .cal-context,
  body.has-cal-tabs .panel > .cal-context { display: none; }

  .cal-rt-tabs, .cal-hotel-tabs {
    gap: 6px;
    padding: 4px 2px 6px;
    margin: 2px 0 4px;
  }
  .cal-hotel-tabs { margin-bottom: 0; padding-bottom: 4px; }
  .cal-rt-tabs { margin-top: 0; }

  .rt-tab {
    padding: 5px 10px 5px 5px;
    gap: 7px;
    border-width: 1px;
    border-radius: 11px;
  }
  .rt-tab.active { border-width: 1.5px; }
  .rt-tab-thumb {
    width: 30px; height: 30px; flex: 0 0 30px;
    border-radius: 8px;
  }
  .rt-tab-thumb-fallback { font-size: 13px; }
  .rt-tab-name {
    font-size: 12px;
    max-width: 130px;
  }
  .rt-tab-price { font-size: 10.5px; }
  .rt-tab-check {
    width: 13px; height: 13px;
    top: 3px; right: 3px;
  }
  .rt-tab-check svg { width: 7px; height: 7px; }
}

/* Месяц-нав отдельной строкой — стрелки по краям контейнера,
   месяц по центру. Раньше всё было сгруппировано в центре (стрелки
   рядом с лейблом) — клик-зоны узкие, неудобно тыкать пальцем. */
.cal-month-nav-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.cal-month-nav-row h3 {
  font-size: 15px; font-weight: 700; text-align: center;
  letter-spacing: -0.2px; color: #0F1B3D;
  flex: 1; min-width: 0;
}
.cal-month-nav-row button { flex-shrink: 0; }

/* Hotel row в sheet «Мои объекты» */
.hotel-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 10px;
  background: white; border: 1px solid #e6e9ee; border-radius: 14px;
  transition: border-color .15s;
}
.hotel-row:hover { border-color: #c2dafe; }
.hotel-photo {
  width: 64px; height: 64px; min-width: 64px;
  border-radius: 10px; background: #f6f8fb;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #cbd5e1; flex-shrink: 0;
}
.hotel-photo svg { width: 28px; height: 28px; }
.hotel-info { flex: 1; min-width: 0; }
.hotel-info .hotel-name { font-size: 14px; font-weight: 700; color: #0F1B3D; letter-spacing: -0.2px; }
.hotel-info .hotel-meta { font-size: 12px; color: #5b6280; margin-top: 3px; }
.hotel-info .hotel-rooms { font-size: 11.5px; color: #94a3b8; margin-top: 3px; }
.hotel-edit-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: #eef5ff; color: #0271ee; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.hotel-edit-btn:hover { background: #dbeafe; }
.bottom-tabs .btab:hover { color: #5b6280; }
.bottom-tabs .btab.active { color: #0271ee; }
.bottom-tabs .btab-badge {
  position: absolute; top: 0; right: calc(50% - 18px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: #ef4444; color: white;
  font-size: 9px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid white; letter-spacing: -0.2px;
}
@media (max-width: 800px) {
  .bottom-tabs { display: flex; }
  /* Чтобы контент не залезал под bar */
  .page { padding-bottom: 80px; }
}
@media (min-width: 801px) {
  /* На десктопе reminder-host фиксированно у нижнего края — резервируем место под него,
     чтобы клик по кнопкам нижних карточек не «попадал в баннер». */
  .page { padding-bottom: 110px; }
}

/* Notification badge на колокольчике */
.notif-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444; color: white;
  font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid white;
  letter-spacing: -0.2px;
  pointer-events: none;
  animation: badge-pop 0.25s ease-out;
}
@keyframes badge-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Booking detail modal */
.bd-section { margin-bottom: 14px; }
.bd-section-title {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.bd-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid #f0f2f5;
  font-size: 13.5px;
}
.bd-row:last-child { border-bottom: none; }
.bd-row-label { color: #5b6280; }
.bd-row-value { color: #0F1B3D; font-weight: 600; text-align: right; }
.bd-row-value.link { color: #0271ee; text-decoration: none; }
.bd-row-value.link:hover { text-decoration: underline; }

/* Кол-во свободных номеров под ценой в ячейке календаря */
.cal-day .free-cnt {
  display: block; font-size: 9px; color: #02a85a; font-weight: 600;
  margin-top: 1px; letter-spacing: -0.2px;
}
.cal-day .free-cnt:empty { display: none; }

/* Multi-select — кастомные «pill»-чекбоксы для типов номеров в правилах.
   Каждый чекбокс — это <label> с настоящим <input type=checkbox> (скрыт через
   sr-only) и обёрткой .rt-check (квадрат 22×22) + текст. Раньше квадрат
   делался через label::before, но в flex-контейнере он рендерился тонкой
   полоской — отсюда «|» вместо чекбокса. Теперь явный inline-block элемент. */
.room-types-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 260px; overflow-y: auto;
  padding: 2px 0;
}
.room-types-list label {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white; border: 1.5px solid #e6e9ee;
  border-radius: 12px; cursor: pointer;
  font-size: 14px; color: #0F1B3D; font-weight: 600;
  transition: background .18s, border-color .18s, box-shadow .18s;
  letter-spacing: -0.1px;
  position: relative;
  line-height: 1.4;
}
.room-types-list label:hover {
  border-color: #c2dafe; background: #f8fbff;
}
.room-types-list label.checked {
  background: #f0f7ff; border-color: #0271ee;
  box-shadow: 0 0 0 3px rgba(2,113,238,0.10);
}
/* Скрываем родной чекбокс полностью */
.room-types-list input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none;
  width: 0; height: 0;
}
/* Кастомный квадрат-чекбокс. Явный display:inline-block + box-sizing,
   width/height — целочисленные пиксели + aspect-ratio для гарантии квадрата
   на любом устройстве. Раньше 1.5px border давал «кривой» вид из-за
   субпиксельного округления на retina. */
.room-types-list .rt-check {
  display: inline-block; box-sizing: border-box;
  flex-shrink: 0; flex-grow: 0;
  align-self: center;
  width: 20px; height: 20px; min-width: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 2px solid #cbd5e1; background: white;
  transition: background-color .18s, border-color .18s;
  background-repeat: no-repeat; background-position: center;
  vertical-align: middle;
}
.room-types-list .rt-name {
  align-self: center;
  line-height: 1.4;
}
.room-types-list label:hover .rt-check { border-color: #94a3b8; }
.room-types-list label.checked .rt-check {
  background-color: #0271ee; border-color: #0271ee;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
.room-types-list label.checked:hover .rt-check { background-color: #0263cf; border-color: #0263cf; }

.room-types-list .rt-name { flex: 1; min-width: 0; }
.room-types-list .rt-hotel {
  font-size: 12px; color: #94a3b8; font-weight: 500;
  margin-left: 6px;
}
.room-types-list label.checked .rt-hotel { color: #5b96ee; }
.room-types-list .rt-empty {
  font-size: 12.5px; color: #94a3b8; text-align: center;
  padding: 18px 12px; background: #f6f8fb;
  border: 1px dashed #e6e9ee; border-radius: 10px;
}
/* Хинт над списком: что вообще требуется сделать */
.rt-hint {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: #f0f6ff; border: 1px solid #d8e4f6;
  border-radius: 10px;
  font-size: 12px; color: #0263cf;
  margin-bottom: 10px;
}
.rt-hint.error {
  background: #fff5f5; border-color: #f5b7b7; color: #b91c1c;
}
.rt-hint svg { width: 14px; height: 14px; flex-shrink: 0; }
/* Кнопка «Выбрать все / Снять все» — компакт-переключатель над списком */
.rt-bulk-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; color: #0271ee;
  margin-left: auto;
}
.rt-bulk-toggle:hover { background: #f0f6ff; }

/* Скелетон для карточек заявок пока загружаются */
.req-skeleton {
  background: white; border-radius: 16px; border: 1px solid #f0f2f5;
  padding: 18px 20px; margin-bottom: 12px;
}
.req-skeleton .skline {
  height: 12px; background: linear-gradient(90deg, #f1f3f6, #e9ebef, #f1f3f6);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: 4px; margin-bottom: 10px;
}
.req-skeleton .skline:last-child { margin-bottom: 0; width: 60%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==========================================
   PROTOTYPE STYLES (вынесены из raida_host_redesign.html)
   ========================================== */

        * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
        body {
            font-family: 'Montserrat', -apple-system, sans-serif;
            background: #f8fafc; color: #1d1d21;
            min-height: 100vh;
        }
        button, input, select, textarea { font: inherit; color: inherit; }
        button { cursor: pointer; }

        /* === Top bar ===
           2026-05-29: добавлены safe-area-inset-* отступы. Без них на iPhone
           с notch и на Samsung Galaxy в браузерном режиме (со status bar
           VoLTE/Wi-Fi/battery поверх контента) шапка «съезжала» — контент
           уезжал за статусбар, кнопки и аватарка лезли друг на друга.
           viewport-fit=cover в meta включает env(safe-area-inset-*) на обоих
           платформах. */
        .topbar {
            display: flex; align-items: center; justify-content: space-between;
            padding: calc(14px + env(safe-area-inset-top, 0)) max(24px, env(safe-area-inset-right, 24px)) 14px max(24px, env(safe-area-inset-left, 24px));
            background: white;
            border-bottom: 1px solid #ebedf0;
            position: sticky; top: 0; z-index: 50;
            gap: 8px; min-width: 0;
        }
        .brand {
            display: flex; align-items: center; gap: 10px;
            min-width: 0; flex-shrink: 1;
        }
        .brand-text { min-width: 0; overflow: hidden; }
        .brand-mark {
            width: 34px; height: 34px; border-radius: 9px;
            background: linear-gradient(135deg, #0271EE 0%, #3a8dff 100%);
            display: flex; align-items: center; justify-content: center;
            color: white; font-weight: 800; font-size: 13px;
            box-shadow: 0 3px 10px rgba(2,113,238,0.25);
        }
        .brand-text { line-height: 1.1; }
        .brand-text b { font-weight: 800; font-size: 15px; color: #0F1B3D; }
        .brand-text small {
            display: block; font-size: 9px; color: #9ca3af;
            letter-spacing: 1.5px; text-transform: uppercase; margin-top: 1px;
        }
        .topbar-actions {
            display: flex; gap: 8px; align-items: center;
            flex-shrink: 0;
        }
        .icon-btn {
            width: 38px; height: 38px; border-radius: 50%;
            background: white; border: 1px solid #ebedf0;
            display: flex; align-items: center; justify-content: center;
            position: relative; transition: all 0.15s;
            flex-shrink: 0;
        }
        .icon-btn:hover { background: #f5f7fb; border-color: #d4d7dc; }
        .icon-btn svg { width: 18px; height: 18px; stroke: #5b6280; }
        .icon-btn .dot {
            position: absolute; top: 7px; right: 7px; width: 9px; height: 9px;
            background: #fa742d; border-radius: 50%; border: 2px solid white;
        }
        .profile-pill {
            display: flex; align-items: center; gap: 8px;
            background: white; border: 1px solid #ebedf0;
            border-radius: 999px; padding: 4px 14px 4px 4px;
            transition: all 0.15s;
            cursor: pointer;
            flex-shrink: 0;
            max-width: 180px; min-width: 0;
        }
        .profile-pill:hover { background: #f5f7fb; }
        .profile-pill span:not(.ava) {
            font-size: 13px; font-weight: 600;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            min-width: 0;
        }
        .profile-pill .ava {
            width: 32px; height: 32px; min-width: 32px;
            border-radius: 50%; aspect-ratio: 1;
            background: linear-gradient(135deg, #0271EE 0%, #3a8dff 100%);
            background-size: cover; background-position: center; background-repeat: no-repeat;
            color: white; display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 13px;
            flex-shrink: 0; overflow: hidden;
            line-height: 1;
        }
        /* Дубль выше — оставлен для обратной совместимости (старые стили) */

        /* === Page wrapper === */
        .page {
            max-width: 1100px; margin: 0 auto;
            padding: 24px 24px 60px;
        }

        /* === Greeting === */
        .greeting { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px;}
        .greeting h1 {
            font-size: 26px; font-weight: 800; color: #0F1B3D;
            letter-spacing: -0.7px;
        }
        .greeting p { font-size: 13px; color: #9ca3af; margin-top: 2px; }

        /* === Mobile-only setup banner — призыв настроить авто-предложение === */
        .setup-banner {
            display: none; /* видна только в мобиле — см. media query */
            align-items: center; gap: 12px;
            background: linear-gradient(135deg, #eef5ff 0%, #dbeafe 100%);
            border: 1px solid rgba(2,113,238,0.18);
            border-radius: 14px; padding: 13px 14px;
            margin-bottom: 14px;
            cursor: pointer; text-align: left; width: 100%;
            font-family: inherit;
            transition: transform 0.18s, box-shadow 0.18s;
        }
        .setup-banner:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px -4px rgba(2,113,238,0.15);
        }
        .setup-banner .icon {
            width: 38px; height: 38px; border-radius: 50%;
            background: #0271ee; color: white; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 2px 6px rgba(2,113,238,0.3);
        }
        .setup-banner .icon svg { width: 18px; height: 18px; stroke: white; }
        .setup-banner .info { flex: 1; min-width: 0; }
        .setup-banner .title {
            font-size: 14px; font-weight: 700; color: #0f172a;
            letter-spacing: -0.2px;
        }
        .setup-banner .sub {
            font-size: 12px; color: #5b6280; margin-top: 2px;
            line-height: 1.4;
        }
        .setup-banner .chev {
            color: #0271ee; flex-shrink: 0;
        }
        .setup-banner .chev svg { width: 18px; height: 18px; stroke-width: 2.2; }

        /* === Stats grid === */
        .stats-grid {
            display: grid; grid-template-columns: repeat(4, 1fr);
            gap: 12px; margin-bottom: 20px;
        }
        .stat-card {
            background: white; border-radius: 14px; padding: 14px 16px;
            border: 1px solid #ebedf0;
        }
        .stat-label {
            font-size: 10px; color: #9ca3af; text-transform: uppercase;
            letter-spacing: 1px; font-weight: 600;
        }
        .stat-value {
            font-size: 22px; font-weight: 800; color: #1d1d21;
            margin-top: 4px; letter-spacing: -0.5px;
        }
        .stat-delta { font-size: 11px; margin-top: 2px; color: #02a85a; font-weight: 600; }
        .stat-delta.neg { color: #fa742d; }

        /* === Generic panel === */
        .panel {
            background: white; border-radius: 14px; padding: 16px;
            border: 1px solid #ebedf0; margin-bottom: 16px;
        }
        /* «Голый» вариант — без фона/рамки/паддингов: заголовок и контент
           идут прямо потоком страницы, чтобы не было «матрёшки» из карточек. */
        .panel.naked {
            background: transparent; border: none;
            padding: 0; margin-bottom: 20px;
        }
        .panel-head {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 14px;
        }
        .panel.naked > .panel-head {
            padding: 0 2px; margin-bottom: 12px;
        }
        .panel-head h3 { font-size: 15px; font-weight: 700; }
        .panel-head .link {
            font-size: 12px; color: #0271ee; font-weight: 600;
            background: none; border: none;
        }
        .panel-head .link:hover { text-decoration: underline; }

        /* === Calendar block === */
        .cal-toolbar {
            display: flex; align-items: center; gap: 10px;
            margin-bottom: 14px; flex-wrap: wrap;
        }
        .cal-room-select {
            background: #f5f7fb; border: 1px solid #ebedf0;
            border-radius: 11px; padding: 8px 14px;
            font-size: 13px; font-weight: 600;
            display: flex; align-items: center; gap: 8px;
        }
        .cal-room-select svg { width: 13px; height: 13px; stroke: #5b6280; }
        .cal-month-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
        .cal-month-nav button {
            width: 30px; height: 30px; border-radius: 50%;
            background: white; border: 1px solid #ebedf0;
            display: flex; align-items: center; justify-content: center;
        }
        .cal-month-nav button svg { width: 13px; height: 13px; stroke: #5b6280; }
        .cal-month-nav h3 { font-size: 15px; font-weight: 700; min-width: 130px; text-align: center; }

        .cal-weekdays {
            /* 2026-06-01: minmax(0, 1fr) — иначе при ценах вроде «1 000 000»
               grid auto-min даёт колонкам интрисическую ширину контента,
               семь колонок не помещаются в 357px viewport и ПН уезжает за экран. */
            display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 4px; margin-bottom: 6px;
        }
        .cal-weekdays div {
            text-align: center; font-size: 10px; font-weight: 600;
            color: #9ca3af; padding: 4px 0; text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .cal-days {
            /* 2026-06-01: см. .cal-weekdays — minmax(0, 1fr) обязателен. */
            display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
        }
        .cal-day {
            height: 60px; display: flex; align-items: center;
            justify-content: center; font-size: 13px; font-weight: 600;
            border-radius: 10px; transition: all 0.15s; border: 1.5px solid transparent;
            flex-direction: column; gap: 1px; padding: 4px;
            background: transparent;
        }
        .cal-day:hover { background: #f5f7fb; }
        .cal-day.muted { color: #cdd1d8; cursor: default; }
        .cal-day.muted:hover { background: transparent; }
        .cal-day.booked { background: #fff7f0; color: #fa742d; font-weight: 700; }
        .cal-day.booked:hover { background: #ffe8d4; }
        .cal-day.blocked { background: #f5f5f7; color: #9ca3af; text-decoration: line-through; }
        /* Прошедшие даты — серые, не кликабельные, без цен/маркеров */
        .cal-day.past, .cal-day:disabled {
            color: #cdd1d8; cursor: not-allowed;
            background: transparent;
        }
        .cal-day.past:hover, .cal-day:disabled:hover { background: transparent; }
        .cal-day.past .price { display: none; }
        .cal-day.past.booked { background: #fafafa; color: #d1d5db; font-weight: 500; }
        .cal-day.past.blocked { background: transparent; color: #cdd1d8; }
        .cal-day.selected {
            background: #0271ee; color: white;
            box-shadow: 0 4px 12px rgba(2,113,238,0.35);
        }
        .cal-day.range-edge {
            background: #0271ee; color: white;
            box-shadow: 0 4px 12px rgba(2,113,238,0.35);
        }
        .cal-day.range-mid {
            background: #e3eefe; color: #0271ee;
        }
        .cal-day.today { border-color: #0271ee; }
        .cal-day .num { font-size: 13px; }
        .cal-day .price {
            font-size: 9px; opacity: 0.7; font-weight: 500;
            /* 2026-06-01: страховка от длинных цен (1 000 000+) — без неё контент
               пытался растянуть колонку и ломал грид. minmax(0,1fr) на .cal-days
               главная защита, это — fail-safe. */
            max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .cal-day.selected .price,
        .cal-day.range-edge .price { opacity: 1; }
        /* Auto-proposal marker: чёткая зелёная точка с обводкой. 2026-05-26:
           переместили в левый-верх, чтобы освободить правый угол под бейдж
           «свободных номеров». Если активна auto-цена внизу — точку прячем
           (визуальный дубль). */
        .cal-day.auto-active::before {
            content: '';
            position: absolute; top: 4px; left: 5px;
            width: 6px; height: 6px; border-radius: 50%;
            background: #02a85a;
            box-shadow: 0 0 0 1.5px white;
        }
        .cal-day.auto-active:has(.auto-price)::before { display: none; }

        /* 2026-05-26: бейдж «свободных номеров» — маленький круг с цифрой
           в правом верхнем углу. Минималистично: серый когда мест много,
           оранжевый когда осталось 1. Не рендерим если хозяин не задал
           значение (избегаем визуального шума на пустых днях). */
        .cal-day .rooms-chip {
            position: absolute; top: 3px; right: 4px;
            font-size: 9px; font-weight: 700; line-height: 1;
            padding: 2px 5px; border-radius: 999px;
            color: #5b6280; background: #eef0f4;
            min-width: 14px; text-align: center;
        }
        .cal-day .rooms-chip.rooms-low {
            color: #c2410c; background: #ffedd5;
        }
        .cal-day.selected .rooms-chip,
        .cal-day.range-edge .rooms-chip,
        .cal-day.booked .rooms-chip { display: none; }

        /* Auto-price (зелёная) — приоритет над .price если автопредложение настроено */
        .cal-day .auto-price {
            font-size: 9px; font-weight: 700;
            color: #02a85a; line-height: 1;
        }
        .cal-day.selected .auto-price,
        .cal-day.range-edge .auto-price { color: white; opacity: 0.95; }
        /* Прошлые даты — никаких маркеров, чисто серый */
        .cal-day.past::before, .cal-day.past .price, .cal-day.past[data-tip]:hover::after {
            display: none !important;
        }
        .cal-day.past { background: transparent !important; }

        /* Кастомный tooltip — появляется мгновенно (без 500мс задержки браузера) */
        .cal-day[data-tip] { position: relative; }
        .cal-day[data-tip]:hover::after {
            content: attr(data-tip);
            position: absolute; bottom: calc(100% + 6px); left: 50%;
            transform: translateX(-50%);
            background: #1d1d21; color: white;
            font-size: 11px; font-weight: 500;
            padding: 6px 10px; border-radius: 7px;
            white-space: nowrap; pointer-events: none;
            z-index: 50;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }
        /* Стрелочку у tooltip'а не делаем чтобы не конфликтовать с ::before
           зелёной точки. ::after достаточно. */
        .cal-day { position: relative; }

        /* Range action bar */
        .range-bar {
            margin-top: 14px; padding: 14px 16px;
            background: #e3eefe; border: 1px solid #c2dafe;
            border-radius: 12px;
            display: flex; align-items: center; gap: 12px;
            flex-wrap: wrap;
        }
        .range-bar .info {
            flex: 1; min-width: 180px;
        }
        .range-bar .info b { font-size: 14px; font-weight: 700; }
        .range-bar .info small { font-size: 11px; color: #5b6280; display: block; }
        .range-bar button {
            padding: 7px 12px; border-radius: 8px;
            font-size: 12px; font-weight: 600; border: none;
            background: white; color: #0271ee;
            border: 1px solid #c2dafe;
        }
        .range-bar button:hover { background: #d1e0fc; }
        .range-bar button.danger { color: #c83a3a; border-color: #f5c4c4; }
        .range-bar button.success { color: white; background: #0271ee; border-color: #0271ee; }
        .range-bar button.success:hover { background: #0261d4; }
        .range-bar .close {
            margin-left: auto; width: 26px; height: 26px; padding: 0;
            border-radius: 50%; background: white; border: 1px solid #c2dafe;
        }

        .cal-legend {
            display: flex; gap: 12px; justify-content: center;
            font-size: 11px; color: #5b6280;
            margin-top: 10px; padding-top: 10px;
            border-top: 1px solid #f3f4f6; flex-wrap: wrap;
        }
        .cal-legend > div { display: flex; align-items: center; gap: 5px; }
        .cal-legend i {
            width: 10px; height: 10px; border-radius: 3px; display: block;
        }

        /* === 2-col layout: requests left, sidebar right === */
        .row-2col {
            display: grid; grid-template-columns: 1fr 320px; gap: 16px;
            align-items: start;
        }

        /* === Request card — современный минимализм: мягкие тени, воздух, единая структура === */
        .request-card {
            position: relative;
            background: white;
            border-radius: 16px;
            padding: 18px 20px;
            margin-bottom: 12px;
            border: 1px solid #f0f2f5;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
            transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
        }
        /* Цветовая дифференциация по state — весь контейнер слегка тонирован,
           без левой полосы. Цвета максимально светлые, чтобы текст оставался читаем. */
        .request-card.fresh       { background: #fff8f1; border-color: #fce8d5; }
        .request-card.offered     { background: #f2f7ff; border-color: #dbe7fa; }
        .request-card.discount    { background: #fff4e8; border-color: #fbdec3; }
        .request-card.confirmable { background: #fff8eb; border-color: #f5e3b8; }
        .request-card.booked      { background: #f0faf3; border-color: #c8eed4; }

        /* Корзина-удалить в правом верхнем углу карточки (заменяет ghost-кнопку «Отклонить») */
        .req-delete {
            position: absolute; top: 12px; right: 12px;
            width: 30px; height: 30px; border-radius: 50%;
            background: transparent; border: none;
            color: #cbd5e1; cursor: pointer; z-index: 3;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s, color 0.15s;
        }
        .req-delete:hover { background: #fef1f1; color: #c83a3a; }
        .req-delete svg { width: 15px; height: 15px; stroke-width: 2; }
        .request-card:hover {
            border-color: #e6e9ee;
            transform: translateY(-1px);
            box-shadow:
                0 10px 28px -8px rgba(15, 23, 42, 0.10),
                0 4px 8px -2px rgba(15, 23, 42, 0.04);
        }

        /* Шапка с гостем: аватар + имя + поездка */
        .req-guest-row {
            display: flex; align-items: flex-start; gap: 12px;
            margin-bottom: 14px;
        }
        .req-avatar {
            width: 38px; height: 38px; border-radius: 50%;
            color: white; font-size: 14px; font-weight: 700;
            display: flex; align-items: center; justify-content: center;
            letter-spacing: -0.3px; flex-shrink: 0;
            box-shadow: inset 0 -1px 0 rgba(0,0,0,0.06);
        }
        .req-avatar.a-1 { background: linear-gradient(135deg, #ffb87d, #fa742d); }
        .req-avatar.a-2 { background: linear-gradient(135deg, #6fa8ff, #0271ee); }
        .req-avatar.a-3 { background: linear-gradient(135deg, #f8bb6c, #d97706); }
        .req-avatar.a-4 { background: linear-gradient(135deg, #6ee7b7, #02a85a); }
        .req-avatar.a-5 { background: linear-gradient(135deg, #c4b5fd, #7c3aed); }
        .req-guest-info { flex: 1; min-width: 0; }

        /* Top: status pill + timer (правый край освобождает место под крестик-корзину) */
        .req-head {
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: 14px; gap: 12px;
            padding-right: 36px;
        }
        .req-head .timer {
            display: inline-flex; align-items: center; gap: 5px;
            font-size: 11.5px; color: #94a3b8; font-weight: 500;
            white-space: nowrap; letter-spacing: -0.05px;
        }
        .req-head .timer svg {
            width: 11px; height: 11px; stroke: #94a3b8; flex-shrink: 0;
        }
        .req-head .timer.urgent { color: #ea5a0c; }
        .req-head .timer.urgent svg { stroke: #ea5a0c; }
        .req-status {
            display: inline-flex; align-items: center; gap: 7px;
            font-size: 11.5px; font-weight: 700;
            padding: 5px 11px 5px 9px; border-radius: 999px;
            letter-spacing: -0.1px;
        }
        .req-status .dot {
            width: 6px; height: 6px; border-radius: 50%;
            flex-shrink: 0;
        }
        .req-status.new       { background: #fff5ed; color: #ea5a0c; }
        .req-status.new .dot  { background: #fa742d; animation: pulse 1.5s infinite; }
        .req-status.offered   { background: #eef5ff; color: #0271ee; }
        .req-status.offered .dot { background: #0271ee; }
        .req-status.discount  { background: #fef3e3; color: #b05f10; }
        .req-status.discount .dot { background: #fa742d; }
        .req-status.booked    { background: #e8f7ee; color: #02a85a; }
        .req-status.booked .dot   { background: #02a85a; }
        .req-status.confirmable { background: #fffbeb; color: #b45309; }
        .req-status.confirmable .dot { background: #f59e0b; animation: pulse 1.5s infinite; }
        @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

        /* Гость + поездка */
        .req-guest {
            font-size: 16px; font-weight: 700; color: #0f172a;
            letter-spacing: -0.3px;
            margin-bottom: 3px;
        }
        .req-guest .meta {
            font-size: 12.5px; font-weight: 500; color: #94a3b8;
            margin-left: 4px; letter-spacing: 0;
        }
        .req-trip {
            font-size: 13px; color: #64748b;
            margin-bottom: 14px; line-height: 1.5;
        }
        .req-trip strong { color: #0f172a; font-weight: 600; }

        /* ===== New-block: «Новая заявка» — рядки с иконками, без серой плашки.
           Аналогично offer-block, но фокус на бюджете гостя + контекст поездки. */
        .new-block {
            display: flex; flex-direction: column; gap: 8px;
            margin-bottom: 14px;
        }
        .new-block .new-row {
            display: flex; align-items: center; gap: 9px;
            font-size: 13px; color: #334155; line-height: 1.4;
        }
        .new-block .new-row .ico {
            flex-shrink: 0; width: 18px; height: 18px;
            display: inline-flex; align-items: center; justify-content: center;
            color: #94a3b8;
        }
        .new-block .new-row .ico svg { width: 15px; height: 15px; display: block; }
        .new-block .new-row .txt { flex: 1; min-width: 0; }
        .new-block .new-row strong { color: #0f1b3d; font-weight: 700; }
        .new-block .new-comment {
            display: flex; align-items: flex-start; gap: 8px;
            margin-top: 4px; padding-top: 10px;
            border-top: 1px dashed #d8dde6;
            font-size: 12.5px; color: #5b6280; line-height: 1.5;
            font-style: italic;
        }
        .new-block .new-comment .qico {
            flex-shrink: 0; color: #c8d1de; margin-top: 1px;
        }
        .new-block .new-comment .qico svg { width: 16px; height: 16px; display: block; }

        /* Ключевое число — мягкая плашка (legacy, для других state) */
        .req-key {
            display: flex; align-items: baseline; gap: 10px;
            background: #f6f8fb;
            border-radius: 12px;
            padding: 12px 14px; margin-bottom: 16px;
        }
        .req-key .lbl {
            font-size: 12px; color: #64748b; font-weight: 500;
        }
        .req-key .val {
            font-size: 18px; font-weight: 800; letter-spacing: -0.4px;
            color: #0f172a;
        }
        .req-key .val .unit { font-size: 11.5px; font-weight: 500; color: #94a3b8; margin-left: 2px; }
        .req-key .extra {
            font-size: 11.5px; color: #94a3b8; margin-left: auto; font-weight: 500;
        }

        /* ===== Offer-block: «Вы предложили» новый дизайн =====
           Без серого фона внутри карточки. Информация льётся секциями
           с тонким разделителем. Цена справа выделяется крупно. */
        .offer-block {
            margin-bottom: 14px;
        }
        .offer-block .offer-rows {
            display: flex; flex-direction: column; gap: 8px;
            padding-bottom: 13px;
            border-bottom: 1px solid #e8ecf2;
        }
        .offer-block .offer-row {
            display: flex; align-items: center; gap: 9px;
            font-size: 13px; color: #334155; line-height: 1.4;
        }
        .offer-block .offer-row .ico {
            flex-shrink: 0; width: 18px; height: 18px;
            display: inline-flex; align-items: center; justify-content: center;
            color: #94a3b8;
        }
        .offer-block .offer-row .ico svg { width: 15px; height: 15px; display: block; }
        .offer-block .offer-row .txt { flex: 1; min-width: 0; }
        .offer-block .offer-row strong { color: #0f1b3d; font-weight: 700; }
        .offer-block .offer-row.auto-row { color: #5b6280; }
        .offer-block .offer-row.auto-row .ico { color: #0271ee; }
        .offer-block .offer-row .dates-tag {
            display: inline-block; margin-left: 6px;
            font-size: 10.5px; font-weight: 600; color: #ea5a0c;
            background: #fff4e8; padding: 1px 7px; border-radius: 999px;
            vertical-align: 1px;
        }

        .offer-block .offer-pricing {
            display: flex; align-items: flex-end; justify-content: space-between;
            gap: 16px; padding: 13px 0 0;
        }
        .offer-block .pricing-left { min-width: 0; }
        .offer-block .pl-amount {
            font-size: 22px; font-weight: 800; color: #0f1b3d;
            letter-spacing: -0.6px; line-height: 1;
        }
        .offer-block .pl-amount .cur {
            font-size: 18px; font-weight: 700; color: #0f1b3d;
        }
        .offer-block .pl-amount .unit {
            font-size: 12px; font-weight: 500; color: #94a3b8;
            margin-left: 4px; letter-spacing: 0;
        }
        .offer-block .pl-sub {
            font-size: 11.5px; color: #5b6280; margin-top: 5px;
        }
        .offer-block .counter-tag {
            display: inline-block;
            margin-left: 8px;
            vertical-align: 6px;
            font-size: 10px; font-weight: 700; color: #fa742d;
            background: #fff4e8; padding: 2px 8px; border-radius: 999px;
            letter-spacing: 0.3px; text-transform: uppercase;
        }
        .offer-block .pricing-right {
            text-align: right; flex-shrink: 0;
        }
        .offer-block .pr-label {
            font-size: 10.5px; font-weight: 600; color: #94a3b8;
            text-transform: uppercase; letter-spacing: 0.4px;
        }
        .offer-block .pr-amount {
            font-size: 16px; font-weight: 800; color: #02a85a;
            margin-top: 3px; letter-spacing: -0.3px;
        }
        .offer-block .pr-sub {
            font-size: 10.5px; color: #9ca3af; margin-top: 2px;
        }

        .offer-block .offer-comment {
            display: flex; align-items: flex-start; gap: 8px;
            margin-top: 12px; padding-top: 12px;
            border-top: 1px dashed #d8dde6;
            font-size: 12.5px; color: #5b6280; line-height: 1.5;
            font-style: italic;
        }
        .offer-block .offer-comment .qico {
            flex-shrink: 0; color: #c8d1de;
            margin-top: 1px;
        }
        .offer-block .offer-comment .qico svg { width: 16px; height: 16px; display: block; }

        /* Сводка — главная цифра + мета (legacy, для других state) */
        .req-summary {
            background: #f6f8fb;
            border-radius: 12px;
            padding: 13px 14px; margin-bottom: 14px;
        }
        .req-summary .price-main {
            font-size: 18px; font-weight: 800; color: #0f172a;
            letter-spacing: -0.4px;
        }
        .req-summary .price-main .unit {
            font-size: 11.5px; font-weight: 500; color: #94a3b8; margin-left: 2px;
        }
        .req-summary .price-meta {
            font-size: 12px; color: #64748b; margin-top: 5px; line-height: 1.6;
        }
        .req-summary .price-meta strong { color: #0f172a; font-weight: 600; }
        .req-summary .price-meta .net { color: #02a85a; font-weight: 700; }
        .req-summary .price-meta .paid { color: #02a85a; font-weight: 600; }
        .req-summary .price-comment {
            margin-top: 10px; padding-top: 10px;
            border-top: 1px solid #e6e9ee;
            font-size: 12.5px; color: #64748b; font-style: italic;
            line-height: 1.5;
        }
        /* Детали предложения: объект / тип номера / даты — над ценовым блоком */
        .req-summary .offer-details {
            display: flex; flex-direction: column; gap: 4px;
            margin-bottom: 10px; padding-bottom: 10px;
            border-bottom: 1px dashed #d8dde6;
        }
        .req-summary .offer-line {
            display: flex; align-items: center; gap: 8px;
            font-size: 12.5px; color: #334155; line-height: 1.5;
        }
        .req-summary .offer-line .ico {
            flex-shrink: 0;
            width: 16px; height: 16px;
            display: inline-flex; align-items: center; justify-content: center;
            color: #6b7280;
        }
        .req-summary .offer-line .ico svg {
            width: 14px; height: 14px;
            display: block;
        }
        .req-summary .offer-line.auto-line { color: #5b6280; }
        .req-summary .offer-line.auto-line .ico { color: #0271ee; }
        .req-summary .offer-line .txt { flex: 1; min-width: 0; }
        .req-summary .offer-line strong { color: #0f172a; font-weight: 700; }
        .req-summary .offer-line .dates-tag {
            display: inline-block;
            margin-left: 4px;
            font-size: 10.5px; font-weight: 600; color: #ea5a0c;
            background: #fff4e8; padding: 1px 7px; border-radius: 999px;
            vertical-align: 1px;
        }
        .req-summary .offer-money {
            padding-top: 2px;
        }

        /* Сравнение цен (Гость просит скидку) */
        .req-discount {
            display: grid; grid-template-columns: 1fr auto 1fr;
            align-items: center; gap: 12px;
            background: #f6f8fb;
            border-radius: 12px;
            padding: 14px; margin-bottom: 14px;
        }
        .req-discount .side { text-align: center; }
        .req-discount .side .lbl {
            font-size: 10px; color: #94a3b8; font-weight: 600;
            text-transform: uppercase; letter-spacing: 0.6px;
        }
        .req-discount .side .amount {
            font-size: 20px; font-weight: 800; margin-top: 5px;
            letter-spacing: -0.5px; color: #0f172a;
        }
        .req-discount .side .amount .unit {
            font-size: 10px; font-weight: 500; color: #94a3b8; margin-left: 2px;
        }
        .req-discount .side.want .amount { color: #fa742d; }
        .req-discount .side .delta {
            display: inline-block; margin-top: 4px;
            font-size: 10.5px; font-weight: 700; letter-spacing: -0.1px;
            padding: 2px 7px; border-radius: 999px;
            background: #fff5ed; color: #ea5a0c;
        }
        .req-discount .arrow {
            width: 32px; height: 32px; border-radius: 50%;
            background: white; box-shadow: 0 1px 3px rgba(15,23,42,0.06);
            display: flex; align-items: center; justify-content: center;
        }
        .req-discount .arrow svg { width: 14px; height: 14px; stroke: #94a3b8; }

        /* Действия */
        .req-actions {
            display: flex; gap: 8px; align-items: center;
        }
        .req-btn {
            padding: 10px 18px; border-radius: 11px;
            font-weight: 600; font-size: 13px; border: none;
            cursor: pointer; transition: all 0.18s ease;
            white-space: nowrap;
            letter-spacing: -0.1px;
        }
        .req-btn.ghost {
            background: transparent; color: #94a3b8;
            padding: 10px 10px; margin-right: auto;
        }
        .req-btn.ghost:hover { color: #c83a3a; }
        .req-btn.secondary {
            background: white; color: #0271ee;
            border: 1px solid #d6e4f9;
        }
        .req-btn.secondary:hover {
            background: #f5faff; border-color: #0271ee;
        }
        .req-btn.primary {
            background: #0271ee; color: white;
            box-shadow: 0 1px 2px rgba(2, 113, 238, 0.18);
        }
        .req-btn.primary:hover {
            background: #0263cf;
            box-shadow: 0 4px 12px -2px rgba(2, 113, 238, 0.35);
        }

        /* === Sent proposals === */
        .sent-item {
            display: flex; align-items: center; gap: 10px; padding: 10px 12px;
            background: #f8fafc; border-radius: 11px; margin-bottom: 6px;
        }
        .sent-item .dot {
            width: 8px; height: 8px; border-radius: 50%; background: #0271ee;
            flex-shrink: 0;
        }
        .sent-item .text { flex: 1; min-width: 0; }
        .sent-item .title { font-size: 12px; font-weight: 600; }
        .sent-item .sub { font-size: 11px; color: #9ca3af; margin-top: 1px; }
        .sent-item .time {
            font-size: 10px; color: #9ca3af; background: white;
            padding: 3px 7px; border-radius: 999px;
        }

        /* === Today rows === */
        .today-row {
            display: flex; align-items: center; gap: 12px; padding: 10px 0;
        }
        .today-row + .today-row { border-top: 1px solid #f3f4f6; }
        .today-dot {
            width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
        }
        .today-dot.in { background: #02a85a; }
        .today-dot.out { background: #fa742d; }
        .today-dot.free { background: #9ca3af; }
        .today-text { flex: 1; font-size: 13px; }
        .today-text strong { font-weight: 600; }
        .today-time { font-size: 11px; color: #9ca3af; font-weight: 500; }
        .today-section-label {
            font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
            color: #9ca3af; text-transform: uppercase; margin: 14px 0 4px;
        }

        /* === Accept-requests master card (над авто-предложением) === */
        .accept-card {
            background: white; border-radius: 14px;
            padding: 14px 16px; margin-bottom: 12px;
            border: 1px solid #f0f2f5;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
        }
        .accept-card .accept-row {
            display: flex; align-items: center; gap: 10px;
        }
        .accept-card .accept-row + .accept-divider {
            margin: 12px -16px; border-bottom: 1px solid #f0f2f5;
        }
        .accept-card .accept-title {
            font-size: 14px; font-weight: 700; color: #0f172a;
            letter-spacing: -0.2px;
        }
        .accept-card .accept-sub {
            font-size: 11.5px; color: #94a3b8; margin-top: 2px;
        }
        .accept-card .accept-info { flex: 1; min-width: 0; }
        .accept-card.off .accept-min { opacity: 0.45; pointer-events: none; }
        .accept-min-label {
            font-size: 11.5px; color: #64748b; font-weight: 600;
            margin-bottom: 6px; display: block;
        }
        .accept-min-input {
            display: flex; align-items: center; gap: 6px;
            background: #f6f8fb; border-radius: 10px;
            padding: 9px 12px;
            border: 1px solid transparent; transition: border 0.15s, background 0.15s;
        }
        .accept-min-input:focus-within { border-color: #0271ee; background: white; }
        .accept-min-input .currency { font-size: 13px; font-weight: 700; color: #64748b; }
        .accept-min-input input {
            flex: 1; min-width: 0; border: none; background: transparent;
            outline: none; font-size: 15px; font-weight: 700; color: #0f172a;
            letter-spacing: -0.3px;
        }
        .accept-min-input .unit { font-size: 11px; color: #94a3b8; }
        .accept-card .accept-hint {
            font-size: 11px; color: #94a3b8; margin-top: 6px;
            line-height: 1.45;
        }

        /* === Auto-proposal === */
        .auto-card {
            background: linear-gradient(135deg, #f0f7ff 0%, #e3eefe 100%);
            border: 1px solid rgba(2,113,238,0.15);
            border-radius: 14px; padding: 14px;
            margin-bottom: 16px;
        }
        .auto-card .row { display: flex; align-items: center; gap: 10px; }
        .auto-card .title { font-size: 13px; font-weight: 700; }
        .auto-card .sub { font-size: 11px; color: #5b6280; margin-top: 1px; }
        .switch {
            width: 42px; height: 24px; background: #cbd5e1; border-radius: 999px;
            position: relative; transition: background 0.2s; flex-shrink: 0;
            border: none;
        }
        .switch.on { background: #02a85a; }
        .switch::after {
            content: ''; position: absolute; top: 3px; left: 3px;
            width: 18px; height: 18px; background: white; border-radius: 50%;
            transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
        .switch.on::after { transform: translateX(18px); }
        .proposal-list {
            display: flex; flex-direction: column; gap: 6px;
            margin-bottom: 8px;
        }
        .proposal-item {
            background: white; border: 1px solid #c2dafe;
            border-radius: 10px; padding: 10px 12px;
            display: flex; gap: 8px; align-items: center;
            cursor: pointer; transition: all 0.15s;
        }
        .proposal-item:hover { border-color: #0271ee; }
        .proposal-item .info { flex: 1; min-width: 0; }
        .proposal-item .dates {
            font-size: 12px; font-weight: 700; color: #1d1d21;
        }
        .proposal-item .params {
            font-size: 11px; color: #5b6280; margin-top: 1px;
            display: flex; flex-wrap: wrap; gap: 0 6px;
            line-height: 1.4;
        }
        /* Чанк «от 3 ночей» не разрезается — либо в строке с типом, либо
           целиком на новой строке (раньше «ночей» отрывалось — некрасиво). */
        .proposal-item .nights-chip { white-space: nowrap; }
        .proposal-item .rt-name { white-space: nowrap; }
        /* Название объекта мелким серым — отличить правила когда у разных
           отелей room_type с одинаковым именем (напр. «Президентский люкс»). */
        .proposal-item .hotel-name {
            font-size: 10px; color: #94a3b8; margin-top: 2px;
            text-transform: none; letter-spacing: 0; font-weight: 600;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .proposal-item .price {
            font-size: 12px; font-weight: 700; color: #0271ee;
            white-space: nowrap;
        }
        .proposal-item .del {
            width: 24px; height: 24px; border-radius: 50%;
            border: none; background: transparent;
            display: flex; align-items: center; justify-content: center;
            color: #c83a3a; transition: background 0.15s;
        }
        .proposal-item .del:hover { background: #fdecec; }
        .proposal-item .del svg { width: 13px; height: 13px; }
        .proposal-empty {
            font-size: 12px; color: #9ca3af; text-align: center;
            padding: 14px 8px; font-style: italic;
        }
        .add-rule-btn {
            width: 100%; padding: 10px;
            background: white; color: #0271ee;
            border: 1px dashed #0271ee; border-radius: 10px;
            font-size: 12px; font-weight: 600;
            display: flex; align-items: center; justify-content: center; gap: 6px;
            transition: all 0.15s;
        }
        .add-rule-btn:hover { background: #f0f7ff; }
        .add-rule-btn svg { stroke: #0271ee; }

        /* 2026-06-05 PER-RT TOGGLE: новая разметка auto-card */
        .auto-rt-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
        .auto-rt-section { display: flex; flex-direction: column; gap: 6px; }
        .auto-rt-hotel {
            font-size: 10px; font-weight: 700; color: #94a3b8;
            text-transform: uppercase; letter-spacing: 0.5px;
            padding: 4px 2px 2px;
        }
        .auto-rt-row {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 12px;
            background: #ffffff;
            border: 1px solid rgba(2,113,238,0.10);
            border-radius: 10px;
        }
        .auto-rt-info { flex: 1; min-width: 0; }
        .auto-rt-name {
            font-size: 13px; font-weight: 600; color: #1d1d21;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .auto-rt-meta { font-size: 11px; color: #5b6280; margin-top: 2px; }
        .auto-rt-hint {
            display: inline-block; margin-top: 4px;
            font-size: 10px; color: #94a3b8;
            letter-spacing: 0.2px;
        }
        .auto-rt-hint.warn { color: #c83a3a; font-weight: 600; }
        .switch.off { background: #cbd5e1; }
        .switch.off::after { transform: translateX(0); }
        .auto-disable-all {
            width: 100%; padding: 10px 14px;
            background: transparent; color: #c83a3a;
            border: 1px solid rgba(200, 58, 58, 0.25); border-radius: 10px;
            font-size: 13px; font-weight: 600; cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
        }
        .auto-disable-all:hover {
            background: #fef2f2; border-color: #c83a3a;
        }

        .auto-rules { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(2,113,238,0.15); }
        .auto-rule {
            display: flex; align-items: center; justify-content: space-between;
            padding: 5px 0; font-size: 12px;
        }
        .auto-rule .label { color: #5b6280; }
        .auto-rule .value { font-weight: 600; }

        /* === External CTA === */
        .external-cta {
            display: flex; align-items: center; gap: 12px;
            padding: 14px 16px; background: white;
            border: 1px solid #ebedf0; border-radius: 14px;
            transition: all 0.15s; margin-top: 16px;
            width: 100%; text-align: left;
        }
        .external-cta:hover { border-color: #0271ee; background: #fafbff; }
        .external-cta .ec-icon {
            width: 40px; height: 40px; border-radius: 11px;
            background: linear-gradient(135deg, #0271EE 0%, #3a8dff 100%);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .external-cta .ec-icon svg { stroke: white; width: 20px; height: 20px; }
        .external-cta .ec-text { flex: 1; }
        .external-cta .ec-title { font-size: 14px; font-weight: 700; }
        .external-cta .ec-sub { font-size: 11px; color: #5b6280; margin-top: 1px; }
        .external-cta .ec-chev { stroke: #9ca3af; width: 18px; height: 18px; }

        /* === Footer thin === */
        .page-footer {
            margin-top: 32px; padding: 16px 0;
            display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
            font-size: 12px; color: #9ca3af;
        }
        .page-footer a, .page-footer button {
            color: #5b6280; background: none; border: none;
            text-decoration: none;
        }
        .page-footer a:hover, .page-footer button:hover {
            color: #0271ee; text-decoration: underline;
        }

        /* ============ Sheets / modals ============ */
        .sheet-backdrop {
            position: fixed; inset: 0; background: rgba(0,0,0,0.45);
            backdrop-filter: blur(2px); z-index: 100;
            opacity: 0; pointer-events: none; transition: opacity 0.2s;
            display: flex; align-items: center; justify-content: center;
            padding: 16px;
        }
        .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
        .sheet {
            background: white; border-radius: 20px; width: 100%; max-width: 460px;
            max-height: 92vh; overflow-y: auto;
            transform: translateY(40px); transition: transform 0.2s;
            box-shadow: 0 20px 60px -15px rgba(0,0,0,0.3);
        }
        .sheet-backdrop.open .sheet { transform: translateY(0); }
        .sheet-head {
            padding: 18px 20px 12px; display: flex; align-items: flex-start;
            justify-content: space-between; gap: 12px;
            border-bottom: 1px solid #f3f4f6;
        }
        .sheet-head h3 {
            font-size: 18px; font-weight: 700; letter-spacing: -0.3px;
        }
        .sheet-head .sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
        .sheet-head .close-btn {
            width: 32px; height: 32px; border-radius: 50%;
            background: #f5f7fb; border: none; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
        }
        .sheet-head .close-btn svg { width: 14px; height: 14px; stroke: #5b6280; }
        .sheet-body { padding: 16px 20px 20px; }
        /* Sticky footer внизу sheet'а — для кнопки «Готово» и подобных
           подтверждающих действий. Прилипает к нижнему краю с белой подложкой
           и тенью сверху чтобы отделить от scroll-зоны. */
        .sheet-footer {
            padding: 12px 20px 16px;
            border-top: 1px solid #f0f2f5;
            background: white;
            position: sticky; bottom: 0;
        }

        .form-field { margin-bottom: 12px; }
        .form-field label {
            font-size: 12px; color: #5b6280; margin-bottom: 6px;
            display: block; font-weight: 600;
        }
        .form-field input, .form-field textarea, .form-field select {
            width: 100%; padding: 12px 14px; border: 1px solid #ebedf0;
            border-radius: 11px; font-size: 14px;
            background: white; outline: none;
        }
        .form-field input:focus, .form-field textarea:focus,
        .form-field select:focus { border-color: #0271ee; }

        .price-input-big {
            display: inline-flex; align-items: center; gap: 6px;
            background: white; border: 1px solid #ebedf0; border-radius: 10px;
            padding: 10px 14px; transition: border 0.15s;
            max-width: 220px; width: 100%;
        }
        .price-input-big:focus-within { border-color: #0271ee; }
        .price-input-big .currency { font-size: 14px; font-weight: 700; color: #5b6280; }
        .price-input-big input {
            flex: 1; min-width: 0; border: none; background: transparent; outline: none;
            font-size: 16px; font-weight: 600;
        }
        .price-input-big input::placeholder { color: #cbd5e1; font-weight: 500; }
        .price-input-big .unit { font-size: 11px; color: #9ca3af; }

        .calc-box {
            background: #f8fafc; border-radius: 11px;
            padding: 12px 14px; margin-top: 10px;
            border: 1px solid #ebedf0;
        }
        .calc-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 3px 0; font-size: 13px;
        }
        .calc-row .label { color: #5b6280; }
        .calc-row .value { font-weight: 600; color: #1d1d21; }
        .calc-row.neg .value { color: #9ca3af; }
        .calc-row.total {
            border-top: 1px solid #e3e7ed; padding-top: 8px; margin-top: 4px;
        }
        .calc-row.total .label { font-weight: 600; color: #1d1d21; font-size: 13px; }
        .calc-row.total .value {
            font-size: 16px; font-weight: 800; color: #0271ee; letter-spacing: -0.2px;
        }

        .full-btn {
            width: 100%; padding: 13px; background: #0271ee; color: white;
            border: none; border-radius: 11px; font-weight: 600;
            font-size: 14px; margin-top: 6px; transition: background 0.15s;
        }
        .full-btn:hover { background: #0261d4; }
        .full-btn.blue { background: #0271ee; }
        .full-btn.blue:hover { background: #0261d4; }
        .full-btn.outline {
            background: white; color: #5b6280; border: 1px solid #ebedf0;
        }
        .full-btn.outline:hover { background: #f5f7fb; }
        .full-btn.danger { background: #c83a3a; }
        .full-btn.danger:hover { background: #a82e2e; }
        .full-btn:disabled { opacity: 0.4; cursor: not-allowed; }

        /* === Action rows для range-actions sheet === */
        .action-row {
            display: flex; align-items: center; gap: 12px;
            width: 100%; padding: 14px 14px;
            background: #f8fafc; border: 1px solid #ebedf0;
            border-radius: 12px; margin-bottom: 8px;
            text-align: left; transition: background 0.15s, border-color 0.15s;
            cursor: pointer;
        }
        .action-row:hover { background: #eef3fb; border-color: #c2dafe; }
        .action-row .icon {
            width: 36px; height: 36px; border-radius: 10px;
            background: white; border: 1px solid #ebedf0;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; color: #0271ee;
        }
        .action-row .icon svg { width: 18px; height: 18px; }
        .action-row.danger .icon { color: #c83a3a; }
        .action-row.success .icon { color: #02a85a; }
        .action-row .label { flex: 1; min-width: 0; }
        .action-row .label b {
            display: block; font-size: 14px; font-weight: 700; color: #1d1d21;
        }
        .action-row .label small {
            display: block; font-size: 11px; color: #5b6280; margin-top: 2px;
        }
        .action-row .chev {
            width: 16px; height: 16px; color: #cbd5e1; flex-shrink: 0;
        }
        .action-row.has-switch { cursor: default; }
        .action-row.has-switch:hover { background: #f8fafc; border-color: #ebedf0; }
        /* Когда блок раскрыт — у строки убираем нижнее скругление,
           чтобы визуально срасталась с раскрытием. */
        .action-block.expanded > .action-row {
            border-bottom-left-radius: 0; border-bottom-right-radius: 0;
            background: #eef3fb; border-color: #c2dafe;
        }
        .action-block.expanded > .action-row.danger { background: #fdecec; border-color: #f5c4c4; }
        .action-block .action-row .chev { transition: transform 0.18s; }
        .action-block.expanded > .action-row .chev { transform: rotate(90deg); color: #5b6280; }

        /* Раскрытие под строкой — единый «лист» с продолжением скруглений */
        .action-expand {
            margin: -8px 0 8px;
            padding: 14px 14px 12px;
            background: white;
            border: 1px solid #c2dafe; border-top: none;
            border-radius: 0 0 12px 12px;
        }
        .action-block.expanded > .action-row.danger ~ .action-expand,
        .action-block:has(> .action-row.danger.range-close-row) .action-expand {
            border-color: #f5c4c4;
        }
        .action-expand[hidden] { display: none !important; }
        .action-expand .form-field:last-of-type { margin-bottom: 8px; }
        .expand-text {
            font-size: 13px; color: #3a3a3a; line-height: 1.45;
            margin-bottom: 12px;
        }
        .expand-actions {
            display: flex; gap: 8px; justify-content: flex-end;
        }
        .expand-btn {
            padding: 10px 16px; border-radius: 10px;
            font-size: 13px; font-weight: 600; border: none;
            cursor: pointer; transition: background 0.15s;
        }
        .expand-btn.ghost {
            background: transparent; color: #5b6280;
            border: 1px solid #ebedf0;
        }
        .expand-btn.ghost:hover { background: #f5f7fb; }
        .expand-btn.primary { background: #0271ee; color: white; }
        .expand-btn.primary:hover { background: #0261d4; }
        .expand-btn.danger { background: #c83a3a; color: white; }
        .expand-btn.danger:hover { background: #a82e2e; }

        /* Под-строка (например «Изменить настройки») — чуть мягче */
        .action-row.sub-row {
            margin-left: 12px; background: white; border-color: #c2dafe;
        }
        .action-row.sub-row .icon { background: #eef3fb; border-color: #c2dafe; }

        /* Pinned-link под auto-row: единый card, нижняя «полка» с мягкой заливкой */
        .auto-edit-link {
            display: flex; align-items: center; gap: 8px;
            width: 100%;
            margin: 0 0 8px;
            padding: 10px 14px 10px 56px;
            background: #f3f6fb;
            border: 1px solid #e6ebf2; border-top: none;
            border-radius: 0 0 12px 12px;
            font-size: 12.5px; font-weight: 600; color: #0271ee;
            cursor: pointer; transition: background 0.15s;
            text-align: left;
        }
        .auto-edit-link:hover { background: #e9f0fa; }
        .auto-edit-link[hidden] { display: none; }
        .auto-edit-link .pencil { width: 13px; height: 13px; color: #0271ee; flex-shrink: 0; }
        .auto-edit-link .label-text { flex: 1; }
        .auto-edit-link .chev { width: 14px; height: 14px; color: #b6bcc7; flex-shrink: 0; }
        /* Когда есть pinned-link — auto-row сквариваем снизу и убираем gap, чтобы стало одной карточкой */
        .action-block:has(> .auto-edit-link:not([hidden])) > .action-row {
            border-bottom-left-radius: 0; border-bottom-right-radius: 0;
            border-bottom: 1px solid #e6ebf2;
            margin-bottom: 0;
        }

        .date-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
        }
        .nights-locked {
            display: flex; align-items: center; gap: 8px;
            padding: 10px 12px; background: #fff7f0;
            border-radius: 10px; font-size: 12px;
            color: #fa742d; margin-bottom: 12px;
        }
        .nights-locked svg { width: 14px; height: 14px; stroke: #fa742d; }

        .comment-templates {
            display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
        }
        .tpl-chip {
            font-size: 11px; padding: 6px 10px; background: #f5f7fb;
            border: 1px solid #ebedf0; border-radius: 999px;
            color: #5b6280; transition: all 0.15s;
        }
        .tpl-chip:hover { border-color: #0271ee; color: #0271ee; }
        .tpl-chip.active { background: #0271ee; color: white; border-color: #0271ee; }

        /* === Day-of-week filter === */
        .dow-filter {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
            background: #f5f7fb; border-radius: 11px; padding: 4px;
        }
        .dow-btn {
            padding: 8px 10px; font-size: 12px; font-weight: 600;
            background: transparent; border: none; border-radius: 8px;
            color: #5b6280; transition: all 0.15s;
        }
        .dow-btn:hover { color: #1d1d21; }
        .dow-btn.active {
            background: white; color: #0271ee;
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        }

        /* === Range chips (saved auto-proposal periods) === */
        .range-chips {
            display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
            min-height: 4px;
        }
        .range-chip {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 5px 4px 5px 12px;
            background: #e8f7ee; color: #02a85a;
            border-radius: 999px; font-size: 12px; font-weight: 600;
        }
        .range-chip .x {
            width: 24px; height: 24px; border-radius: 50%;
            background: transparent; border: none;
            display: flex; align-items: center; justify-content: center;
            color: #c83a3a; transition: background 0.15s;
        }
        .range-chip .x:hover { background: #fdecec; }
        .range-chip .x svg { width: 13px; height: 13px; }
        .range-chips-empty {
            font-size: 11px; color: #9ca3af; font-style: italic;
        }

        .add-range-btn {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 10px 14px; font-size: 13px; font-weight: 600;
            background: white; color: #0271ee;
            border: 1px dashed #0271ee; border-radius: 10px;
            transition: all 0.15s;
        }
        .add-range-btn:hover { background: #f0f7ff; }
        .add-range-btn svg { stroke: #0271ee; }

        /* === Date picker modal — двухмесячный календарь как на rai-da.ru === */
        .pick-sheet {
            max-width: 720px; padding: 24px;
            position: relative;
        }
        .pick-sheet .pick-close {
            position: absolute; top: 14px; right: 14px;
            width: 32px; height: 32px; border-radius: 50%;
            background: #f5f7fb; border: none;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: background 0.15s; z-index: 2;
        }
        .pick-sheet .pick-close:hover { background: #ebedf0; }
        .pick-sheet .pick-close svg { width: 14px; height: 14px; stroke: #5b6280; }
        .pick-toolbar {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 24px;
            padding-right: 44px; /* освобождаем место под крестик закрытия */
        }
        .pick-toolbar h3 {
            font-size: 16px; font-weight: 700; color: #1d1d21;
        }
        .pick-nav {
            width: 34px; height: 34px; border-radius: 50%;
            background: white; border: 1px solid #ebedf0;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
        }
        .pick-nav:hover { background: #f5f7fb; border-color: #d4d7dc; }
        .pick-nav svg { width: 16px; height: 16px; stroke: #5b6280; }

        .pick-months {
            display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
        }
        .pick-month-title {
            font-size: 14px; font-weight: 600; color: #1d1d21;
            text-align: center; margin-bottom: 14px;
        }
        .pick-weekdays {
            display: grid; grid-template-columns: repeat(7, 1fr);
            margin-bottom: 8px;
        }
        .pick-weekdays div {
            text-align: center; font-size: 11px;
            color: #9ca3af; font-weight: 500;
            padding: 4px 0; letter-spacing: 0.5px;
        }
        .pick-weekdays div.we { color: #fa742d; }
        .pick-days-grid {
            display: grid; grid-template-columns: repeat(7, 1fr);
            row-gap: 4px;
        }
        .pick-day {
            aspect-ratio: 1; min-height: 36px; max-width: 44px; margin: 0 auto;
            width: 100%;
            position: relative;
            display: flex; align-items: center; justify-content: center;
            font-size: 13px; font-weight: 500; cursor: pointer;
            background: transparent; border: none; color: #1d1d21;
            transition: background 0.15s, color 0.15s, transform 0.1s;
        }
        .pick-day:hover:not(.past):not(.empty) {
            background: #f0f3f8;
        }
        .pick-day.we { color: #fa742d; }
        .pick-day.past, .pick-day:disabled {
            color: #d1d5db; cursor: not-allowed;
            pointer-events: none;
            background: transparent;
        }
        .pick-day.past:hover, .pick-day:disabled:hover { background: transparent; }
        .pick-day.empty { visibility: hidden; cursor: default; }
        .pick-day.today {
            box-shadow: inset 0 0 0 1.5px #0271ee;
            border-radius: 50%;
        }
        /* Selection: edges are filled blue circles, middle is light blue strip */
        .pick-day.edge {
            background: #0271ee; color: white; font-weight: 700;
            border-radius: 50%;
            box-shadow: 0 4px 12px -2px rgba(2,113,238,0.35);
        }
        .pick-day.mid {
            background: #e3eefe; color: #0271ee; border-radius: 0;
        }
        .pick-day.edge.left-edge { border-radius: 50%; }
        .pick-day.edge.right-edge { border-radius: 50%; }
        /* Если только одна выбрана (старт) — кружок */
        .pick-day.edge.only { border-radius: 50%; }
        /* Saved auto-period — лёгкая зелёная подсветка */
        .pick-day.saved {
            background: #e8f7ee;
            color: #02a85a; font-weight: 600;
        }
        .pick-day.saved.weekend { color: #02a85a; }

        .pick-footer {
            display: flex; align-items: center; justify-content: space-between;
            margin-top: 24px; padding: 14px 0 6px;
            border-top: 1px solid #ebedf0;
            position: sticky; bottom: 0; z-index: 5;
            background: white;
            margin-left: -8px; margin-right: -8px; padding-left: 8px; padding-right: 8px;
        }
        #pick-hint-text {
            font-size: 13px; color: #5b6280;
        }
        .pick-footer-actions { display: flex; gap: 8px; }
        .pick-reset {
            padding: 9px 18px; background: transparent; border: none;
            color: #5b6280; font-weight: 600; font-size: 13px;
            border-radius: 9px; transition: background 0.15s;
        }
        .pick-reset:hover { background: #f5f7fb; }
        .pick-apply {
            padding: 9px 22px; background: #0271ee; color: white;
            border: none; border-radius: 9px; font-weight: 600; font-size: 13px;
            transition: background 0.15s;
        }
        .pick-apply:hover:not(:disabled) { background: #0261d4; }
        .pick-apply:disabled { opacity: 0.4; cursor: not-allowed; }

        @media (max-width: 680px) {
            .pick-sheet { padding: 18px; }
            .pick-months { grid-template-columns: 1fr; gap: 20px; }
            .pick-footer { flex-direction: column; gap: 12px; align-items: stretch; }
            .pick-footer-actions { justify-content: space-between; }
            .pick-apply { flex: 1; }
        }
        .auto-cal-toolbar {
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: 8px; font-size: 13px;
        }
        .auto-cal-toolbar #auto-cal-month {
            font-weight: 700; color: #1d1d21;
        }
        .auto-cal-toolbar .hint { font-size: 10px; color: #9ca3af; }
        .mc-weekdays {
            display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
            margin-bottom: 4px;
        }
        .mc-weekdays div {
            text-align: center; font-size: 10px; font-weight: 600;
            color: #9ca3af; padding: 3px 0; text-transform: uppercase;
        }
        .mc-days {
            display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
        }
        .mc-day {
            aspect-ratio: 1; display: flex; align-items: center;
            justify-content: center; font-size: 12px; font-weight: 600;
            border-radius: 7px; color: #1d1d21;
            background: white; border: 1px solid #ebedf0;
            cursor: pointer; transition: all 0.1s;
        }
        .mc-day:hover { border-color: #0271ee; }
        .mc-day.muted {
            color: #cdd1d8; background: transparent; border: none; cursor: default;
        }
        .mc-day.muted:hover { border: none; }
        .mc-day.saved {
            background: #e8f7ee; border-color: #c5e7d1; color: #02a85a;
        }
        .mc-day.weekend-skipped, .mc-day.weekday-skipped {
            background: repeating-linear-gradient(45deg, #f5f7fb, #f5f7fb 3px, transparent 3px, transparent 6px);
            color: #cbd5e1;
        }
        .mc-day.picking-edge {
            background: #0271ee; color: white; border-color: #0271ee;
        }
        .mc-day.picking-mid {
            background: #c2dafe; color: #0271ee; border-color: #c2dafe;
        }

        /* === Notification dropdown === */
        .notif-dropdown {
            position: fixed; top: 60px; right: 20px;
            background: white; border-radius: 14px; width: 340px;
            box-shadow: 0 20px 60px -15px rgba(0,0,0,0.25);
            border: 1px solid #ebedf0;
            opacity: 0; pointer-events: none; transform: translateY(-8px);
            transition: all 0.15s; z-index: 60;
            max-height: 440px; overflow-y: auto;
        }
        .notif-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
        .notif-head {
            padding: 14px 16px; border-bottom: 1px solid #f3f4f6;
            display: flex; align-items: center; justify-content: space-between;
        }
        .notif-head h4 { font-size: 14px; font-weight: 700; }
        .notif-item {
            padding: 12px 16px; display: flex; gap: 10px;
            border-bottom: 1px solid #f5f7fb; cursor: pointer;
        }
        .notif-item:hover { background: #f8fafc; }
        .notif-item.unread { background: rgba(2,113,238,0.04); }
        .notif-item-icon {
            width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
            background: #f5f7fb;
            display: flex; align-items: center; justify-content: center;
        }
        .notif-item-icon svg { width: 16px; height: 16px; stroke: #0271ee; }
        .notif-item-text { flex: 1; min-width: 0; }
        .notif-item-title { font-size: 13px; font-weight: 600; }
        .notif-item-body { font-size: 11px; color: #5b6280; margin-top: 2px; }
        .notif-item-time { font-size: 10px; color: #9ca3af; margin-top: 4px; }

        /* 2026-05-26: stale-уведомления — заявка уже отменена/истекла.
           Серый цвет + микро-пометка чтобы хозяин видел почему ничего не
           находится в инбоксе при клике. */
        .notif-item.stale .notif-item-title,
        .notif-item.stale .notif-item-body { color: #9ca3af; }
        .notif-item.stale .notif-item-icon { background: #f5f5f7; }
        .notif-item.stale .notif-item-icon svg { stroke: #cdd1d8; }
        .notif-item-stale {
            font-size: 10.5px; color: #c2410c;
            margin-top: 4px; font-weight: 600;
            display: inline-flex; align-items: center; gap: 3px;
        }
        .notif-item-stale::before {
            content: '○'; font-size: 11px;
        }

        /* Пульс-подсветка карточки заявки при переходе из уведомления */
        @keyframes inbox-focus-pulse {
            0%   { box-shadow: 0 0 0 0 rgba(2,113,238, 0.5); transform: scale(1); }
            30%  { box-shadow: 0 0 0 6px rgba(2,113,238, 0.18); transform: scale(1.01); }
            100% { box-shadow: 0 0 0 0 rgba(2,113,238, 0); transform: scale(1); }
        }
        .inbox-card--focus-pulse {
            animation: inbox-focus-pulse 2s ease-out 1;
            position: relative; z-index: 2;
        }

        /* === Toast === */
        .toast {
            position: fixed; bottom: 24px; left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: #1d1d21; color: white; padding: 12px 20px;
            border-radius: 999px; font-size: 13px; font-weight: 500;
            opacity: 0; pointer-events: none; transition: all 0.25s;
            z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

        /* === Mobile responsive === */
        @media (max-width: 800px) {
            .topbar { padding: 12px 14px; }
            .brand-text { display: none; }
            /* На мобиле имя оставляем (компактно), pill как был — единый стиль с десктопом */
            .profile-pill { padding: 4px 12px 4px 4px; }
            .profile-pill .ava { width: 32px; height: 32px; min-width: 32px; font-size: 13px; }
            .profile-pill span:not(.ava) { font-size: 12px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .page { padding: 16px 14px 60px; }
            .greeting h1 { font-size: 22px; }
            .stats-grid { grid-template-columns: 1fr 1fr; }
            .row-2col { grid-template-columns: 1fr; }
            .cal-day { height: 50px; }
            .cal-day .price { font-size: 8px; }
            .sheet-backdrop { align-items: flex-end; padding: 0; }
            .sheet {
                border-radius: 20px 20px 0 0; max-width: 100%;
                transform: translateY(100%);
            }
            .sheet-backdrop.open .sheet { transform: translateY(0); }
            .notif-dropdown { left: 10px; right: 10px; width: auto; top: 65px; }
            .req-actions { flex-wrap: wrap; }
            .req-actions .accept, .req-actions .counter { flex: 1; min-width: 140px; justify-content: center; }

            /* Setup-баннер «Настройте авто-предложение» виден только на мобиле */
            .setup-banner { display: flex; }

            /* Discount: на мобиле столбиком, с label слева и суммой справа */
            .req-discount {
                grid-template-columns: 1fr;
                gap: 10px;
                padding: 14px;
            }
            .req-discount .side {
                display: grid;
                grid-template-columns: 1fr auto;
                align-items: center;
                text-align: left;
                column-gap: 12px; row-gap: 4px;
            }
            .req-discount .side .lbl {
                text-transform: none; letter-spacing: 0;
                font-size: 12px; color: #64748b; font-weight: 600;
                grid-column: 1; grid-row: 1;
            }
            .req-discount .side .amount {
                margin-top: 0;
                grid-column: 2; grid-row: 1;
                text-align: right;
            }
            .req-discount .side .delta {
                margin-top: 0;
                grid-column: 1 / -1; grid-row: 2;
                justify-self: end;
            }
            .req-discount .arrow {
                transform: rotate(90deg);
                width: 28px; height: 28px;
                margin: 0 auto;
            }
        }
        @media (max-width: 480px) {
            .stats-grid { grid-template-columns: 1fr; }
            .cal-toolbar { gap: 6px; }
            .cal-month-nav h3 { font-size: 13px; min-width: 100px; }
        }

/* Accept-sheet: блок «От какого объекта/номера уходит предложение» */
.accept-context {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #f0f6ff 0%, #fafbfd 100%);
  border: 1px solid #d8e4f6;
  border-radius: 12px;
  padding: 10px 12px;
}
.accept-context .ctx-info { flex: 1; min-width: 0; }
.accept-context .ctx-hotel {
  font-size: 13.5px; font-weight: 700; color: #0f1b3d;
  letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.accept-context .ctx-room {
  font-size: 12px; color: #5b6280; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.accept-context .ctx-change {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 999px;
  background: white; border: 1px solid #c8d7ee;
  font-size: 12px; font-weight: 600; color: #0271ee;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.accept-context .ctx-change:hover { background: #f0f6ff; border-color: #0271ee; }
.accept-context .ctx-change svg { width: 12px; height: 12px; }
.accept-context .ctx-change[disabled] {
  opacity: 0.5; cursor: not-allowed;
  position: relative;
}
/* Кастомный тултип на hover для disabled-кнопки «Сменить».
   Disabled <button> в некоторых браузерах не отдаёт title/hover-события,
   поэтому делаем обёрткой через data-tooltip + ::after. */
.accept-context .ctx-change[disabled][data-tooltip]:hover::after,
.accept-context .ctx-change[disabled][data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px); right: 0;
  background: #0F1B3D; color: white;
  padding: 8px 12px; border-radius: 8px;
  font-size: 11.5px; font-weight: 500;
  white-space: normal; width: max-content; max-width: 240px;
  box-shadow: 0 6px 20px -4px rgba(15,27,61,0.32);
  opacity: 1; cursor: default;
  z-index: 100;
  line-height: 1.4;
  pointer-events: none;
  text-align: left;
  letter-spacing: 0;
}
.accept-context .ctx-change[disabled][data-tooltip]:hover::before,
.accept-context .ctx-change[disabled][data-tooltip]:focus::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px); right: 14px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #0F1B3D;
  z-index: 100;
  pointer-events: none;
}
.accept-context.needs-pick {
  border-color: #f5b7b7;
  background: linear-gradient(90deg, #fff4f4 0%, #fafbfd 100%);
}
.accept-context.needs-pick .ctx-change {
  background: #0271ee; color: white; border-color: #0271ee;
}
.accept-context.needs-pick .ctx-change:not([disabled]):hover {
  background: #0263cf;
}

/* ===== Shake-error: красный шейк инпута при невалидной цене =====
   Применяется добавлением .shake-error на input (snippet снимается через
   ~600ms — добавляем класс заново через re-flow для повторного триггера). */
@keyframes raida-shake-error {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}
.shake-error {
  animation: raida-shake-error 0.55s cubic-bezier(.36,.07,.19,.97) both;
  border-color: #ef4444 !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

/* ===== Кастомная confirm-модалка (raida-confirm) — замена window.confirm() =====
   Открывается из JS через raidaConfirm({title, body, okLabel, okVariant}).
   Возвращает Promise<boolean>. */
.raida-confirm-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 27, 61, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: raida-fade-in 0.18s ease-out;
}
.raida-confirm-backdrop[hidden] { display: none; }
@keyframes raida-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.raida-confirm-card {
  background: white; border-radius: 18px;
  padding: 24px 24px 20px;
  max-width: 420px; width: 100%;
  box-shadow: 0 24px 60px -16px rgba(15, 27, 61, 0.35);
  animation: raida-pop-in 0.22s cubic-bezier(.16,.84,.44,1) both;
  text-align: left;
}
@keyframes raida-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.raida-confirm-card .rc-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff4e8; color: #fa742d;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.raida-confirm-card .rc-icon svg { width: 22px; height: 22px; }
.raida-confirm-card.danger .rc-icon { background: #fee5e5; color: #e23a3a; }
.raida-confirm-card.info .rc-icon { background: #e6f2ff; color: #0271ee; }
.raida-confirm-card .rc-title {
  font-size: 17px; font-weight: 700; color: #0F1B3D;
  margin: 0 0 8px; letter-spacing: -0.3px;
  line-height: 1.3;
}
.raida-confirm-card .rc-body {
  font-size: 13.5px; color: #5b6280; line-height: 1.5;
  margin: 0 0 20px;
}
.raida-confirm-card .rc-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}
.raida-confirm-card .rc-btn {
  padding: 10px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.raida-confirm-card .rc-btn.secondary {
  background: transparent; color: #5b6280;
}
.raida-confirm-card .rc-btn.secondary:hover { background: #f5f7fb; }
.raida-confirm-card .rc-btn.primary {
  background: #0271ee; color: white;
}
.raida-confirm-card .rc-btn.primary:hover { background: #0263cf; }
.raida-confirm-card.danger .rc-btn.primary { background: #e23a3a; }
.raida-confirm-card.danger .rc-btn.primary:hover { background: #c83a3a; }

/* Nights stepper — кастомный +/- счётчик ночей, заменяет select.
   Range 1..30, шаг 1, ноль запрещён (минус дизейблится на 1). */
.nights-stepper {
  display: inline-flex; align-items: center; gap: 6px;
  background: white; border: 1.5px solid #e6e9ee;
  border-radius: 12px;
  padding: 6px;
  width: 100%; max-width: 220px;
  box-sizing: border-box;
}
.nights-stepper .ns-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 9px;
  border: none; background: #f5f7fb;
  color: #0F1B3D;
  font-size: 20px; font-weight: 600; line-height: 1;
  cursor: pointer; transition: background .15s, color .15s, opacity .15s;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.nights-stepper .ns-btn:hover { background: #e9eef6; }
.nights-stepper .ns-btn:active { background: #d8e0eb; }
.nights-stepper .ns-btn[disabled] {
  opacity: 0.35; cursor: not-allowed; background: #f5f7fb;
}
.nights-stepper .ns-value {
  flex: 1; min-width: 0;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.15;
}
.nights-stepper .ns-num {
  font-size: 18px; font-weight: 800; color: #0F1B3D;
  letter-spacing: -0.3px; tabular-nums: 1;
}
.nights-stepper .ns-label {
  font-size: 11px; color: #94a3b8; font-weight: 500;
  margin-top: 1px;
}

/* Компактный вариант для «accept-min» панели — на ~15% меньше базового
   степпера, чтобы не давить визуально на остальные элементы карточки. */
.accept-nights-stepper {
  max-width: 180px; padding: 5px;
  /* Центрируем по умолчанию (десктоп + мобайл) — степпер всегда по центру
     своего блока, чтобы плюс/минус были равноудалены от краёв карточки. */
  margin: 0 auto; display: flex;
}
.accept-nights-stepper .ns-btn {
  width: 30px; height: 30px; border-radius: 8px;
  font-size: 17px;
}
.accept-nights-stepper .ns-num { font-size: 15px; }
.accept-nights-stepper .ns-label { font-size: 10px; }

/* Блок «Минимум ночей» — центрируем лейбл + hint тоже, чтобы вертикальная
   ось совпадала со степпером. И увеличиваем отступ от hint'а выше через
   divider--lg, иначе они липли друг к другу. */
.accept-min--nights { text-align: center; }
.accept-min--nights .accept-min-label { text-align: center; }
.accept-min--nights .accept-hint { text-align: center; }
.accept-card .accept-divider.accept-divider--lg {
  margin-top: 18px; margin-bottom: 18px;
}

/* Карточка заявки, которую гость отменил (#5). Через 24 часа после
   отмены такие SR уходят из выдачи (backend-фильтр). До этого момента
   показываются серыми, чтобы хозяин видел «эта заявка уже не активна»
   и не тратил время на предложение. */
.inbox-card.is-cancelled,
.proposal-card.is-cancelled {
  opacity: 0.55;
  filter: grayscale(0.5);
  position: relative;
}
.inbox-card.is-cancelled::after,
.proposal-card.is-cancelled::after {
  content: 'Отменена гостем';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #fef2f2;
  color: #c83a3a;
  border: 1px solid rgba(200, 58, 58, 0.25);
  padding: 3px 8px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
}
.inbox-card.is-cancelled button,
.proposal-card.is-cancelled button {
  pointer-events: none;
  opacity: 0.5;
}

/* 2026-06-01: status-pill для отменённой заявки в табе «Все» (рендерится
   в верхней части карточки) — серая, без яркой подложки. Отличается от
   ::after-бейджа «Отменена гостем» в правом углу — пилюля идёт в потоке
   карточки и видна на первом скролле; бейдж — глобальный визуальный
   маркер «эта карточка нерабочая». */
.status-pill.status-pill-cancelled {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* 2026-06-01: заглушка вместо кнопки «Отправить предложение» на серой
   карточке. Чтобы хозяин не ловил confusion от disabled-кнопки и понимал
   почему действия нет. Pointer-events:auto чтобы текст можно было
   выделить (карточка целиком is-cancelled — без этого override наследует
   pointer-events:none от .is-cancelled button, но это div не button). */
.inbox-cancelled-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8f9fa;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 12.5px;
  text-align: center;
  font-weight: 500;
}

/* === Адаптив шапки для узких мобайл-экранов (S24 Ultra, iPhone и т.п.).
   2026-05-27: на S24 Ultra (412px) шапка съезжала из-за padding 24px + 4 кнопки + brand с длинным текстом. Уменьшаем padding/gap/brand на узких. === */
@media (max-width: 480px) {
  .topbar {
    /* Тут тоже учитываем safe-area сверху и по бокам (узкие телефоны
       в landscape ловят notch слева/справа). */
    padding: calc(12px + env(safe-area-inset-top, 0)) max(14px, env(safe-area-inset-right, 14px)) 12px max(14px, env(safe-area-inset-left, 14px));
    gap: 6px;
  }
  .topbar-actions { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
  .profile-pill {
    padding: 3px 10px 3px 3px;
    max-width: 140px;
  }
  .profile-pill .ava { width: 28px; height: 28px; min-width: 28px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-text b { font-size: 13.5px; }
  .brand-text small { font-size: 8.5px; letter-spacing: 1.2px; }
}
@media (max-width: 380px) {
  /* Совсем узкие — прячем подпись «ХОЗЯЕВА» под лого и текст имени в profile-pill */
  .topbar { padding: calc(10px + env(safe-area-inset-top, 0)) max(10px, env(safe-area-inset-right, 10px)) 10px max(10px, env(safe-area-inset-left, 10px)); }
  .brand-text small { display: none; }
  .profile-pill { padding: 3px 3px; max-width: none; }
  .profile-pill span:not(.ava) { display: none; }
}
