/* Plain CSS — works alongside Tailwind CDN without needing @apply. */

.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(71 85 105);
  transition: background-color .15s, color .15s;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.nav-btn:hover { background: rgb(241 245 249); }
.nav-btn.active { background: rgb(15 23 42); color: #fff; }
.nav-btn.active:hover { background: rgb(15 23 42); }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid rgb(203 213 225);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
  color: rgb(15 23 42);
}
.action-btn:hover { background: rgb(248 250 252); border-color: rgb(148 163 184); }
.action-btn:active { background: rgb(241 245 249); }

.bd-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.bd-pill.cristal   { background: #eff6ff; color: #1d4ed8; }
.bd-pill.diamant   { background: #fff1f2; color: #9f1239; }
.bd-pill.emeraude  { background: #ecfdf5; color: #047857; }
.bd-pill.saphir    { background: #eef2ff; color: #4338ca; }
.bd-pill.amethyste { background: #fdf4ff; color: #a21caf; }
.bd-pill.tech      { background: #f1f5f9; color: #334155; }
.bd-pill.anim      { background: #fffbeb; color: #b45309; }
.bd-pill.nuit      { background: #eef2ff; color: #3730a3; }
.bd-pill.ssjn      { background: #f0fdfa; color: #115e59; }
.bd-pill.soins     { background: #ecfeff; color: #0e7490; }
.bd-pill.cuisine   { background: #fff7ed; color: #c2410c; }
.bd-pill.admin     { background: #fafaf9; color: #44403c; }

.bd-bar { height: 4px; }
.bd-bar.cristal   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.bd-bar.diamant   { background: linear-gradient(90deg, #881337, #e11d48); }
.bd-bar.emeraude  { background: linear-gradient(90deg, #059669, #34d399); }
.bd-bar.saphir    { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.bd-bar.amethyste { background: linear-gradient(90deg, #a21caf, #d946ef); }
.bd-bar.tech      { background: linear-gradient(90deg, #475569, #94a3b8); }   /* slate */
.bd-bar.anim      { background: linear-gradient(90deg, #d97706, #fbbf24); }   /* amber */
.bd-bar.nuit      { background: linear-gradient(90deg, #1e3a8a, #4338ca); }   /* navy */
.bd-bar.ssjn      { background: linear-gradient(90deg, #0f766e, #2dd4bf); }   /* teal */
.bd-bar.soins     { background: linear-gradient(90deg, #0891b2, #22d3ee); }   /* cyan */
.bd-bar.cuisine   { background: linear-gradient(90deg, #ea580c, #fb923c); }   /* orange */
.bd-bar.admin     { background: linear-gradient(90deg, #44403c, #a8a29e); }   /* stone */

table.list { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
table.list thead th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(100 116 139);
  border-bottom: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
}
table.list tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgb(241 245 249);
  vertical-align: middle;
}
table.list tbody tr:hover { background: rgba(248, 250, 252, 0.7); }

.tel-mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tel-ext-link { color: inherit; text-decoration: none; }
.tel-ext-link:hover { text-decoration: underline; color: #2563eb; }

.tel-cell { display: inline-flex; align-items: center; gap: 0.5rem; }
.phone-status { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.phone-status svg { width: 1rem; height: 1rem; display: block; }
.phone-status.on  { color: rgb(15 118 110); }   /* teal-700 */
.phone-status.off { color: rgb(220 38 38); }    /* red-600 */

/* === Flag toggles (TV / Myosotis) === */
.flag-toggle, .flag-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; font-weight: 500;
  padding: 0.25rem 0.6rem; border-radius: 9999px;
  border: 1px solid transparent;
}
.flag-toggle { cursor: pointer; transition: transform 0.05s, box-shadow 0.1s; }
.flag-toggle:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.flag-toggle:active { transform: scale(0.97); }
.flag-toggle.on,  .flag-badge.on  { background: rgb(220 252 231); color: rgb(21 128 61); border-color: rgb(187 247 208); }
.flag-toggle.off, .flag-badge.off { background: rgb(248 250 252); color: rgb(100 116 139); border-color: rgb(226 232 240); }
.flag-toggle svg, .flag-badge svg { width: 0.95rem; height: 0.95rem; }
.flag-meta { font-size: 0.7rem; color: rgb(148 163 184); }

.auth-banner {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.9rem; margin-bottom: 1rem;
  border-radius: 0.5rem; font-size: 0.85rem;
  background: rgb(254 243 199); color: rgb(120 53 15); border: 1px solid rgb(253 230 138);
}
.auth-banner.ok    { background: rgb(220 252 231); color: rgb(21 128 61); border-color: rgb(187 247 208); }
.auth-banner.muted { background: rgb(241 245 249); color: rgb(71 85 105); border-color: rgb(226 232 240); }
.auth-banner a     { text-decoration: underline; font-weight: 600; }

/* === Admin pictos (TV / camera) — used across all lists === */
.adm-pics { display: inline-flex; gap: 0.25rem; align-items: center; flex: 0 0 auto; }
.adm-pic  { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; flex: 0 0 auto; }
.adm-pic svg { width: 1rem; height: 1rem; display: block; }
.adm-pic.placeholder { visibility: hidden; }
.adm-pic.tv.on    { color: rgb(15 118 110); }
.adm-pic.tv.off   { color: rgb(148 163 184); }
.adm-pic.cam.ok   { color: rgb(22 163 74); }   /* green-600 */
.adm-pic.cam.part { color: rgb(202 138 4); }   /* yellow-600 */
.adm-pic.cam.off  { color: rgb(220 38 38); }   /* red-600 */
.adm-pic.myo.on   { color: rgb(99 102 241); }  /* indigo-500 — myosotis */
.adm-pic.bus.on   { color: rgb(22 163 74);  }  /* green-600 */
.adm-pic.bus.off  { color: rgb(220 38 38);  }  /* red-600 */
/* Transport tristate button */
.flag-toggle.transport-on,  .flag-badge.transport-on  { background: rgb(220 252 231); color: rgb(21 128 61);  border-color: rgb(187 247 208); }
.flag-toggle.transport-off, .flag-badge.transport-off { background: rgb(254 226 226); color: rgb(185 28 28);  border-color: rgb(252 165 165); }
.flag-toggle.transport-vide { background: rgb(248 250 252); color: rgb(148 163 184); border-color: rgb(226 232 240); }

/* Phone status used inside admin badges: harmonize size */
.adm-pics .phone-status { width: 1rem; height: 1rem; }
.adm-pics .phone-status svg { width: 0.95rem; height: 0.95rem; }

/* Admin column (rightmost): only as wide as needed, no text wrap */
th.adm-col, td.adm-col {
  width: 1%;
  white-space: nowrap;
  padding-left: 0.4rem;
  padding-right: 0.6rem;
  text-align: right;
}

/* Plan cell badges: stack under name */
.plan-cell .adm-pics { margin-top: 0.25rem; justify-content: center; }

/* Split (double) plan cells — icons smaller + tighter to fit both residents */
.plan-cell.split > div { padding: 0.3rem 0.35rem; }
.plan-cell.split .who { word-break: break-word; }
.plan-cell.split .adm-pics { gap: 0.08rem; margin-top: 0.15rem; }
.plan-cell.split .adm-pic,
.plan-cell.split .adm-pic svg { width: 0.65rem; height: 0.65rem; }
.plan-cell.split .adm-pics .phone-status,
.plan-cell.split .adm-pics .phone-status svg { width: 0.65rem; height: 0.65rem; }

/* === PWA install banner === */
.pwa-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgb(17 24 39);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  font-size: 0.83rem;
  max-width: calc(100vw - 2rem);
  white-space: nowrap;
  flex-wrap: wrap;
  animation: pwa-slide-up 0.3s ease;
}
@keyframes pwa-slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.pwa-banner-icon { width: 1.2rem; height: 1.2rem; color: rgb(52 211 153); flex-shrink: 0; }
.pwa-banner span { flex: 1; min-width: 0; white-space: normal; line-height: 1.35; }
.pwa-banner-install {
  background: rgb(0 166 121);
  color: #fff;
  border: none;
  border-radius: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.pwa-banner-install:hover { background: rgb(0 140 102); }
.pwa-banner-close {
  background: none;
  border: none;
  color: rgb(156 163 175);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.2rem;
  flex-shrink: 0;
  line-height: 1;
}
.pwa-banner-close:hover { color: #fff; }

/* === Phones view: smaller base font (3 cards side-by-side on wide screens) === */
.phones-grid .list { font-size: 0.78rem; }
.phones-grid .list th, .phones-grid .list td { padding: 0.35rem 0.5rem; }
.phones-grid .adm-pic, .phones-grid .adm-pic svg { width: 0.9rem; height: 0.9rem; }
.phones-grid .adm-pics .phone-status,
.phones-grid .adm-pics .phone-status svg { width: 0.9rem; height: 0.9rem; }
.phones-grid .col-int { width: 1%; white-space: nowrap; padding-left: 0.3rem; padding-right: 0.4rem; }

/* === Auto-adapt: container queries shrink font + padding when card is narrow === */
.list-cq { container-type: inline-size; container-name: listcard; }

@container listcard (max-width: 360px) {
  .list { font-size: 0.78rem; }
  .list th, .list td { padding: 0.35rem 0.45rem; }
  .adm-pic, .adm-pic svg { width: 0.9rem; height: 0.9rem; }
  th.adm-col, td.adm-col { padding-left: 0.25rem; padding-right: 0.4rem; }
}
@container listcard (max-width: 280px) {
  .list { font-size: 0.7rem; }
  .list th, .list td { padding: 0.25rem 0.3rem; }
  .adm-pics { gap: 0.15rem; }
  .adm-pic, .adm-pic svg { width: 0.8rem; height: 0.8rem; }
  .phone-status, .phone-status svg { width: 0.85rem; height: 0.85rem; }
  .bd-pill { font-size: 0.65rem; padding: 0.15rem 0.45rem; }
}
@container listcard (max-width: 220px) {
  .list { font-size: 0.65rem; }
  .list th, .list td { padding: 0.2rem 0.25rem; }
}

/* Admin view tristate segmented control */
.seg { display: inline-flex; border: 1px solid rgb(226 232 240); border-radius: 9999px; overflow: hidden; }
.seg-btn {
  padding: 0.2rem 0.55rem; font-size: 0.75rem; font-weight: 500;
  background: #fff; color: rgb(100 116 139); cursor: pointer;
  border: none; border-right: 1px solid rgb(226 232 240);
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { background: rgb(248 250 252); }
.seg-btn.active.cam-oui     { background: rgb(220 252 231); color: rgb(21 128 61); }
.seg-btn.active.cam-partiel { background: rgb(254 249 195); color: rgb(133 77 14); }
.seg-btn.active.cam-non     { background: rgb(254 226 226); color: rgb(153 27 27); }

/* Genre du lit segment (H/F/Couple) */
.seg-gender .seg-btn { min-width: 1.6rem; font-weight: 600; }
.seg-btn.active.bg-h      { background: rgb(219 234 254); color: rgb(30 64 175); }   /* blue */
.seg-btn.active.bg-f      { background: rgb(252 231 243); color: rgb(157 23 77); }   /* pink */
.seg-btn.active.bg-couple { background: rgb(220 252 231); color: rgb(21 128 61); }   /* green */
.flag-badge.bg-h            { background: rgb(219 234 254); color: rgb(30 64 175); }
.flag-badge.bg-f            { background: rgb(252 231 243); color: rgb(157 23 77); }
.flag-badge.bg-couple       { background: rgb(220 252 231); color: rgb(21 128 61); }
.flag-badge.bg-unspecified  { background: rgb(254 243 199); color: rgb(120 53 15); border: 1px dashed rgb(252 211 77); }

/* Vacancies summary */
.vacancy-summary { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.vac-stat {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.8rem; border-radius: 9999px;
  font-weight: 600; font-size: 0.85rem;
  border: 1px solid transparent;
}
.vac-stat small { font-weight: 400; opacity: 0.85; }
.vac-stat.total        { background: rgb(241 245 249); color: rgb(30 41 59); border-color: rgb(203 213 225); }
.vac-stat.bg-h         { background: rgb(219 234 254); color: rgb(30 64 175); border-color: rgb(191 219 254); }
.vac-stat.bg-f         { background: rgb(252 231 243); color: rgb(157 23 77); border-color: rgb(251 207 232); }
.vac-stat.bg-couple    { background: rgb(220 252 231); color: rgb(21 128 61); border-color: rgb(187 247 208); }
.vac-stat.bg-unspecified { background: rgb(254 243 199); color: rgb(120 53 15); border-color: rgb(252 211 77); }

.row-vacant { background: rgb(248 250 252); }
.row-vacant td { border-color: rgb(241 245 249); }

.admin-table th, .admin-table td { padding: 0.4rem 0.5rem; }

.admin-subnav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem; padding: 0.6rem 0.9rem;
  background: rgb(248 250 252); border: 1px solid rgb(226 232 240);
  border-radius: 0.5rem;
}
.admin-subnav-label {
  font-size: 0.8rem; font-weight: 500; color: rgb(71 85 105);
  margin-right: 0.25rem;
}

/* === Édition 3CX === */
.edit3cx-search {
  display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.edit3cx-field { display: flex; flex-direction: column; gap: 0.2rem; }
.edit3cx-field label { font-size: 0.7rem; font-weight: 500; color: rgb(100 116 139); }
.edit3cx-field input {
  padding: 0.4rem 0.6rem; border: 1px solid rgb(203 213 225); border-radius: 0.4rem;
  font-size: 0.85rem; min-width: 180px;
}
.edit3cx-field input:focus { outline: none; border-color: rgb(37 99 235); box-shadow: 0 0 0 2px rgb(37 99 235 / 0.15); }
.edit3cx-or { font-size: 0.75rem; font-weight: 600; color: rgb(100 116 139); padding-bottom: 0.5rem; }
.edit3cx-status { font-size: 0.85rem; font-weight: 500; }

.edit3cx-table .cell-edit {
  cursor: pointer; position: relative;
  background: rgba(248, 250, 252, 0.5);
  transition: background 0.1s;
}
.edit3cx-table .cell-edit:hover { background: rgb(241 245 249); }
.edit3cx-table .cell-edit::after {
  content: "✎"; position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  color: rgb(148 163 184); opacity: 0; font-size: 0.75rem; transition: opacity 0.15s;
}
.edit3cx-table .cell-edit:hover::after { opacity: 1; }
.edit3cx-input {
  width: 100%; padding: 0.2rem 0.4rem; border: 1px solid rgb(37 99 235);
  border-radius: 0.3rem; font-size: inherit; font-family: inherit;
  background: white;
}
.edit3cx-input:focus { outline: none; box-shadow: 0 0 0 2px rgb(37 99 235 / 0.2); }
.edit3cx-table .row-disabled { opacity: 0.55; background: rgb(248 250 252); }

/* Toggle switch (Enabled) */
.ext-toggle { position: relative; display: inline-block; width: 36px; height: 20px; vertical-align: middle; }
.ext-toggle input { opacity: 0; width: 0; height: 0; }
.ext-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgb(203 213 225); border-radius: 9999px; transition: 0.2s;
}
.ext-toggle-slider::before {
  content: ""; position: absolute; height: 14px; width: 14px;
  left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.2s;
}
.ext-toggle input:checked + .ext-toggle-slider { background: rgb(34 197 94); }
.ext-toggle input:checked + .ext-toggle-slider::before { transform: translateX(16px); }
.ext-badge {
  display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.5rem;
  border-radius: 9999px; font-size: 0.7rem; font-weight: 600;
  vertical-align: middle;
}
.ext-badge.on  { background: rgb(220 252 231); color: rgb(21 128 61); }
.ext-badge.off { background: rgb(254 226 226); color: rgb(153 27 27); }

/* === SSJN statut badges === */
.badge-statut {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.55rem; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 500;
}
.statut-actif  { background: #dcfce7; color: #166534; }
.statut-absent { background: #fff7ed; color: #9a3412; }

.hidden { display: none !important; }

/* === Staff (Internes) view: highlighted group numbers === */
.staff-groups {
  padding: 0.6rem 0.9rem;
  background: linear-gradient(180deg, rgb(254 252 232), rgb(255 255 255));
  border-bottom: 1px solid rgb(226 232 240);
}
.staff-groups-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  color: rgb(180 83 9); text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.staff-groups-grid {
  display: grid; gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.staff-group-card {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.5rem 0.7rem;
  background: white;
  border: 1px solid rgb(254 215 170);
  border-left: 3px solid rgb(245 158 11);
  border-radius: 0.4rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.staff-group-ext {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 1rem; font-weight: 700; color: rgb(154 52 18);
}
.staff-group-ext .phone-status { width: 0.9rem; height: 0.9rem; }
.staff-group-ext .phone-status svg { width: 0.85rem; height: 0.85rem; }
.staff-group-label {
  font-size: 0.78rem; color: rgb(71 85 105);
}

.plan-cell {
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  font-size: 0.75rem;
  line-height: 1.15;
  padding: 0.375rem 0.5rem;
  min-height: 56px;
}
.plan-cell.label {
  background: rgb(241 245 249);
  color: rgb(71 85 105);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.plan-cell.empty {
  background: transparent;
  border: 1px dashed rgb(226 232 240);
}
.plan-cell .room { font-weight: 600; color: rgb(51 65 85); }
.plan-cell .who  { color: rgb(71 85 105); margin-top: 0.125rem; }
.plan-cell.split { padding: 0; }
.plan-cell.split > div { padding: 0.375rem 0.5rem; }
.plan-cell.split > div:first-child { border-right: 1px solid rgb(226 232 240); }

/* Saphir column placement — below Diamant (col 2) at md+ and in print */
@media (min-width: 768px) {
  .saphir-section { grid-column-start: 2; }
}

.pf-btn {
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity .15s;
  line-height: 1.5;
}
.pf-btn.active { opacity: 1; }
.pf-btn.cristal   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pf-btn.diamant   { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.pf-btn.emeraude  { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.pf-btn.saphir    { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.pf-btn.amethyste { background: #fdf4ff; color: #a21caf; border-color: #f5d0fe; }

@keyframes pulseDot { 0%,100% { opacity:.3 } 50% { opacity:1 } }
#status .live-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #22c55e;
  margin-right: 0.35rem;
  animation: pulseDot 1.6s ease-in-out infinite;
  vertical-align: middle;
}
#status.error .live-dot { background: #ef4444; }

.print-header { display: none; }
.print-title, .print-subtitle { display: none; }

@media print {
  @page { size: A4 portrait; margin: 10mm 8mm; }
  html, body { background:#fff !important; color:#000 !important; font-size: 8pt; }
  .no-print { display: none !important; }
  main { padding: 0 !important; max-width: none !important; }

  /* Compact tables */
  table.list thead th {
    background:#fff !important; color:#000 !important;
    border-bottom: 1.5px solid #000 !important;
    padding: 2px 4px !important; font-size: 7pt;
  }
  table.list tbody td { border-bottom: 1px solid #d4d4d4 !important; padding: 2px 4px !important; }
  table.list { page-break-inside: auto; }
  table.list tr { page-break-inside: avoid; page-break-after: auto; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  /* Section headers */
  .px-4.py-3 { padding: 2px 4px !important; }

  /* Residents — 3-col grid, Saphir in col 2 below Diamant */
  .residents-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3mm !important;
    align-items: start !important;
  }
  .saphir-section { grid-column: 2 !important; }

  /* Phones — 3 sections side-by-side */
  .phones-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3mm !important;
    align-items: start !important;
  }

  /* 3 Services — 3 buildings side-by-side, floors stack within each column */
  .services-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3mm !important;
    align-items: start !important;
  }
  .services-grid section { margin-top: 0 !important; }
  .services-floors { grid-template-columns: 1fr !important; gap: 2mm !important; }

  .print-header {
    display: flex !important;
    align-items: center;
    gap: 4mm;
    margin-bottom: 4mm;
    padding-bottom: 3mm;
    border-bottom: 1.5px solid #ccc;
  }
  .print-logo-img { height: 12mm; width: auto; }
  .print-title { display: block !important; font-size: 12pt; font-weight: 700; margin: 0; }
  .print-subtitle { display: block !important; font-size: 8pt; color: #555; margin-top: 0.5mm; }
  .bd-bar, .bd-pill, .phone-status { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bd-pill { border: 1px solid currentColor; }
  .phone-status.off { color: #000 !important; }
  .page-break { page-break-before: always; }
  .avoid-break { page-break-inside: avoid; }
  .plan-cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .space-y-6 > * + * { margin-top: 3mm !important; }
  .space-y-3 > * + * { margin-top: 2mm !important; }
  .gap-3 { gap: 2mm !important; }
  /* Building/section headers in print */
  .bd-bar.h-1\.5 { height: 2px !important; }
  h2.font-semibold { margin-bottom: 1mm !important; }
}
