html {
  font-size: 14px;
  min-height: 100%;
}

body {
  min-height: 100%;
  background: #eef2f6;
  color: #102033;
  line-height: 1.3;
  font-family: "Source Sans Pro", "Segoe UI", Arial, sans-serif;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.pg-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.pg-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #343a40;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 16px;
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
}

.pg-brand:hover {
  color: #fff;
}

.pg-brand-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffc107;
  color: #102033;
  font-size: 0.78rem;
  font-weight: 900;
}

.pg-user-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0 10px;
  padding: 18px 0;
}

.pg-user-panel strong,
.pg-user-panel small {
  display: block;
}

.pg-user-panel small {
  color: #c2c7d0;
}

.pg-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #17a2b8;
  color: #fff;
  font-weight: 900;
}

.pg-sidebar-nav {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.pg-sidebar-navigation-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pg-sidebar-navigation-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.pg-sidebar-nav a {
  border-radius: 4px;
  color: #cfd4da;
  padding: 11px 14px;
  text-decoration: none;
  font-weight: 650;
}

.pg-sidebar-nav a:hover,
.pg-sidebar-nav a:focus,
.pg-sidebar-nav a.is-active {
  background: #007bff;
  color: #fff;
}

.pg-main {
  min-width: 0;
  min-height: 100vh;
}

.pg-topbar {
  position: sticky;
  top: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  background: #343a40;
  color: #fff;
  padding: 0 18px;
}

.pg-topbar-left,
.pg-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pg-topbar-right span {
  color: #c2c7d0;
}

.pg-logout-form {
  margin: 0;
}

.pg-logout-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 800;
}

.pg-logout-button:hover,
.pg-logout-button:focus {
  background: #007bff;
}

.pg-menu-button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 901px) {
  .pg-shell { transition: grid-template-columns .18s ease; }
  .pg-shell.pg-sidebar-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
  .pg-shell.pg-sidebar-collapsed .pg-sidebar { overflow: visible; }
  .pg-shell.pg-sidebar-collapsed .pg-brand { justify-content: center; padding: 0; }
  .pg-shell.pg-sidebar-collapsed .pg-brand > span:last-child,
  .pg-shell.pg-sidebar-collapsed .pg-user-panel > div:last-child,
  .pg-shell.pg-sidebar-collapsed .pg-nav-label,
  .pg-shell.pg-sidebar-collapsed .pg-sidebar-students > div { display: none; }
  .pg-shell.pg-sidebar-collapsed .pg-user-panel { justify-content: center; margin: 0 6px; padding: 14px 0; }
  .pg-shell.pg-sidebar-collapsed .pg-sidebar-nav { gap: 7px; padding: 9px 8px; }
  .pg-shell.pg-sidebar-collapsed .pg-sidebar-nav a,
  .pg-shell.pg-sidebar-collapsed .pg-sidebar-students summary { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px !important; }
  .pg-shell.pg-sidebar-collapsed .pg-sidebar-students summary::after { display: none; }
}

.pg-nav-icon { display: inline-block; width: 20px; min-width: 20px; height: 20px; margin-right: 9px; color: currentColor; vertical-align: middle; }
.pg-shell.pg-sidebar-collapsed .pg-nav-icon { margin-right: 0; }

.pg-content {
  padding: 16px;
}

.pg-footer {
  border-top: 1px solid #d8dee5;
  background: #fff;
  color: #6c7885;
  line-height: 48px;
  padding: 0 16px;
}

.pg-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pg-page-heading h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.pg-page-heading p {
  margin: 0;
  color: #5f6d7a;
}

.pg-eyebrow {
  margin-bottom: 4px !important;
  color: #607080 !important;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pg-domain-pill {
  flex: 0 0 auto;
  border: 1px solid #b8c3cf;
  border-radius: 6px;
  background: #fff;
  padding: 8px 12px;
  font-weight: 700;
}

.pg-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.pg-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.pg-stat-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-radius: 6px;
  padding: 16px 18px;
  color: #fff;
  box-shadow: 0 1px 4px rgba(16, 32, 51, 0.15);
}

.pg-stat-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -24px;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(8deg);
}

.pg-stat-card span,
.pg-stat-card strong,
.pg-stat-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.pg-stat-card span {
  font-size: 0.92rem;
}

.pg-stat-card strong {
  margin: 8px 0 4px;
  font-size: 1.85rem;
  line-height: 1;
}

.pg-stat-card small {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
}

.is-blue { background: #2f83a8; }
.is-green { background: #248f72; }
.is-red { background: #cf4f35; }
.is-navy { background: #344e68; }
.is-olive { background: #5f963d; }
.is-orange { background: #ba6608; }
.is-teal { background: #148273; }
.is-purple { background: #6f5a91; }

.pg-workspace {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 14px;
}

.pg-panel {
  border: 1px solid #d3dbe3;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(16, 32, 51, 0.08);
}

.pg-panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.pg-module-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pg-module-list span {
  border: 1px solid #d7e0e8;
  border-radius: 4px;
  background: #f8fafc;
  padding: 8px 10px;
  font-weight: 650;
}

.pg-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pg-detail-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  border-bottom: 1px solid #edf1f5;
  padding-bottom: 8px;
}

.pg-detail-list dt {
  color: #627080;
  font-weight: 800;
}

.pg-detail-list dd {
  margin: 0;
  font-weight: 700;
}

.pg-admin-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1.05fr) minmax(420px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.pg-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf1f5;
  margin: -16px -16px 14px;
  padding: 12px 16px;
}

.pg-panel-title h2 {
  margin: 0;
}

.pg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.pg-form-grid.single {
  grid-template-columns: 1fr;
}

.pg-form-grid .form-group {
  margin-bottom: 0;
}

.pg-form-grid label,
.pg-section-title {
  color: #263748;
  font-size: 0.82rem;
  font-weight: 800;
}

.pg-section-title {
  border-top: 1px solid #edf1f5;
  margin: 14px 0 10px;
  padding-top: 12px;
}

.pg-switch-row {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-top: 18px;
}

.pg-module-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pg-module-check {
  min-height: 34px;
  border: 1px solid #d9e2ea;
  border-radius: 4px;
  background: #f8fafc;
  padding: 7px 10px 7px 30px;
  font-weight: 650;
}

.pg-module-check:hover {
  border-color: #2f83a8;
  background: #eef8fb;
}

.pg-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf1f5;
  margin: 14px -16px -16px;
  padding: 12px 16px;
}

.pg-mini-badge {
  border-radius: 4px;
  background: #e8f4f7;
  color: #17647f;
  padding: 4px 8px;
  font-weight: 800;
}

.pg-empty-state {
  border: 1px dashed #b8c3cf;
  border-radius: 6px;
  background: #f8fafc;
  padding: 16px;
}

.pg-empty-state strong,
.pg-empty-state span {
  display: block;
}

.pg-login-shell {
  display: grid;
  min-height: calc(100vh - 140px);
  place-items: center;
}

.pg-login-card {
  width: min(420px, 100%);
  border: 1px solid #d3dbe3;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.12);
}

.pg-login-switch {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf1f5;
  margin: 14px -16px -16px;
  padding: 12px 16px;
}

.pg-login-switch span {
  color: #5d6b79;
}

.pg-public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.4fr);
  gap: 18px;
  align-items: center;
  border: 1px solid #d3dbe3;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff, #eef8fb);
  margin-bottom: 16px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(16, 32, 51, 0.08);
}

.pg-public-hero h1 {
  max-width: 880px;
  margin: 0 0 10px;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.pg-public-hero p {
  max-width: 760px;
  margin: 0;
  color: #536474;
  font-size: 1.05rem;
}

.pg-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pg-public-panel {
  border-left: 5px solid #17a2b8;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(16, 32, 51, 0.1);
}

.pg-public-panel strong,
.pg-public-panel span {
  display: block;
}

.pg-public-panel strong {
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 850;
}

.pg-public-panel span {
  color: #5d6b79;
}

.pg-public-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1.15fr) minmax(420px, 0.85fr);
  gap: 14px;
}

.pg-tenant-list {
  display: grid;
  gap: 12px;
}

.pg-tenant-card {
  overflow: hidden;
  border: 1px solid #d4dde6;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 32, 51, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.pg-tenant-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.13);
}

.pg-tenant-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #17645f;
  color: #fff;
  padding: 12px 14px;
}

.pg-tenant-card-top h3 {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 850;
}

.pg-tenant-card-top small {
  color: rgba(255, 255, 255, 0.82);
}

.pg-code {
  color: #e6f7ef;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.pg-tenant-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.pg-tenant-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.pg-tenant-metrics div {
  border-right: 1px solid #edf1f5;
  padding: 10px 12px;
}

.pg-tenant-metrics div:last-child {
  border-right: 0;
}

.pg-tenant-metrics dt {
  color: #617080;
  font-size: 0.76rem;
  font-weight: 800;
}

.pg-tenant-metrics dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 800;
}

.pg-tenant-note {
  display: grid;
  gap: 3px;
  border-top: 1px solid #edf1f5;
  background: #fbfcfe;
  padding: 9px 12px;
  color: #536474;
  font-size: 0.82rem;
}

.pg-tenant-note span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-tenant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #edf1f5;
  padding: 10px 12px;
}

.pg-tenant-actions form {
  margin: 0;
}

.pg-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.pg-dashboard-kpi-grid .pg-stat-card {
  min-height: 112px;
  padding: 14px 15px;
}

.pg-dashboard-kpi-grid .pg-stat-card strong {
  font-size: 1.55rem;
}

.pg-tenant-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.85fr) minmax(520px, 1.15fr);
  gap: 14px;
  margin-bottom: 14px;
}

.pg-module-list.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pg-module-list.compact span {
  min-height: 34px;
  padding: 7px 9px;
}

.pg-dashboard-queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pg-dashboard-queue div {
  border: 1px solid #d7e0e8;
  border-radius: 4px;
  background: #f8fafc;
  padding: 10px 12px;
}

.pg-dashboard-queue strong,
.pg-dashboard-queue span {
  display: block;
}

.pg-dashboard-queue strong {
  margin-bottom: 4px;
}

.pg-dashboard-queue span {
  color: #657382;
  font-size: 0.84rem;
}

.pg-user-admin-grid {
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(520px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.pg-switch-row.compact {
  min-height: 30px;
  padding-top: 10px;
}

.pg-user-role-list {
  display: grid;
  gap: 10px;
}

.pg-user-role-card {
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fbfcfe;
  padding: 11px 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-user-role-card:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.pg-user-role-card strong,
.pg-user-role-card span {
  display: block;
}

.pg-user-role-card strong {
  font-size: 1rem;
  font-weight: 850;
}

.pg-user-role-card span {
  color: #5d6b79;
}

.pg-user-role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.pg-user-role-card p {
  overflow-wrap: anywhere;
  margin: 0;
  color: #536474;
  font-size: 0.84rem;
}

.pg-db-setup-grid {
  display: grid;
  grid-template-columns: minmax(560px, 0.95fr) minmax(420px, 0.65fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.pg-db-picker label {
  color: #263748;
  font-size: 0.82rem;
  font-weight: 800;
}

.pg-form-actions.inline-actions {
  margin: 14px -16px -16px;
}

.pg-schema-boundary {
  display: grid;
  gap: 8px;
  border-left: 4px solid #17a2b8;
  background: #f3fbfd;
  padding: 12px 14px;
}

.pg-schema-boundary strong {
  font-size: 1rem;
}

.pg-schema-boundary span {
  color: #536474;
}

.pg-schema-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pg-schema-card {
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fff;
}

.pg-schema-card header {
  display: grid;
  gap: 3px;
  background: #17645f;
  color: #fff;
  padding: 10px 12px;
}

.pg-schema-card header strong {
  font-size: 1rem;
  font-weight: 850;
}

.pg-schema-card header span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
}

.pg-schema-table {
  font-size: 0.82rem;
}

.pg-schema-table th {
  color: #263748;
  white-space: nowrap;
}

.pg-schema-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pg-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  background: rgba(16, 32, 51, 0.42);
  padding: 20px;
}

.pg-progress-overlay.is-visible {
  display: grid;
}

.pg-progress-dialog {
  width: min(720px, 100%);
  border: 1px solid #b8c3cf;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 32, 51, 0.26);
  padding: 18px;
}

.pg-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pg-progress-header strong,
.pg-progress-header span {
  display: block;
}

.pg-progress-header strong {
  color: #102033;
  font-size: 1.15rem;
  font-weight: 850;
}

.pg-progress-header span {
  color: #607080;
}

#pgProgressPercent {
  color: #148273;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.pg-progress-bar-track {
  overflow: hidden;
  height: 16px;
  border: 1px solid #b8c3cf;
  border-radius: 4px;
  background: #edf1f5;
}

.pg-progress-bar-fill {
  width: 0;
  height: 100%;
  background: #28a745;
  transition: width 0.3s ease;
}

.pg-progress-steps {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.pg-progress-steps li {
  color: #667584;
  font-weight: 650;
}

.pg-progress-steps li.is-active {
  color: #102033;
}


.pg-rooms-grid {
  display: grid;
  grid-template-columns: minmax(560px, 0.85fr) minmax(520px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.pg-rent-grid {
  display: grid;
  grid-template-columns: minmax(640px, 1.05fr) minmax(420px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.pg-room-list {
  display: grid;
  gap: 10px;
}

.pg-room-card {
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fff;
}

.pg-room-card > div:first-child {
  background: #17645f;
  color: #fff;
  padding: 10px 12px;
}

.pg-room-card strong,
.pg-room-card small {
  display: block;
}

.pg-room-card strong {
  font-size: 1.05rem;
  font-weight: 850;
}

.pg-room-card small {
  color: rgba(255, 255, 255, 0.82);
}

.pg-room-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.pg-room-card dl div {
  border-right: 1px solid #edf1f5;
  padding: 8px 10px;
}

.pg-room-card dl div:last-child {
  border-right: 0;
}

.pg-room-card dt {
  color: #617080;
  font-size: 0.76rem;
  font-weight: 800;
}

.pg-room-card dd {
  margin: 0;
  font-weight: 850;
}

.pg-bed-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(110px, 1fr));
  gap: 8px;
}

.pg-bed-tile {
  border: 1px solid #d7e0e8;
  border-left: 5px solid #28a745;
  border-radius: 6px;
  background: #fbfcfe;
  padding: 9px 10px;
}

.pg-bed-tile strong,
.pg-bed-tile span,
.pg-bed-tile small {
  display: block;
}

.pg-bed-tile strong {
  font-weight: 850;
}

.pg-bed-tile span,
.pg-bed-tile small {
  color: #5d6b79;
  font-size: 0.78rem;
}

.pg-bed-tile.status-occupied {
  border-left-color: #344e68;
}

.pg-bed-tile.status-maintenance {
  border-left-color: #ba6608;
}

.pg-bed-tile.status-blocked {
  border-left-color: #cf4f35;
}

.pg-allocation-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(390px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #cfe0e8;
  border-left: 5px solid #17647f;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(18, 43, 53, 0.08);
  padding: 14px;
}

.pg-allocation-occupant {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.pg-allocation-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: #17647f;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 850;
}

.pg-allocation-occupant h2 {
  margin: 2px 0;
  color: #173c4b;
  font-size: 1.08rem;
  font-weight: 850;
}

.pg-allocation-occupant p {
  margin: 0;
  color: #60717c;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.pg-allocation-date-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.pg-allocation-date-form label {
  display: block;
  margin-bottom: 3px;
  color: #3c5360;
  font-size: 0.76rem;
  font-weight: 850;
}

.pg-allocation-counts {
  display: grid;
  gap: 5px;
  min-width: 105px;
  color: #4f6470;
  font-size: 0.76rem;
}

.pg-allocation-counts span,
.pg-allocation-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-allocation-counts b {
  font-size: 1.12rem;
}

.pg-allocation-counts .available { color: #16843d; }
.pg-allocation-counts .occupied { color: #c53c42; }

.pg-available-beds-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid #d3dbe3;
  border-radius: 6px;
  background: #fff;
  padding: 12px 14px;
}

.pg-occupation-filter { display: grid; gap: 4px; min-width: 220px; }
.pg-sidebar-students { border: 1px solid rgba(208, 221, 232, .17); border-radius: 5px; }
.pg-sidebar-students summary { cursor: pointer; color: #e8f0f6; font-size: .88rem; font-weight: 750; list-style: none; padding: 10px 12px; }
.pg-sidebar-students summary::-webkit-details-marker { display: none; }
.pg-sidebar-students summary::after { content: "+"; float: right; color: #b8cad9; }
.pg-sidebar-students[open] summary::after { content: "−"; }
.pg-sidebar-students > div { display: grid; gap: 1px; padding: 0 6px 7px; }
.pg-sidebar-students > div > span { color: #b9c9d6; font-size: .68rem; font-weight: 800; padding: 4px 7px 2px; text-transform: uppercase; }
.pg-sidebar-students a { padding: 6px 8px !important; color: #d7e4ed !important; font-size: .78rem !important; }
.pg-occupation-filter label { color: #26465d; font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.pg-bed-legend { display: flex; flex-wrap: wrap; gap: 13px; padding-bottom: 8px; }
.pg-bed-legend span { display: inline-flex; align-items: center; gap: 6px; color: #405361; font-size: .82rem; font-weight: 700; }
.pg-bed-legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.pg-bed-legend .available { background: #26a75a; }
.pg-bed-legend .occupied { background: #d64a4f; }
.pg-bed-legend .compatible { background: #2879d8; }
.pg-bed-legend .mixed { background: #d9931d; }
.pg-auto-refresh { margin-left: auto; padding-bottom: 8px; color: #697b87; font-size: .78rem; }
.pg-available-beds-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-available-beds-board { display: grid; gap: 14px; }
.pg-available-floor > header { align-items: center; }
.pg-floor-counts { display: flex; gap: 12px; font-size: .78rem; font-weight: 800; }
.pg-floor-counts .available { color: #13813c; }
.pg-floor-counts .occupied { color: #bf3f44; }
.pg-available-room-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.pg-available-room { min-width: 0; border: 1px solid #cfe0e8; border-radius: 5px; background: #fff; padding: 10px; }
.pg-available-room > header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.pg-available-room header strong, .pg-available-room header span { display: block; }
.pg-available-room header strong { color: #164f87; font-size: .86rem; font-weight: 850; }
.pg-available-room header span, .pg-available-room header small { color: #657681; font-size: .71rem; }
.pg-available-room header small { text-align: right; white-space: nowrap; }
.pg-available-bed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pg-available-bed { min-width: 0; min-height: 62px; border: 1px solid; border-radius: 5px; padding: 5px 2px; cursor: pointer; text-align: center; font: inherit; transition: transform 150ms ease, box-shadow 150ms ease; }
.pg-available-bed:hover, .pg-available-bed:focus-visible { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(16, 32, 51, .18); outline: 0; }
.pg-available-bed.is-available { border-color: #9ad9af; background: #effbf2; color: #14743a; }
.pg-available-bed.is-occupied { border-color: #ecb2b5; background: #fff1f1; color: #bd353b; }
.pg-available-bed.compatible { box-shadow: inset 0 -3px 0 #2879d8; }
.pg-available-bed.mixed { box-shadow: inset 0 -3px 0 #d9931d; }
.pg-available-bed strong, .pg-available-bed small { display: block; line-height: 1.1; }
.pg-available-bed strong { font-size: .82rem; font-weight: 900; }
.pg-available-bed small { overflow: hidden; text-overflow: ellipsis; font-size: .64rem; white-space: nowrap; }
.pg-seat-icon { display: block; font-size: 1rem; line-height: .9; }
.pg-bed-detail-dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 28px); border: 0; border-radius: 7px; box-shadow: 0 18px 46px rgba(8, 28, 45, .32); padding: 22px; }
.pg-bed-detail-dialog::backdrop { background: rgba(11, 28, 41, .55); }
.pg-dialog-close { float: right; }
.pg-dialog-close button { border: 0; background: transparent; color: #536672; font-size: 1.7rem; line-height: 1; }
.pg-bed-detail-dialog h2 { margin: 3px 0 15px; color: #163d63; font-size: 1.25rem; font-weight: 850; }
.pg-bed-detail-dialog h3 { margin: 0 0 10px; color: #24465f; font-size: .95rem; font-weight: 850; }
.pg-bed-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 16px; border: 1px solid #d9e2e9; background: #d9e2e9; }
.pg-bed-detail-list div { min-width: 0; background: #fff; padding: 8px 10px; }
.pg-bed-detail-list dt { color: #687a86; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.pg-bed-detail-list dd { overflow-wrap: anywhere; margin: 2px 0 0; color: #233c51; font-size: .86rem; font-weight: 700; }
.pg-bed-allocation-form { border-top: 1px solid #d9e2e9; padding-top: 14px; }
.pg-bed-order-form { display: flex; align-items: end; gap: 10px; margin-top: 16px; border-top: 1px solid #d9e2e9; padding-top: 14px; }
.pg-bed-order-form > div { flex: 1; }
.pg-bed-order-form label { display: block; margin-bottom: 4px; font-size: .78rem; font-weight: 800; }

.pg-simple-allocation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pg-occupant-search-box { position: relative; }
.pg-occupant-search-box label { display: block; margin-bottom: 6px; color: #26465d; font-size: .82rem; font-weight: 800; }
.pg-occupant-results { position: absolute; z-index: 10; top: 70px; right: 0; left: 0; overflow: hidden; border: 1px solid #b9cad7; border-radius: 5px; background: #fff; box-shadow: 0 8px 20px rgba(18, 42, 61, .16); }
.pg-occupant-results:empty { display: none; }
.pg-occupant-results button { display: block; width: 100%; border: 0; border-bottom: 1px solid #e4edf2; background: #fff; padding: 10px 12px; color: #254256; text-align: left; }
.pg-occupant-results button:hover, .pg-occupant-results button:focus { background: #f1f8fc; outline: 0; }
.pg-occupant-results strong, .pg-occupant-results span { display: block; }
.pg-occupant-results strong { font-size: .87rem; font-weight: 850; }
.pg-occupant-results span, .pg-search-empty { color: #698090; font-size: .75rem; }
.pg-allocation-queues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.pg-queue-list { display: grid; gap: 8px; max-height: 330px; overflow-y: auto; }
.pg-queue-item { display: grid; gap: 2px; width: 100%; border: 1px solid #d6e2eb; border-left: 4px solid #1c9cb5; border-radius: 5px; background: #fff; padding: 10px 12px; color: #254256; text-align: left; }
.pg-queue-item:hover, .pg-queue-item:focus { border-color: #1786aa; background: #f2f9fc; outline: 0; }
.pg-queue-item.is-assigned { border-left-color: #3f7cbc; }
.pg-queue-item strong { font-size: .9rem; }
.pg-queue-item span, .pg-queue-item small { color: #657e93; font-size: .77rem; overflow-wrap: anywhere; }
.pg-assignment-history { display: grid; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e4edf2; }
.pg-assignment-history strong { color: #294a60; font-size: .78rem; text-transform: uppercase; }
.pg-assignment-history span { color: #657e93; font-size: .78rem; }
.pg-profile-card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pg-profile-card-tile { display: grid; gap: 8px; min-width: 0; border: 1px solid #d5e2eb; border-radius: 6px; background: #fff; padding: 10px; color: #23435a; text-align: center; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pg-profile-card-tile:hover, .pg-profile-card-tile:focus { border-color: #1786aa; box-shadow: 0 7px 17px rgba(20, 64, 89, .15); color: #173f6c; outline: 0; transform: translateY(-2px); }
.pg-profile-card-tile.is-former { opacity: .72; }
.pg-profile-card-photo { display: grid; width: 100%; aspect-ratio: 1; place-items: center; overflow: hidden; border-radius: 5px; background: #eaf3f8; color: #176f91; font-size: 1.5rem; font-weight: 850; }
.pg-profile-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.pg-profile-card-tile strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.pg-profile-card-tile span { color: #6b8191; font-size: .7rem; }
.pg-document-dialog { width: min(900px, calc(100vw - 28px)); max-height: calc(100vh - 28px); border: 0; border-radius: 7px; padding: 0; box-shadow: 0 18px 46px rgba(8, 28, 45, .32); }
.pg-document-dialog::backdrop { background: rgba(11, 28, 41, .62); }
.pg-document-dialog header, .pg-document-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; background: #f5f9fc; }
.pg-document-dialog header { border-bottom: 1px solid #dce6ed; }
.pg-document-dialog footer { border-top: 1px solid #dce6ed; justify-content: flex-end; }
.pg-document-dialog header p { margin: 0; color: #1e759f; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.pg-document-dialog h2 { margin: 2px 0 0; color: #173f6c; font-size: 1rem; }
.pg-document-dialog header button { border: 0; background: transparent; color: #536672; font-size: 1.7rem; line-height: 1; }
.pg-document-preview { display: grid; min-height: 300px; max-height: calc(100vh - 190px); place-items: center; overflow: auto; background: #eaf1f5; padding: 14px; }
.pg-document-preview img { max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; }
.pg-document-preview iframe { width: 100%; height: min(680px, calc(100vh - 220px)); border: 0; background: #fff; }
.pg-document-preview > div { display: grid; gap: 6px; max-width: 340px; color: #536d80; text-align: center; }
@media (max-width: 1100px) { .pg-profile-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .pg-allocation-queues, .pg-profile-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pg-search-empty { display: block; padding: 11px 12px; }
.pg-selected-occupant { margin-top: 18px; border-left: 4px solid #1d9bb4; background: #f4fbff; padding: 13px; }
.pg-selected-occupant h3 { margin: 3px 0 10px; color: #173f6c; font-size: 1.05rem; font-weight: 850; }
.pg-selected-occupant dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 0; }
.pg-selected-occupant dt { color: #698090; font-size: .69rem; font-weight: 800; text-transform: uppercase; }
.pg-selected-occupant dd { margin: 2px 0 0; color: #29475a; font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.pg-user-password-reset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: end; margin-top: 16px; border-top: 1px solid #dce5eb; padding-top: 14px; }
.pg-user-password-reset label { grid-column: 1 / -1; margin: 0; color: #526a7a; font-size: .78rem; font-weight: 800; }
.pg-tenant-admin-controls { display: grid; gap: 8px; margin-top: 12px; border-top: 1px solid #dde6ec; padding-top: 11px; }
.pg-tenant-admin-controls > strong { color: #345369; font-size: .77rem; text-transform: uppercase; }
.pg-tenant-admin-controls form { margin: 0; }
.pg-tenant-admin-controls > form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pg-tenant-admin-controls > div { display: flex; flex-wrap: wrap; gap: 7px; }

.pg-allocation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.27fr);
  gap: 14px;
  margin-top: 14px;
}

.pg-building-board {
  display: grid;
  gap: 12px;
}

.pg-floor-section {
  overflow: hidden;
  border: 1px solid #cfe0e8;
  border-radius: 6px;
  background: #f8fcff;
}

.pg-floor-section > header,
.pg-allocation-room-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pg-floor-section > header {
  border-bottom: 1px solid #d7e8f2;
  background: #eaf6fd;
  color: #17647f;
  padding: 9px 12px;
}

.pg-floor-section > header h2 {
  margin: 1px 0 0;
  font-size: 1rem;
  font-weight: 850;
}

.pg-floor-section > header > span,
.pg-allocation-room-card > header > span {
  color: #1d765a;
  font-size: 0.78rem;
  font-weight: 850;
}

.pg-allocation-room-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.pg-allocation-room-card {
  min-width: 0;
  border: 1px solid #cfe0e8;
  border-radius: 5px;
  background: #fff;
  padding: 9px;
}

.pg-allocation-room-card > header {
  align-items: flex-start;
  margin-bottom: 8px;
}

.pg-allocation-room-card strong,
.pg-allocation-room-card header span {
  display: block;
}

.pg-allocation-room-card strong {
  color: #164f87;
  font-size: 0.86rem;
  font-weight: 850;
}

.pg-allocation-room-card header span {
  color: #657681;
  font-size: 0.72rem;
}

.pg-allocation-bed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pg-bed-booking-form { margin: 0; }

.pg-visual-bed {
  width: 100%;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid #bfe5cd;
  border-radius: 5px;
  background: #f4fff7;
  color: #19713a;
  cursor: pointer;
  padding: 7px;
  text-align: left;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.pg-visual-bed:hover:not(:disabled),
.pg-visual-bed:focus-visible:not(:disabled) {
  border-color: #16843d;
  box-shadow: 0 5px 13px rgba(22, 132, 61, 0.2);
  outline: 0;
  transform: translateY(-2px);
}

.pg-visual-bed.is-unavailable {
  border-color: #f0c3c5;
  background: #fff7f7;
  color: #be4147;
  cursor: not-allowed;
  opacity: 0.78;
}

.pg-visual-bed span,
.pg-visual-bed strong,
.pg-visual-bed small,
.pg-visual-bed em { display: block; }

.pg-bed-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.pg-visual-bed strong {
  margin-top: 3px;
  font-size: 0.76rem;
  font-weight: 850;
}

.pg-visual-bed small,
.pg-visual-bed em {
  overflow: hidden;
  color: inherit;
  font-size: 0.68rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-visual-bed em { opacity: 0.75; }

.pg-allocation-help {
  display: grid;
  align-content: start;
  gap: 14px;
}

.pg-allocation-help .pg-panel { margin: 0; }

.pg-allocation-help p {
  margin: 0;
  color: #5d6b79;
  font-size: 0.82rem;
  line-height: 1.5;
}

.pg-allocation-legend { display: grid; gap: 9px; margin-bottom: 12px; color: #536772; font-size: 0.78rem; }
.pg-allocation-legend i { width: 12px; height: 12px; border-radius: 3px; }
.pg-allocation-legend i.available { background: #28a745; }
.pg-allocation-legend i.occupied { background: #dc3545; }

.pg-allocation-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pg-allocation-details dt { color: #60717c; font-size: 0.72rem; font-weight: 800; }
.pg-allocation-details dd { margin: 2px 0 0; color: #203b48; font-size: 0.82rem; font-weight: 850; overflow-wrap: anywhere; }

.pg-record-table {
  font-size: 0.86rem;
}

.pg-record-table th {
  color: #263748;
  white-space: nowrap;
}

.pg-record-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pg-payment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pg-payment-card {
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-left: 5px solid #cf4f35;
  border-radius: 6px;
  background: #fff;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-payment-card:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.pg-payment-card.is-paid {
  border-left-color: #28a745;
}

.pg-payment-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  background: #fbfcfe;
  padding: 10px 12px;
}

.pg-payment-card header strong,
.pg-payment-card header span {
  display: block;
}

.pg-payment-card header strong {
  font-size: 1rem;
  font-weight: 850;
}

.pg-payment-card header span {
  color: #5d6b79;
  font-size: 0.82rem;
}

.pg-payment-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.pg-payment-card dl div {
  border-right: 1px solid #edf1f5;
  padding: 8px 10px;
}

.pg-payment-card dl div:last-child {
  border-right: 0;
}

.pg-payment-card dt {
  color: #617080;
  font-size: 0.76rem;
  font-weight: 800;
}

.pg-payment-card dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 850;
}

.pg-due-alert-panel {
  border-top: 4px solid #cf4f35;
  margin-bottom: 14px;
}

.pg-due-alert-list {
  display: grid;
  gap: 10px;
}

.pg-due-alert-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.35fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e3c1b8;
  border-left: 5px solid #cf4f35;
  border-radius: 6px;
  background: #fff8f6;
  padding: 10px 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-due-alert-card:hover {
  border-color: #ba6608;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.pg-due-alert-card strong,
.pg-due-alert-card span {
  display: block;
}

.pg-due-alert-card strong {
  font-size: 1rem;
  font-weight: 850;
}

.pg-due-alert-card span {
  color: #5d6b79;
  font-size: 0.82rem;
}

.pg-due-alert-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.pg-due-alert-card dt {
  color: #6f4035;
  font-size: 0.74rem;
  font-weight: 850;
}

.pg-due-alert-card dd {
  margin: 0;
  color: #102033;
  font-weight: 900;
}

.pg-due-status {
  border-radius: 4px;
  background: #cf4f35;
  color: #fff !important;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
  font-weight: 850;
}

.pg-record-card-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pg-record-download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pg-record-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fff;
  padding: 11px 12px;
  box-shadow: 0 1px 3px rgba(16, 32, 51, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-record-download-card:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.pg-record-download-card strong,
.pg-record-download-card span {
  display: block;
}

.pg-record-download-card strong {
  font-size: 1rem;
  font-weight: 850;
}

.pg-record-download-card span {
  color: #5d6b79;
  font-size: 0.82rem;
}

.pg-records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.pg-expense-card-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pg-payment-tracking-card-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.pg-expenses-grid {
  display: grid;
  grid-template-columns: minmax(560px, 0.85fr) minmax(520px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.pg-expense-list {
  display: grid;
  gap: 10px;
}

.pg-expense-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7e0e8;
  border-left: 5px solid #ba6608;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-expense-row:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.pg-expense-row strong,
.pg-expense-row span {
  display: block;
}

.pg-expense-row span {
  color: #5d6b79;
  font-size: 0.82rem;
}

.pg-payment-tracking-table td,
.pg-payment-tracking-table th {
  text-align: right;
}

.pg-payment-tracking-table td:first-child,
.pg-payment-tracking-table th:first-child {
  text-align: left;
}

.pg-bulk-grid {
  display: grid;
  grid-template-columns: minmax(560px, 0.8fr) minmax(520px, 1.2fr);
  gap: 14px;
  align-items: start;
}

.pg-error-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #842029;
}

.pg-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.3fr) minmax(360px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.pg-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pg-search-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-search-card:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.pg-search-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.pg-search-card header strong,
.pg-search-card header small,
.pg-search-card footer span,
.pg-search-card footer a {
  display: block;
}

.pg-search-card header strong {
  color: #102033;
  font-size: 1.02rem;
  font-weight: 850;
}

.pg-search-card header small,
.pg-search-card footer {
  color: #5d6b79;
  font-size: 0.82rem;
}

.pg-search-card .pg-code {
  color: #17647f;
}

.pg-search-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.pg-search-card dt {
  color: #617080;
  font-size: 0.74rem;
  font-weight: 800;
}

.pg-search-card dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 850;
}

.pg-search-card footer {
  border-top: 1px solid #edf1f5;
  padding-top: 8px;
}

.pg-gallery-tools {
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(560px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.pg-gallery-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.5fr) auto;
  gap: 10px;
  align-items: end;
}

.pg-gallery-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pg-gallery-pill {
  border: 1px solid #17a2b8;
  border-radius: 999px;
  color: #147183;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  min-width: 82px;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.pg-gallery-pill:hover,
.pg-gallery-pill:focus-visible,
.pg-gallery-pill.active {
  background: #17a2b8;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.pg-gallery-scroll-shell {
  max-height: calc(100vh - 330px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 8px 14px 2px;
}

.pg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.pg-gallery-card {
  overflow: hidden;
  border: 1px solid #dfe7ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18, 43, 53, 0.08);
  min-width: 0;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.pg-gallery-card:hover,
.pg-gallery-card:focus-within {
  box-shadow: 0 16px 34px rgba(18, 43, 53, 0.16);
  transform: translateY(-4px);
}

.pg-gallery-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef4f6;
}

.pg-gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 180ms ease;
}

.pg-gallery-card:hover .pg-gallery-frame img {
  transform: scale(1.035);
}

.pg-gallery-card-body {
  padding: 10px;
}

.pg-gallery-card-body h3,
.pg-gallery-card-body p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-gallery-card-body h3 {
  margin: 7px 0 3px;
  color: #213943;
  font-size: 0.95rem;
  font-weight: 850;
}

.pg-gallery-card-body p {
  margin: 0;
  color: #62757d;
  font-size: 0.86rem;
}

.pg-audit-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pg-audit-grid {
  display: grid;
  grid-template-columns: minmax(520px, 0.85fr) minmax(620px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.pg-delete-review-list {
  display: grid;
  gap: 10px;
}

.pg-delete-review-card {
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-left: 5px solid #ffc107;
  border-radius: 6px;
  background: #fff;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-delete-review-card:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.13);
  transform: translateY(-1px);
}

.pg-delete-review-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #17645f;
  color: #fff;
  padding: 12px 14px;
}

.pg-delete-review-card header h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 850;
}

.pg-delete-review-card header small {
  color: rgba(255, 255, 255, 0.82);
}

.pg-delete-review-card p,
.pg-delete-review-card > small {
  display: block;
  margin: 0;
  padding: 10px 12px 0;
}

.pg-delete-review-card > small {
  color: #5d6b79;
  padding-bottom: 10px;
}

.pg-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #edf1f5;
  padding: 10px 12px;
}

.pg-review-actions form,
.pg-user-delete-request {
  display: flex;
  gap: 8px;
}

.pg-review-actions .form-control,
.pg-user-delete-request .form-control {
  min-width: 0;
}

.pg-user-delete-request {
  border-top: 1px solid #edf1f5;
  margin-top: 10px;
  padding-top: 10px;
}

.pg-diagnostics-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pg-diagnostic-tenant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pg-diagnostic-card {
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-left: 5px solid #ffc107;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 32, 51, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pg-diagnostic-card:hover {
  border-color: #2f83a8;
  box-shadow: 0 5px 14px rgba(16, 32, 51, 0.13);
  transform: translateY(-1px);
}

.pg-diagnostic-card.status-healthy {
  border-left-color: #28a745;
}

.pg-diagnostic-card.status-error {
  border-left-color: #dc3545;
}

.pg-diagnostic-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #17645f;
  color: #fff;
  padding: 12px 14px;
}

.pg-diagnostic-card header h3 {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 850;
}

.pg-diagnostic-card header small {
  color: rgba(255, 255, 255, 0.82);
}

.pg-health-badge {
  align-self: start;
  border-radius: 4px;
  padding: 4px 8px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.pg-health-badge.status-healthy {
  background: #28a745;
}

.pg-health-badge.status-warning {
  background: #ffc107;
  color: #102033;
}

.pg-health-badge.status-error {
  background: #dc3545;
}

.pg-diagnostic-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.pg-diagnostic-metrics div {
  border-right: 1px solid #edf1f5;
  padding: 9px 12px;
}

.pg-diagnostic-metrics div:last-child {
  border-right: 0;
}

.pg-diagnostic-metrics dt {
  color: #617080;
  font-size: 0.76rem;
  font-weight: 800;
}

.pg-diagnostic-metrics dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 850;
}

.pg-check-list {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
}

.pg-check-list.expanded {
  padding: 0;
}

.pg-check-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #d7e0e8;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  background: #fbfcfe;
  padding: 8px 10px;
}

.pg-check-row.status-healthy {
  border-left-color: #28a745;
}

.pg-check-row.status-error {
  border-left-color: #dc3545;
}

.pg-check-row strong {
  font-weight: 850;
}

.pg-check-row span {
  color: #5d6b79;
  overflow-wrap: anywhere;
}

.pg-diagnostic-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #edf1f5;
  padding: 10px 12px;
}

@media (max-width: 1200px) {
  .pg-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pg-record-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pg-payment-tracking-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pg-dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pg-module-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pg-tenant-dashboard-grid,
  .pg-user-admin-grid,
  .pg-public-hero,
  .pg-public-grid,
  .pg-db-setup-grid,
  .pg-admission-grid,
  .pg-rooms-grid,
  .pg-rent-grid,
  .pg-expenses-grid,
  .pg-audit-grid,
  .pg-review-actions,
  .pg-record-download-grid,
  .pg-records-grid,
  .pg-bulk-grid,
  .pg-search-form,
  .pg-search-results,
  .pg-gallery-tools,
  .pg-gallery-filter-form,
  .pg-schema-table-grid,
  .pg-diagnostic-tenant-grid,
  .pg-dashboard-queue {
    grid-template-columns: 1fr;
  }

  .pg-allocation-summary,
  .pg-allocation-layout {
    grid-template-columns: 1fr;
  }

  .pg-allocation-room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pg-bed-board,
  .pg-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .pg-public-page-hero { min-height: 360px; padding-top: 56px; padding-bottom: 56px; }
  .pg-public-feature-grid, .pg-public-city-grid, .pg-public-price-grid, .pg-public-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-public-page-search { grid-template-columns: 1fr 1fr; }
  .pg-public-page-search button { min-height: 44px; }
}

@media (max-width: 560px) {
  .pg-public-page-hero { min-height: 330px; padding-right: 20px; padding-left: 20px; }
  .pg-public-page-section { padding: 48px 20px; }
  .pg-public-soft-section { padding-right: 20px; padding-left: 20px; }
  .pg-public-feature-grid, .pg-public-city-grid, .pg-public-price-grid, .pg-public-steps, .pg-public-page-search { grid-template-columns: 1fr; }
  .pg-public-inline-cta, .pg-public-bottom-cta { align-items: flex-start; flex-direction: column; }
  .pg-public-bottom-cta { width: calc(100% - 40px); margin-bottom: 40px; }
}

/* Global responsive guardrails: modules keep their existing layouts, but nothing
   may force the application shell beyond the visible viewport. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

.pg-main,
.pg-content,
.pg-panel,
.pg-page-heading,
.pg-page-actions,
.pg-topbar-left,
.pg-topbar-right,
.pg-form-grid > *,
.pg-card-grid > *,
.pg-dashboard-kpi-grid > *,
.pg-tenant-dashboard-grid > * {
  min-width: 0;
}

.pg-content {
  overflow-x: clip;
}

.table-responsive,
.pg-module-code,
.pg-document-preview {
  max-width: 100%;
  overscroll-behavior-inline: contain;
}

@media (max-width: 900px) {
  .pg-topbar { gap: 10px; padding: 0 12px; }
  .pg-topbar-left, .pg-topbar-right { gap: 9px; }
  .pg-topbar-user small { display: none; }
  .pg-page-heading { align-items: flex-start; flex-wrap: wrap; }
  .pg-page-actions { justify-content: flex-start; flex-wrap: wrap; }
  .pg-dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .pg-brand { min-height: 52px; }
  .pg-user-panel { padding: 10px 0; }
  .pg-topbar { position: sticky; min-height: 52px; flex-wrap: wrap; padding-block: 7px; }
  .pg-topbar-right { margin-left: auto; max-width: 100%; }
  .pg-topbar-domain { display: none; }
  .pg-content { padding: 12px; }
  .pg-footer { line-height: 1.35; padding-block: 14px; }
  .pg-page-heading h1 { font-size: 1.65rem; }
  .pg-page-actions .btn, .pg-page-actions .pg-domain-pill { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 480px) {
  html { font-size: 13px; }
  .pg-topbar { align-items: center; }
  .pg-topbar-left strong, .pg-topbar-user { display: none; }
  .pg-topbar-right { gap: 6px; }
  .pg-logout-button { padding: 6px 8px; }
  .pg-dashboard-kpi-grid, .pg-card-grid { grid-template-columns: 1fr; }
  .pg-panel { padding: 12px; }
  .pg-page-heading h1 { font-size: 1.45rem; }
  .pg-page-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .pg-page-actions .btn, .pg-page-actions .pg-domain-pill { width: 100%; }
}

@media (max-width: 768px) {
  .pg-page-heading,
  .pg-workspace,
  .pg-admin-grid,
  .pg-public-hero,
  .pg-page-actions {
    display: block;
  }

  .pg-domain-pill,
  .pg-page-actions,
  .pg-panel {
    margin-top: 12px;
  }

  .pg-card-grid,
  .pg-dashboard-kpi-grid,
  .pg-expense-card-grid,
  .pg-payment-tracking-card-grid,
  .pg-module-list,
  .pg-form-grid,
  .pg-upload-grid,
  .pg-bed-board,
  .pg-room-card dl,
  .pg-payment-list,
  .pg-payment-card dl,
  .pg-due-alert-card,
  .pg-due-alert-card dl,
  .pg-record-card-grid,
  .pg-search-card,
  .pg-search-card dl,
  .pg-gallery-grid,
  .pg-module-check-grid,
  .pg-tenant-metrics {
    grid-template-columns: 1fr;
  }

  .pg-check-row {
    grid-template-columns: 1fr;
  }

  .pg-allocation-date-form,
  .pg-allocation-room-grid,
  .pg-allocation-bed-grid,
  .pg-allocation-details {
    grid-template-columns: 1fr;
  }

  .pg-form-actions,
  .pg-tenant-card-top,
  .pg-expense-row,
  .pg-user-delete-request {
    align-items: stretch;
    flex-direction: column;
  }
}

.pg-occupant-autocomplete { position: relative; }
.pg-occupant-match-list {
  position: absolute;
  z-index: 8;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd9e8;
  border-top: 0;
  box-shadow: 0 8px 18px rgba(15, 50, 84, .16);
}
.pg-occupant-match {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #e7eef5;
  background: #fff;
  color: #173f6c;
  text-align: left;
  font: inherit;
}
.pg-occupant-match:hover, .pg-occupant-match:focus { background: #eef8ff; color: #076fba; }
.pg-profile-summary { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
.pg-profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pg-profile-header h2 { margin: 2px 0; font-size: 1.25rem; }
.pg-profile-header p { margin: 0; color: #63778d; }
.pg-profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; }
.pg-profile-details div { min-width: 0; border-top: 1px solid #e6edf4; padding-top: 8px; }
.pg-profile-details dt { color: #678099; font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.pg-profile-details dd { margin: 3px 0 0; color: #173f6c; overflow-wrap: anywhere; }
.pg-profile-totals { display: grid; gap: 12px; align-content: start; }
.pg-profile-totals article { padding: 18px; border: 1px solid #c9dfef; border-left: 4px solid #1c9cb5; background: #f5fbff; }
.pg-profile-totals article:nth-child(2) { border-left-color: #d15437; background: #fff8f5; }
.pg-profile-totals span, .pg-profile-totals small { display: block; color: #63778d; }
.pg-profile-totals strong { display: block; margin: 5px 0; color: #173f6c; font-size: 1.35rem; }
.pg-topbar-user { display: inline-flex; align-items: baseline; gap: 6px; }
.pg-topbar-user small { color: #8ea4b9; font-size: .75rem; font-weight: 500; }
.pg-notifications { position: relative; }
.pg-notifications summary { position: relative; display: grid; width: 34px; height: 34px; place-items: center; cursor: pointer; list-style: none; color: #f4bd33; font-size: 1.1rem; }
.pg-notifications summary::-webkit-details-marker { display: none; }
.pg-notifications summary:hover { color: #fff0ae; }
.pg-notifications summary b { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: #dc3545; color: #fff; font-size: .65rem; line-height: 17px; text-align: center; }
.pg-notification-popover { position: absolute; z-index: 30; top: 42px; right: 0; width: min(390px, calc(100vw - 24px)); overflow: hidden; border: 1px solid #b8ccdc; background: #fff; box-shadow: 0 12px 30px rgba(12, 39, 66, .25); color: #173f6c; }
.pg-notification-popover > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid #dbe6ef; background: #f3f9fd; }
.pg-notification-popover > header span { color: #6c8295; font-size: .8rem; }
.pg-notification-list { max-height: 410px; overflow-y: auto; }
.pg-notification-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #edf2f6; border-left: 4px solid #b8d8e9; color: inherit; text-decoration: none; }
.pg-notification-item:hover { background: #f7fbfe; color: inherit; }
.pg-notification-item strong, .pg-notification-item span { display: block; }
.pg-notification-item strong { font-size: .88rem; }
.pg-notification-item span { color: #657e93; font-size: .75rem; line-height: 1.35; }
.pg-notification-amount { text-align: right; white-space: nowrap; }
.pg-notification-amount b { font-size: .85rem; }
.pg-notification-item.is-due-soon { border-left-color: #df8a16; background: #fff7e8; }
.pg-notification-item.is-overdue { border-left-color: #d83245; background: #fff0f2; }
.pg-notification-item.is-paid { border-left-color: #23864d; background: #effaf3; }
.pg-notification-status { color: #173f6c !important; font-weight: 700; }
.pg-notification-empty { padding: 16px; color: #698096; font-size: .86rem; }
.pg-public-body { --pg-public-nav-height: 64px; min-height: 100vh; padding-top: var(--pg-public-nav-height); background: #fff; color: #172637; }
.pg-public-site { min-height: 100vh; background: #fff; }
.pg-public-nav { position: fixed; inset: 0 0 auto; z-index: 1050; display: grid; grid-template-columns: auto 1fr auto; align-items: center; height: var(--pg-public-nav-height); gap: 28px; padding: 0 7.5%; background: #fff; box-shadow: 0 1px 8px rgba(12, 36, 58, .08); }
.pg-public-brand { color: #172637; font-size: 1.02rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.pg-public-brand:hover { color: #172637; }
.pg-public-brand span { margin-right: 6px; color: #1e587d; font-size: 1.2rem; }
.pg-public-nav nav { display: flex; justify-content: center; gap: 24px; }
.pg-public-nav nav a, .pg-public-account a { color: #435263; font-size: .84rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.pg-public-nav a:hover, .pg-public-nav a:focus { color: #0c79b6; }
.pg-public-account { display: flex; gap: 16px; align-items: center; }
.pg-public-account a:first-child { color: #172637; font-weight: 800; }
.pg-public-account form { margin: 0; }
.pg-public-account-button { border: 0; background: transparent; color: #172637; font: inherit; font-size: .84rem; font-weight: 800; white-space: nowrap; }
.pg-public-account-button:hover { color: #0c79b6; }
.pg-payment-receipt-success { max-width: 760px; display: grid; grid-template-columns: 74px 1fr; gap: 20px; align-items: center; }
.pg-payment-success-mark { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 50%; background: #147be8; color: #fff; font-size: 2rem; font-weight: 800; }
.pg-payment-receipt-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.pg-payment-receipt-summary span { color: #64748b; font-size: .82rem; }
.pg-payment-receipt-summary strong { display: block; color: #172637; }
.pg-public-login-switch { margin: 12px 0 0; color: #52606d; font-size: .88rem; text-align: center; }
.pg-public-login-switch button { border: 0; background: transparent; color: #1269ad; font: inherit; font-weight: 700; padding: 0; }
@media (max-width: 600px) { .pg-payment-receipt-success { grid-template-columns: 1fr; } .pg-payment-receipt-summary { grid-template-columns: 1fr; } }
.pg-public-hero-v2 { position: relative; display: grid; min-height: calc(100vh - var(--pg-public-nav-height)); min-height: calc(100svh - var(--pg-public-nav-height)); place-items: center; overflow: hidden; background: url('/images/pg-stay-public-hero.png') center / cover no-repeat; }
.pg-public-hero-subtitle { max-width: 620px; margin: 12px auto 0; color: #e6eef2; font-size: 1rem; line-height: 1.5; }

.pg-public-page-hero { display: grid; min-height: 420px; place-items: center; padding: 72px max(24px, calc((100% - 1120px) / 2)); background: linear-gradient(90deg, rgba(9, 29, 42, .92), rgba(9, 29, 42, .58)), url('/images/pg-stay-public-hero.png') center / cover no-repeat; color: #fff; }
.pg-public-page-hero > div { width: min(100%, 760px); }
.pg-public-page-hero p, .pg-public-section-heading > p, .pg-public-bottom-cta p { margin: 0 0 8px; color: #e8bd4d; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.pg-public-page-hero h1 { max-width: 670px; margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.08; }
.pg-public-page-hero span { display: block; max-width: 620px; margin-top: 16px; color: #e3edf3; font-size: 1.06rem; line-height: 1.55; }
.pg-public-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pg-public-primary, .pg-public-secondary, .pg-public-bottom-cta a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 5px; padding: 0 18px; font-weight: 800; text-decoration: none; }
.pg-public-primary, .pg-public-bottom-cta a { background: #f0bf43; color: #102033; }
.pg-public-secondary { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.pg-public-page-section { width: min(100%, 1120px); margin: 0 auto; padding: 72px 24px; }
.pg-public-soft-section { width: 100%; padding-right: max(24px, calc((100% - 1120px) / 2)); padding-left: max(24px, calc((100% - 1120px) / 2)); background: #edf4f7; }
.pg-public-section-heading { max-width: 700px; margin-bottom: 28px; }
.pg-public-section-heading h2 { margin: 0; color: #123b61; font-size: clamp(1.65rem, 3vw, 2.3rem); }
.pg-public-section-heading span { display: block; margin-top: 10px; color: #536474; line-height: 1.55; }
.pg-public-feature-grid, .pg-public-city-grid, .pg-public-price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pg-public-feature-grid article, .pg-public-city-grid a, .pg-public-price-grid article { min-height: 180px; border: 1px solid #d5e0e8; border-radius: 6px; background: #fff; padding: 22px; color: #243a4d; text-decoration: none; }
.pg-public-feature-grid b, .pg-public-city-grid strong { display: block; margin-bottom: 9px; color: #123b61; font-size: 1.05rem; }
.pg-public-feature-grid span, .pg-public-city-grid span { color: #627485; line-height: 1.5; }
.pg-public-city-grid a:hover, .pg-public-price-grid article:hover { border-color: #177db1; transform: translateY(-2px); }
.pg-public-price-grid .is-featured { border: 2px solid #e0ad31; box-shadow: 0 12px 28px rgba(25, 65, 93, .12); }
.pg-public-price-grid p { margin: 0 0 10px; color: #177db1; font-weight: 800; text-transform: uppercase; }
.pg-public-price-grid h3 { margin: 0; color: #173f6c; font-size: 1.45rem; }
.pg-public-price-grid span { display: block; min-height: 68px; margin: 12px 0; color: #607080; line-height: 1.5; }
.pg-public-price-grid a { color: #096b9c; font-weight: 800; }
.pg-public-page-search { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 10px; border: 1px solid #c4d4df; border-radius: 6px; background: #fff; padding: 14px; }
.pg-public-page-search input, .pg-public-page-search select { min-width: 0; border: 1px solid #a8bdcc; border-radius: 4px; padding: 11px; }
.pg-public-page-search button { border: 0; border-radius: 4px; background: #0d77ac; color: #fff; padding: 0 18px; font-weight: 800; }
.pg-public-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0; list-style: none; }
.pg-public-steps li { display: flex; gap: 12px; align-items: flex-start; border-top: 3px solid #177db1; padding-top: 14px; }
.pg-public-steps b { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 50%; background: #173f6c; color: #fff; }
.pg-public-steps strong, .pg-public-steps span { display: block; }
.pg-public-steps span { margin-top: 5px; color: #607080; font-size: .9rem; line-height: 1.45; }
.pg-public-inline-cta, .pg-public-bottom-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; border-radius: 6px; padding: 24px; background: #173f6c; color: #fff; }
.pg-public-inline-cta strong, .pg-public-inline-cta span { display: block; }
.pg-public-inline-cta span { margin-top: 5px; color: #d8e8f2; }
.pg-public-inline-cta a { border-radius: 4px; background: #f0bf43; color: #102033; padding: 10px 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.pg-public-faq-section { padding-bottom: 38px; }
.pg-public-faq-list { display: grid; gap: 10px; }
.pg-public-faq-list details { border: 1px solid #d5e0e8; border-radius: 5px; background: #fff; padding: 16px 18px; }
.pg-public-faq-list summary { cursor: pointer; color: #173f6c; font-weight: 800; }
.pg-public-faq-list p { margin: 12px 0 0; color: #607080; line-height: 1.5; }
.pg-public-bottom-cta { width: min(calc(100% - 48px), 1120px); margin: 28px auto 64px; }
.pg-public-bottom-cta h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.pg-public-empty { grid-column: 1 / -1; color: #607080; }
.pg-module-health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pg-module-health-card { border: 1px solid #d5e0e8; border-left: 4px solid #dca728; border-radius: 6px; background: #fff; padding: 16px; }
.pg-module-health-card.status-healthy { border-left-color: #198754; }
.pg-module-health-card.status-error { border-left-color: #dc3545; }
.pg-module-health-card header, .pg-module-health-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-module-health-card header span, .pg-module-health-card header small { display: block; color: #607080; font-size: .78rem; }
.pg-module-health-card h3 { margin: 2px 0; color: #173f6c; font-size: 1.05rem; }
.pg-module-health-card header b { border-radius: 4px; padding: 4px 7px; background: #fff3cd; color: #7a5700; font-size: .75rem; }
.pg-module-health-card.status-healthy header b { background: #d9f2e5; color: #15683e; }
.pg-module-health-card.status-error header b { background: #f9d9dd; color: #a51f2b; }
.pg-module-health-card p { min-height: 42px; margin: 14px 0 8px; color: #536474; }
.pg-module-health-card ul { max-height: 112px; overflow: auto; margin: 0 0 14px; padding-left: 18px; color: #607080; font-size: .78rem; }
.pg-module-code { max-height: 520px; overflow: auto; margin: 0; border: 1px solid #d5e0e8; border-radius: 5px; background: #102033; padding: 16px; color: #e7f1f7; font-size: .78rem; line-height: 1.45; white-space: pre-wrap; }
.pg-restore-steps { display: grid; gap: 10px; margin: 0; padding-left: 22px; color: #536474; }
.pg-public-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 22, 34, .8) 0%, rgba(8, 28, 41, .57) 47%, rgba(8, 28, 41, .12) 100%); }
.pg-public-hero-content { position: relative; z-index: 1; width: min(850px, calc(100% - 32px)); padding-bottom: 56px; text-align: center; }
.pg-public-hero-content h1 { margin: 0 auto 30px; color: #fff; font-size: clamp(2rem, 3.35vw, 3.6rem); font-weight: 800; line-height: 1.05; text-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.pg-public-search { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 20px; align-items: center; border: 1px solid rgba(255, 222, 126, .65); border-radius: 18px; background: rgba(9, 24, 32, .72); padding: 16px; box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }
.pg-public-search label { display: flex; align-items: center; min-width: 0; min-height: 46px; border: 1px solid rgba(247, 203, 87, .7); border-radius: 7px; background: rgba(6, 14, 18, .48); color: #ffd66f; padding: 0 11px; }
.pg-public-search label span { flex: 0 0 auto; margin-right: 8px; }
.pg-public-location-field { position: relative; }
.pg-public-city-matches { position: absolute; z-index: 8; top: calc(100% + 5px); left: 0; right: 0; display: grid; overflow: hidden; border: 1px solid #c8d6df; border-radius: 6px; background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.pg-public-city-matches:empty { display: none; }
.pg-public-city-matches button { grid-column: auto; grid-row: auto; min-height: 0; border-radius: 0; background: #fff; color: #1c3448; padding: 9px 12px; text-align: left; text-transform: none; }
.pg-public-city-matches button:hover { background: #e9f5fb; }
.pg-public-search input, .pg-public-search select { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: .9rem; }
.pg-public-search input::placeholder { color: rgba(255, 255, 255, .84); }
.pg-public-search input[type='date']::-webkit-calendar-picker-indicator { filter: invert(1); }
.pg-public-search select option { color: #172637; }
.pg-public-search button { grid-column: 3; grid-row: 1 / span 2; min-height: 48px; border: 0; border-radius: 25px; background: #efbd48; color: #2d2618; font-weight: 800; text-transform: uppercase; }
.pg-public-search button:hover, .pg-public-search button:focus { background: #ffd46d; }
.pg-public-city-matches { max-height: 300px; overflow-y: auto; }
.pg-public-search .pg-public-city-matches button { grid-column: auto; grid-row: auto; min-height: 0; border-radius: 0; background: #fff; color: #1c3448; padding: 9px 12px; text-align: left; text-transform: none; }
.pg-public-search .pg-public-city-matches button:hover, .pg-public-search .pg-public-city-matches button:focus { background: #e9f5fb; }
.pg-public-search-status { min-height: 20px; margin: 12px 0 0; color: #fff0bd; font-weight: 650; }
.pg-public-trust { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 16px; min-height: 68px; padding: 0 7.5%; background: #fff; box-shadow: 0 -2px 10px rgba(22, 41, 58, .1); }
.pg-public-trust div { display: flex; justify-content: center; align-items: center; gap: 10px; color: #263748; }
.pg-public-trust div span { color: #d1a72f; font-size: 1.45rem; }
.pg-public-trust strong { font-size: .94rem; }
.pg-public-assistant { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 22px; background: #263748; color: #fff; padding: 10px 15px; font-size: .82rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.pg-public-assistant:hover { background: #0c79b6; color: #fff; }
.pg-public-results { padding: 54px 7.5% 64px; background: #f4f8fb; }
.pg-public-results-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.pg-public-results-heading p, .pg-public-listing p, .pg-public-suggestions h3, .pg-public-profile-heading p { margin: 0 0 5px; color: #1e759f; font-size: .78rem; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.pg-public-results-heading h2, .pg-public-profile-heading h1 { margin: 0; color: #172637; font-size: 1.9rem; font-weight: 800; }
.pg-public-results-heading span, .pg-public-profile-heading > span { color: #526273; }
.pg-public-results-heading > a { color: #0c79b6; font-weight: 750; text-decoration: none; }
.pg-public-listings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pg-public-listing, .pg-public-no-results, .pg-public-profile-card { border: 1px solid #d3e0e9; border-radius: 8px; background: #fff; box-shadow: 0 5px 16px rgba(23, 54, 77, .06); }
.pg-public-listing { display: flex; min-height: 152px; flex-direction: column; justify-content: space-between; padding: 19px; }
.pg-public-listing.is-suggestion { background: #fbfdff; }
.pg-public-listing h3 { margin: 0 0 5px; color: #172637; font-size: 1.08rem; font-weight: 800; }
.pg-public-listing span { color: #5d6c7a; font-size: .9rem; }
.pg-public-listing dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.pg-public-listing dt { color: #71808f; font-size: .73rem; font-weight: 700; text-transform: uppercase; }
.pg-public-listing dd { margin: 2px 0 0; color: #16764c; font-size: 1.15rem; font-weight: 850; }
.pg-public-listing-action { align-self: start; margin-top: 14px; border: 1px solid #0d77ac; border-radius: 4px; background: #fff; color: #0d77ac; padding: 7px 10px; font: inherit; font-size: .8rem; font-weight: 800; text-decoration: none; }
.pg-public-listing-action:hover, .pg-public-listing-action:focus { background: #0d77ac; color: #fff; }
.pg-public-directory-section { padding-top: 56px; }
.pg-public-directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.pg-public-directory-heading > a { flex: 0 0 auto; border: 1px solid #0d77ac; border-radius: 4px; color: #0d77ac; padding: 10px 13px; font-size: .86rem; font-weight: 800; text-decoration: none; }
.pg-public-directory-heading > a:hover { background: #0d77ac; color: #fff; }
.pg-public-directory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pg-public-directory-card { min-height: 250px; overflow: hidden; border-color: #cbdde8; border-top: 4px solid #177db1; padding: 15px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pg-public-directory-card:nth-child(5n + 2) { border-top-color: #1a9460; }
.pg-public-directory-card:nth-child(5n + 3) { border-top-color: #cf8a20; }
.pg-public-directory-card:nth-child(5n + 4) { border-top-color: #a84a55; }
.pg-public-directory-card:nth-child(5n + 5) { border-top-color: #6259a4; }
.pg-public-directory-card:hover { box-shadow: 0 13px 25px rgba(23, 54, 77, .15); transform: translateY(-4px); }
.pg-public-directory-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 22px; }
.pg-public-property-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 4px; background: #e7f3fa; color: #0c6699; font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
.pg-public-live-badge { display: inline-flex; align-items: center; gap: 5px; color: #27704d !important; font-size: .7rem !important; font-weight: 800; white-space: nowrap; }
.pg-public-live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #21a563; box-shadow: 0 0 0 3px #dff5e7; }
.pg-public-directory-card h3 { min-height: 44px; margin-bottom: 6px; font-size: 1rem; line-height: 1.2; }
.pg-public-directory-card .pg-public-location { display: block; min-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-public-directory-card dl { margin-top: 18px; padding-top: 13px; border-top: 1px solid #e4edf3; }
.pg-public-directory-card dd { color: #17784d; font-size: 1.2rem; }
.pg-public-directory-card dd small { color: #71808f; font-size: .7rem; font-weight: 700; }
.pg-public-directory-card > a { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: #0d70a7; font-size: .82rem; font-weight: 850; text-decoration: none; }
.pg-public-directory-card > a span { color: inherit; font-size: 1rem; }
.pg-floor-setup-panel { border-top: 4px solid #146ca1; }
.pg-floor-setup-toolbar, .pg-floor-draft > header, .pg-floor-draft footer, .pg-generated-floor > header, .pg-generated-room > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-floor-setup-toolbar { margin: 18px 0 14px; }
.pg-setup-totals { color: #173f6c; font-weight: 800; }
.pg-floor-drafts { display: grid; gap: 16px; }
.pg-floor-draft { border: 1px solid #c9dbe8; border-left: 4px solid #1976ae; background: #f9fcff; padding: 14px; }
.pg-floor-draft > header label { display: grid; grid-template-columns: auto minmax(160px, 250px); align-items: center; gap: 10px; color: #173f6c; font-size: .88rem; font-weight: 800; }
.pg-floor-draft-head, .pg-floor-draft-room { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(110px, .65fr) minmax(160px, 1.15fr) auto; gap: 12px; align-items: end; }
.pg-floor-draft-head { margin: 16px 0 5px; color: #5c7286; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.pg-floor-draft-room { border-top: 1px solid #e2ecf3; padding: 9px 0; }
.pg-floor-draft-room label { display: grid; gap: 5px; color: #173f6c; font-size: .78rem; font-weight: 800; }
.pg-floor-draft-room [data-bed-sequence] { min-height: 38px; padding-top: 9px; color: #137443; font-size: .86rem; font-weight: 800; }
.pg-floor-draft footer { margin-top: 8px; }
.pg-bed-legend { display: flex; flex-wrap: wrap; gap: 17px; margin: 0 0 20px; color: #445c70; font-size: .83rem; font-weight: 750; }
.pg-bed-legend span { display: inline-flex; align-items: center; gap: 6px; }.pg-bed-legend i { width: 11px; height: 11px; border-radius: 50%; background: #249759; }.pg-bed-legend .is-reserved i { background: #dd9216; }.pg-bed-legend .is-occupied i { background: #d8404d; }.pg-bed-legend .is-maintenance i { background: #247ab9; }
.pg-generated-floors { display: grid; gap: 18px; }.pg-generated-floor { border: 1px solid #d3e2ed; background: #fbfdff; padding: 14px; }.pg-generated-floor > header { border-bottom: 1px solid #dce8ef; padding: 0 0 10px; }.pg-generated-floor h3 { margin: 0; color: #123b61; font-size: 1.08rem; }.pg-generated-floor > header span, .pg-generated-room header span { color: #60788c; font-size: .8rem; }
.pg-generated-room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }.pg-generated-room { border: 1px solid #d7e5ed; background: #fff; padding: 11px; }.pg-generated-room strong { color: #173f6c; }.pg-generated-bed-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pg-generated-bed { position: relative; min-width: 78px; border: 1px solid #bfe2cc; background: #eefaf2; color: #176940; }.pg-generated-bed.status-reserved { border-color: #f1cb8e; background: #fff7e8; color: #9a6200; }.pg-generated-bed.status-occupied { border-color: #edb4ba; background: #fff0f1; color: #a82834; }.pg-generated-bed.status-maintenance { border-color: #b8d2e8; background: #edf6fd; color: #17669e; }.pg-generated-bed summary { display: grid; cursor: pointer; gap: 3px; list-style: none; padding: 9px; }.pg-generated-bed summary::-webkit-details-marker { display: none; }.pg-generated-bed summary strong { color: currentColor; font-size: .78rem; }.pg-generated-bed summary span { font-size: .68rem; font-weight: 750; }.pg-generated-bed[open] { z-index: 2; box-shadow: 0 8px 16px rgba(21, 56, 85, .16); }
.pg-bed-actions { display: grid; gap: 5px; border-top: 1px solid currentColor; padding: 7px; }.pg-bed-actions form { margin: 0; }.pg-bed-actions button, .pg-bed-actions a { display: block; width: 100%; border: 0; background: transparent; color: inherit; padding: 2px 0; font: inherit; font-size: .7rem; font-weight: 850; text-align: left; text-decoration: none; }.pg-bed-actions button:hover, .pg-bed-actions a:hover { text-decoration: underline; }
.pg-public-no-results { display: grid; gap: 5px; padding: 24px; color: #526273; }
.pg-public-no-results strong { color: #172637; }
.pg-public-suggestions { margin-top: 30px; }
.pg-public-suggestions h3 { margin-bottom: 12px; color: #172637; font-size: 1rem; }
.pg-public-signup-dialog { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 10px; padding: 0; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
.pg-public-signup-dialog::backdrop { background: rgba(5, 23, 34, .66); }
.pg-public-signup-dialog form { display: grid; gap: 15px; padding: 25px; }
.pg-public-signup-dialog header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.pg-public-signup-dialog header p { margin: 0 0 4px; color: #1e759f; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.pg-public-signup-dialog h2 { margin: 0; color: #172637; font-size: 1.35rem; font-weight: 800; }
.pg-public-signup-dialog header button { border: 0; background: transparent; color: #526273; font-size: 1.8rem; line-height: 1; }
.pg-public-signup-dialog label { display: grid; gap: 6px; color: #263748; font-size: .86rem; font-weight: 750; }
.pg-public-signup-dialog input { min-height: 42px; border: 1px solid #bccdda; border-radius: 5px; padding: 8px 10px; color: #172637; }
.pg-public-signup-dialog select { min-height: 42px; border: 1px solid #bccdda; border-radius: 5px; background: #fff; padding: 8px 10px; color: #172637; }
.pg-public-signup-dialog form > button { min-height: 45px; border: 0; border-radius: 6px; background: #efbd48; color: #2d2618; font-weight: 850; }
.pg-public-form-error { margin: 0; color: #b52632; font-weight: 700; }
.pg-public-profile-page { min-height: 100vh; background: #f4f8fb; }
.pg-public-profile-content { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 58px 0; }
.pg-public-profile-heading { margin-bottom: 25px; }
.pg-public-profile-grid { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.5fr); gap: 20px; }
.pg-public-profile-card { padding: 23px; }
.pg-public-profile-card h2 { margin: 0 0 18px; color: #172637; font-size: 1.2rem; font-weight: 800; }
.pg-public-profile-card dl { margin: 0; }
.pg-public-profile-card dl > div { display: grid; grid-template-columns: 102px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e6edf2; }
.pg-public-profile-card dl > div:last-child { border-bottom: 0; }
.pg-public-profile-card dt { color: #71808f; font-size: .8rem; font-weight: 750; }
.pg-public-profile-card dd { margin: 0; color: #263748; font-weight: 650; overflow-wrap: anywhere; }
.pg-public-history { display: grid; gap: 10px; }
.pg-public-history > div { display: grid; gap: 3px; border-left: 3px solid #1e759f; background: #f5f9fc; padding: 11px 13px; }
.pg-public-history strong { color: #172637; }.pg-public-history span, .pg-public-history small, .pg-public-muted { color: #617181; }
@media (max-width: 900px) {
  .pg-public-body { --pg-public-nav-height: 164px; }
  .pg-topbar { padding: 0 12px; }
  .pg-topbar-left, .pg-topbar-right { gap: 8px; }
  .pg-topbar-domain, .pg-topbar-user small { display: none; }
  .pg-topbar-user { white-space: nowrap; }
  .pg-profile-summary, .pg-profile-details { grid-template-columns: 1fr; }
  .pg-public-nav { grid-template-columns: 1fr; gap: 10px; min-height: 0; padding: 14px 20px 12px; }
  .pg-public-nav nav { display: flex; justify-content: flex-start; gap: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .pg-public-nav nav::-webkit-scrollbar { display: none; }
  .pg-public-nav nav a { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; }
  .pg-public-account { min-width: 0; flex-wrap: wrap; gap: 10px; }
  .pg-public-search { grid-template-columns: 1fr 1fr; }
  .pg-public-search button { grid-column: 1 / -1; grid-row: auto; }
  .pg-public-trust { grid-template-columns: repeat(2, 1fr); padding: 14px 20px; }
  .pg-public-assistant { grid-column: 1 / -1; justify-self: center; }
  .pg-public-results { padding: 38px 20px; }
  .pg-public-listings { grid-template-columns: 1fr; }
  .pg-public-directory-heading { align-items: start; flex-direction: column; }
  .pg-public-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-generated-room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-floor-draft-head { display: none; }.pg-floor-draft-room { grid-template-columns: 1fr 1fr; }.pg-floor-draft-room [data-bed-sequence] { grid-column: 1 / -1; }.pg-floor-draft-room button { justify-self: start; }
  .pg-public-profile-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1240px) {
  .pg-public-directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pg-public-directory-grid { grid-template-columns: 1fr; }
  .pg-generated-room-grid { grid-template-columns: 1fr; }.pg-floor-draft > header, .pg-floor-setup-toolbar { align-items: stretch; flex-direction: column; }.pg-floor-draft > header label { grid-template-columns: 1fr; }
}

/* Compact navigation: the existing sidebar remains a single off-canvas drawer. */
.pg-mobile-nav-backdrop { display: none; }

/* Super Admin: the tenant form and tenant list need one full-width column before
   the desktop sidebar leaves too little room for their minimum content widths. */
@media (max-width: 1200px) {
  .pg-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pg-admin-grid > .pg-panel,
  .pg-tenant-card {
    min-width: 0;
  }

  .pg-tenant-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pg-tenant-metrics div:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .pg-shell { display: block; min-height: 100svh; }
  .pg-main { width: 100%; min-width: 0; }
  .pg-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1060;
    width: min(330px, 88vw);
    height: 100svh;
    max-height: 100svh;
    transform: translateX(-105%);
    transition: transform 180ms ease, box-shadow 180ms ease;
    overflow: hidden;
    box-shadow: none;
  }
  .pg-shell:not(.pg-sidebar-collapsed) .pg-sidebar {
    transform: translateX(0);
    box-shadow: 14px 0 32px rgba(10, 29, 52, .32);
  }
  .pg-mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1050;
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(7, 20, 37, .5);
    transition: opacity 180ms ease;
  }
  body.pg-mobile-nav-open { overflow: hidden; }
  body.pg-mobile-nav-open .pg-mobile-nav-backdrop { opacity: 1; pointer-events: auto; }
  .pg-sidebar-navigation-scroll { min-height: 0; overflow-x: hidden; overflow-y: auto; }
  .pg-sidebar-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px; }
  .pg-sidebar-nav a, .pg-sidebar-students { width: 100%; min-width: 0; }
  .pg-topbar, .pg-content { width: 100%; min-width: 0; }
  .pg-content { padding: 14px; }
  .pg-page-heading, .pg-page-actions, .pg-inline-actions, .pg-toolbar, .pg-filter-row { min-width: 0; flex-wrap: wrap; }
  .pg-dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pg-topbar { gap: 8px; padding-inline: 12px; }
  .pg-content { padding: 12px; }
  .pg-dashboard-kpi-grid, .pg-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-panel, .card { min-width: 0; }
  .pg-page-actions > *, .pg-inline-actions > *, .pg-toolbar > * { max-width: 100%; }
}

@media (max-width: 420px) {
  .pg-dashboard-kpi-grid, .pg-card-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-content { padding: 10px; }
  .pg-topbar-domain, .pg-topbar-user small { display: none; }
}

/* The portal header belongs to the application shell, not the scrolling page.
   A fixed position avoids sticky-header failures in Safari and embedded browsers. */
:root { --pg-topbar-height: 58px; }

.pg-main {
  padding-top: var(--pg-topbar-height);
}

.pg-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 250px;
  min-height: var(--pg-topbar-height);
  box-sizing: border-box;
}

@media (min-width: 901px) {
  /* Keep the complete desktop sidebar, including the PG Stay brand, outside the
     document scroll. The navigation scroll region remains the only scrollable
     part of this rail. */
  .pg-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    z-index: 1030;
  }

  /* A fixed grid child no longer reserves its original track. Keep portal
     pages in the second track so their content is never covered by the rail. */
  .pg-main {
    grid-column: 2;
  }

  .pg-shell.pg-sidebar-collapsed .pg-sidebar {
    width: 68px;
  }

  .pg-shell.pg-sidebar-collapsed .pg-topbar { left: 68px; }
}

@media (max-width: 900px) {
  :root { --pg-topbar-height: 52px; }

  .pg-topbar {
    right: 0;
    left: 0;
    min-height: var(--pg-topbar-height);
    height: var(--pg-topbar-height);
    flex-wrap: nowrap;
    padding-block: 0;
  }
}
