:root {
  --blue-50: #eef5ff;
  --blue-100: #dceafd;
  --blue-300: #91bcfa;
  --blue-500: #2b78e4;
  --blue-600: #2563eb;
  --blue-700: #1749a3;
  --ink: #0f1f3b;
  --text: #415774;
  --muted: #64748b;
  --line: #dce7f8;
  --surface: rgba(255, 255, 255, .93);
  --shadow: 0 22px 58px rgba(15, 46, 99, .12);
  --shadow-soft: 0 10px 28px rgba(15, 46, 99, .08);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(96, 165, 250, .28), transparent 31rem),
    radial-gradient(circle at 93% 92%, rgba(37, 99, 235, .18), transparent 26rem),
    linear-gradient(180deg, #fbfdff, #f2f7ff 52%, #fff);
  color: var(--ink);
  font-family: "Manrope", "Trebuchet MS", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }

.bg-header-image {
  position: fixed;
  inset: 0 0 auto;
  z-index: -2;
  height: min(490px, 58vh);
  opacity: .24;
  pointer-events: none;
  background: url("/static/hotel_o.png") center top / cover no-repeat;
  filter: blur(2px);
  mask-image: linear-gradient(#000 22%, transparent);
}
.bg-blur {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(100px);
  pointer-events: none;
}
.bg-blur-a { top: -16rem; right: -12rem; background: rgba(43, 120, 228, .24); }
.bg-blur-b { bottom: -18rem; left: -14rem; background: rgba(147, 197, 253, .32); }

.app-container {
  width: min(1240px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0 38px;
  position: relative;
}
.top-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.brand {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 0;
  color: var(--blue-700);
  background: transparent;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .23);
  font-weight: 900;
}
.brand-wordmark {
  font-weight: 950;
  font-size: 1.38rem;
  letter-spacing: -.06em;
}
.nav-right, .nav-links, .action-row, .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-right { justify-content: flex-end; min-width: 0; }
.nav-links { justify-content: flex-end; flex-wrap: wrap; }
.nav-link {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  background: transparent;
  font-weight: 800;
  transition: .18s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--blue-700);
  background: #eef5ff;
}
.notification-bell {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 10px;
  color: var(--blue-700);
  background: transparent;
}
.notification-bell.visible { display: inline-flex; }
.notification-bell:hover { background: #eef5ff; }
.notification-bell svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: .67rem;
  font-weight: 900;
}
.notification-badge.visible { display: inline-flex; }
.hamburger {
  display: none;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #eef5ff;
}
.hamburger span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 9px;
  background: var(--blue-700);
  transition: .18s ease;
}
.hamburger.active span:first-child { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:last-child { transform: translateY(-6px) rotate(-45deg); }

.page { display: none; animation: page-in .32s ease both; }
.page.active { display: grid; gap: 18px; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero, .panel, .widget-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero {
  position: relative;
  display: block;
  padding: clamp(18px, 2.6vw, 28px) clamp(18px, 3vw, 30px) clamp(10px, 1.4vw, 14px);
  text-align: center;
  overflow: hidden;
  transition: min-height .22s ease, padding .22s ease;
  background: linear-gradient(135deg, rgba(255, 255, 255, .66), rgba(245, 248, 255, .56));
  backdrop-filter: blur(2px);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(37, 99, 235, .07), transparent 70%);
}
.hero::before {
  width: 300px;
  height: 300px;
  top: -92px;
  right: -72px;
}
.hero::after {
  width: 250px;
  height: 250px;
  bottom: -78px;
  left: -74px;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
}
.hero h1 {
  max-width: 1060px;
  margin: 5px auto 6px;
  font-size: clamp(2rem, 3.15vw, 2.72rem);
  line-height: 1.08;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.hero h1 .accent {
  color: var(--blue-600);
}
.hero p, .panel p, .widget-note { color: var(--text); }
.hero-subtitle {
  max-width: 650px;
  margin: 0 auto 10px;
  color: var(--text);
  font-size: 1rem;
}
.eyebrow {
  display: inline-block;
  color: var(--blue-700);
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.widget-card, .panel { padding: clamp(16px, 2.4vw, 28px); }
.widget-card {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
}
.list-widget-card {
  padding-top: clamp(18px, 2.2vw, 24px);
}
.card-header {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
h2, h3, p { margin-top: 0; }
.card-header h2, .chat-head h2 { margin: 1px 0 0; line-height: 1.15; letter-spacing: -.04em; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  font-size: .78rem;
  font-weight: 900;
}
.badge.warn { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.search-panel {
  max-width: 1040px;
  margin: 0 auto;
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(15, 46, 99, .08);
  transition: height .22s ease;
}
.widget-search-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.realty-widget-shell {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #f5f9ff);
}
.realty-search-shell { min-height: 116px; }
.realty-list-shell {
  height: clamp(980px, 132vh, 1220px);
  min-height: 0;
  overflow: hidden;
}
.list-widget-card .realty-widget-shell {
  padding: 0;
  border-color: #edf3fb;
  background: transparent;
}
.home-reserve-frame {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
}
.home-reserve-search-frame {
  height: 116px;
  min-height: 116px;
  border-radius: 20px;
  transition: height .22s ease;
}
.home-reserve-list-frame {
  height: 100%;
  min-height: 100%;
  overflow: auto;
}
.support-entry { display: flex; justify-content: center; padding: 7px 0 8px; }
.support-ask-btn {
  min-width: min(280px, 100%);
  border: 2px solid var(--blue-600);
  border-radius: 999px;
  padding: 15px 30px;
  color: var(--blue-700);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 35px rgba(37, 99, 235, .13);
  font-weight: 950;
  transition: .18s ease;
}
.support-ask-btn:hover { color: #fff; background: var(--blue-600); transform: translateY(-2px); }
.support-scroll-pill {
  position: fixed;
  right: max(18px, calc((100vw - 1240px) / 2 + 18px));
  bottom: 24px;
  z-index: 28;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--blue-700);
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 16px 36px rgba(15, 46, 99, .13);
  backdrop-filter: blur(14px);
  font-weight: 950;
  transition: .18s ease;
}
.support-scroll-pill:hover {
  transform: translateY(-2px);
  background: rgba(238, 245, 255, .88);
}

.about-panel h2 { max-width: 720px; font-size: clamp(1.45rem, 2.6vw, 2.5rem); letter-spacing: -.055em; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.contact-grid div, .summary-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f7fbff;
}
.contact-grid span { color: var(--text); }
.footer-bar {
  display: grid;
  gap: 4px;
  padding: 20px 8px 0;
  color: var(--muted);
  text-align: center;
  font-size: .87rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .18);
  font-weight: 900;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.03); transform: translateY(-1px); }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: .79rem; border-radius: 11px; }
.btn-xs { min-height: 30px; padding: 5px 9px; font-size: .72rem; border-radius: 10px; }
.btn-secondary { color: var(--blue-700); background: #eaf3ff; border-color: #cfe1fd; box-shadow: none; }
.btn-ghost { color: var(--blue-700); background: #fff; border-color: #d8e7fb; box-shadow: none; }
.btn-danger { background: #dc2626; }

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-weight: 850;
  font-size: .84rem;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfe0f8;
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; min-height: 82px; }
input:focus, select:focus, textarea:focus {
  outline: 4px solid rgba(37, 99, 235, .11);
  border-color: var(--blue-300);
}
.auth-grid, .field-grid, .admin-shell, .profile-settings, .support-board {
  display: grid;
  gap: 12px;
}
.auth-choice {
  display: inline-flex;
  gap: 5px;
  width: fit-content;
  padding: 4px;
  border-radius: 999px;
  background: var(--blue-50);
}
.auth-choice button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--blue-700);
  background: transparent;
  font-weight: 900;
}
.auth-choice button.active { background: #fff; box-shadow: 0 5px 14px rgba(23, 73, 163, .13); }
.form-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #f6faff);
}
.form-card h3 { margin-bottom: 0; }
.field-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.oauth-row {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(350px, 100%);
  min-height: 50px;
  border: 1px solid #d5e4fb;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  font-weight: 950;
}
.oauth-btn svg, .oauth-letter {
  width: 24px;
  height: 24px;
}
.oauth-letter {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: .81rem;
  font-weight: 1000;
}
.oauth-letter.yandex { color: #fff; background: #fc3f1d; }
.oauth-letter.vk { color: #fff; background: #0077ff; }
.code-input-row {
  display: flex;
  gap: 7px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.code-digit {
  width: 48px;
  height: 56px;
  border-radius: 999px;
  padding: 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 950;
}
.code-input-row.shake { animation: shake .34s ease; }
@keyframes shake { 20% { transform: translateX(-6px); } 60% { transform: translateX(5px); } }
.dev-code {
  border: 1px dashed var(--blue-300);
  border-radius: 14px;
  padding: 10px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-weight: 900;
}
.profile-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 18px;
  background: rgba(15, 31, 59, .42);
  backdrop-filter: blur(8px);
}
.chat-card, .confirm-card {
  width: min(760px, 100%);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  padding: clamp(14px, 2.5vw, 24px);
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 31, 59, .28);
}
.chat-card {
  display: grid;
  grid-template-rows: auto minmax(260px, 48vh) auto auto;
  gap: 12px;
}
.chat-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.chat-head p { margin-bottom: 0; color: var(--text); }
.close-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 1.35rem;
  line-height: 1;
}
.chat-messages {
  display: grid;
  align-content: start;
  gap: 9px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, #f8fbff, #edf5ff);
}
.chat-bubble {
  max-width: min(88%, 540px);
  border-radius: 18px;
  padding: 10px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 7px 18px rgba(15, 46, 99, .06);
}
.chat-bubble.user { justify-self: end; color: #fff; background: var(--blue-600); }
.chat-bubble.bot, .chat-bubble.operator { justify-self: start; border: 1px solid var(--line); background: #fff; }
.chat-bubble.system { justify-self: center; color: var(--text); background: #e7f1ff; font-size: .86rem; }
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}
.review-box {
  display: grid;
  gap: 8px;
  border: 1px solid #d9e7fb;
  border-radius: 19px;
  padding: 12px;
  background: #f7fbff;
}
.review-stars { display: flex; gap: 4px; }
.review-stars button {
  border: 0;
  padding: 0;
  color: #cbd5e1;
  background: transparent;
  font-size: 1.7rem;
}
.review-stars button.active { color: var(--blue-600); }
.confirm-card { position: relative; display: grid; gap: 10px; max-width: 500px; }
.confirm-card > .close-btn { position: absolute; top: 13px; right: 13px; }

.operator-bar, .support-column, .operator-card, .user-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #f6faff);
}
.operator-bar, .support-column { padding: 15px; }
.support-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.support-column { display: grid; align-content: start; gap: 10px; }
.ticket {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e7fb;
  border-radius: 18px;
  background: #fff;
}
.ticket p, .operator-card p, .user-row p { margin-bottom: 0; color: var(--text); overflow-wrap: anywhere; }
.metric-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.metric-row b {
  display: grid;
  min-width: 92px;
  border-radius: 17px;
  padding: 11px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 1.18rem;
}
.metric-row small { color: var(--text); font-size: .7rem; font-weight: 900; }
.operator-grid, .users-list { display: grid; gap: 10px; }
.operator-grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.operator-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 245px;
  padding: 15px;
}
details {
  border: 1px solid #e0ebfb;
  border-radius: 16px;
  padding: 8px 10px;
  background: #fff;
}
summary { cursor: pointer; color: var(--blue-700); font-weight: 950; }
.details-feed { display: grid; gap: 7px; margin-top: 8px; color: var(--text); }
blockquote {
  margin: 0;
  border-left: 3px solid var(--blue-300);
  padding-left: 8px;
  overflow-wrap: anywhere;
}
blockquote small { display: block; color: var(--muted); }
.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  align-items: center;
  gap: 10px;
  padding: 12px;
}
.user-row select { min-width: 120px; }
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(16px, 2vw, 24px);
  background: linear-gradient(135deg, #fff, #eaf3ff);
}
.admin-hero h2 { margin-bottom: 6px; letter-spacing: -.05em; }
.notice-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  width: min(560px, calc(100% - 28px));
  transform: translateX(-50%);
  border: 1px solid #cce0fd;
  border-radius: 17px;
  padding: 11px 14px;
  color: var(--blue-700);
  background: rgba(238, 245, 255, .96);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(14px);
  animation: notice-in .18s ease both;
}
.notice-bar.error { color: #991b1b; border-color: #fecaca; background: rgba(254, 242, 242, .96); }
.notice-bar.success { color: #166534; border-color: #bbf7d0; background: rgba(240, 253, 244, .96); }
@keyframes notice-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.notification-dropdown {
  position: fixed;
  top: 83px;
  right: max(15px, calc((100vw - 1240px) / 2 + 15px));
  z-index: 50;
  width: min(370px, calc(100% - 28px));
  max-height: 460px;
  display: grid;
  gap: 9px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow);
}
.notification-item {
  width: 100%;
  border: 1px solid #d9e7fb;
  border-radius: 16px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: #f7fbff;
}
.notification-item strong, .notification-item span { display: block; }
.notification-item.unread { border-color: var(--blue-300); background: #eef5ff; }

@media (max-width: 820px) {
  .app-container { width: min(100% - 20px, 1240px); padding-top: 10px; }
  .top-nav { padding: 11px 12px; border-radius: 20px; }
  .nav-right { gap: 5px; }
  .hamburger { display: block; }
  .nav-links {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    display: none;
    width: min(330px, calc(100vw - 20px));
    align-items: stretch;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 20px;
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow);
  }
  .nav-links.mobile-open { display: grid; }
  .nav-link { text-align: left; }
  .hero, .support-board, .admin-hero { grid-template-columns: 1fr; }
  .hero h1 { white-space: normal; }
  .contact-grid { grid-template-columns: 1fr; }
  .chat-head, .card-header { align-items: start; }
  .chat-card { grid-template-rows: auto minmax(230px, 48vh) auto auto; padding: 14px; border-radius: 23px; }
  .chat-form { grid-template-columns: 1fr; }
  .action-row { flex-wrap: wrap; }
  .user-row { grid-template-columns: 1fr; }
  .user-row .action-row, .user-row select, .chat-form .btn { width: 100%; }
  .bg-header-image { background-image: url("/static/hotel_o_vert.png"); }
}

@media (max-width: 520px) {
  .hero { padding: 16px 14px 12px; }
  .hero h1 { font-size: 1.72rem; letter-spacing: -.045em; }
  .hero-subtitle { margin-bottom: 8px; }
  .brand-wordmark { font-size: 1.18rem; }
  .brand-icon { width: 39px; height: 39px; }
  .panel, .widget-card { padding: 14px; border-radius: 23px; }
  .realty-widget-shell { padding: 8px; border-radius: 18px; }
  .realty-search-shell { min-height: 112px; }
  .realty-list-shell { height: min(1080px, 132vh); }
  .home-reserve-search-frame {
    height: 112px;
    min-height: 112px;
  }
  .support-scroll-pill {
    right: 16px;
    bottom: 18px;
    padding: 9px 13px;
    font-size: .9rem;
  }
  .code-digit { width: 42px; height: 52px; }
}
