/* Shared surfaces inherit their palette before page-specific rules paint. */
.public-body .login-layout{min-height:100dvh;padding-block:3rem}.login-copy h1{font-size:clamp(3rem,6vw,6rem);letter-spacing:-.055em;white-space:nowrap}
.company-picker{max-width:960px;margin:4vh auto}.company-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;margin-top:24px}.company-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;min-height:200px;width:100%;padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}.company-tile:hover{border-color:var(--blue);background:var(--hover,#edf4ff)}.company-tile img{max-width:180px;max-height:70px;padding:12px;background:#071525;border-radius:10px}.company-tile:disabled{cursor:default;opacity:.65}.company-monogram{font-size:2.4rem;font-weight:800}.company-tile small{color:var(--muted)}
.user-menu-panel{padding:14px;min-width:300px}.user-menu-identity{padding:10px 8px 16px}.start-choice{display:block;width:100%;text-align:left;border:0;background:transparent;color:var(--ink);padding:12px;border-radius:8px;cursor:pointer}.start-choice:hover,.start-choice[aria-pressed=true]{background:var(--selection,#e9f1ff)}.appearance-panel{right:100%;margin-right:12px}.appearance-panel:after{content:'';position:absolute;left:100%;top:0;width:14px;height:100%}.appearance-menu>summary{list-style:none}.appearance-menu[open]>summary{background:var(--hover,#edf4ff)}
.document-items,.document-columns,.document-resizer,.customer-tabs,.customer-tab,.file-view-info,.editor-toolbar,.customer-facts>div{border-color:var(--line)!important}.document-open,.document-open:visited{color:var(--ink)}.document-open:hover{background:var(--hover,#edf4ff);color:var(--ink)}.button:not(.primary):not(.danger){background:var(--surface);color:var(--ink);border:1px solid var(--line)}.document-help,.document-columns,.section-note{color:var(--muted)}
.auto-save-status{position:fixed;bottom:14px;right:24px;padding:9px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:.8rem;z-index:100}.auto-save-status[data-state=error]{color:#e16363}.live-search-status{font-size:.8rem;color:var(--muted)}.page-preview-pages{display:grid;gap:12px}.page-preview-pages img{width:100%;height:auto;background:white}.page-preview{overflow:auto;max-height:75dvh}.file-view-sidebar .page-preview{max-height:calc(100dvh - 180px)}
@media(max-width:800px){.appearance-panel{margin-right:0}.login-copy h1{white-space:normal}.company-picker{margin:0}.auto-save-status{right:10px;bottom:10px}}
.customer-search button[type=submit],.document-toolbar>button,.customer-search div>button{display:none}.editor-status{order:3;border-top:1px solid var(--line)}

/* Original branding; never approximate the logo with a font. */
.login-copy .login-brand{margin:0 0 24px;line-height:1;white-space:normal}
.login-brand img{width:min(100%,560px);height:auto;display:block}
.login-brand .brand-on-dark{display:none}
[data-theme=dark] .login-brand .brand-on-light{display:none}
[data-theme=dark] .login-brand .brand-on-dark{display:block}
@media(prefers-color-scheme:dark){[data-theme=system] .login-brand .brand-on-light{display:none}[data-theme=system] .login-brand .brand-on-dark{display:block}}
/* Open records are separate from the sections within the current record. */
.app-main>.topbar{border-bottom:0;box-shadow:none}
.app-main>.customer-tabs{padding:12px 16px 0;gap:5px;border:0;background:var(--surface);scrollbar-width:thin}
.customer-tabs .customer-tab{border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:transparent;box-shadow:none;min-width:130px;max-width:260px}
.customer-tabs .customer-tab[aria-current=true]{background:var(--canvas);box-shadow:inset 0 3px var(--blue)}
.customer-tabs .customer-tab:hover{background:var(--hover,#edf4ff)}
.customer-tabs .customer-tab a,.customer-tabs .customer-tab button{color:var(--muted)}
.customer-tabs .customer-tab[aria-current=true] a{color:var(--ink)}
.customer-tabs .customer-tab button{border-radius:6px;margin-right:4px;padding:4px 8px}
.customer-tabs .customer-tab button:hover{background:var(--selection,#e9f1ff);color:var(--ink)}
.topbar-customer nav{padding:3px;gap:2px;border-radius:10px;background:var(--canvas)}
.topbar-customer nav a{color:var(--muted)}
.topbar-customer nav a[aria-current=page]{background:var(--selection,#e9f1ff);color:var(--ink)}
.user-menu>summary:hover,.user-menu[open]>summary,.user-menu summary:hover{background:var(--hover,#edf4ff);color:var(--ink)}
.favorite-bar,.favorite-chip,.favorite-toggle{background:var(--surface);color:var(--ink);border-color:var(--line)}
.favorite-chip:hover,.favorite-toggle:hover{background:var(--hover,#edf4ff);border-color:var(--blue)}
.favorite-toggle[aria-pressed=true]{background:var(--selection,#e9f1ff);border-color:var(--line);color:var(--blue)}
.meta-results{width:min(540px,calc(100vw - 32px))}
.command-result{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:11px 12px;border:0;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer}
.command-result small{color:var(--muted);font-size:.75rem;line-height:1.5}
.command-result strong{overflow-wrap:anywhere}
.command-result:hover,.command-result[aria-selected=true]{background:var(--selection,#e9f1ff);color:var(--ink)}

.customer-tabs .customer-tab:only-child{max-width:520px;flex:1}
.customer-facts section{border-color:var(--line)}

/* Compact customer context in the existing topbar; record tabs stay unchanged. */
.workspace-greeting{color:var(--muted);font-size:.8rem}
.topbar .customer-context{display:flex;align-items:center;gap:20px;flex:1;min-width:0}
.customer-context-heading{min-width:80px;flex:1}
.customer-context-heading>div{min-width:0}
.customer-context-heading strong{display:block;font-size:.9rem;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.customer-context-heading small{display:block;color:var(--muted);font-size:.7rem;margin-top:3px}
.customer-context-avatar{display:none}
.customer-context-sections{display:flex;flex-shrink:0;align-items:center;gap:14px}
.customer-context-sections a{padding:9px 0;text-decoration:none;color:var(--muted);font-size:.8rem;border-bottom:2px solid transparent;white-space:nowrap}
.customer-context-sections a[aria-current=page]{color:var(--ink);border-bottom-color:var(--blue)}
.customer-context-sections a:hover{color:var(--ink)}
.topbar--customer .meta-search{flex:0 1 280px}
.editor-page.editor-focus .customer-context{display:none}
@media(max-width:1400px){.topbar .customer-context{gap:12px}.customer-context-sections{gap:10px}.topbar--customer .user-copy{display:none}.topbar--customer .meta-search{flex-basis:220px}}
@media(max-width:1100px){.topbar .customer-context{align-items:flex-start;flex-direction:column;gap:2px}.customer-context-heading{width:100%}.customer-context-heading small{display:none}.customer-context-sections a{padding:4px 0}.topbar--customer{gap:12px}}
@media(max-width:780px){.workspace-greeting{display:none}.topbar--customer{flex-wrap:wrap}.topbar .customer-context{order:10;flex-basis:100%;flex-direction:row;align-items:center}.customer-context-heading{width:auto;min-width:0}.customer-context-heading small{display:block}.customer-context-sections{flex-wrap:wrap}.customer-context-sections a{font-size:.75rem}}
@media(max-width:480px){.topbar .customer-context{flex-direction:column;align-items:stretch}.customer-context-heading{width:100%}.customer-context-sections{gap:16px}}


/* Inactive tabs keep their silhouette without competing with the active tab. */
.customer-tabs .customer-tab:not([aria-current=true]){border-color:color-mix(in srgb,var(--muted) 24%,transparent)!important;background:color-mix(in srgb,var(--ink) 2%,transparent)}
.customer-tabs .customer-tab:not([aria-current=true]):hover{background:color-mix(in srgb,var(--ink) 7%,transparent);border-color:color-mix(in srgb,var(--muted) 45%,transparent)!important}
.customer-tabs .customer-tab:focus-within{outline:2px solid var(--blue);outline-offset:-2px}

/* Customer navigation lives directly beneath the persistent customer tabs. */
.customer-record-menu{display:flex;align-items:center;gap:22px;flex-shrink:0;overflow-x:auto;padding:8px 24px;border-bottom:1px solid color-mix(in srgb,var(--muted) 25%,transparent);background:var(--surface);white-space:nowrap}
.customer-record-menu a,.platform-global-menu a{color:var(--muted);text-decoration:none;padding:7px 0;border-bottom:2px solid transparent}
.customer-record-menu a[aria-current=page]{color:var(--ink);border-bottom-color:var(--blue);font-weight:600}
.customer-record-menu a:focus-visible,.platform-global-menu a:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.customer-record-menu [aria-disabled],.platform-global-menu [aria-disabled]{color:var(--muted);opacity:.7}
.customer-record-menu small,.platform-global-menu small{font-size:.65rem}
.platform-global-menu{display:flex;gap:16px;align-items:center;white-space:nowrap;font-size:.8rem}
.topbar .customer-context{flex:1;min-width:150px}
@media(max-width:1100px){.platform-global-menu{flex-wrap:wrap;gap:8px 14px}.customer-record-menu{padding:6px 16px;gap:18px}}
@media(max-width:700px){.platform-global-menu{order:4;width:100%;overflow-x:auto;flex-wrap:nowrap}.customer-record-menu{padding:6px 10px}.topbar{flex-wrap:wrap}}

/* Keep the original logo distinct from the environment indicator. */
.shell-logo{display:block;max-width:100%}
.shell-logo img{max-width:100%;filter:none}
.shell-logo .shell-logo-on-dark{display:none}
[data-theme=dark] .shell-logo .shell-logo-on-light{display:none}
[data-theme=dark] .shell-logo .shell-logo-on-dark{display:block}
@media(prefers-color-scheme:dark){
  [data-theme=system] .shell-logo .shell-logo-on-light{display:none}
  [data-theme=system] .shell-logo .shell-logo-on-dark{display:block}
}
.shell-logo.shell-logo--dark .shell-logo-on-light{display:none}
.shell-logo.shell-logo--dark .shell-logo-on-dark{display:block}
.sidebar-brand .shell-logo{width:176px}
.sidebar-brand .shell-logo img{height:auto;max-height:56px}
.mobile-brand .shell-logo img{filter:none}
.environment-badge{display:inline-flex;align-items:center;flex-shrink:0;max-width:160px;padding:5px 9px;border:1px solid #a87926;border-radius:6px;background:#fff4d8;color:#704600;font-size:.65rem;font-weight:750;line-height:1.4;letter-spacing:.06em;overflow-wrap:anywhere}
[data-theme=dark] .environment-badge{background:#392d18;color:#ffda88;border-color:#967239}
@media(prefers-color-scheme:dark){[data-theme=system] .environment-badge{background:#392d18;color:#ffda88;border-color:#967239}}
@media(max-width:480px){.environment-badge{max-width:96px;padding:4px 6px;font-size:.6rem}}

/* Keep the viewport width stable when records have different content heights. */
html{scrollbar-gutter:stable}
