/* Shared page geometry. Loaded after feature styles to keep routes aligned. */
.main { --page-title-size:38px; --page-title-leading:1.08; --page-title-tracking:normal; --page-header-gap:32px; }
.main > :is(.settings-page,.cp-view,.intelligence-view,.integrations-view,.media-view,.reviews-view,.placeholder-view,.route-error) { width:100%; max-width:none; margin:0; padding-top:0; }
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) {
 position:relative; display:block; width:100%; max-width:none; min-height:150px;
 margin:0 0 var(--page-header-gap); padding:0 180px 24px 0;
 border-bottom:1px solid var(--sp-border,rgba(51,46,30,.12));
}
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) h1 {
 font-family:var(--font-headline); font-size:var(--page-title-size); font-weight:600;
 line-height:var(--page-title-leading); letter-spacing:var(--page-title-tracking); color:var(--sp-ink,#332e1e);
 margin:12px 0; overflow-wrap:break-word;
}
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) .section-eyebrow {
 display:block; margin:0; font-size:10px; line-height:16px; font-weight:400; letter-spacing:.12em;
}
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) p {
 max-width:760px; margin:0; font-size:15px; line-height:1.6; color:var(--sp-text-muted,#7d7866);
}
.main .cp-heading .cp-library,.main .integrations-header .integration-back-button,.main .media-heading #mediaBack { position:absolute; right:0; top:54px; margin:0; }
.main .settings-heading { display:block; }
.main .settings-heading > div { min-width:0; }
.main .settings-back-button { position:absolute; right:0; top:54px; margin:0; }
.main .settings-head-actions { position:absolute; right:0; top:104px; }
.main .integration-card-compact { max-width:none; }
@media(max-width:820px) {
 .main { --page-title-size:34px; --page-title-leading:1.04; --page-title-tracking:-.015em; --page-header-gap:24px; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) { min-height:0; padding:0 0 24px; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) p { font-size:14px; }
 .main .cp-heading .cp-library,.main .integrations-header .integration-back-button,.main .media-heading #mediaBack,.main .settings-back-button,.main .settings-head-actions { position:static; margin:16px 0 0; }
 .main .integrations-header,.main .settings-heading { display:flex; flex-direction:column; align-items:flex-start; }
 .main .integrations-header .integration-back-button,.main .settings-back-button { float:none; order:2; margin:16px 0 0; }
 .main .cp-heading .cp-library { font-size:13px; }
}

/* Reserved subpage navigation row: identical content start with or without tabs. */
.main { --page-subnav-height:80px; }
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) {
 margin-bottom:calc(var(--page-subnav-height) + var(--page-header-gap));
}
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading):has(+ .page-subnav) {
 margin-bottom:0;
}
.main .page-subnav {
 box-sizing:border-box; display:flex; align-items:center; gap:8px;
 height:var(--page-subnav-height); min-height:var(--page-subnav-height);
 margin:0 0 var(--page-header-gap); padding:0;
 border-bottom:1px solid var(--sp-border,rgba(51,46,30,.12));
 overflow-x:auto; white-space:nowrap;
}
.main .page-subnav > button { flex:0 0 auto; margin:0; }
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) + :not(.page-subnav) { margin-top:0; }
.main .page-subnav + * { margin-top:0; }
#analyticsStatus:empty { display:none; }
@media(max-width:820px) {
 .main { --page-subnav-height:72px; }
 .main .page-subnav { scrollbar-width:none; }
 .main .page-subnav::-webkit-scrollbar { display:none; }
}

/* Overview is the typography reference for every page title. */
.main :is(.overview-header,.placeholder-view,.route-error) h1 {
 font-family:var(--font-headline); font-size:var(--page-title-size); font-weight:600;
 line-height:var(--page-title-leading); letter-spacing:var(--page-title-tracking);
 color:var(--sp-ink);
}
@media(max-width:420px) { .main { --page-title-size:32px; } }
/* Keep long provider names and settings controls separate on phones. */
@media(max-width:600px) {
 .main .integration-card-summary .integration-card-top { display:grid; grid-template-columns:42px minmax(0,1fr) 34px; column-gap:10px; row-gap:6px; }
 .main .integration-card-summary .integration-icon { grid-column:1; grid-row:1 / 3; }
 .main .integration-card-summary .integration-title { grid-column:2; grid-row:1; min-width:0; }
 .main .integration-card-summary .integration-title h2 { font-size:16px; overflow-wrap:anywhere; }
 .main .integration-card-summary .integration-status { grid-column:2; grid-row:2; order:0; justify-self:start; margin:0; }
 .main .integration-card-summary .integration-more-button { grid-column:3; grid-row:1 / 3; }
}

.module-link { color:inherit; text-decoration:none; transition:border-color .18s,box-shadow .18s; }
.module-link:hover { border-color:var(--sp-gold,#b0a06d); box-shadow:0 4px 18px #332e1e08; }
.module-link:focus-visible { outline:2px solid var(--sp-gold,#b0a06d); outline-offset:3px; }

/* Mobile rhythm: no empty navigation reservation; actions occupy their own row. */
.sp-ui-icon { display:inline-block; width:16px; height:16px; flex:0 0 16px; vertical-align:-.15em; }
.cp-symbol > .sp-ui-icon { width:24px; height:24px; }
.cp-close > .sp-ui-icon { width:20px; height:20px; }
@media(max-width:820px) {
 .main { --page-header-gap:32px; --page-subnav-height:64px; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) { margin-bottom:32px; padding-bottom:16px; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) h1 { margin:16px 0; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading):has(+ .page-subnav) { margin-bottom:0; }
 .main :is(.cp-heading,.integrations-header,.media-heading,.settings-page-head):has(.page-header-actions) { padding-bottom:0; }
 .main .page-header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; width:100%; margin-top:16px; padding:16px 0; border-top:1px solid var(--sp-border,rgba(51,46,30,.12)); }
 .main .page-header-actions :is(.cp-library,.integration-back-button,#mediaBack,.settings-back-button) { margin:0; position:static; }
 .main .cp-starts { gap:16px; }
 .main .cp-start { padding:24px 16px; gap:16px; }
 .main .integration-card-summary .integration-card-top { column-gap:8px; row-gap:8px; }
 .main .integration-card-summary { padding:16px; }
}

@media(max-width:820px) {
 .main .overview-intro .section-eyebrow { margin-bottom:16px; }
 .main .overview-header h1 { margin:0 0 16px; }
 .main .cp-symbol { width:48px; height:48px; }
 .main .cp-library { padding:16px; }
}

@media(max-width:820px) { .main { padding-left:16px; padding-right:16px; } .main .kpi-strip { margin-top:32px; } }

/* Desktop page shell: 8px rhythm and an explicit 80px content offset. */
@media(min-width:821px) {
 .main { --page-header-gap:80px; --page-subnav-height:64px; padding:64px 48px 72px; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) {
  min-height:160px; margin-bottom:80px; padding:0 0 24px; 
 }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) h1 { margin:24px 0 16px; }
 .main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading):has(+ .page-subnav) { margin-bottom:0; }
 .main :is(.cp-heading,.integrations-header,.media-heading,.settings-page-head):has(.page-header-actions) { padding-bottom:0; }
 .main .page-header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; width:100%; margin-top:24px; padding:16px 0; border-top:1px solid var(--sp-border,rgba(51,46,30,.12)); }
 .main .page-header-actions :is(.cp-library,.integration-back-button,#mediaBack,.settings-back-button) { position:static; margin:0; }
 .main .page-subnav { margin-bottom:80px; }
 .main .overview-header { padding:0 0 24px; margin-bottom:80px; border-bottom:1px solid var(--sp-border,rgba(51,46,30,.12)); gap:32px; }
 .main .overview-intro .section-eyebrow { margin:0; }
 .main .overview-header h1 { margin:24px 0 16px; }
 .main .overview-header + .kpi-strip { margin-top:0; }
 .main .settings-back-button { top:64px; }
 .main .settings-head-actions { top:112px; }
 .main :is(.cp-starts,.cp-grid,.integrations-grid,.media-grid) { gap:24px; }
}
@media(min-width:1600px) { .main { padding-left:64px; padding-right:64px; } }
@media(min-width:821px) and (max-width:1100px) { .main { padding-left:32px; padding-right:32px; } }

.main .settings-head-actions.page-header-actions { position:static; }
@media(min-width:821px) { .main .overview-divider { display:none; } }
.main .page-header-actions { justify-content:flex-start; }
.main .page-header-actions .settings-back-button { order:0; }
.main .page-header-actions .profile-save-state:empty { display:none; }
/* App-owned select affordances use SVG rather than a platform glyph. */
.main select:not([multiple]) {
 appearance:none; -webkit-appearance:none; padding-right:40px;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23817e70' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
 background-repeat:no-repeat; background-position:right 16px center; background-size:16px 16px;
}

/* Greeting and pulse share one compact header, separated by a short rule. */
.welcome-name { display:inline; }
.main .overview-header { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,1fr); align-items:center; gap:0; }
.main .overview-intro { flex:0 1 auto; width:auto; min-width:0; }
.main .overview-header [data-hotel-pulse] { position:relative; width:100%; max-width:none; margin:0; padding:0; }
.main .overview-header [data-hotel-pulse]::before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width:1px; height:64px; background:var(--sp-border,#e7e1d3); }
.main .overview-header .hp-trigger { display:block; padding:16px 0; min-height:0; border:0; text-align:center; }
.main .overview-header .hp-value { display:flex; height:64px; justify-content:center; }
.main .overview-header .hp-link { display:flex; align-items:center; justify-content:center; gap:8px; margin:8px 0 0; }
@media(max-width:820px) {
 .main { padding-top:calc(120px + env(safe-area-inset-top)); }
 .welcome-name { display:block; }
 .main .overview-header { grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:0; }
 .main .overview-intro { padding-right:16px; }
 .main .overview-header [data-hotel-pulse] { width:100%; padding-left:16px; }
 .main .overview-header .hp-value { height:56px; }
 .main .overview-header .hp-link { font-size:10px; gap:8px; flex-wrap:wrap; }
 .main .overview-header .hp-eyebrow { font-size:9px; letter-spacing:.08em; }
 .main .overview-header .hp-value strong { font-size:40px; }
 .main .overview-header .hp-value small { font-size:10px; }
 .main .overview-header .hp-value { gap:4px; }
}
@media(max-width:420px) {
 .main .overview-header { grid-template-columns:minmax(0,7fr) minmax(0,3fr); }
 .main .overview-header [data-hotel-pulse] { padding-left:8px; }
}

/* Keep greeting units intact and affordances aligned independently of font baselines. */
.welcome-greeting { white-space:nowrap; }
.main .module { gap:16px; }
.main .module > div { min-width:0; }
.main .module .status { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:8px 16px; line-height:16px; white-space:nowrap; }
.main .module .status .sp-ui-icon { display:block; width:16px; height:16px; flex:0 0 16px; vertical-align:initial; }
@media(max-width:820px) {
 .main .overview-header { grid-template-columns:minmax(0,7fr) minmax(0,3fr); }
 .main .overview-intro { container-type:inline-size; }
 .main .overview-header h1 { font-size:clamp(20px, 7.2vw, 32px); font-size:clamp(20px, 13cqi, 32px); }
 .welcome-name { white-space:nowrap; }
 .main .overview-header [data-hotel-pulse] { padding-left:8px; }
}

/* One eyebrow-to-title spacing contract on every page and viewport. */
.main :is(.overview-header,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) .section-eyebrow { margin-bottom:0; }
.main :is(.overview-header,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) h1 { margin-top:24px; }
/* Optical compensation for the uppercase font's visible cap-height. */
.main .module .status.active > span { transform:translateY(1px); }
/* iOS focus zoom: readable form text across views, login and portalled dialogs. */
@media(max-width:820px), (hover:none) and (pointer:coarse) {
 body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea,[contenteditable=true]) { font-size:16px !important; }
}

/* Trim font-internal whitespace so the measured gap matches visible lettering. */
.main :is(.overview-header,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) :is(.section-eyebrow,h1) { text-box-trim:trim-both;text-box-edge:cap alphabetic; }
@media(max-width:820px) {
 .main :is(.overview-header,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) h1 { margin-top:16px; }
}
/* Single close-control contract for every app overlay, including nested dialogs. */
body :is(dialog,[role="dialog"]) button:is([aria-label$="schließen" i],.integration-dialog-close,.cp-close,.hp-close,.ai-report-close,.reviews-close) {
 box-sizing:border-box;display:inline-grid;place-items:center;flex:0 0 40px;
 width:40px;height:40px;min-width:40px;min-height:40px;max-width:40px;max-height:40px;
 padding:0;margin:0;border:0;border-radius:12px;background:transparent;color:#847e6b;
 box-shadow:none;font-size:0;line-height:1;cursor:pointer;align-self:flex-start;
}
body :is(dialog,[role="dialog"]) button:is([aria-label$="schließen" i],.integration-dialog-close,.cp-close,.hp-close,.ai-report-close,.reviews-close) svg {
 display:block;width:18px;height:18px;min-width:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transform:none;vertical-align:initial;
}
body :is(dialog,[role="dialog"]) button:is([aria-label$="schließen" i],.integration-dialog-close,.cp-close,.hp-close,.ai-report-close,.reviews-close):hover { background:#ede8da;color:#494738; }
body :is(dialog,[role="dialog"]) button:is([aria-label$="schließen" i],.integration-dialog-close,.cp-close,.hp-close,.ai-report-close,.reviews-close):focus-visible { outline:2px solid #b5a56b;outline-offset:3px; }
/* Campaign entry cards share the tallest content height, also when stacked. */
.main .cp-starts { grid-auto-rows:1fr;align-items:stretch; }
.main .cp-start { height:100%;box-sizing:border-box; }

/* Equal overview tiles across rows and stacked mobile layouts. */
.main .module-list { grid-auto-rows:1fr;align-items:stretch;gap:16px; }
.main .module { height:100%;box-sizing:border-box;padding:24px; }
@media(max-width:820px) { .main .module { padding:16px; } }
/* Canonical content rhythm — see DESIGN-RHYTHM.md. No route-specific offsets. */
:root {
 --sp-eyebrow-title-gap:24px;
 --sp-title-rule-gap:32px;
 --sp-rule-buttons-gap:16px;
 --sp-buttons-content-gap:54px;
}
@media(max-width:820px) {
 :root { --sp-eyebrow-title-gap:16px; --sp-title-rule-gap:24px; --sp-buttons-content-gap:32px; }
}
.main :is(.sp-page-heading,.overview-header,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading,.dashboard-section-head,.cp-live-toolbar) .section-eyebrow {
 display:block;margin:0; text-box-trim:trim-both;text-box-edge:cap alphabetic;
}
.main :is(.sp-page-heading,.overview-header,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading,.dashboard-section-head,.cp-live-toolbar) :is(h1,h2) {
 margin:var(--sp-eyebrow-title-gap) 0 0; text-box-trim:trim-both;text-box-edge:cap alphabetic;
}
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) {
 min-height:0!important;padding-bottom:var(--sp-title-rule-gap)!important;margin-bottom:var(--sp-buttons-content-gap)!important;
}
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading) p { margin-top:16px;margin-bottom:0; }
.main :is(.sp-page-heading,.intelligence-header,.integrations-header,.cp-heading,.media-heading,.settings-page-head,.reviews-heading,.placeholder-heading):has(+ :is(.sp-page-nav,.page-subnav,.intelligence-tabs,.reviews-nav,.cp-provider-tabs)) {
 margin-bottom:0!important;border-bottom:0!important;
}
.main :is(.sp-page-nav,.page-subnav,.intelligence-tabs,.reviews-nav,.cp-provider-tabs,.sp-weather-switch) {
 height:auto!important;min-height:0!important;padding:var(--sp-rule-buttons-gap) 0 0!important;
 margin:0 0 var(--sp-buttons-content-gap)!important;border-top:1px solid var(--sp-button-border,#e5dfd0)!important;border-bottom:0!important;align-items:center;
}
.main :is(.sp-page-nav,.page-subnav,.intelligence-tabs,.reviews-nav,.cp-provider-tabs,.sp-weather-switch)+* {
 margin-top:0!important;
}
/* A framed content card keeps its internal padding and border after navigation. */
.main :is(.sp-page-nav,.page-subnav,.intelligence-tabs,.reviews-nav,.cp-provider-tabs,.sp-weather-switch)+:not(.sp-operating-banner) {
 border-top:0!important;padding-top:0!important;
}
.main :is(#hotelMediaLibrary>.media-toolbar,#hotelMediaLibrary>.video-toolbar,.analytics-toolbar,.sc-toolbar,.cp-planning>.cp-starts) {margin-top:0!important;padding-top:0!important;border-top:0!important}
.main :is(.overview-weather,.active-section,.hh-overview)>.dashboard-section-head,
.main .cp-live-toolbar:has(h2) { margin:0 0 var(--sp-title-rule-gap);padding:0; }
.main .cp-report-actions { margin:0 0 16px;display:flex;justify-content:flex-end; }
.main .cp-report-actions [data-refresh] svg {width:16px;height:16px}
/* Period filters are content controls, not a second page navigation. */
.main .cp-history .cp-provider-tabs {border-top:0!important;padding-top:0!important;margin-bottom:16px!important}
/* No navigation: content follows the heading directly, with no reserved row. */
.main :is(.sp-page-heading,.integrations-header,.settings-page-head,.placeholder-heading):not(:has(+ :is(.sp-page-nav,.page-subnav))):not(:has(.page-header-actions)) {
 padding-bottom:0!important;border-bottom:0!important;margin-bottom:var(--sp-title-rule-gap)!important;
}
.main :is(.settings-page-head,.cp-heading,.media-heading,.integrations-header):has(.page-header-actions) {
 padding-bottom:0!important;border-bottom:0!important;margin-bottom:var(--sp-buttons-content-gap)!important;
}
.main .page-header-actions {margin-top:var(--sp-title-rule-gap);padding:var(--sp-rule-buttons-gap) 0 0;border-bottom:0}
/* Weather's existing grid gap is replaced with the same explicit child rhythm. */
.main .sp-weather {row-gap:0}
.main .sp-weather > :not(.sp-weather-switch):not(.sp-weather-location) {margin-top:16px}

/* The eyebrow/title pair also applies to content section headers. */
.main .section-eyebrow:has(+ :is(h1,h2)) {display:block;margin-bottom:0;text-box-trim:trim-both;text-box-edge:cap alphabetic}
.main .section-eyebrow + :is(h1,h2) {margin-top:var(--sp-eyebrow-title-gap);text-box-trim:trim-both;text-box-edge:cap alphabetic}

/* Greeting metadata is a subtitle group, with breathing room below the title. */
.main .overview-intro > .overview-hotel {margin-top:16px;flex-wrap:wrap;column-gap:8px;row-gap:8px}
/* Overview subtitle uses the same muted text token as content-page subtitles. */
.main .overview-header .overview-hotel,
.main .overview-header .overview-hotel #hotelName {color:var(--sp-text-muted)}

/* Phone content switcher. Navigation keeps the canonical rule/spacing above.
   Tablet and desktop retain the original buttons; filters are not converted. */
.sp-subnav-mobile {display:none}
html.sp-subnav-open {overflow:hidden}
body dialog.sp-subnav-sheet {box-sizing:border-box;position:fixed;inset:auto 0 0;width:100%;max-width:600px;max-height:85dvh;margin:0 auto;padding:24px 24px calc(24px + env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
.sp-subnav-sheet-head {display:flex;align-items:center;gap:16px;margin:0 0 24px;padding:0}
.sp-subnav-sheet-head h2 {flex:1;min-width:0;margin:0;overflow-wrap:anywhere}
.sp-subnav-options {display:grid;gap:8px}
@media(max-width:600px) {
 .main .sp-subnav-enhanced > :not(.sp-subnav-mobile) {display:none!important}
 .main .sp-subnav-enhanced .sp-subnav-mobile {display:block;grid-column:1 / -1;width:100%;min-width:0}
 .sp-subnav-trigger {width:100%;display:flex;align-items:center;gap:16px;min-height:56px}
 .sp-subnav-copy {display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
 .sp-subnav-current {overflow-wrap:anywhere}
 .sp-subnav-current-icon,.sp-subnav-list-icon {display:flex;align-items:center;justify-content:center;flex:0 0 24px}
 .sp-subnav-list-icon {flex-basis:44px;min-height:44px}
}
