/* Page shell: background, header, footer */
.app-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: linear-gradient(165deg, #eef2ff 0%, #f0f4f8 38%, #e8eef5 100%);
  background-attachment: fixed;
}

.app-main-fill {
  flex: 1 0 auto;
}

/* Tenant calendar & admin rooms — same frosted panel shell */
.calendar-main {
  max-width: min(1800px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.calendar-shell {
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.14);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow:
    0 8px 28px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
}

/* Band behind “Май 2026” / month navigation on the calendar */
.calendar-toolbar {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.07) 0%,
    rgba(248, 250, 252, 0.98) 48%,
    rgba(255, 255, 255, 0.96) 100%
  );
  border-bottom: 1px solid rgba(13, 148, 136, 0.12);
}

/* Admin rooms (and similar): full panel filled with the same green-teal wash */
.calendar-toolbar-panel {
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.14);
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.07) 0%,
    rgba(248, 250, 252, 0.98) 48%,
    rgba(255, 255, 255, 0.96) 100%
  );
  backdrop-filter: blur(8px);
  box-shadow:
    0 8px 28px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
}

.calendar-month-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f766e;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
  box-shadow: 0 1px 3px rgba(30, 58, 95, 0.06);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.75rem);
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.site-header-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem 1.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #1e3a5f;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-brand:hover {
  color: #2c5282;
}

.site-brand-mark {
  height: 52px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  gap: 0.1rem;
}

.site-brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1e3a5f;
}

.site-brand-tagline {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #4a5568;
  text-transform: none;
}

.site-header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
}

.site-header-phone-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: #2b6cb0;
}

.site-header-phone a {
  color: inherit;
  text-decoration: none;
}

.site-header-phone a:hover {
  color: #2b6cb0;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
}

.site-header-actions .small {
  font-size: 0.95rem !important;
}

.site-footer {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(30, 58, 95, 0.08);
  padding: 1rem clamp(1rem, 4vw, 2.75rem);
  text-align: center;
  font-size: 1rem;
  line-height: 1.5;
  color: #718096;
}

.app-subnav {
  border-bottom: none;
}

/* Tenant area — light horizontal menu bar */
.tenant-subnav {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.tenant-subnav-inner {
  padding: 0.5rem clamp(0.85rem, 3vw, 2rem);
  max-width: 1800px;
  margin: 0 auto;
}

.tenant-nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
}

.tenant-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.45rem 1.2rem;
  font-size: 1.03rem;
  font-weight: 600;
  line-height: 1.25;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #475569;
  border: 1px solid transparent;
  transition:
    background-color 0.14s ease,
    color 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.tenant-nav-item:hover {
  color: #1e293b;
  background: rgba(148, 163, 184, 0.22);
  border-color: rgba(148, 163, 184, 0.35);
}

.tenant-nav-item--active {
  color: #ffffff;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  border-color: #4338ca;
  box-shadow:
    0 2px 8px rgba(79, 70, 229, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tenant-nav-item--active:hover {
  color: #ffffff;
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
  border-color: #4f46e5;
}

.tenant-nav-item:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}

/* Header logout — minimum 44×44 target, clear contrast */
.btn-site-logout {
  min-height: 2.75rem;
  min-width: 5.5rem;
  padding: 0.5rem 1.15rem;
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: 0.5rem;
  border: 2px solid #1e3a5f;
  color: #1e3a5f;
  background-color: #ffffff;
  line-height: 1.25;
}

.btn-site-logout:hover {
  background-color: #1e3a5f;
  color: #ffffff;
  border-color: #1e3a5f;
}

.btn-site-logout:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.login-card-wrap {
  max-width: 420px;
}

/* Platform admin — clearer sections */
.platform-hub-card {
  border: 1px solid rgba(30, 58, 95, 0.1) !important;
}

.platform-hub-card__intro {
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.platform-system-picker {
  max-width: 36rem;
}

.platform-subsection {
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(30, 58, 95, 0.04);
}

.platform-subsection + .platform-subsection {
  margin-top: 1.25rem;
}

.platform-subsection__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  letter-spacing: -0.01em;
}

.platform-subsection--users {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.platform-nested-block {
  border: 1px dashed rgba(30, 58, 95, 0.18);
  border-radius: 0.375rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
}

.platform-nested-block + .platform-nested-block {
  margin-top: 1rem;
}

.platform-nested-block__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 0.85rem;
}

.platform-user-system-cell .platform-user-system-name {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}

.platform-user-system-cell code {
  font-size: 0.78rem;
}
