/* Dedicated IGLOUE Platform surface. The tenant application never loads this file. */
body.platform-host {
  --platform-ink: #23354a;
  --platform-muted: #617286;
  --platform-line: #dce4ed;
  --platform-blue: #e7f0ff;
  --platform-lavender: #f0ebff;
  --platform-mint: #e4f6ee;
  --platform-peach: #fff0e8;
  --platform-amber: #fff3d6;
  --platform-slate: #edf1f5;
  color-scheme: light;
  color: var(--platform-ink);
  background: #f4f6f9;
  font-size: 15px;
}

body.platform-host:not([data-admin-state="platform_ready"]) {
  color: var(--platform-ink);
  background: #f4f6f9;
}
body.platform-host .admin-shell { width: min(100% - 32px, 560px); padding-block: 28px; }
body.platform-host[data-admin-state="platform_ready"] .admin-shell,
body.platform-host[data-admin-state="platform_ready"] .admin-shell:has(.tenant-app-shell) { width: 100%; max-width: none; padding: 0; }
body.platform-host .admin-header { width: min(100% - 40px, 1480px); margin-inline: auto; padding: 20px 0; }
body.platform-host .admin-brand { color: #1e3a5f; letter-spacing: -.025em; }
body.platform-host .admin-label, body.platform-host .admin-eyebrow { color: #60758d; }
body.platform-host .admin-card { border-color: var(--platform-line); border-radius: 16px; background: #fff; color: var(--platform-ink); box-shadow: 0 12px 32px rgb(31 52 75 / 8%); }
body.platform-host .admin-status { color: var(--platform-muted); }
body.platform-host .admin-card input, body.platform-host .admin-card select { border-color: #c8d3df; border-radius: 8px; background: #fff; color: var(--platform-ink); }
body.platform-host .admin-card button, body.platform-host .admin-action { border-color: #245b9a; border-radius: 8px; background: #245b9a; color: #fff; }
body.platform-host .admin-card button:hover, body.platform-host .admin-action:hover { background: #19497f; }
body.platform-host .admin-secondary { color: #245b9a; }
body.platform-host button:focus-visible, body.platform-host a:focus-visible,
body.platform-host input:focus-visible, body.platform-host select:focus-visible { outline: 3px solid #3378c6; outline-offset: 3px; }

body.platform-host .admin-authorized.tenant-app-shell {
  display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 0; min-height: 100vh; width: 100%;
  border: 0; border-radius: 0; background: #f4f6f9; box-shadow: none;
}
body.platform-host .tenant-sidebar {
  position: sticky; top: 0; display: flex; flex-direction: column; width: 252px; height: 100vh; min-height: 100vh;
  padding: 24px 16px; border: 0; border-right: 1px solid var(--platform-line); background: #fff; color: var(--platform-ink);
}
body.platform-host .tenant-brand { gap: 10px; padding: 6px 9px 22px; color: #1f385a; font-size: 1.05rem; letter-spacing: -.02em; }
body.platform-host .tenant-brand-mark { border-radius: 9px; background: #dceaff; color: #245b9a; }
body.platform-host .tenant-sidebar-caption { margin: 0 10px 12px; color: #708198; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
body.platform-host .admin-route-nav { display: grid; gap: 5px; margin: 0; padding: 0; }
body.platform-host .admin-route-nav a {
  min-height: 42px; justify-content: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid transparent;
  border-radius: 9px; background: transparent; color: #465a70; font-size: .88rem; font-weight: 650; text-decoration: none;
}
body.platform-host .admin-route-nav a:hover { background: #f5f7fa; color: #223c5c; }
body.platform-host .tenant-nav-icon { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: var(--platform-slate); color: #51647a; }
body.platform-host .admin-route-nav a[data-admin-route="platform-home"] .tenant-nav-icon { background: var(--platform-blue); color: #285fa2; }
body.platform-host .admin-route-nav a[data-admin-route="platform-alerts"] .tenant-nav-icon { background: var(--platform-peach); color: #a9542b; }
body.platform-host .admin-route-nav a[data-admin-route="platform-tenants"] .tenant-nav-icon { background: var(--platform-lavender); color: #6948a3; }
body.platform-host .admin-route-nav a[data-admin-route="platform-access"] .tenant-nav-icon { background: var(--platform-slate); color: #51647a; }
body.platform-host #admin-route-nav[data-current="platform-home"] a[data-admin-route="platform-home"],
body.platform-host #admin-route-nav[data-current="platform-alerts"] a[data-admin-route="platform-alerts"],
body.platform-host #admin-route-nav[data-current="platform-tenants"] a[data-admin-route="platform-tenants"],
body.platform-host #admin-route-nav[data-current="platform-access"] a[data-admin-route="platform-access"] {
  border-color: #dbe5ef; background: #f0f5fb; color: #183c68; box-shadow: inset 3px 0 #3b78bb;
}
body.platform-host .tenant-sidebar-help { margin-top: auto; color: #52677e; }
body.platform-host .tenant-sidebar-footer { color: #617286; }
body.platform-host .tenant-status-dot { background: #41a47a; }
body.platform-host .tenant-main { min-width: 0; padding: 0 clamp(22px, 4vw, 58px) 44px; }
body.platform-host .tenant-topbar { min-height: 66px; margin: 0 calc(clamp(22px, 4vw, 58px) * -1) 28px; padding: 12px clamp(22px, 4vw, 58px); border-bottom: 1px solid var(--platform-line); background: #fff; }
body.platform-host .tenant-search { color: #52677e; }
body.platform-host .tenant-search input { border-color: #d5dee8; border-radius: 8px; background: #f8fafc; color: var(--platform-ink); }
body.platform-host .tenant-search small { color: #748397; }
body.platform-host .tenant-topbar-tools { color: #52677e; }
body.platform-host .tenant-alert-indicator { display: none; }
body.platform-host .tenant-profile { border-color: var(--platform-line); color: var(--platform-ink); }
body.platform-host .tenant-profile-copy small { color: #687a8e; }
body.platform-host .dashboard-header { align-items: center; margin-bottom: 24px; padding-bottom: 22px; border-color: var(--platform-line); }
body.platform-host .dashboard-header h1 { color: #223750; font-size: clamp(1.6rem, 2.4vw, 2.2rem); letter-spacing: -.035em; }
body.platform-host .admin-organisation-name { color: #59728e; }
body.platform-host .dashboard-updated { color: #708198; }
body.platform-host .dashboard-controls { align-items: center; }
body.platform-host .admin-action-secondary { border-color: #cbd6e2; background: #fff; color: #3d5c7d; }
body.platform-host .dashboard-route-content { display: grid; gap: 16px; color: var(--platform-ink); }
body.platform-host .dashboard-route-title { color: #293f59; }
body.platform-host .dashboard-item-detail, body.platform-host .dashboard-section-note { color: var(--platform-muted); }
body.platform-host .dashboard-empty { border-color: #cbd6e2; color: #5f7084; }
body.platform-host .dashboard-feedback { background: #edf4fc; color: #315579; }
body.platform-host .dashboard-feedback-error { background: #fff0ed; color: #8d332c; }
body.platform-host .platform-centre-eyebrow { color: #537499; }
body.platform-host .platform-centre-panel,
body.platform-host .platform-centre-incident,
body.platform-host .platform-access-form,
body.platform-host .dashboard-detail-group,
body.platform-host .platform-alert-card {
  border: 1px solid var(--platform-line); border-radius: 12px; background: #fff; color: var(--platform-ink);
  box-shadow: 0 3px 12px rgb(31 52 75 / 4%); backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.platform-host .platform-centre-panel { gap: 14px; padding: clamp(17px, 2.3vw, 25px); }
body.platform-host .platform-centre-panel h3 { color: #2e4662; }
body.platform-host .platform-centre-tenant-picker label, body.platform-host .platform-centre-filters label { color: #52677e; }
body.platform-host .platform-centre-select { border-color: #ccd7e3; border-radius: 8px; background: #fff; color: #263c55; }
body.platform-host .platform-centre-summary { gap: 12px; }
body.platform-host .platform-centre-metric { min-height: 88px; border: 1px solid #dce4ed; border-radius: 11px; background: #fff; box-shadow: none; }
body.platform-host .platform-centre-metric:nth-child(4n + 1) { background: var(--platform-blue); }
body.platform-host .platform-centre-metric:nth-child(4n + 2) { background: var(--platform-lavender); }
body.platform-host .platform-centre-metric:nth-child(4n + 3) { background: var(--platform-mint); }
body.platform-host .platform-centre-metric:nth-child(4n) { background: var(--platform-amber); }
body.platform-host .platform-centre-metric-value { color: #203953; }
body.platform-host .platform-centre-metric-label { color: #52677e; }
body.platform-host .platform-centre-quick-links a, body.platform-host .dashboard-detail-link { border-color: #d5e1ee; color: #245b9a; }
body.platform-host .platform-centre-health { background: var(--platform-mint); color: #285b45; }
body.platform-host .platform-centre-health.status-attention { background: var(--platform-amber); color: #795d1a; }
body.platform-host .platform-centre-health.status-critical { background: #ffebe8; color: #8b332d; }
body.platform-host .platform-centre-health-list li, body.platform-host .platform-centre-incident { border-color: var(--platform-line); background: #fbfcfe; }
body.platform-host .platform-centre-incident > strong, body.platform-host .platform-tenant-health-row > strong { color: #2b4059; }
body.platform-host .platform-centre-incident span { color: #65778b; }
body.platform-host .platform-alert-filters { align-items: end; }
body.platform-host .platform-alert-card { display: grid; gap: 9px; padding: 17px 19px; }
body.platform-host .platform-alert-card.category-payments { border-left: 4px solid #d2a13a; }
body.platform-host .platform-alert-card.category-reservations,
body.platform-host .platform-alert-card.category-operations { border-left: 4px solid #6ba993; }
body.platform-host .platform-alert-card.category-deliveries { border-left: 4px solid #58a7a0; }
body.platform-host .platform-alert-card.category-extensions { border-left: 4px solid #8a75bf; }
body.platform-host .platform-alert-card.category-communications,
body.platform-host .platform-alert-card.category-incidents { border-left: 4px solid #df9d75; }
body.platform-host .platform-alert-card h3, body.platform-host .platform-alert-card p { margin: 0; }
body.platform-host .platform-alert-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.platform-host .platform-alert-severity, body.platform-host .platform-alert-type { display: inline-flex; min-height: 26px; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--platform-slate); color: #4d6178; font-size: .76rem; font-weight: 750; }
body.platform-host .platform-alert-severity.severity-critical { background: #ffe8e4; color: #8a312a; }
body.platform-host .platform-alert-severity.severity-attention { background: var(--platform-amber); color: #755718; }
body.platform-host .platform-alert-severity.severity-unknown { background: #e9edf2; color: #59697a; }
body.platform-host .platform-alert-severity.severity-healthy { background: var(--platform-mint); color: #2d644b; }
body.platform-host .platform-alert-type { background: var(--platform-peach); color: #8b4d30; }
body.platform-host .platform-alert-description { color: #425a73; }
body.platform-host .platform-alert-meta { color: #6b7c90; font-size: .82rem; }
body.platform-host .platform-alert-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.platform-host .platform-diary-shell { color: var(--platform-ink); }
body.platform-host .platform-diary-header, body.platform-host .platform-diary-panel,
body.platform-host .platform-diary-issue { border-color: var(--platform-line); border-radius: 12px; background: #fff; color: var(--platform-ink); box-shadow: none; }
body.platform-host .platform-diary-header h1, body.platform-host .platform-diary-panel h2,
body.platform-host .platform-diary-issue h3 { color: #293f59; }
body.platform-host .platform-diary-shell input, body.platform-host .platform-diary-shell select,
body.platform-host .platform-diary-shell textarea { border-color: #ccd7e3; background: #fff; color: var(--platform-ink); }

@media (max-width: 900px) {
  body.platform-host .admin-authorized.tenant-app-shell { grid-template-columns: 1fr; }
  body.platform-host .tenant-sidebar { position: sticky; z-index: 30; width: 100%; height: auto; min-height: 0; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--platform-line); }
  body.platform-host .tenant-brand { padding: 2px 4px 9px; }
  body.platform-host .tenant-sidebar-caption, body.platform-host .tenant-sidebar-help, body.platform-host .tenant-sidebar-footer { display: none; }
  body.platform-host .admin-route-nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
  body.platform-host .admin-route-nav a { min-height: 40px; flex: 0 0 auto; gap: 7px; padding: 6px 9px; font-size: .76rem; white-space: nowrap; }
  body.platform-host .tenant-main { padding: 0 18px 30px; }
  body.platform-host .tenant-topbar { margin: 0 -18px 20px; padding-inline: 18px; }
  body.platform-host .platform-centre-tenant-picker { grid-template-columns: 1fr; }
  body.platform-host .platform-centre-tenant-picker .admin-action { grid-column: auto; }
}
@media (max-width: 560px) {
  body.platform-host .tenant-main { padding-inline: 12px; }
  body.platform-host .tenant-topbar { margin-inline: -12px; padding-inline: 12px; }
  body.platform-host .tenant-search { min-width: 0; }
  body.platform-host .tenant-search input { max-width: 42vw; }
  body.platform-host .tenant-profile-copy { display: none; }
  body.platform-host .dashboard-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  body.platform-host .dashboard-controls { justify-content: flex-start; }
  body.platform-host .platform-centre-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body.platform-host .platform-centre-metric { min-height: 78px; padding: 11px; }
  body.platform-host .platform-centre-filters { align-items: stretch; flex-direction: column; }
  body.platform-host .platform-centre-filters label, body.platform-host .platform-centre-filters select { width: 100%; }
  body.platform-host .platform-alert-card { padding: 14px; }
}

/* Compact enterprise refinement for the dedicated platform application. */
body.platform-host .admin-authorized.tenant-app-shell {
  grid-template-columns: 220px minmax(0, 1fr);
}
body.platform-host .tenant-sidebar {
  width: 220px;
  padding: 18px 12px;
}
body.platform-host .tenant-brand {
  gap: 8px;
  padding: 4px 8px 16px;
  font-size: 1rem;
}
body.platform-host .tenant-sidebar-caption { margin: 0 9px 8px; }
body.platform-host .admin-route-nav { gap: 3px; }
body.platform-host #admin-platform-home-link { margin-top: 8px; border-top-color: var(--platform-line); padding-top: 10px; }
body.platform-host .admin-route-nav a {
  min-height: 38px;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: .84rem;
  font-weight: 600;
}
body.platform-host .tenant-nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
body.platform-host .tenant-main { padding: 0 clamp(18px, 2.4vw, 34px) 30px; }
body.platform-host .tenant-topbar {
  min-height: 52px;
  margin: 0 calc(clamp(18px, 2.4vw, 34px) * -1) 18px;
  padding-block: 8px;
}
body.platform-host .dashboard-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
}
body.platform-host .dashboard-header h1,
body.platform-host .platform-diary-header h1 { font-size: clamp(1.375rem, 1.8vw, 1.5625rem); letter-spacing: -.025em; }
body.platform-host .dashboard-section-heading h2,
body.platform-host .dashboard-route-title,
body.platform-host .platform-centre-panel h3,
body.platform-host .platform-alert-card h3,
body.platform-host .platform-diary-content .panel h2 { font-size: 1.0625rem; letter-spacing: -.01em; }
body.platform-host .dashboard-route-title { margin-top: 5px; font-weight: 650; }
body.platform-host .dashboard-route-content { gap: 12px; }
body.platform-host .platform-centre-panel { gap: 10px; padding: 16px; }
body.platform-host .platform-centre-summary { gap: 9px; }
body.platform-host .platform-centre-metric { min-height: 76px; padding: 12px; }
body.platform-host .platform-centre-metric-value { font-size: clamp(1.25rem, 1.7vw, 1.65rem); }
body.platform-host .platform-alert-card { gap: 7px; padding: 13px 15px; }
body.platform-host .platform-alert-pagination { gap: 8px; }
body.platform-host .platform-diary-shell { gap: 12px; }
body.platform-host .platform-diary-header { padding-bottom: 10px; }
body.platform-host .platform-diary-content { gap: 10px; }
body.platform-host .platform-diary-content .panel,
body.platform-host .platform-diary-content .diary-subpanel { padding: 13px; }
body.platform-host .platform-diary-content .panel h2 { margin-bottom: 9px; }
body.platform-host .platform-diary-content .diary-filter-form { gap: 9px; padding: 11px; }
body.platform-host .platform-diary-content .diary-subpanel { gap: 8px; margin-top: 10px; }
body.platform-host .platform-diary-header button,
body.platform-host .platform-diary-controls button,
body.platform-host .dashboard-controls .admin-action,
body.platform-host .tenant-topbar-tools button {
  min-height: 38px;
  padding-block: 7px;
  border-radius: 7px;
  font-size: .82rem;
}

@media (max-width: 1100px) {
  body.platform-host .tenant-main { padding-inline: 20px; }
  body.platform-host .tenant-topbar { margin-inline: -20px; padding-inline: 20px; }
}
@media (max-width: 900px) {
  body.platform-host .tenant-sidebar { padding: 8px 12px; }
  body.platform-host .tenant-brand { padding: 2px 4px 7px; }
  body.platform-host .admin-route-nav { min-width: 0; }
  body.platform-host #admin-platform-home-link { margin-top: 0; border-top-color: transparent; padding-top: 6px; }
  body.platform-host .admin-route-nav a { min-height: 40px; }
  body.platform-host .tenant-main { padding: 0 18px 24px; }
  body.platform-host .tenant-topbar { margin: 0 -18px 14px; padding-inline: 18px; }
  body.platform-host .dashboard-header h1,
  body.platform-host .platform-diary-header h1 { font-size: 1.375rem; }
  body.platform-host .dashboard-header { margin-bottom: 13px; }
}
@media (max-width: 560px) {
  body.platform-host .tenant-main { padding: 0 12px 20px; }
  body.platform-host .tenant-topbar { margin-inline: -12px; padding-inline: 12px; }
  body.platform-host .admin-route-nav { scrollbar-width: thin; }
  body.platform-host .admin-route-nav a { min-height: 42px; }
  body.platform-host .dashboard-controls .admin-action,
  body.platform-host .tenant-topbar-tools button,
  body.platform-host .platform-diary-controls button { min-height: 42px; }
  body.platform-host .platform-centre-panel { padding: 12px; }
  body.platform-host .platform-diary-content .panel,
  body.platform-host .platform-diary-content .diary-subpanel { padding: 11px; }
  body.platform-host .platform-alert-pagination { align-items: stretch; flex-direction: column; }
}

/* Keep the tablet/mobile shell overrides after the compact desktop rules. */
@media (max-width: 900px) {
  body.platform-host .admin-authorized.tenant-app-shell { grid-template-columns: minmax(0, 1fr); }
  body.platform-host .tenant-sidebar { width: 100%; min-width: 0; }
}
