/* Contrast only: existing typography sizes and spacing are retained. */
:root{--muted:#4b544e;--text:#202722}
body,.workspace-shell{color:#202722}
#main-content :is(p,small,label,.muted,.help,.form-intro,.form-description,.eyebrow,.metric-title,.overview-label,.simple-row,.history-row,.module-card p,.ui-heading-th,.schedule-summary,.schedule-legend,.schedule-bottom,.schedule-person small,.schedule-grid-head small,.schedule-row-label small,.schedule-empty){color:#465149}
#main-content :is(h1,h2,h3,h4,strong,.ui-heading-en,.module-card strong,.task-card strong,.detail-field,.ui-select-trigger,.ui-select-value,.card-time,.card-name){color:#202722}
input,select,textarea,.ui-select-option{color:#242c27}
input::placeholder,textarea::placeholder{color:#566159;opacity:1}
.workspace-top-actions .user-label,.workspace-top-actions .logout-button,footer,footer span,.back-link{color:#465149}
.button:not(.primary):not(.danger),button.ui-select-trigger{color:#303a33}
.button.primary,.primary .ui-heading-en{color:#fff}
.button:disabled,button:disabled{color:#626b65;opacity:1}
.button.primary:disabled{color:#fff;background:#626b65}
.badge{color:#344237}.badge.draft,.badge.pending,.badge.submitted{color:#70511d}.badge.voided,.badge.cancelled,.badge.rejected{color:#913d31}
.schedule-card small,.schedule-person small,.schedule-grid-head small,.schedule-row-label small,.schedule-dialog .muted,.schedule-dialog label small{color:#4d4857}
.schedule-card.published small{color:#385d4d}.schedule-time-off{color:#6c4e15}
.ui-heading [lang=th]{font-family:inherit}
.workspace-menu-controls{display:flex;align-items:center;gap:8px;flex:none}
.language-switch{position:relative;margin:0;display:flex;align-items:center;flex:none;width:78px;height:32px;padding:2px;border:1px solid #d7ddd9;border-radius:999px;background:#eef1ef;isolation:isolate}
.language-switch::before{content:'';position:absolute;z-index:-1;left:2px;top:2px;bottom:2px;width:calc((100% - 4px)/2);border-radius:999px;background:#283c33;transition:transform .15s ease}
.language-switch[data-language=en]::before{transform:translateX(100%)}
.language-switch button{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:26px;margin:0;padding:0;border:0;border-radius:999px;background:transparent;color:#465149;font:500 10px/1 var(--font-ui);letter-spacing:.3px;cursor:pointer}
.language-switch button[aria-pressed=true]{color:#fff}
.language-switch button:focus-visible{outline:2px solid #283c33;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.language-switch::before{transition:none}}
.public-language{position:absolute;top:18px;right:20px}
@media(max-width:500px){.workspace-topbar{flex-wrap:wrap}.workspace-top-actions{flex-wrap:wrap;justify-content:flex-end}.workspace-menu-controls{gap:6px}}

.language-switch .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

#main-content .primary :is(strong,span,small){color:inherit}.workspace-shell td:before{color:#465149}

/* Shared black-text palette. Inverse controls retain white text on dark surfaces. */
:root{--ink:#000;--muted:#000;--text:#000;--text-secondary:#000}
body.workspace-shell,body.workspace-shell :where(*){color:#000!important}
body.workspace-shell :is(input,textarea)::placeholder{color:#000!important;opacity:1}
body.workspace-shell :is(td,summary)::before,body.workspace-shell summary::after{color:#000!important}
body.workspace-shell :is(.button.primary,.schedule-top-actions .primary,.schedule-dialog .primary,.sales-paper-mark,.schedule-grid-head.today strong,.language-switch button[aria-pressed=true]),
body.workspace-shell :is(.button.primary,.schedule-top-actions .primary,.schedule-dialog .primary,.sales-paper-mark,.schedule-grid-head.today strong,.language-switch button[aria-pressed=true]) *{color:#fff!important}
/* Search buttons use a light background even when marked primary. */
body.workspace-shell .filter-buttons .button.primary,body.workspace-shell .filter-buttons .button.primary *{color:#000!important}
