/* Shared foundation for public pages, workspace, client portal, and administration. */
:root {
  --opright-blue:#526340; --opright-gradient:#526340; --opright-wash:#f6f3ec;
  --opright-line:#e9e3d7; --opright-muted:#526340; --opright-radius:8px;
  --platform-muted:#526340; --platform-line:#e9e3d7; --platform-radius:8px;
  --platform-shadow:none;
}
body { font-family:var(--ds-font-body); font-size:16px; }
img,video { max-width:100%; }
button,input,select,textarea { font-family:var(--ds-font-body); }
a { overflow-wrap:anywhere; text-underline-offset:3px; }
:where(main,section,article,aside,header,footer,nav,form,fieldset) { min-width:0; }
:where(h1,h2,h3,h4,p,label,strong,td,th) { overflow-wrap:anywhere; }
:where(button,a,summary,input,select,textarea):focus-visible { outline:3px solid #526340; outline-offset:3px; }
:where(button):disabled { cursor:wait; }
:where(.primary,.secondary,.marketingButton,.platformButton,.pricingCta):not(:disabled):hover { opacity:1; filter:none; transform:none; }
:where(.primary,.workspaceLeaveSave,.oprightGuideLauncher,.oprightGuideSend,.guideLauncher,.guideSend) { background:#526340!important; box-shadow:none!important; }
:where(.primary,.secondary,.success,.danger,.platformButton) { border-radius:6px; min-height:44px; }
:where(.hint,.error,.notice) { font-size:14px; line-height:1.55; }
:where(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) { min-width:0; max-width:100%; font-size:16px; }
.skip-link { position:fixed; top:-100px; left:16px; z-index:10000; padding:12px 16px; background:#fdfcf9; color:#252821; border:1px solid #252821; border-radius:4px; }
.skip-link:focus { top:max(12px,env(safe-area-inset-top)); }
.publicMenu { display:none; position:relative; flex:0 0 auto; padding:0; border:0; background:none; }
.publicMenu>summary { display:flex; min-height:44px; align-items:center; padding:10px 14px; border:1px solid #8e9a74; border-radius:5px; background:#fdfcf9; color:#252821; font-size:14px; font-weight:650; cursor:pointer; list-style:none; }
.publicMenu>summary::-webkit-details-marker { display:none; }
.publicMenu>summary::after { content:'+'; margin-left:10px; font-size:18px; }
.publicMenu[open]>summary::after { content:'−'; }
.publicMenu>nav { position:absolute; right:0; top:calc(100% + 8px); z-index:80; display:grid; width:260px; max-width:calc(100vw - 32px); max-height:65dvh; overflow:auto; padding:8px; border:1px solid #8e9a74; border-radius:6px; background:#fdfcf9; box-shadow:0 8px 24px #25282118; }
.publicMenu>nav>a { display:block; min-height:44px; padding:12px; border-radius:3px; color:#252821; font-size:16px; line-height:1.4; text-decoration:none; }
.publicMenu>nav>a:hover { background:#f6f3ec; text-decoration:underline; }
.publicActionStatus { max-width:1160px; margin:16px auto; padding:16px; border:1px solid #d4d6cb; border-radius:6px; background:#fdfcf9; color:#252821; font-size:16px; line-height:1.5; }
[hidden] { display:none!important; }
/* Keep semantic states, charts, and industry colors; simplify structural surfaces. */
#appView .top,#appView .tabs,.platformSidebar,.legalTopbar { background:#252821; box-shadow:none; backdrop-filter:none; }
#appView .workspaceBrand { color:#fdfcf9; text-decoration:none; min-width:0; }
#appView .workspaceDesktopBrand { letter-spacing:-.02em; text-transform:none; }
#appView .workspaceDesktopBrand img,#appView .workspaceBrand>img { box-shadow:none; }
#appView .workspaceBrandCopy>span { display:none; }
#appView .tabs button:not(.hidden) { color:#e9e3d7; border-radius:6px; transform:none; }
#appView .tabs button.active { background:#343a2d; color:#fdfcf9; box-shadow:inset 3px 0 #fdfcf9; }
#appView .tabs button:not(.hidden):hover { background:#343a2d; transform:none; }
#appView :is(.hero,.settingsHubIntro,.homeCommandDeck,.scheduleCommandDeck,.plannerCommandDeck,.paymentOverview,.migrationHero,.settingsHelpHero,.helpHero,.supportHero) { background:#252821!important; box-shadow:none!important; border-radius:8px; }
#appView :is(.homeCommandDeck,.scheduleCommandDeck,.plannerCommandDeck,.settingsHubIntro,.helpHero,.supportHero)::before,
#appView :is(.homeCommandDeck,.scheduleCommandDeck,.plannerCommandDeck,.settingsHubIntro,.helpHero,.supportHero)::after { content:none; }
#appView :is(.panel,.card,.stat,.form,.settingsHubCard,.workCard,.homeRouteCard,.homeQuietCard,.migrationSourceCard,.migrationFileCard,.migrationMapping,.migrationReview,.migrationHistorySection) { border-color:#e9e3d7; border-radius:8px; box-shadow:none; }
#appView :is(.settingsHubHelpCard,.statsTileFeatured) { border-color:#e9e3d7!important; background:#f6f3ec!important; }
#appView :is(.homeMetricIcon,.settingsHubCard .settingsHubIcon) { display:none; }
#appView .homeMetric { padding:20px; }
#appView .settingsHubCard { grid-template-columns:minmax(0,1fr) auto; }
#appView :is(.card span,.hint,.form label,.panel label,.settingsHubCard p,.homeMetric>span,.installStepCopy>span,.installStepCopy>strong) { font-size:14px!important; line-height:1.5; }
#appView .tabs button>span { font-size:12px!important; }
#appView .workspaceHeaderButton { min-height:44px; min-width:44px; color:#fdfcf9; border-color:#526340; background:#252821; border-radius:6px; }
#appView .top :is(.workspaceLivePill,.workspaceLivePill>i) { box-shadow:none; }
.sheet,.authbox,.workspaceLeaveCard { border-radius:10px; }
#companySignupForm { border:0; padding:0; }
#companySignupForm :is(label,.hint,.error,.notice) { font-size:14px; line-height:1.5; }
#companySignupForm .legalSignupCheck { border:0; background:none; padding:8px 0; }
#companySignupForm>.hint:first-child { padding:0 0 12px; border:0; border-radius:0; background:none; }
#signupMsg:not(:empty),#authMsg:not(:empty) { padding:12px; background:#f6f3ec; border-radius:5px; }
#sheet:has(#companySignupForm) { border-radius:10px; }
.platformHero,.legalArticleHeader { background:#252821; box-shadow:none; }
.platformGate { background:#f6f3ec; }
.platformGateCard,.platformCard,.platformMetric,.platformTableCard,.clientCard,.clientShell,.legalArticle { border-color:#e9e3d7; border-radius:8px; box-shadow:none; }
.platformButtonPrimary,.platformNav button.active { background:#526340; box-shadow:none; }
.platformNav button:hover { transform:none; }
.platformBrand small,.platformNavLabel { color:#8e9a74; }
.platformNav button { color:#e9e3d7; border-radius:6px; }
.legalArticleHeader>span,.legalSidebarEyebrow,.platformEyebrow { color:#8e9a74; }
.legalArticleHeader>span { display:none; }
.legalArticleFooter,.legalTopbar { flex-wrap:wrap; height:auto; min-height:72px; gap:12px; }
.legalSidebar>div { background:#252821; border-radius:8px; }
.trustCard { border-radius:6px; }
.trustCard:hover { transform:none; border-color:#526340; box-shadow:none; }
.legalArticleFooter p,.legalContactLine,.clientFooter { overflow-wrap:anywhere; }
@media(max-width:960px) { .publicMenu { display:block; } }
@media(min-width:1060px) { #appView .tabs button>span { font-size:14px!important; } }
@media(max-width:600px) {
  .sheet { border-radius:10px 10px 0 0; }
  #sheet:has(#companySignupForm) { border-radius:10px 10px 0 0; }
  #appView .homeMetric { padding:16px 12px; }
  .publicActionStatus { margin:12px 16px; }
  .legalTopbar { padding-block:12px; padding-top:max(12px,env(safe-area-inset-top)); }
}
/* Match the specificity of the established workspace layout. */
#appView { font-family:var(--ds-font-body); }
#appView .workspaceDesktopBrand>span { font-size:22px!important; line-height:1.2; }
#appView #home .homeCommandDeck { border-radius:8px; }
#appView #home .homeMetric { padding:20px; border-radius:8px; border-color:#e9e3d7; box-shadow:none; }
#appView #home .homeMetricIcon { display:none; }
#appView #home .homeRecentHeader>div { width:auto; flex:1 1 0; min-width:0; }
#appView #home #goInvoices { flex:0 0 auto; width:auto; min-width:76px; min-height:44px; font-size:14px; white-space:nowrap; }
#appView #home .homeTitleCopy>span { display:none; }
@media(max-width:600px) {
  #appView #home .homeMetric { padding:16px 12px; }
}

/* Keep the complete artwork inside rounded company-logo containers. */
#appView .top .workspaceBrand > img,
#appView .workspaceDesktopBrand img,
#brandLogoPreview,
#sheet .invoicehead img {
  box-sizing: border-box;
  padding: 4px;
  object-fit: contain;
  object-position: center;
  background: #fdfcf9;
}
#sheet .invoicehead img { padding: 6px; }
.workspaceLoadingScreen .workspaceLoadingLogo,
.workspaceLoadingScreen .workspaceLoadingBrand img {
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}
.workspaceLoadingScreen .workspaceLoadingBrand img { padding: 3px; background: #fdfcf9; }

/* Home route empty state matches the simple schedule empty card. */
#appView #home .homeRoutePanel.is-empty #homeRouteCanvas {
  background: #e5eadd;
  border: 1px dashed #d4d6cb;
  border-radius: 18px;
  box-shadow: none;
}
#appView #home #homeRouteCanvas .homeQuietState {
  min-height: 180px;
  padding: 32px 18px;
  gap: 10px;
  background: transparent;
  border: 0;
}
#appView #home #homeRouteCanvas .homeQuietIcon {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 14px;
  background: #e5eadd;
  color: #3f5c37;
  font-size:27px;
}
#appView #home #homeRouteCanvas .homeQuietState h3 { color: #252821; }
#appView #home #homeRouteCanvas .homeQuietState p { max-width: 100%; }

/* A readable, filterable customer record on desktop and phones. */
.customerHistory{color:var(--ds-ink);min-width:0}
.customerHistory .modalhead{align-items:flex-start}
.historyEyebrow{font-size:11px;letter-spacing:.14em;color:var(--ds-action);margin:0 0 8px}
.historyTags{display:flex;flex-wrap:wrap;gap:6px}
.historyTags span{padding:4px 10px;background:var(--ds-cream);border:1px solid var(--ds-line);border-radius:20px;font-size:12px}
.historySummary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.historySummary>div{padding:14px;background:var(--ds-cream);border:1px solid var(--ds-line);border-radius:var(--ds-radius-sm)}
.historySummary small,.historySummary strong{display:block;overflow-wrap:anywhere}
.historySummary small{font-size:12px;color:var(--ds-muted);margin-bottom:6px}
.historySummary strong{font-size:22px;font-variant-numeric:tabular-nums}
.historyToolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:20px 0 12px}
.historyToolbar label{display:grid;gap:6px;flex:1;max-width:280px}
.historyRows{display:grid}
.historyRow{display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left;width:100%;min-height:80px;padding:16px 0;border:0;border-bottom:1px solid var(--ds-line);border-radius:0;background:transparent;color:var(--ds-ink)}
.historyRow:hover{background:var(--ds-cream)}
.historyRow>span:first-child{display:grid;gap:4px;min-width:0}
.historyRow small{color:var(--ds-muted);font-size:12px}
.historyRow strong,.historyRow span{overflow-wrap:anywhere}
.historyRow>span:last-child{font-variant-numeric:tabular-nums;flex-shrink:0}
.historyNotes summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}
.historyNotes p{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:430px){.historySummary{grid-template-columns:1fr;gap:8px}.historySummary>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.historySummary small{margin:0}.historySummary strong{font-size:20px}.historyRow{gap:10px}.historyRow>span:last-child{max-width:35%;font-size:13px}}
