/* SMITHSMM V31: white/blue | navy/blue, no outer frame. Last-loaded theme layer. */
:root{--v31-blue:#1767d7;--v31-blue-hover:#0f55c1;--v31-speed:.23s}
html{scroll-behavior:smooth;scroll-padding-top:92px}
html[data-smith-theme="light"]{--v31-toolbar:#f8faff;--v31-flat:#f0f5fb;--v31-border:#dce5f0}
html[data-smith-theme="dark"]{--v31-toolbar:#101d30;--v31-flat:#1a2d45;--v31-border:#2b415c}
html[data-smith-theme] body.smm-v25-option-b.smm-v31 .topbar,html[data-smith-theme] body.smm-v25-option-b.smm-v31 .smm-admin-topbar{
 position:sticky!important;top:0!important;z-index:30!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
 width:100%!important;min-height:72px!important;padding:12px clamp(14px,2vw,32px)!important;
 background:var(--v31-toolbar)!important;backdrop-filter:blur(12px)!important;border:0!important;box-shadow:0 1px 0 var(--v31-border)!important;gap:12px!important;
}
html[data-smith-theme] body.smm-v25-option-b.smm-v31 .smm-admin-top-actions,html[data-smith-theme] body.smm-v25-option-b.smm-v31 .top-right{display:flex!important;align-items:center;gap:8px;min-width:0;margin-left:auto}
html[data-smith-theme] body.smm-v25-option-b.smm-v31 .quick-actions{display:flex;align-items:center;flex:0 1 auto;min-width:0;gap:9px}
html[data-smith-theme] body.smm-v25-option-b.smm-v31 .topbar .btn{white-space:nowrap}
html[data-smith-theme] body.smm-v25-option-b.smm-v31 .sidebar,html[data-smith-theme] body.smm-v25-option-b.smm-v31 .smm-admin-sidebar{scrollbar-width:thin;scrollbar-color:var(--v31-border) transparent}
html[data-smith-theme] body.smm-v31 .sidebar-close{display:none!important}
html[data-smith-theme] body.smm-v31 .v31-collapse-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;border-radius:10px;padding:7px;background:transparent;color:var(--b25-text);border:0;cursor:pointer;flex-shrink:0}
html[data-smith-theme] body.smm-v31 .v31-collapse-button:hover{background:var(--v31-flat)}
html[data-smith-theme] body.smm-v31 .v31-collapse-button:focus-visible{outline:3px solid var(--v31-blue);outline-offset:2px}
html[data-smith-theme] body.smm-v25-option-b.smm-v31.smm-side-collapsed .smm-admin-layout,html[data-smith-theme] body.smm-v25-option-b.smm-v31.smm-side-collapsed .shell{grid-template-columns:82px minmax(0,1fr)!important;transition:grid-template-columns var(--v31-speed) ease}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-sidebar,html[data-smith-theme] body.smm-v31.smm-side-collapsed .sidebar{padding:24px 9px!important;width:82px!important;overflow-x:hidden}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-brand>span:last-child,html[data-smith-theme] body.smm-v31.smm-side-collapsed .brand>span:last-child,html[data-smith-theme] body.smm-v31.smm-side-collapsed :is(.smm-admin-menu-caption,.smm-admin-search-label,.smm-admin-menu-search,.smm-admin-no-matches,.smm-admin-secondary-label,.smm-admin-sidebar-bottom,.v21-admin-more,.v23-side-promo,.smp-nav-caption,.v22-user-greeting,.v22-nav-secondary,.smp-side-profile,.sidebar-footer,.v22-admin-provider-pill){display:none!important}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-menu a,html[data-smith-theme] body.smm-v31.smm-side-collapsed .nav>a{justify-content:center!important;padding:12px!important;min-height:44px!important}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-menu a>span:last-child,html[data-smith-theme] body.smm-v31.smm-side-collapsed .nav>a>span:last-child{display:none!important}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-logo,html[data-smith-theme] body.smm-v31.smm-side-collapsed .brandmark{margin:0 auto!important}
html[data-smith-theme] body.smm-v31 .smm-admin-menu a,html[data-smith-theme] body.smm-v31 .nav a,html[data-smith-theme] body.smm-v31 .btn,html[data-smith-theme] body.smm-v31 button{transition:background-color var(--v31-speed) ease,color var(--v31-speed) ease,box-shadow var(--v31-speed) ease,transform var(--v31-speed) ease}
html[data-smith-theme] body.smm-v31 .smm-admin-menu a:hover,html[data-smith-theme] body.smm-v31 .nav a:hover{transform:translateX(2px)}
html[data-smith-theme] body.smm-v31 .b25-kpi,html[data-smith-theme] body.smm-v31 .b25-card,html[data-smith-theme] body.smm-v31 .panel{transition:box-shadow var(--v31-speed) ease,background-color var(--v31-speed) ease}
html[data-smith-theme] body.smm-v31 .b25-card:hover,html[data-smith-theme] body.smm-v31 .panel:hover{box-shadow:0 9px 22px rgba(17,54,98,.045)!important}
.v31-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.v31-wide{grid-column:1/-1}.v31-card{padding:24px;background:var(--b25-card,var(--surface));border:1px solid var(--v31-border);border-radius:14px;margin:0 0 18px;color:var(--b25-text,var(--text));min-width:0}
.v31-card h2{font-size:19px;margin:0 0 12px;color:inherit}.v31-card h3{font-size:15px;margin:24px 0 10px;color:inherit}.v31-card p{line-height:1.65}.v31-card label{display:flex;flex-direction:column;gap:7px;font-weight:600;font-size:13px;min-width:0;margin:0}
.v31-card label.check{flex-direction:row;align-items:center}.v31-card :is(input:not([type=checkbox]):not([type=file]),select,textarea){width:100%;background:var(--b25-card,var(--surface));color:var(--b25-text,var(--text));border:1px solid var(--v31-border);border-radius:9px;padding:11px;max-width:100%;font-size:14px}
.v31-card :is(input,select,textarea):focus-visible{outline:3px solid #3989e477;outline-offset:1px}
.v31-image-field{padding:17px;border-radius:12px;background:var(--v31-flat)}.v31-image-field>img{display:block;max-width:100%;max-height:120px;object-fit:contain;margin:12px 0;border-radius:10px}
.v31-image-field form{margin:10px 0;display:grid;gap:9px}.v31-image-field input[type=file]{max-width:100%}
.v31-inline{display:flex;gap:10px;align-items:center;margin-top:16px}
.v31-alert{padding:14px 16px;background:var(--v31-flat);border:1px solid var(--v31-border);border-radius:11px;color:var(--b25-text,var(--text));line-height:1.65;margin-bottom:18px}
.v31-error{border-color:#b55164;color:var(--b25-text,var(--text));}
.v31-bank-card{background:var(--v31-flat);border-radius:12px;padding:16px;margin-bottom:12px;min-width:0}.v31-bank-card p{overflow-wrap:anywhere;margin:5px 0}.v31-bank-card small{display:block;opacity:.75;margin-bottom:10px}.v31-bank-card details{margin-top:10px}.v31-bank-card details summary{cursor:pointer;padding:8px 0}.v31-bank-card form{display:grid;gap:11px;margin:8px 0}
.v31-qris-preview{width:min(250px,100%);height:auto;display:block;margin:10px auto 22px;border-radius:8px}
.v31-bank-invoice{padding:22px;border:1px solid var(--v31-border);background:var(--v31-flat);border-radius:12px}.v31-bank-invoice h2{margin:0 0 16px}.v31-bank-invoice .kv{overflow-wrap:anywhere}
.v31-platform-icon{height:34px!important;width:34px!important;display:grid!important;place-items:center!important;background:var(--v31-flat)!important;border-radius:10px!important;padding:6px!important;position:relative;overflow:hidden}
.v31-platform-icon>img{width:100%!important;height:100%!important;object-fit:contain;display:block;position:absolute;inset:0;padding:6px;background:var(--v31-flat);border-radius:10px}
.v31-platform-icon .v31-platform-fallback{font-size:18px!important;font-weight:750!important;color:var(--b25-blue,#1767d7)!important}
.v31-platform-twitter img,.v31-platform-tiktok img{background:#fff!important}
.v31-platform-facebook .v31-platform-fallback{color:#1877F2!important}.v31-platform-youtube .v31-platform-fallback{color:#f03!important}.v31-platform-whatsapp .v31-platform-fallback{color:#25D366!important}.v31-platform-shopee .v31-platform-fallback{color:#EE4D2D!important}
.smm-brandmark-v31{display:inline-flex;align-items:center;justify-content:center;overflow:hidden}.smm-brandmark-v31 img{max-width:100%;max-height:100%;object-fit:contain}.smm-brand-dark{display:none!important}html[data-smith-theme=dark] .smm-brand-light{display:none!important}html[data-smith-theme=dark] .smm-brand-dark{display:block!important}
@media(max-width:900px){html[data-smith-theme] body.smm-v31 .v31-collapse-button{display:none!important}html[data-smith-theme] body.smm-v31 .topbar,html[data-smith-theme] body.smm-v31 .smm-admin-topbar{min-height:64px!important}html[data-smith-theme] body.smm-v31 .mobile-menu,html[data-smith-theme] body.smm-v31 .smm-admin-mobile-menu{display:inline-flex!important}}
@media(max-width:700px){.v31-grid{grid-template-columns:1fr}.v31-card{padding:16px}.v31-wide{grid-column:auto}html[data-smith-theme] body.smm-v31 .topbar{gap:6px!important}html[data-smith-theme] body.smm-v31 .topbar .quick-actions .btn{padding:8px!important;min-height:36px}html[data-smith-theme] body.smm-v31 .account-menu{margin-left:0!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}html[data-smith-theme] body.smm-v31 *,html[data-smith-theme] body.smm-v31 *::before,html[data-smith-theme] body.smm-v31 *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

html[data-smooth-motion="0"] body.smm-v31 *,html[data-smooth-motion="0"] body.smm-v31 *::before,html[data-smooth-motion="0"] body.smm-v31 *::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}

html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-menu a,html[data-smith-theme] body.smm-v31.smm-side-collapsed .nav>a{font-size:0!important;overflow:hidden!important;gap:0!important}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-menu-icon .ui-icon,html[data-smith-theme] body.smm-v31.smm-side-collapsed .nav>a .ui-icon{width:22px!important;height:22px!important;flex-shrink:0!important}
html[data-smith-theme] body.smm-v31.smm-side-collapsed .smm-admin-menu a>span:first-child,html[data-smith-theme] body.smm-v31.smm-side-collapsed .nav>a>svg{display:inline-flex!important}
html[data-smith-theme] body.smm-v31 #v31-channel-label[hidden]{display:none!important}

html[data-smith-theme] body.smm-v31:has(.auth-intro) .auth-intro:has(.smm-brandmark-v31){position:relative}
html[data-smith-theme] body.smm-v31:has(.auth-intro) .auth-intro>*{position:relative}
html[data-smooth-motion="0"]{scroll-behavior:auto!important}

/* V31.1: exactly ONE User sidebar control at all viewport widths.
   Desktop = collapse/expand sidebar; mobile = open/close off-canvas menu. */
html[data-smith-theme] body.smm-v31 .smm-user-single-toggle{
 display:inline-flex!important;align-items:center;justify-content:center!important;
 flex:0 0 38px;min-width:38px!important;min-height:38px!important;
}
@media(max-width:900px){
 html[data-smith-theme] body.smm-v31 .smm-user-single-toggle{display:inline-flex!important;}
}
/* SMITHSMM V31.3 — Contrast & Readability. CSS-only, scoped to V31.
   Maintain the existing full-screen Option B layout and both theme modes.
   This layer must remain last in assets/smith-clean-v31.css. */
html[data-smith-theme="light"] {
  color-scheme: light;
  --b25-page:#f5f8fc;
  --b25-sidebar:#ffffff;
  --b25-card:#ffffff;
  --b25-field:#ffffff;
  --b25-head:#edf3fa;
  --b25-soft:#e6f0ff;
  --b25-text:#102239;
  --b25-muted:#445873;
  --b25-line:#ced9e7;
  --b25-blue:#155ec1;
  --v31-toolbar:#f7faff;
  --v31-flat:#edf3fa;
  --v31-border:#ced9e7;
  --v31-readable-strong:#102239;
  --v31-readable-secondary:#445873;
  --v31-readable-link:#155ec1;
  --v31-readable-icon:#405a77;
}
html[data-smith-theme="dark"] {
  color-scheme: dark;
  --b25-page:#111a28;
  --b25-sidebar:#152131;
  --b25-card:#1c2b3e;
  --b25-field:#1b2b3c;
  --b25-head:#283a50;
  --b25-soft:#1f3a58;
  --b25-text:#f2f7fd;
  --b25-muted:#c1cfe0;
  --b25-line:#41566e;
  --b25-blue:#8fc1ff;
  --v31-toolbar:#152132;
  --v31-flat:#26394f;
  --v31-border:#41566e;
  --v31-readable-strong:#f2f7fd;
  --v31-readable-secondary:#c1cfe0;
  --v31-readable-link:#8fc1ff;
  --v31-readable-icon:#c4d4e7;
}

/* Nav icon legibility — fixes the pale SVGs inherited from old V22 styles. */
html[data-smith-theme] body.smm-v31 :is(.smm-admin-menu-icon,.smm-admin-menu-icon .smm22-ico,.smp-nav>a .ui-icon,.nav>a .ui-icon,.smm-admin-topbar .smm22-ico,.topbar .ui-icon) {
  color:var(--v31-readable-icon)!important;
  opacity:1!important;
  filter:none!important;
}
html[data-smith-theme] body.smm-v31 :is(.smm-admin-menu a.is-current .smm-admin-menu-icon,.smm-admin-menu a.is-current .smm22-ico,.smp-nav>a.active .ui-icon,.nav>a.active .ui-icon) {
  color:var(--v31-readable-link)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(.smm-admin-menu a:hover .smm-admin-menu-icon,.smm-admin-menu a:hover .smm22-ico,.smp-nav>a:hover .ui-icon,.nav>a:hover .ui-icon) {
  color:var(--v31-readable-link)!important;
}
html[data-smith-theme] body.smm-v31 :is(.smm-admin-menu a,.smp-nav>a,.nav>a,.v21-admin-more summary,.v22-nav-secondary summary,.v22-nav-secondary a) {
  color:var(--v31-readable-strong)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(.smm-admin-menu a.is-current,.smp-nav>a.active,.nav>a.active) {
  color:var(--v31-readable-link)!important;
  background:var(--b25-soft)!important;
}
html[data-smith-theme] body.smm-v31 :is(.smm-admin-menu-caption,.smm-admin-search-label,.smp-nav-caption,.smm-admin-top-title small,.smm-admin-sidebar-bottom small,.side-bottom small,.sidebar-footer,.smm-admin-footer) {
  color:var(--v31-readable-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(.v31-collapse-button,.smm-user-single-toggle,.smm-admin-mobile-menu,.mobile-menu) {
  color:var(--v31-readable-strong)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(.v31-collapse-button,.smm-user-single-toggle) svg {
  stroke:currentColor!important;opacity:1!important;
}

/* Dashboard: small text, chart labels, KPIs, cards and status pills. */
html[data-smith-theme] body.smm-v31 :is(.b25-kpi-label,.b25-kpi small,.b25-user-kpi small,.b25-card-head p,.b25-helper,.b25-chart-labels,.b25-footnote,.b25-table td small,.b25-form-note,.b25-empty,.b25-wallet-sub,.b25-user-intro p,.b25-quote span,.b25-quote small) {
  color:var(--v31-readable-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(.b25-card-head h2,.b25-kpi strong,.b25-user-kpi strong,.b25-table td,.b25-table td strong,.b25-status-list>div,.b25-quick-links a,.b25-order-card label,.b25-quote strong,.b25-quote b) {
  color:var(--v31-readable-strong)!important;
}
html[data-smith-theme] body.smm-v31 :is(.b25-kpi-label svg,.b25-quick-links svg,.b25-card-head>a,.b25-card-head .b25-period) {
  color:var(--v31-readable-link)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 .b25-status-list strong {
  color:var(--v31-readable-strong)!important;
  background:var(--b25-head)!important;
}
html[data-smith-theme="light"] body.smm-v31 .b25-status-list .b25-ok {
  color:#135b3c!important;background:#dcf5e8!important;
}
html[data-smith-theme="dark"] body.smm-v31 .b25-status-list .b25-ok {
  color:#b6f5d6!important;background:#214a3d!important;
}
html[data-smith-theme="light"] body.smm-v31 .b25-status-pill {
  color:#144c9b!important;background:#e7f0ff!important;
}
html[data-smith-theme="dark"] body.smm-v31 .b25-status-pill {
  color:#c4dcff!important;background:#27466b!important;
}
html[data-smith-theme="light"] body.smm-v31 :is(.b25-status-completed,.b25-status-pill.b25-status-completed) {
  color:#16603f!important;background:#e0f5e8!important;
}
html[data-smith-theme="dark"] body.smm-v31 :is(.b25-status-completed,.b25-status-pill.b25-status-completed) {
  color:#baf7d8!important;background:#225040!important;
}
html[data-smith-theme="light"] body.smm-v31 :is(.b25-status-failed,.b25-status-canceled) {
  color:#a32b36!important;background:#ffebed!important;
}
html[data-smith-theme="dark"] body.smm-v31 :is(.b25-status-failed,.b25-status-canceled) {
  color:#ffd5d9!important;background:#61333d!important;
}
html[data-smith-theme] body.smm-v31 .b25-table th {
  color:var(--v31-readable-strong)!important;
  background:var(--b25-head)!important;
}
html[data-smith-theme] body.smm-v31 :is(.b25-status-list>div,.b25-table td) {
  border-color:var(--b25-line)!important;
}

/* Settings + user forms; do not recolor primary submit buttons. */
html[data-smith-theme] body.smm-v31 :is(.v31-card,.v31-alert,.v31-bank-card,.v31-bank-invoice,.panel,.b25-card,.b25-kpi,.b25-user-kpi) {
  color:var(--v31-readable-strong)!important;
}
html[data-smith-theme] body.smm-v31 :is(.v31-card p,.v31-bank-card small,.v31-card small,.b25-helper-card p) {
  color:var(--v31-readable-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  background:var(--b25-field)!important;
  color:var(--v31-readable-strong)!important;
  border-color:var(--b25-line)!important;
}
html[data-smith-theme] body.smm-v31 :is(input,textarea)::placeholder {
  color:var(--v31-readable-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 :is(.btn.subtle,.btn.outline,.smm-theme-toggle,.wallet-chip,.v21-top-api) {
  color:var(--v31-readable-strong)!important;
  background:var(--b25-card)!important;
  border-color:var(--b25-line)!important;
}
html[data-smith-theme] body.smm-v31 :is(.btn.primary,.b25-primary) {
  color:#fff!important;background:#155fc5!important;
}
html[data-smith-theme] body.smm-v31 :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid var(--v31-readable-link)!important;
  outline-offset:2px!important;
}
html[data-smith-theme] body.smm-v31 a:not(.btn):not(.b25-primary):hover {
  text-decoration-color:currentColor;
}

/* Respect browser theme focus on mobile and reduced-motion preferences. */
@media (prefers-reduced-motion:reduce) {
  html[data-smith-theme] body.smm-v31 *,html[data-smith-theme] body.smm-v31 *::before,html[data-smith-theme] body.smm-v31 *::after {
    transition:none!important;animation:none!important;
  }
}


/* V31.4 — Admin price lists and sidebar readability in both modes.
   Restrict to display styles; never change controls or values. */
html[data-smith-theme="light"] body.smm-v31 {
  --v314-secondary:#41566f;
  --v314-icon:#405b7a;
  --v314-active:#175bb4;
}
html[data-smith-theme="dark"] body.smm-v31 {
  --v314-secondary:#c5d2e4;
  --v314-icon:#ccdaee;
  --v314-active:#98c8ff;
}
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar .smm-admin-menu :is(a .smm-admin-menu-icon,a .smm-admin-menu-icon svg,summary svg,.v21-admin-more svg),
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar .smm-admin-menu .smm22-ico {
  color:var(--v314-icon)!important;
  stroke:currentColor!important;
  stroke-opacity:1!important;
  opacity:1!important;
  filter:none!important;
}
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar .smm-admin-menu a.is-current :is(.smm-admin-menu-icon,svg),
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar .smm-admin-menu a:hover :is(.smm-admin-menu-icon,svg) {
  color:var(--v314-active)!important;
  stroke:currentColor!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar .smm-admin-menu a {
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar .smm-admin-menu :is(summary,.v21-admin-more-links a),
html[data-smith-theme] body.smm-v31 .smm-admin-sidebar :is(.smm-admin-menu-caption,.smm-admin-search-label) {
  color:var(--v314-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table :is(td,th,.aprice-product strong) {
  color:var(--b25-text)!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table :is(.aprice-muted,.aprice-unit) {
  color:var(--v314-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table .aprice-current {
  color:var(--b25-text)!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table .aprice-publication.is-visible {
  background:var(--b25-soft)!important;
  color:var(--v314-active)!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table .aprice-publication.is-hidden {
  background:var(--b25-head)!important;
  color:var(--v314-secondary)!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table :is(tr,td,th) {
  border-color:var(--b25-line)!important;
}

/* Headings and sidebar secondary labels were still stuck on legacy navy-mode colors. */
html[data-smith-theme] body.smm-v31.smm-admin-body .smm-admin-main :is(.panel h2,.panel h3,.panel h4) {
  color:var(--b25-text)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31.smm-admin-body .smm-admin-sidebar :is(.smm-admin-brand small,.smm-admin-sidebar-bottom small) {
  color:var(--v314-secondary)!important;
  opacity:1!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table :is(td,th) {
  padding-block:13px!important;
  line-height:1.5!important;
}
html[data-smith-theme] body.smm-v31 .aprice-table .aprice-product strong {
  line-height:1.5!important;
}
