:root {
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --topbar-mobile-min-height: 6.75rem;
  --sidebar-bg: #20242c;
  --sidebar-text: #cfd4dc;
  --sidebar-active: #2f3642;
  --topbar-bg: #c81f25;
  --page-bg: #f4f6f9;
  --card-blue: #0d6efd;
  --card-red: #dc3545;
  --ui-text-primary: #172033;
  --ui-text-secondary: #4b5563;
  --ui-label-size: 0.875rem;
  --sidebar-transition: 0.25s;
}

html,
body {
  height: 100%;
}

body {
  background: var(--page-bg);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.auth-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8f9fb 0%, #eceff4 100%);
}

.app-shell {
  display: block;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  overflow-y: auto;
  transition: transform var(--sidebar-transition) ease;
  transform: translateX(-100%);
  will-change: transform;
  max-width: 88vw;
  height: 100dvh;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(8, 12, 20, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--sidebar-transition) ease, visibility var(--sidebar-transition) ease;
  z-index: 1025;
}

.app-sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 0.9rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-local-time {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.2rem;
}

.sidebar-local-time-label {
  color: #8e99ab;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-local-time-value {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.sidebar-local-date-value {
  color: #c7d0df;
  font-size: 0.82rem;
  line-height: 1.2;
}

.sidebar-nav {
  padding: 0.75rem 0.5rem 1rem;
}

.sidebar-group {
  color: #8e99ab;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 0.9rem 0.65rem 0.35rem;
}

.sidebar-section {
  margin-top: 0.25rem;
}

.sidebar-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #8e99ab;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 0.9rem 0.65rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-group-toggle i {
  transition: transform 0.2s ease;
}

.sidebar-group-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.sidebar-group-panel[hidden] {
  display: none !important;
}

.sidebar-nav .nav-link {
  color: var(--sidebar-text);
  border-radius: 0.5rem;
  margin: 0.125rem 0;
  padding: 0.65rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.94rem;
}

.sidebar-nav .nav-link.sidebar-sub {
  padding-left: 1rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: #fff;
  background: var(--sidebar-active);
}

.app-main {
  flex: 1;
  margin-left: 0;
  min-width: 0;
  width: 100%;
  min-height: 100vh;
  transition: width var(--sidebar-transition) ease;
}

.app-topbar {
  min-height: var(--topbar-height);
  background: var(--topbar-bg);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.45rem;
  column-gap: 1rem;
  padding: 0.625rem clamp(0.75rem, 1.8vw, 1.25rem);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.topbar-main {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-page-title {
  color: #fff;
  display: block;
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  row-gap: 0.35rem;
  gap: 0.55rem;
  justify-content: flex-end;
  min-width: 0;
}

.topbar-profile-control {
  align-items: center;
  color: #fff;
  display: inline-flex;
  flex: 0 1 auto;
  font-size: 0.925rem;
  font-weight: 600;
  gap: 0.4rem;
  line-height: 1.2;
  max-width: clamp(8rem, 20vw, 18rem);
  min-width: 0;
  min-height: 2.5rem;
  overflow: hidden;
  padding-inline: 0.75rem;
}

.topbar-profile-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-role {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #75151a;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.55rem;
}

.topbar-logout-form {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
}

.topbar-action,
.topbar-logout {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 2.5rem;
}

.topbar-action {
  flex: 0 0 2.5rem;
  padding: 0;
  width: 2.5rem;
}

.topbar-logout {
  gap: 0.4rem;
  padding-inline: 0.75rem;
}

.app-topbar a:focus-visible,
.app-topbar button:focus-visible {
  box-shadow: 0 0 0 0.22rem rgba(255, 255, 255, 0.7);
  outline: 2px solid #172033;
  outline-offset: 2px;
}

.app-content {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  --bs-gutter-x: clamp(0.9rem, 2.4vw, 2.25rem);
}

.app-content .form-label,
.app-content .form-check-label {
  color: var(--ui-text-primary);
  font-size: var(--ui-label-size);
  font-weight: 600;
  line-height: 1.35;
}

.app-content .form-text,
.app-content .text-muted,
.ui-meta {
  color: var(--ui-text-secondary) !important;
  line-height: 1.4;
}

.entity-name {
  color: var(--ui-text-primary);
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: normal;
}

.app-content a:focus-visible,
.app-content button:focus-visible,
.app-content summary:focus-visible,
.app-content input:focus-visible,
.app-content select:focus-visible,
.app-content textarea:focus-visible {
  outline: 3px solid #0a58ca;
  outline-offset: 2px;
}

.app-content .table thead th {
  color: #343a40;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-content .badge {
  font-weight: 600;
}

.floating-alerts {
  position: fixed;
  top: calc(var(--topbar-rendered-height, var(--topbar-height)) + 0.75rem);
  right: 1rem;
  z-index: 1100;
  width: min(420px, calc(100vw - 2rem));
  max-height: min(50vh, calc(100dvh - var(--topbar-rendered-height, var(--topbar-height)) - 2rem));
  display: grid;
  gap: 0.5rem;
  overflow-y: auto;
  pointer-events: none;
}

.floating-alert {
  margin: 0;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
  pointer-events: auto;
}

.auth-shell .floating-alerts,
body.is-anonymous .floating-alerts {
  top: 1rem;
}

@media (max-width: 767.98px) {
  .app-topbar {
    align-content: center;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr);
    min-height: var(--topbar-mobile-min-height);
    padding-block: 0.55rem;
  }

  .topbar-main,
  .topbar-user {
    width: 100%;
  }

  .topbar-user {
    gap: 0.45rem;
  }

  .topbar-profile-control {
    flex: 1 1 auto;
    max-width: none;
  }

  .floating-alerts {
    top: calc(var(--topbar-rendered-height, var(--topbar-mobile-min-height)) + 0.5rem);
    right: 0.75rem;
    width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - var(--topbar-rendered-height, var(--topbar-mobile-min-height)) - 1rem);
  }
}

@media (max-width: 575.98px) {
  .topbar-action-label {
    display: none;
  }

  .topbar-logout {
    padding: 0;
    width: 2.5rem;
  }

  .topbar-profile-control {
    font-size: 0.875rem;
  }

  .topbar-role {
    font-size: 0.74rem;
    padding-inline: 0.45rem;
  }
}

.page-section {
  margin-bottom: 1.5rem;
  min-width: 0;
}

.page-block-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  min-width: 0;
}

.page-block-grid--sidebar {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.page-block-grid--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-block-grid--triad {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-block-span-full {
  grid-column: 1 / -1;
}

.page-block-stack {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-width: 0;
}

.card-accent-blue,
.card-accent-red {
  border: 0;
  border-top: 4px solid transparent;
  box-shadow: 0 2px 10px rgba(18, 29, 52, 0.06);
}

.card-accent-blue {
  border-top-color: var(--card-blue);
}

.card-accent-red {
  border-top-color: var(--card-red);
}

.block-card {
  height: 100%;
  border-radius: 0.95rem;
  overflow: hidden;
  min-width: 0;
}

.block-card>.card-body,
.card,
.card-body,
.tab-content,
.tab-pane,
.row>* {
  min-width: 0;
}

.block-card>.card-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(18, 29, 52, 0.06);
}

.block-card>.card-body {
  padding: 1rem;
}

.block-card>.card-body.p-0 {
  padding: 0 !important;
}

.block-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.block-card-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 700;
}

.block-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}.toolbar-search-input {
  width: auto;
  min-width: 220px;
}

.toolbar-search-input--wide {
  min-width: 230px;
}

.profile-summary {
  display: grid;
  gap: 1rem;
}

.profile-summary-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.profile-summary-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 53, 69, 0.1);
  color: var(--card-red);
  font-size: 2rem;
}

.profile-summary-meta {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-summary-item {
  border: 1px solid rgba(18, 29, 52, 0.08);
  border-radius: 0.85rem;
  padding: 0.85rem 0.9rem;
  background: #fbfcfe;
}

.profile-summary-label {
  color: var(--ui-text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

#admin-hub-tabs .nav-link {
  color: #172033;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

#admin-hub-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

#admin-hub-tabs .nav-item {
  flex: 0 0 auto;
}

#admin-hub-tabs .nav-link.active {
  color: #c81f25;
}

.admin-row-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #172033;
  font-weight: 700;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.admin-row-primary:hover,
.admin-row-primary:focus {
  color: #b22222;
  text-decoration: none;
}

.admin-row-meta {
  display: grid;
  gap: 0.12rem;
  margin-top: 0.2rem;
  color: var(--ui-text-secondary);
  font-size: 0.84rem;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
}.admin-advanced-panel {
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 0.5rem;
}

.admin-advanced-panel summary {
  cursor: pointer;
  font-weight: 700;
}.admin-equipment-select {
  min-height: 16rem;
}

.admin-form-modal-dialog {
  width: min(1140px, calc(100vw - 1rem));
  max-height: calc(100vh - 1rem);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-form-modal-content {
  max-height: calc(100vh - 1rem);
  overflow: hidden;
}

.admin-form-modal {
  display: flex;
  min-height: 0;
  max-height: inherit;
  flex-direction: column;
}

.admin-form-modal .modal-header,
.admin-form-modal .modal-footer {
  flex: 0 0 auto;
  background: #fff;
}

.admin-form-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-form-modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -0.5rem 1rem rgba(16, 24, 40, 0.06);
}

.admin-user-form-stack,
.admin-user-access-layout {
  display: grid;
  gap: 1rem;
}

.admin-user-access-section {
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 0.75rem;
  background: #fff;
}

.admin-user-access-section {
  padding: 1rem;
}

.admin-user-access-section__heading {
  margin-bottom: 1rem;
}

.admin-user-access-section__heading h2 {
  margin: 0;
  color: #172033;
  font-size: 1rem;
  font-weight: 750;
}

.admin-user-access-section__heading p {
  margin: 0.25rem 0 0;
  color: #667085;
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-user-identity-grid,
.admin-user-access-general-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.9rem 1rem;
}

.admin-user-identity-grid__full,
.admin-user-access-general-grid__full {
  grid-column: 1 / -1;
}

.admin-access-selector__group>summary:focus-visible,
.admin-user-direct-access>summary:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.28);
  outline-offset: -3px;
}

.admin-user-direct-access {
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.admin-user-direct-access>summary {
  padding: 0.9rem 1rem;
  cursor: pointer;
  color: #172033;
  font-weight: 750;
  background: #f8f9fa;
}

.admin-user-direct-access[open]>summary {
  border-bottom: 1px solid rgba(16, 24, 40, 0.1);
}

.admin-user-direct-access__body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.admin-user-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.8rem;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -0.35rem 1rem rgba(16, 24, 40, 0.06);
}

.admin-access-selector {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.admin-access-selector [hidden],
.admin-clean-room-access [hidden] {
  display: none !important;
}

.admin-access-selector__enhanced {
  min-width: 0;
}

.admin-access-selector__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.admin-access-selector__title {
  margin: 0;
  color: #172033;
  font-size: 0.98rem;
  font-weight: 750;
}

.admin-access-selector__toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.admin-access-selector__search {
  flex: 1 1 16rem;
}

.admin-access-selector__place-filter {
  flex: 1 1 13rem;
}

.admin-access-selector__place-filter label {
  display: block;
  margin-bottom: 0.2rem;
  color: #667085;
  font-size: 0.75rem;
  font-weight: 650;
}

.admin-access-selector__groups {
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 0.55rem;
  background: #fff;
  overflow: visible;
}

.admin-access-selector__group+.admin-access-selector__group {
  border-top: 1px solid rgba(16, 24, 40, 0.1);
}

.admin-access-selector__group-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  color: #344054;
  background: #f8f9fa;
}

.admin-access-selector__group[open]>.admin-access-selector__group-heading {
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

.admin-access-selector__group-title {
  display: grid;
  gap: 0.08rem;
}

.admin-access-selector__group-title>span,
.admin-access-selector__group-counts {
  color: #667085;
  font-size: 0.78rem;
}

.admin-access-selector__options {
  display: grid;
}

.admin-access-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(16, 24, 40, 0.07);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.admin-access-option:last-child {
  border-bottom: 0;
}

.admin-access-option:hover {
  background: #f9fbff;
}

.admin-access-option:focus-within {
  outline: 3px solid rgba(13, 110, 253, 0.2);
  outline-offset: -3px;
}

.admin-access-option.is-direct {
  border-left-color: #4d7bd6;
}

.admin-access-option.is-inherited {
  background: #fffdf6;
}

.admin-access-option.is-direct.is-inherited {
  background: linear-gradient(90deg, #f3f7ff 0, #fffdf6 100%);
}

.admin-access-option.is-locked {
  background: #fffdf6;
}

.admin-access-option.is-locked .admin-access-option__body {
  opacity: 0.82;
}

.admin-access-option__control .form-check-input {
  margin-top: 0.18rem;
}

.admin-access-option__lock {
  margin-top: 0.22rem;
  color: #7a4b00;
}

.admin-access-option__body {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
  cursor: pointer;
}

.admin-access-option__title {
  color: #172033;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-access-option__state,
.admin-access-option__details,
.admin-access-option__sources {
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-access-option__state .fa-lock {
  margin-right: 0.2rem;
  color: #7a4b00;
}

.admin-access-option details>summary {
  cursor: pointer;
  color: #495057;
  font-weight: 650;
}

.admin-access-option details ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.admin-access-sensitive {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.2rem;
  padding: 0.45rem 0.55rem;
  color: #842029;
  border: 1px solid rgba(220, 53, 69, 0.24);
  border-radius: 0.45rem;
  background: rgba(220, 53, 69, 0.06);
}

.admin-access-selector__empty {
  padding: 1rem;
  text-align: center;
}

.admin-clean-room-access {
  padding: 0.8rem;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 0.5rem;
  background: #fbfcfe;
}

.admin-clean-room-access .form-check {
  margin-bottom: 0.3rem !important;
}

.admin-clean-room-access__summary {
  color: #495057;
  font-size: 0.84rem;
}

@media (max-width: 767.98px) {

  .admin-user-identity-grid,
  .admin-user-access-general-grid {
    grid-template-columns: 1fr;
  }

  .admin-access-selector__header,
  .admin-access-selector__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-access-selector__toolbar {
    align-items: stretch;
  }

  .admin-access-selector__search,
  .admin-access-selector__place-filter {
    width: 100%;
  }

  .admin-user-form-actions {
    justify-content: stretch;
  }

  .admin-user-form-actions .btn {
    flex: 1 1 0;
  }
}

.admin-inline-text {
  color: #172033;
  font-weight: 600;
}

.form-control,
.form-select,
textarea,
select {
  min-width: 0;
}

.modal-dialog {
  max-width: min(var(--bs-modal-width, 500px), calc(100vw - 1rem));
}

.modal-content {
  min-width: 0;
}

.modal-header,
.modal-footer {
  gap: 0.5rem;
}

.modal-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-footer {
  flex-wrap: wrap;
}

.reservation-edit-modal .modal-dialog {
  width: min(900px, calc(100vw - 1rem));
  max-height: calc(100vh - 1rem);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.reservation-edit-modal .modal-content {
  max-height: calc(100vh - 1rem);
  overflow: hidden;
}

.reservation-edit-form {
  display: flex;
  min-height: 0;
  max-height: inherit;
  flex-direction: column;
}

.reservation-edit-form .modal-header,
.reservation-edit-form .modal-footer {
  flex: 0 0 auto;
  background: #fff;
}

.reservation-edit-form .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.reservation-edit-form .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -0.5rem 1rem rgba(16, 24, 40, 0.06);
}

#bookingCalendar {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

#bookingCalendar .fc {
  min-width: 720px;
}

#bookingCalendar .fc-toolbar {
  gap: 0.5rem;
  flex-wrap: wrap;
}

#bookingCalendar .fc-toolbar-title {
  font-size: clamp(1rem, 2vw, 1.45rem);
}

#bookingCalendar .fc-button {
  padding: 0.28rem 0.48rem;
  font-size: 0.82rem;
}

#bookingCalendar .fc-event-title,
#bookingCalendar .fc-event-main {
  white-space: normal;
  overflow-wrap: anywhere;
}

#bookingCalendar .calendar-availability-reserved,
.badge.calendar-availability-reserved {
  background-color: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

#bookingCalendar .calendar-availability-own-reservation,
.badge.calendar-availability-own-reservation {
  background-color: #6f42c1;
  border-color: #59359a;
  color: #fff;
}.table td,
.table th {
  vertical-align: middle;
}

.table thead th[data-sort-direction] {
  position: relative;
  padding-right: 1.2rem;
}

.table thead th[data-sort-direction]::after {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  line-height: 1;
  color: #495057;
}

.table thead th[data-sort-direction="asc"]::after {
  content: "\25B2";
}

.table thead th[data-sort-direction="desc"]::after {
  content: "\25BC";
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.table-responsive {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.table-wrap .table,
.table-responsive .table {
  width: 100%;
  min-width: 720px;
  margin-bottom: 0;
}

.table-wrap .table td,
.table-wrap .table th,
.table-responsive .table td,
.table-responsive .table th {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Particles tables carry short numeric columns, so the shared 720px floor only
   forces horizontal scrolling here. Scoped opt-out: the wrapper still scrolls
   on narrow viewports, but desktop fits without it. */
.particles-table-wrap .table {
  min-width: 0;
}

.table-wrap .table thead th,
.table-responsive .table thead th {
  white-space: nowrap;
}

#reservation-history,
.history-card {
  max-width: 100%;
  min-width: 0;
}

.history-card-header {
  align-items: center;
  display: flex;
  gap: 0.65rem 1rem;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
}

.history-header-summary,
.history-header-controls,
.history-header-title-line,
.history-per-page-control,
.history-bulk-actions {
  align-items: center;
  display: flex;
}

.history-header-summary {
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  min-width: 0;
}

.history-header-title-line {
  gap: 0.5rem;
  white-space: nowrap;
}

.history-total-count,
.history-selected-count {
  color: var(--ui-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.history-selected-count {
  border-left: 1px solid rgba(18, 29, 52, 0.14);
  padding-left: 0.65rem;
}

.history-header-controls {
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  justify-content: flex-end;
}

.history-per-page-control {
  gap: 0.4rem;
}

.history-per-page-control .form-label {
  font-size: 0.76rem;
  white-space: nowrap;
}

.history-per-page-control .form-select {
  min-width: 4.4rem;
  width: auto;
}

.history-bulk-actions {
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.history-bulk-actions .btn {
  gap: 0.32rem;
  min-height: 2rem;
  white-space: nowrap;
}

.history-table {
  font-size: 0.86rem;
  min-width: 1180px;
}

.history-table> :not(caption)>*>* {
  line-height: 1.22;
  overflow-wrap: normal;
  padding: 0.34rem 0.4rem;
  vertical-align: middle;
  word-break: normal;
}

.history-table thead th {
  font-size: 0.76rem;
  padding-bottom: 0.4rem;
  padding-top: 0.4rem;
}

.history-select-column {
  text-align: center;
  width: 2.35rem;
}

.history-cell-id {
  min-width: 6.4rem;
}

.history-cell-zone,
.history-cell-equipment {
  min-width: 8.5rem;
  max-width: 12rem;
}

.history-cell-user {
  min-width: 8rem;
  max-width: 11rem;
}

.history-cell-group {
  min-width: 9rem;
  max-width: 13rem;
}

.history-cell-description {
  min-width: 10rem;
  max-width: 15rem;
}

.history-cell-date,
.history-cell-time,
.history-cell-duration,
.history-cell-status,
.history-cell-actions {
  white-space: nowrap;
}

.history-cell-actions {
  min-width: 7.75rem;
}

/* La nota consolidada de cómputo es más larga que la duración: se le permite
   fluir en varias líneas para que el `nowrap` de la celda no ensanche la
   columna ni fuerce scroll horizontal en móvil o con zoom. */
.history-duration-note {
  white-space: normal;
  overflow-wrap: break-word;
}

.history-cell-zone .d-grid {
  gap: 0.08rem;
}

.history-clamp-two,
.history-description-preview {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
}

.history-description-preview {
  color: #4f596b;
}

.history-table .table-actions {
  flex-wrap: nowrap;
  gap: 0.2rem;
}

.history-table .table-actions .btn {
  line-height: 1;
  min-height: 2rem;
  min-width: 2rem;
  padding: 0.25rem 0.38rem;
  white-space: nowrap;
}

.history-row-parent {
  border-top: 2px solid rgba(220, 53, 69, 0.22);
  background: #fff8f8;
  font-weight: 600;
}

.history-row-parent>td {
  padding-bottom: 0.4rem;
  padding-top: 0.4rem;
}

.history-row-standalone {
  background: #fff;
}

.history-row-standalone>td {
  padding-bottom: 0.32rem;
  padding-top: 0.32rem;
}

.history-row-child {
  background: #f7f9fc;
  color: #465064;
  font-size: 0.84rem;
}

.history-row-child>td {
  border-top-color: rgba(91, 105, 135, 0.11);
  line-height: 1.2;
  padding-bottom: 0.22rem;
  padding-top: 0.22rem;
  vertical-align: middle;
}

.history-row-child>td:nth-child(2) {
  border-left: 3px solid rgba(220, 53, 69, 0.28);
  padding-left: 1.35rem;
  position: relative;
}

.history-row-child>td:nth-child(2)::before {
  border-top: 2px solid rgba(220, 53, 69, 0.28);
  content: "";
  left: 0;
  position: absolute;
  top: 50%;
  width: 0.8rem;
}

.history-row-child .entity-name {
  font-size: 0.84rem;
  font-weight: 600;
}

.history-child-kind {
  align-items: center;
  color: #687286;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 700;
  gap: 0.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.history-id {
  align-items: center;
  display: inline-flex;
  gap: 0.32rem;
  white-space: nowrap;
}

.history-id-child {
  color: #495057;
}

.history-id-child i {
  color: #c75a65;
  font-size: 0.68rem;
  transform: rotate(90deg);
}

.history-children-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(220, 53, 69, 0.24);
  border-radius: 999px;
  color: #842029;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.3rem;
  justify-content: center;
  min-height: 2rem;
  padding: 0.16rem 0.46rem;
}

.history-children-toggle i {
  font-size: 0.62rem;
  transition: transform 0.16s ease;
}

.history-children-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

@media (max-width: 991.98px) {
  .history-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .history-header-controls {
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {

  .history-card-header,
  .history-header-controls {
    align-items: stretch;
  }

  .history-header-controls {
    flex-direction: column;
  }

  .history-per-page-control,
  .history-bulk-actions {
    justify-content: space-between;
  }

  .history-bulk-actions .btn {
    flex: 1 1 0;
    min-height: 2.25rem;
  }

  .history-table .table-actions .btn {
    min-height: 2.25rem;
    min-width: 2.25rem;
  }
}

.filter-dropdown {
  min-width: 0;
}

.filter-dropdown__details {
  position: relative;
}

.filter-dropdown__button {
  align-items: center;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  gap: 0.5rem;
  justify-content: space-between;
  line-height: 1.5;
  list-style: none;
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  width: 100%;
}

.filter-dropdown__button::-webkit-details-marker {
  display: none;
}

.filter-dropdown__details[open] .filter-dropdown__button {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.filter-dropdown__summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-dropdown__menu {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.14);
  left: 0;
  margin-top: 0.25rem;
  max-width: min(22rem, 88vw);
  min-width: min(18rem, 88vw);
  padding: 0.5rem;
  position: absolute;
  top: 100%;
  z-index: 1030;
}

.filter-dropdown__actions {
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
}

.filter-dropdown__options {
  display: grid;
  gap: 0.25rem;
  max-height: 16rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.filter-dropdown__option {
  align-items: flex-start;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  gap: 0.45rem;
  line-height: 1.25;
  min-width: 0;
  padding: 0.25rem;
}

.filter-dropdown__option:hover,
.filter-dropdown__option:focus-within {
  background: rgba(13, 110, 253, 0.08);
}

.filter-dropdown__option span {
  overflow-wrap: anywhere;
}

.table-actions,
.btn-group {
  min-width: 0;
}

.table-actions .btn,
.btn-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-main-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.65rem, 1vw, 1.15rem);
}

.dashboard-main-grid>.page-block-stack {
  min-width: 0;
}

.dashboard-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(0.65rem, 1vw, 1.15rem);
  align-items: start;
  min-width: 0;
}

.dashboard-top-row.dashboard-top-row-solo {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 991.98px) {
  .dashboard-top-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dashboard-alert-stack {
  display: grid;
  gap: 0.6rem;
}/* Create panel toggle button styles */
.create-panel-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.create-panel-toggle:hover {
  transform: scale(1.1);
}

.create-panel-toggle i {
  font-size: 0.9rem;
}

@media (max-width: 991.98px) {
  body.sidebar-mobile-open {
    overflow: hidden;
  }

  body.sidebar-mobile-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-mobile-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .app-main {
    margin-left: 0;
    width: 100%;
  }

  .app-content {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .page-block-grid,
  .page-block-grid--sidebar,
  .page-block-grid--split,
  .page-block-grid--triad {
    grid-template-columns: 1fr;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }  .profile-summary-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-summary-meta {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .page-block-grid--triad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-block-grid--sidebar {
    grid-template-columns: 1fr;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

}

/* Equipment Usage Time: filtered exact-usage pie (v2.19.21). */
.statistics-usage-distribution {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.statistics-usage-pie-wrap {
  width: min(100%, 17rem);
  margin-inline: auto;
}

.statistics-usage-pie {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.statistics-usage-track,
.statistics-usage-segment {
  fill: none;
  stroke-width: 60;
}

.statistics-usage-track {
  stroke: var(--bs-gray-200, #e9ecef);
}

.statistics-usage-segment {
  transform: rotate(-90deg);
  transform-box: fill-box;
  transform-origin: center;
}

.statistics-usage-legend {
  display: grid;
  gap: 0.65rem;
}

.statistics-usage-legend-item {
  display: grid;
  grid-template-columns: 0.85rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}

.summary-optional {
  margin-left: 0.25rem;
  font-size: 0.75em;
  font-weight: 400;
  color: var(--text-muted, #6b7280);
}

.statistics-usage-legend-marker {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.25rem;
  border: 1px solid rgb(0 0 0 / 18%);
  border-radius: 50%;
}

.statistics-usage-legend-content {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 0.75rem;
}

.statistics-usage-legend-value {
  flex: 0 0 auto;
  color: var(--bs-secondary-color, #6c757d);
  font-variant-numeric: tabular-nums;
}

.statistics-usage-empty {
  display: grid;
  min-height: 17rem;
  place-content: center;
  padding: 1rem;
}

.statistics-usage-segment.statistics-usage-color-0 {
  stroke: #0d6efd;
}

.statistics-usage-segment.statistics-usage-color-1 {
  stroke: #198754;
}

.statistics-usage-segment.statistics-usage-color-2 {
  stroke: #6f42c1;
}

.statistics-usage-segment.statistics-usage-color-3 {
  stroke: #fd7e14;
}

.statistics-usage-segment.statistics-usage-color-4 {
  stroke: #0dcaf0;
}

.statistics-usage-segment.statistics-usage-color-5 {
  stroke: #d63384;
}

.statistics-usage-segment.statistics-usage-color-6 {
  stroke: #795548;
}

.statistics-usage-segment.statistics-usage-color-7 {
  stroke: #6c757d;
}

.statistics-usage-legend-marker.statistics-usage-color-0 {
  background-color: #0d6efd;
}

.statistics-usage-legend-marker.statistics-usage-color-1 {
  background-color: #198754;
}

.statistics-usage-legend-marker.statistics-usage-color-2 {
  background-color: #6f42c1;
}

.statistics-usage-legend-marker.statistics-usage-color-3 {
  background-color: #fd7e14;
}

.statistics-usage-legend-marker.statistics-usage-color-4 {
  background-color: #0dcaf0;
}

.statistics-usage-legend-marker.statistics-usage-color-5 {
  background-color: #d63384;
}

.statistics-usage-legend-marker.statistics-usage-color-6 {
  background-color: #795548;
}

.statistics-usage-legend-marker.statistics-usage-color-7 {
  background-color: #6c757d;
}

@media (max-width: 575.98px) {
  .statistics-usage-legend-content {
    display: block;
  }

  .statistics-usage-legend-value {
    display: block;
    margin-top: 0.1rem;
  }
}

@media (min-width: 992px) {
  .app-shell {
    display: block;
  }

  #sidebarToggle,
  .sidebar-backdrop {
    display: none !important;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    z-index: 1030;
    transform: none !important;
  }

  .app-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }
}

@media (prefers-reduced-motion: reduce) {

  .app-sidebar,
  .sidebar-backdrop,
  .app-main,
  .sidebar-group-toggle i,
  .create-panel-toggle {
    transition: none !important;
  }
}

/* Badge Status Utilities */
.table-actions form {
  margin: 0;
}

.table-actions .btn {
  white-space: normal;
}

.clean-room-panel {
  box-shadow: 0 10px 24px rgba(18, 29, 52, 0.08);
}

.clean-room-panel>.card-header {
  padding: 0.44rem 0.62rem;
}

.clean-room-panel>.card-body {
  padding: 0.48rem 0.56rem;
}

.clean-room-panel .block-card-title {
  gap: 0.3rem;
  font-size: 0.95rem;
}.clean-room-main-compact {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
  width: 100%;
}

.clean-room-status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(18, 29, 52, 0.12);
  border-radius: 0.62rem;
  padding: 0.58rem 0.65rem;
  background: #fbfcfe;
}

.clean-room-status-strip.is-active {
  border-left: 4px solid rgba(220, 53, 69, 0.58);
}

.clean-room-status-strip.is-neutral {
  border-left: 4px solid rgba(108, 117, 125, 0.35);
}

.clean-room-status-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  color: var(--ui-text-secondary);
  font-size: 0.875rem;
  line-height: 1.25;
}

.clean-room-presence-main {
  color: #172033;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.clean-room-presence-count {
  color: var(--ui-text-secondary);
  font-weight: 600;
}

.clean-room-status-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.clean-room-status-action .reservation-action-form {
  display: flex;
}

.clean-room-entry-panel {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-width: 0;
  width: 100%;
}

.clean-room-entry-status {
  order: -1;
}

.clean-room-entry-disclosure {
  border: 1px solid rgba(18, 29, 52, 0.1);
  border-radius: 0.62rem;
  background: #fbfcfe;
  text-align: left;
}

.clean-room-entry-disclosure>summary {
  color: #172033;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  padding: 0.7rem;
}

.clean-room-entry-disclosure>summary::marker {
  color: #59359a;
}

.clean-room-entry-disclosure[open]>summary {
  border-bottom: 1px solid rgba(18, 29, 52, 0.1);
}

.clean-room-entry-disclosure-body {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem;
}

/* Equipment and group share the wide layout; description spans the next row.
   The grid collapses naturally at mobile/zoom widths without fixed dimensions,
   absolute positioning or horizontal clipping. */
.clean-room-entry-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.clean-room-entry-field {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.clean-room-entry-field label {
  color: #495057;
  font-size: 0.8125rem;
  font-weight: 700;
}

.clean-room-entry-field--description {
  grid-column: 1 / -1;
}

.clean-room-entry-hint {
  color: #59359a;
  font-size: 0.75rem;
  font-weight: 650;
}

.clean-room-occupancy-list {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.clean-room-occupant-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.26rem 0.48rem;
  min-width: 0;
  border: 1px solid rgba(18, 29, 52, 0.1);
  border-radius: 0.5rem;
  padding: 0.42rem 0.55rem;
  background: #fff;
  color: #495057;
  font-size: 0.875rem;
  line-height: 1.25;
}

.clean-room-occupant-chip.is-current {
  border-left: 4px solid rgba(13, 110, 253, 0.38);
  background: #fbfcfe;
}

.clean-room-occupant-chip.is-empty {
  color: var(--ui-text-secondary);
  background: #fbfcfe;
}

.clean-room-occupant-name {
  color: #172033;
  font-weight: 700;
}

.clean-room-occupant-duration {
  color: var(--ui-text-secondary);
  font-weight: 600;
}

.clean-room-occupant-status {
  min-width: 0;
  overflow-wrap: break-word;
}

.clean-room-immediate-usage {
  display: grid;
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid rgba(18, 29, 52, 0.1);
  border-radius: 0.62rem;
  background: #fbfcfe;
}

.clean-room-immediate-usage-copy,
.clean-room-usage-form {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.clean-room-usage-fields {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clean-room-usage-action-row {
  align-items: end;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.clean-room-usage-field {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.clean-room-usage-field label {
  color: #495057;
  font-size: 0.8125rem;
  font-weight: 700;
}

.clean-room-usage-submit {
  min-height: 2.35rem;
  white-space: nowrap;
}

.clean-room-primary-action {
  min-height: 2.55rem;
  min-width: 6.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}.reservation-slot-copy .reservation-primary {
  overflow-wrap: break-word;
  word-break: normal;
}.reservation-meta-item span {
  color: var(--ui-text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.reservation-primary {
  color: #172033;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.18;
}

.reservation-list {
  display: grid;
  gap: 0.42rem;
}

.reservation-slot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 0.34rem;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(18, 29, 52, 0.12);
  border-radius: 0.62rem;
  padding: 0.34rem 0.42rem;
  background: #fbfcfe;
  box-shadow: 0 1px 0 rgba(18, 29, 52, 0.04);
}

.reservation-slot-row.is-active {
  border-left: 4px solid rgba(220, 53, 69, 0.58);
}

.reservation-slot-row.is-upcoming {
  border-left: 4px solid rgba(255, 193, 7, 0.62);
}

.reservation-slot-row.is-neutral {
  border-left: 4px solid rgba(108, 117, 125, 0.35);
}

.reservation-slot-children {
  display: grid;
  gap: 0.34rem;
  margin-left: 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(220, 53, 69, 0.16);
}

.reservation-slot-child {
  background: #ffffff;
  border-color: rgba(18, 29, 52, 0.1);
  box-shadow: none;
}

.reservation-slot-main {
  display: grid;
  grid-template-columns: minmax(130px, 0.78fr) minmax(145px, 1.22fr);
  gap: 0.42rem;
  align-items: center;
  min-width: 0;
}

.reservation-slot-copy,
.reservation-slot-meta {
  min-width: 0;
}

.reservation-slot-copy {
  display: grid;
  gap: 0.08rem;
}

.reservation-muted {
  color: var(--ui-text-secondary);
  font-size: 0.825rem;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
}

.reservation-slot-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 0.32rem;
}

.reservation-meta-item {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.reservation-meta-item strong {
  color: #172033;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}.reservation-slot-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.24rem;
  min-width: 0;
  flex-wrap: wrap;
}

.reservation-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reservation-action-form {
  margin: 0;
}

.reservation-action.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.52rem;
  font-size: 0.8rem;
  line-height: 1;
}

.clean-room-alert-stack {
  margin-top: 0.22rem;
}

.clean-room-booking-layout {
  display: grid;
  grid-template-columns: minmax(245px, 0.72fr) minmax(0, 1.85fr);
  gap: 0.72rem;
  align-items: start;
}

.clean-room-booking-sidebar {
  display: grid;
  gap: 0.62rem;
  align-content: start;
  min-width: 0;
}.clean-room-booking-actions {
  display: grid;
  gap: 0.75rem;
}

.clean-room-submit-button {
  width: 100%;
}

.clean-room-booking-calendar {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.clean-room-slot-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.clean-room-slot-toolbar-copy {
  display: grid;
  gap: 0.2rem;
}

.clean-room-slot-toolbar-copy strong {
  font-size: 0.92rem;
}

.clean-room-slot-toolbar-copy span {
  color: #6c757d;
  font-size: 0.78rem;
  line-height: 1.32;
}

.clean-room-slot-legend {
  display: flex;
  gap: 0.42rem 0.55rem;
  flex-wrap: wrap;
}

.clean-room-slot-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: #495057;
  font-size: 0.76rem;
}

.clean-room-slot-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(18, 29, 52, 0.12);
  display: inline-block;
}

.clean-room-slot-grid {
  display: grid;
  gap: 0.4rem;
  min-width: min(100%, 520px);
  padding: 0.58rem;
  border: 1px solid rgba(18, 29, 52, 0.08);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(13, 110, 253, 0.02) 0%, rgba(255, 255, 255, 0.9) 100%),
    #fff;
}

.clean-room-slot-nav {
  display: flex;
  justify-content: center;
  margin: 0.45rem 0;
}

.clean-room-slot-nav-top {
  margin-top: -0.15rem;
}

.clean-room-slot-nav-bottom {
  margin-bottom: 0;
}

.clean-room-slot-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
}.clean-room-slot-day-separator {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #495057;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.clean-room-slot-day-separator::before,
.clean-room-slot-day-separator::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid rgba(18, 29, 52, 0.16);
}

.clean-room-slot-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
}

.clean-room-slot-row--hidden {
  display: none !important;
}

.clean-room-slot-hour {
  color: #6c757d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.clean-room-slot-cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.32rem;
}

.clean-room-slot {
  border: 1px solid rgba(18, 29, 52, 0.12);
  border-radius: 0.7rem;
  min-height: 2.05rem;
  padding: 0.34rem 0.38rem;
  font-size: 0.76rem;
  font-weight: 600;
  background: #fff;
  color: #172033;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.clean-room-slot:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(18, 29, 52, 0.1);
}

.clean-room-slot:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.clean-room-slot.is-free,
.clean-room-slot-swatch.is-free {
  background: #fff;
  border-color: rgba(25, 135, 84, 0.26);
  color: #146c43;
}.clean-room-slot.is-reserved,
.clean-room-slot-swatch.is-reserved {
  background: rgba(255, 193, 7, 0.24);
  border-color: rgba(202, 152, 0, 0.55);
  color: #664d03;
}

.clean-room-slot.is-own-reservation,
.clean-room-slot-swatch.is-own-reservation {
  background: rgba(111, 66, 193, 0.16);
  border-color: rgba(111, 66, 193, 0.48);
  color: #59359a;
}.clean-room-slot.is-partial,
.clean-room-slot-swatch.is-partial {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0 50%, #fff 50% 100%);
  border-color: rgba(202, 152, 0, 0.45);
  color: #495057;
}

.clean-room-slot.is-disabled,
.clean-room-slot-swatch.is-disabled {
  background: repeating-linear-gradient(135deg,
      rgba(73, 80, 87, 0.1),
      rgba(73, 80, 87, 0.1) 6px,
      rgba(233, 236, 239, 0.9) 6px,
      rgba(233, 236, 239, 0.9) 12px);
  border-color: rgba(73, 80, 87, 0.3);
  color: #343a40;
}

.clean-room-slot.is-past,
.clean-room-slot-swatch.is-past {
  background: rgba(233, 236, 239, 0.9);
  border-color: rgba(108, 117, 125, 0.18);
  color: #868e96;
}

.clean-room-slot.is-selected,
.clean-room-slot-swatch.is-selected {
  background: #0d6efd;
  border-color: #0b5ed7;
  color: #fff;
}@media (max-width: 1199.98px) {  .reservation-slot-main {
    grid-template-columns: minmax(130px, 0.75fr) minmax(150px, 1.25fr);
  }
}

@media (max-width: 1399.98px) {
  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1320px) {

  .reservation-slot-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .reservation-slot-side {
    justify-self: start;
    justify-content: flex-start;
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 991.98px) {
  .clean-room-booking-layout {
    grid-template-columns: 1fr;
  }

  .clean-room-status-strip {
    grid-template-columns: 1fr;
  }

  .clean-room-status-action {
    justify-content: flex-start;
  }

  .clean-room-status-action,
  .clean-room-status-action .reservation-action-form,
  .clean-room-primary-action {
    width: 100%;
  }

  .clean-room-usage-fields,
  .clean-room-usage-action-row {
    grid-template-columns: 1fr;
  }

  .clean-room-usage-submit {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .clean-room-entry-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .clean-room-entry-field--description {
    grid-column: auto;
  }  .reservation-slot-row,
  .reservation-slot-main,
  .reservation-slot-meta {
    grid-template-columns: 1fr;
  }  .reservation-slot-side {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }  .clean-room-slot-row {
    grid-template-columns: 1fr;
  }

  .clean-room-slot-cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reservation-action.btn {
    min-height: 2.5rem;
    min-width: 2.5rem;
  }

}
