/* Shared colour contract, deliberately more specific than lazy route styles.
   Do not change layouts, data, customer card colour classifications or images. */
.login-card .login-version{display:block;margin-top:18px;padding-top:14px;border-top:1px solid var(--stroke);color:var(--sub);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.login-version [lang="en"]{display:none}
html[lang="en"] .login-version [lang="zh-CN"]{display:none}
html[lang="en"] .login-version [lang="en"]{display:inline}
html:root[data-theme]{
 --nav:var(--surface);--nav-ink:var(--ink);--nav-strong:var(--ink);--nav-sub:var(--sub);
 --nav-stroke:var(--stroke);--nav-hover:var(--surface-2);--nav-field:var(--surface-2);
 --nav-active:var(--brand-soft);--nav-accent:var(--brand-2);
 --text:var(--ink);--muted:var(--sub);--line:var(--stroke);--bg:var(--page);
 --green:var(--brand);--pink:var(--hot);color-scheme:light;
}
html:root[data-theme="mist-blue-gray"],html:root[data-theme="obsidian-black"],html:root[data-theme="starry-black"]{color-scheme:dark}
html[data-theme] body{font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;text-shadow:none}
html[data-theme] .quiet-global-shell{background:var(--page);background-image:none}
html[data-theme] :is(.topbar,.crumb,.login-card,.quiet-global-command){backdrop-filter:none}
html[data-theme] :is(.quiet-global-shell,.modal-card,.project-modal,.theme-panel){--text:var(--ink);--muted:var(--sub);--line:var(--stroke);--bg:var(--page)}
html[data-theme] :is(.panel,.modal-card,.project-modal,.theme-panel,.table-wrap){color:var(--ink);border-color:var(--stroke);background:var(--surface);box-shadow:var(--shadow)}
html[data-theme] :is(input,select,textarea){accent-color:var(--brand);color-scheme:inherit}
html[data-theme] body :is(#content,.modal-card,.project-modal,.theme-panel) :is(input,select,textarea){border-color:var(--stroke)!important;color:var(--ink)!important;-webkit-text-fill-color:var(--ink);background-color:var(--surface)!important}
html[data-theme] body :is(input,textarea)::placeholder{color:var(--sub)!important;-webkit-text-fill-color:var(--sub);opacity:1}
html[data-theme] body :is(button,input,select,textarea,a,[tabindex]):focus-visible{outline:3px solid var(--brand-2)!important;outline-offset:2px}
html[data-theme] body :is(button,input,select,textarea):disabled{opacity:1!important;color:var(--sub)!important;-webkit-text-fill-color:var(--sub);background-color:var(--surface-2)!important;border-color:var(--stroke)!important;cursor:not-allowed}
html[data-theme] :is(.modal-actions,.project-modal-actions) button:not(.primary):not(.link-btn){border:1px solid var(--stroke);background:var(--surface-2);color:var(--ink)}
html[data-theme] body .primary,html[data-theme] .login-card #loginButton{color:#fff!important;-webkit-text-fill-color:#fff;background:var(--brand)!important;border-color:var(--brand)!important;box-shadow:none!important}
html[data-theme] body .primary:disabled{color:var(--sub)!important;background:var(--surface-3)!important;-webkit-text-fill-color:var(--sub)}
html[data-theme] :is(.link-btn,.status-tabs .active){color:var(--brand-2)}
html[data-theme] :is(.muted,.hint,.no-data,.pager,.config label small){color:var(--sub);opacity:1}
html[data-theme] :is(table,tbody,td){background-color:var(--surface)}
html[data-theme] th{background:var(--surface-2);color:var(--ink);font-weight:700}
html[data-theme] td{color:var(--ink);border-color:var(--stroke)}
html[data-theme] tbody tr:hover td{background:var(--surface-2)}
html[data-theme] :is(.tag.green,.booking){background:var(--brand-soft);color:var(--brand-2);border-color:var(--brand-2)}
html[data-theme] .tag.red{background:var(--surface-2);color:var(--hot);border:1px solid var(--hot)}
html[data-theme] .notice{background:var(--surface-2);color:var(--ink);border-left:3px solid var(--hot)}
html[data-theme] .theme-panel{width:min(430px,100vw);z-index:500}
html[data-theme] .theme-backdrop{z-index:499}
html[data-theme] .theme-card{border-radius:10px;min-height:78px}
html[data-theme] .theme-card.active{border:2px solid var(--brand-2);background:var(--brand-soft);box-shadow:none}
html[data-theme] .theme-card em{color:var(--brand-2)}
html[data-theme] .theme-card small{font-size:13px;line-height:1.5}
html[data-theme] .quiet-global-shell :is(#topNav button,.group-items button,.quiet-secondary-tab){font-size:13px;font-weight:600}
html[data-theme] .quiet-global-shell #topNav button.active{box-shadow:inset 0 -3px var(--brand-2);border-color:var(--brand-2)}
html[data-theme] .quiet-global-shell .group-items button.active{box-shadow:inset 3px 0 var(--brand-2);color:var(--ink)}
html[data-theme] .quiet-global-shell :is(.quiet-global-command input,.nav-search input){color:var(--ink)}

/* Cashier formerly pinned its own dark palette, even in a light theme. */
html[data-theme] .cashier-mode{
 --quiet-bg:var(--page);--quiet-panel:var(--surface);--quiet-panel-2:var(--surface-2);
 --quiet-card:var(--surface-2);--quiet-line:var(--stroke);--quiet-text:var(--ink);
 --quiet-muted:var(--sub);--quiet-violet:var(--brand);--quiet-mint:var(--brand-2);
 --cart-border:var(--stroke);--cart-danger:var(--hot);
}
html[data-theme] .cashier-mode :is(.quiet-workspace,.quiet-control,.quiet-session,.quiet-session-card,.quiet-queue,.quiet-context,.quiet-head,.quiet-hub,.quiet-person,.quiet-cart,.quiet-command,.quiet-control-section){background:var(--surface);color:var(--ink);border-color:var(--stroke);box-shadow:none}
html[data-theme] .cashier-mode :is(.quiet-session-card>header,.quiet-context,.quiet-execution,.quiet-member-assets){background:var(--surface-2);color:var(--ink)}
html[data-theme] .cashier-mode :is(.quiet-person h2,.quiet-queue-person b,.quiet-control h3,.quiet-context h3,.quiet-session-card b,.cash-total b,.cash-total span:last-child){color:var(--ink)}
html[data-theme] .cashier-mode :is(.quiet-person p,.quiet-queue-person small,.quiet-control-section>header span,.quiet-queue>header span,.quiet-control-heading>span,.quiet-session-card small,.quiet-session-card>header span,.cash-total span,.quiet-suggest p,.quiet-meta,.quiet-queue-empty){color:var(--sub);font-size:12px;opacity:1}
html[data-theme] .cashier-mode :is(.quiet-control-heading small,.quiet-control-section h3){color:var(--ink);font-size:13px}
html[data-theme] .cashier-mode :is(.quiet-control-tabs button,.quiet-hub .cash-tabs button,.quiet-arrival,.quiet-content-toggle,.quiet-rebook,.quiet-suggest button,.quiet-queue-person,.quiet-person>button){background:var(--surface-2)!important;color:var(--ink)!important;border-color:var(--stroke)!important}
html[data-theme] .cashier-mode :is(.quiet-control-tabs button,.quiet-hub .cash-tabs button,.quiet-content-toggle,.quiet-queue-person).active,
html[data-theme] .cashier-mode :is([role="tab"][aria-selected="true"],.quiet-queue-person.selected){background:var(--brand-soft)!important;color:var(--ink)!important;border-color:var(--brand-2)!important;box-shadow:inset 0 -3px var(--brand-2)}
html[data-theme] .cashier-mode :is(.quiet-control-tabs button,.quiet-hub .cash-tabs button) :is(b,span,small){color:inherit!important}
html[data-theme] .cashier-mode :is(.quiet-member-assets>div,.quiet-assets>div,.quiet-execution>div){background:var(--surface-2);color:var(--ink);border-color:var(--stroke)}
html[data-theme] .cashier-mode .cash-actions button:not(.primary){color:var(--ink);background:var(--surface-2);border-color:var(--stroke);font-size:13px;font-weight:600}
html[data-theme] .cashier-mode .cart-empty{color:var(--sub)}
html[data-theme] .cashier-mode .cash-total{border-color:var(--stroke)}
html[data-theme] .cashier-mode .cash-total span:last-child b{color:var(--ink);font-weight:800}
html[data-theme] .cashier-mode :is(.cashier-catalog-tabs,.categories) button.active{background:var(--brand)!important;color:#fff!important;border-color:var(--brand)!important;box-shadow:inset 0 -3px #ffffff80}
/* Preserve the legacy Starry Black palette; deepen only filled actions for white labels. */
html[data-theme="starry-black"] .cap-options input:not(:disabled):checked+span,
html[data-theme="starry-black"] body .primary:not(:disabled),
html[data-theme="starry-black"] .login-card #loginButton:not(:disabled),
html[data-theme="starry-black"] .cashier-mode :is(.cashier-catalog-tabs,.categories) button.active:not(:disabled){background:#3854BC!important;border-color:#3854BC!important;color:#fff!important;-webkit-text-fill-color:#fff}
html[data-theme="starry-black"] .cap-options input:not(:disabled):checked+span:hover,
html[data-theme="starry-black"] body .primary:not(:disabled):hover,
html[data-theme="starry-black"] .login-card #loginButton:not(:disabled):hover,
html[data-theme="starry-black"] .cashier-mode :is(.cashier-catalog-tabs,.categories) button.active:not(:disabled):hover{background:#2D46A2!important;border-color:#2D46A2!important}
html[data-theme="starry-black"] .cap-options input:not(:disabled):checked+span :is(span,b,small,i),
html[data-theme="starry-black"] :is(.primary,#loginButton) :is(span,b,small,i){color:inherit!important;-webkit-text-fill-color:inherit}
html[data-theme] .cashier-mode .goods-grid button{border-color:var(--stroke)!important;box-shadow:none!important}
html[data-theme] .cashier-mode .goods-grid button:hover{border-color:var(--brand-2)!important;outline:1px solid var(--brand-2)}
html[data-theme] .cashier-mode .goods-grid button.cashier-owned-project.disabled{opacity:1;background:var(--surface-2)!important;border-style:dashed}
html[data-theme] .cashier-mode .goods-grid button.cashier-owned-project.disabled>em{color:var(--hot);background:var(--surface-2)}
html[data-theme] .cashier-mode :is(.cashier-owned-copy small,.cashier-owned-balance small,.cashier-owned-expire small,.goods-grid button small){font-size:12px;color:var(--sub)}
/* Keep product labels legible over photos without depending on the image. */
html[data-theme] .cashier-catalog-media>i{opacity:1;color:var(--sub)}
html[data-theme] .cashier-business-time small{font-size:12px}
html[data-theme] .cashier-mode .goods-grid button.cashier-catalog-item>b{color:var(--brand-2)}
html[data-theme] .cashier-mode .quiet-assets :is(span,small){color:var(--sub);font-size:12px}
html[data-theme] .cashier-mode .quiet-assets b{color:var(--ink);font-size:13px}
html[data-theme] .cashier-mode .quiet-avatar.empty{background:var(--surface-3);color:var(--ink)}
/* Later customer pages use their own toolbar rather than .toolbar. */
html[data-theme] :is(.ci-head p,.ci-filter label,.ci-loading,.ci-empty){color:var(--sub)}
html[data-theme] .ci-head small{color:var(--brand-2)}
html[data-theme] :is(.ci-head,.ci-filter) button{appearance:none;border:1px solid var(--stroke);border-radius:8px;min-height:36px;padding:6px 12px;background:var(--surface-2);color:var(--ink);font-weight:600}
html[data-theme] .ci-filter :is(input,select){border:1px solid var(--stroke);border-radius:7px;min-height:34px;padding:5px 8px;background:var(--surface);color:var(--ink)}
html[data-theme] .ci-filter input[type="checkbox"]{min-height:0;accent-color:var(--brand)}
html[data-theme] :is(.appointment-resource small,.appointment-time,.appointment-board-legend){font-size:12px}
html[data-theme] .appointment-detail .project-modal-actions .danger{color:var(--hot);border-color:var(--hot)}
/* Avatar registration is mounted outside #content and has its own surface. */
html[data-theme] .cap-modal{background:var(--surface);color:var(--ink);color-scheme:inherit;border:1px solid var(--stroke)}
html[data-theme] .cap-modal :is(h2,h3,label,legend,.cap-options span,.cap-candidate span){color:var(--ink)}
html[data-theme] .cap-modal :is(header,footer,.cap-basic,.cap-results){border-color:var(--stroke)}
html[data-theme] .cap-modal :is(input,select){background:var(--surface-2);color:var(--ink);border-color:var(--stroke);-webkit-text-fill-color:var(--ink)}
html[data-theme] .cap-modal :is(header small,.cap-results>div:first-child span){color:var(--sub)}
html[data-theme] .cap-modal :is(.cap-options span,.cap-candidate,header button,footer button:not(.primary)){background:var(--surface-2);color:var(--ink);border-color:var(--stroke)}
html[data-theme] .cap-modal .cap-options input:checked+span{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:none}
html[data-theme] .cap-modal .cap-options input:disabled+span{background:var(--surface-2)!important;color:var(--sub)!important;-webkit-text-fill-color:var(--sub);border-color:var(--stroke)!important;box-shadow:none;opacity:1;cursor:not-allowed}
html[data-theme] .cap-modal .cap-options input:disabled+span :is(span,b,small,i){color:inherit!important;-webkit-text-fill-color:inherit}
html[data-theme] .cap-modal .cap-options input:focus-visible+span{outline:3px solid var(--brand-2);outline-offset:2px}
html[data-theme] .cap-modal .cap-candidate.selected{background:var(--brand-soft);border-color:var(--brand-2);box-shadow:none}
html[data-theme] .wa-modal{background:var(--surface);color:var(--ink);border:1px solid var(--stroke)}
html[data-theme] .wa-modal :is(input:not([type="checkbox"]),select,textarea){min-height:38px;padding:8px 10px;border:1px solid var(--stroke);border-radius:8px;background:var(--surface-2);color:var(--ink)}
html[data-theme] .wa-modal :is(header button,footer button){padding:8px 14px;border:1px solid var(--stroke);border-radius:8px;background:var(--surface-2);color:var(--ink)}
@media(prefers-reduced-motion:reduce){html[data-theme] *,html[data-theme] *::before,html[data-theme] *::after{transition:none!important;animation:none!important}}
/* Reference palette assignments for navigation, order summary and checkout. */
html:root[data-theme="pearl-white"]{--reference-nav:#203D33;--order-band:#244F40}
html:root[data-theme="warm-ivory"]{--reference-nav:#082D83;--order-band:#123EA8}
html:root[data-theme="pale-jade"]{--reference-nav:#273E20;--order-band:#A65029}
html:root[data-theme="mist-blue-gray"]{--reference-nav:#121D24;--order-band:#203B3A}
html:root[data-theme="sandstone-gray"]{--reference-nav:#33231B;--order-band:#692326}
html:root[data-theme="twilight-blue"]{--reference-nav:#432348;--order-band:#613366}
html:root[data-theme="deep-pine"]{--reference-nav:#2B2B2B;--order-band:#763C12}
html:root[data-theme="deep-ocean"]{--reference-nav:#123F58;--order-band:#205771}
html:root[data-theme="graphite-gray"]{--reference-nav:#452A1E;--order-band:#79502E}
html:root:is([data-theme="pearl-white"],[data-theme="warm-ivory"],[data-theme="pale-jade"],[data-theme="mist-blue-gray"],[data-theme="sandstone-gray"],[data-theme="twilight-blue"],[data-theme="deep-pine"],[data-theme="deep-ocean"],[data-theme="graphite-gray"]){--nav:var(--reference-nav);--nav-ink:#fff;--nav-strong:#fff;--nav-sub:#efece5;--nav-hover:color-mix(in srgb,var(--nav) 85%,white);--nav-field:var(--nav-hover);--nav-stroke:color-mix(in srgb,var(--nav) 65%,white);--nav-active:color-mix(in srgb,var(--nav) 74%,white);--nav-accent:white}
html:root:is([data-theme="pearl-white"],[data-theme="warm-ivory"],[data-theme="pale-jade"],[data-theme="mist-blue-gray"],[data-theme="sandstone-gray"],[data-theme="twilight-blue"],[data-theme="deep-pine"],[data-theme="deep-ocean"],[data-theme="graphite-gray"]) .quiet-global-shell .topbar{background:var(--nav)!important;color:var(--nav-ink)}
html:root:is([data-theme="pearl-white"],[data-theme="warm-ivory"],[data-theme="pale-jade"],[data-theme="mist-blue-gray"],[data-theme="sandstone-gray"],[data-theme="twilight-blue"],[data-theme="deep-pine"],[data-theme="deep-ocean"],[data-theme="graphite-gray"]) .cashier-mode :is(.quiet-control-cart>header,.cash-total){background:var(--order-band)!important;color:#fff!important}
html:root:is([data-theme="pearl-white"],[data-theme="warm-ivory"],[data-theme="pale-jade"],[data-theme="mist-blue-gray"],[data-theme="sandstone-gray"],[data-theme="twilight-blue"],[data-theme="deep-pine"],[data-theme="deep-ocean"],[data-theme="graphite-gray"]) .cashier-mode :is(.quiet-control-cart>header,.cash-total) :is(b,span,small){color:#fff!important;-webkit-text-fill-color:#fff}
html:root:is([data-theme="pearl-white"],[data-theme="warm-ivory"],[data-theme="pale-jade"],[data-theme="mist-blue-gray"],[data-theme="sandstone-gray"],[data-theme="twilight-blue"],[data-theme="deep-pine"],[data-theme="deep-ocean"],[data-theme="graphite-gray"]) .cashier-mode .goods-grid button.cashier-catalog-item:not(:disabled){background-color:var(--surface-2)!important}
html:root:is([data-theme="pearl-white"],[data-theme="warm-ivory"],[data-theme="pale-jade"],[data-theme="mist-blue-gray"],[data-theme="sandstone-gray"],[data-theme="twilight-blue"],[data-theme="deep-pine"],[data-theme="deep-ocean"],[data-theme="graphite-gray"]) .quiet-global-shell .topbar .quiet-global-command input{color:var(--nav-ink)!important;background:var(--nav-field)!important}

/* Nanyang Rattan: green frames the cream workspace and terracotta order bands. */
html:root[data-theme="pale-jade"] .cashier-mode .cash-actions{
 background:#273e20!important;
 border-color:#273e20!important;
}
html:root[data-theme="pale-jade"] .cashier-mode .cash-actions button:not(.primary):not(:disabled){
 background:#fbf4e9!important;color:#273e20!important;border-color:#c8b28f!important;
}
html:root[data-theme="pale-jade"] .cashier-mode .cash-actions button.primary:not(:disabled){
 background:#35572b!important;color:#fff8e8!important;border-color:#bfbd8d!important;
}

/* Nanyang Rattan finish */
html:root[data-theme="pale-jade"] {
  --reference-nav: #142c20;
  --rattan-glaze: linear-gradient(112deg, #0e2218 0%, #193627 36%, #254231 54%, #172f21 76%, #10271b 100%);
}
html:root[data-theme="pale-jade"] .quiet-global-shell .topbar {
  background: var(--rattan-glaze) !important;
  box-shadow: inset 0 1px rgba(244, 228, 174, .18), inset 0 -1px rgba(5, 18, 12, .48);
}
html:root[data-theme="pale-jade"] .quiet-global-shell .topbar #topNav {
  background: transparent;
}
html:root[data-theme="pale-jade"] .cashier-mode .cash-actions {
  background: var(--rattan-glaze) !important;
  border-radius: 12px;
  padding: 8px 10px !important;
  gap: 7px;
  box-sizing: border-box;
}
html:root[data-theme="pale-jade"] .cashier-mode .cash-total {
  border-radius: 12px;
  padding: 10px 14px !important;
  box-sizing: border-box;
}

/* Straits Blue: a midnight-blue glaze on both navigation rows. */
html:root[data-theme="warm-ivory"] {
  --reference-nav: #0a2047;
  --straits-glaze: linear-gradient(110deg, #071831 0%, #102a53 34%, #193e66 55%, #102a50 77%, #091b38 100%);
}
html:root[data-theme="warm-ivory"] .quiet-global-shell :is(.topbar,.sidebar) {
  background: var(--straits-glaze) !important;
  box-shadow: inset 0 1px rgba(219, 232, 252, .14), inset 0 -1px rgba(3, 13, 31, .5);
}
html:root[data-theme="warm-ivory"] .quiet-global-shell :is(.topbar #topNav,.sidebar .sidebar-heading) {
  background: transparent;
}

html:root[data-theme="sandstone-gray"] { --reference-nav: var(--order-band); }

html:root[data-theme="deep-pine"] { --reference-nav: var(--order-band); }

html:root[data-theme] .cashier-mode .cash-total {
  border-radius: 12px;
  padding: 10px 14px !important;
  box-sizing: border-box;
}
