/* Account-scoped appearance; avoid inline CSS hacks and readable nighttime forms. */
.settings-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:20px}.settings-layout .card{margin-bottom:0}.settings-layout .card:last-child{grid-column:1/-1}
.setting-links{display:grid;gap:9px;margin-top:16px}.setting-link{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:14px 15px;text-decoration:none;background:var(--panel)}.setting-link strong,.setting-link small{display:block}.setting-link small{margin-top:4px;color:var(--muted)}.setting-link:hover{border-color:var(--brand)}.fee-disclosure{font-size:12px;line-height:1.65;color:var(--muted);padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.offline-help{max-width:860px}.offline-help li{padding:4px 0;line-height:1.75}.offline-help h3{margin-bottom:4px}
html[data-theme=dark]{color-scheme:dark;--ink:#e8eef4;--muted:#aab7c6;--bg:#0e1520;--panel:#172331;--line:#344459;--dark:#0a111b;--shadow:0 10px 30px rgba(0,0,0,.26)}
html[data-theme=dark] body,html[data-theme=dark] .main{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .card,html[data-theme=dark] .user-pill,html[data-theme=dark] .kpi,html[data-theme=dark] .product-card,html[data-theme=dark] .setting-link,html[data-theme=dark] .plan-card,html[data-theme=dark] .stat-card,html[data-theme=dark] .checkout-main,html[data-theme=dark] .order-summary,html[data-theme=dark] dialog{background:var(--panel);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] label,html[data-theme=dark] th,html[data-theme=dark] .breadcrumb,html[data-theme=dark] .page-heading,html[data-theme=dark] .nav-caption{color:var(--ink)}
html[data-theme=dark] input,html[data-theme=dark] textarea,html[data-theme=dark] select,html[data-theme=dark] .menu-toggle,html[data-theme=dark] .qty button,html[data-theme=dark] .icon-btn{background:#0e1825;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] th,html[data-theme=dark] code,html[data-theme=dark] .kbd,html[data-theme=dark] .change-box,html[data-theme=dark] .checkout-notice,html[data-theme=dark] .form-stack .notice{background:#213246;color:var(--ink)}
html[data-theme=dark] .btn.ghost,html[data-theme=dark] .btn.subtle{background:#22354a;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .page-context,html[data-theme=dark] .muted,html[data-theme=dark] .hint,html[data-theme=dark] .footer{color:var(--muted)}
html[dir=rtl] .sidebar{inset:0 0 0 auto}html[dir=rtl] .main{margin-left:0;margin-right:260px}html[dir=rtl] .brand,html[dir=rtl] .nav-link,html[dir=rtl] .logout-btn{text-align:right}
@media(max-width:900px){.settings-layout{grid-template-columns:1fr}.settings-layout .card:last-child{grid-column:auto}html[dir=rtl] .main{margin-right:0}html[dir=rtl] .sidebar{transform:translateX(110%)}html[dir=rtl] .sidebar.open{transform:translateX(0)}}

.appearance-field{border:0;padding:0;margin:0;min-width:0}.appearance-field legend{font-size:12px;font-weight:750;margin-bottom:8px}.theme-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}.theme-choice{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--panel);cursor:pointer}.theme-choice:has(input:checked){border-color:var(--brand);box-shadow:0 0 0 2px rgba(15,118,110,.12)}.theme-choice input{width:auto;accent-color:var(--brand)}

/* v1.1.21: public language/theme selector and dark-mode contrast remediation */
.public-preferences{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));z-index:90;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 40px rgba(8,20,32,.24);padding:9px 12px;max-width:min(calc(100vw - 24px),510px)}
.public-prefs-form{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.public-prefs-form label{display:grid;gap:3px;font-size:10px;color:var(--muted);font-weight:750}.public-prefs-form select{font-size:12px;min-height:37px;padding:6px 26px 6px 9px;width:auto;max-width:125px;background:var(--panel);color:var(--ink)}.public-prefs-form .btn{min-height:37px;padding:8px 12px;font-size:12px}
html[dir=rtl] .public-preferences{right:auto;left:max(12px,env(safe-area-inset-left))}
html[data-theme=dark]{--brand:#2DD4BF;--brand2:#5EEAD4;--success:#4ADE80;--warn:#FBBF24;--danger:#FCA5A5;--brand-soft:#143b38;--dark-2:#0a1420}
html[data-theme=dark] .pricing-card,html[data-theme=dark] .application-tile,html[data-theme=dark] .application-card,html[data-theme=dark] .permission-option,html[data-theme=dark] .registration-choice,html[data-theme=dark] .usage-strip,html[data-theme=dark] .qr-scanner-dialog,html[data-theme=dark] .public-preview,html[data-theme=dark] .public-cards article,html[data-theme=dark] .public-nav,html[data-theme=dark] .preview-grid>div,html[data-theme=dark] .product-entry-tools,html[data-theme=dark] .auth-card,html[data-theme=dark] .auth-panel{background:var(--panel);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .public-site,html[data-theme=dark] .auth-shell,html[data-theme=dark] .public-simple,html[data-theme=dark] .recovery-main{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .public-hero p,html[data-theme=dark] .public-simple>p,html[data-theme=dark] .public-cards p,html[data-theme=dark] .public-nav nav>a:not(.btn),html[data-theme=dark] .public-cta p,html[data-theme=dark] .registration-choice p,html[data-theme=dark] .application-details small,html[data-theme=dark] .thread-item span,html[data-theme=dark] .preview-grid span,html[data-theme=dark] .preview-grid small,html[data-theme=dark] .plan-card ul{color:var(--muted)}
html[data-theme=dark] .public-cta,html[data-theme=dark] .preview-bottom,html[data-theme=dark] .quick.primary,html[data-theme=dark] .registration-choice.trial-choice,html[data-theme=dark] .application-details,html[data-theme=dark] .registration-receipt,html[data-theme=dark] .quote-summary,html[data-theme=dark] .message-bubble,html[data-theme=dark] .trial-highlight{background:#19342f;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .registration-choice strong,html[data-theme=dark] .application-details strong,html[data-theme=dark] .application-head h3,html[data-theme=dark] .pricing-card h2,html[data-theme=dark] .price strong,html[data-theme=dark] .public-cards h3{color:var(--ink)}
html[data-theme=dark] table tbody td{background:var(--panel);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] tbody tr:hover td{background:#203346}
html[data-theme=dark] th{background:#22354a;color:#ecf4fb;border-color:var(--line)}
html[data-theme=dark] .pricing-card .badge,html[data-theme=dark] .status:not(.active):not(.warning):not(.danger),html[data-theme=dark] .badge:not(.paid):not(.failed):not(.pending),html[data-theme=dark] .status.inactive{background:#2b3b4c;color:#e8eef4}
html[data-theme=dark] .permission-option strong,html[data-theme=dark] .permission-option small,html[data-theme=dark] .payment-option,html[data-theme=dark] .plan-price strong,html[data-theme=dark] .plan-card .plan-price,html[data-theme=dark] .preview-grid strong,html[data-theme=dark] .preview-bottom{color:var(--ink)}
html[data-theme=dark] .public-eyebrow,html[data-theme=dark] .public-logo,html[data-theme=dark] .text-link,html[data-theme=dark] .auth-home-link,html[data-theme=dark] .breadcrumb a{color:var(--brand)}
html[data-theme=dark] .public-nav,html[data-theme=dark] .public-preview,html[data-theme=dark] .preview-grid>div,html[data-theme=dark] .public-cards article,html[data-theme=dark] .payment-option{border-color:var(--line)}
html[data-theme=dark] .payment-option:has(input:checked),html[data-theme=dark] .product-card:hover{background:#1b413d}
html[data-theme=dark] .info-box,html[data-theme=dark] .checkout-notice{background:#18364b;color:#dbeafe;border-color:#42627c}
html[data-theme=dark] .flash.success{background:#133f30;color:#bbf7d0}html[data-theme=dark] .flash.error{background:#4c2028;color:#fecdd3}
html[data-theme=dark] input,html[data-theme=dark] textarea,html[data-theme=dark] select{color-scheme:dark}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#99a7bb;opacity:1}
html[data-theme=dark] .btn.primary{background:linear-gradient(135deg,#0f766e,#115e59);color:#fff}
html[data-theme=dark] .btn.secondary{background:#273f55;color:#f8fafc}
html[data-theme=dark] .auth-card h1,html[data-theme=dark] .auth-card h2{color:var(--ink)}
html[data-theme=dark] .status.active,html[data-theme=dark] .status.warning,html[data-theme=dark] .status.danger,html[data-theme=dark] .payment-chip{filter:saturate(.92);color:#114630}
html[data-theme=dark] .status.warning,html[data-theme=dark] .payment-chip{color:#854d0e}
html[data-theme=dark] .status.danger{color:#991b1b}
@media(max-width:560px){.public-preferences{padding:8px;bottom:8px;right:8px;left:8px;max-width:none}.public-prefs-form{flex-wrap:nowrap;justify-content:center}.public-prefs-form label{flex:1;min-width:0}.public-prefs-form select{width:100%;min-width:0;max-width:none}.public-prefs-form .btn{align-self:end}.public-footer,.auth-shell{padding-bottom:100px!important}}

/* v1.1.21: accessible credential validation in light and dark themes */
.form-error-summary{display:grid;gap:3px;padding:12px 14px;margin:0 0 14px;border:1px solid #fecaca;border-radius:12px;background:#fff1f2;color:#991b1b;font-size:13px;line-height:1.5}
.form-error-summary strong{font-size:14px}
.field-feedback{display:block;color:var(--muted);font-size:11px;line-height:1.5;font-weight:500;overflow-wrap:anywhere}
.field-feedback.is-error{color:#b42318;font-weight:700}
.credential-meter{display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-width:0;margin:5px 0 2px}
.credential-meter progress{appearance:none;-webkit-appearance:none;width:92px;height:7px;border:0;border-radius:999px;overflow:hidden;background:#e2e8f0;flex:none}
.credential-meter progress::-webkit-progress-bar{background:#e2e8f0;border-radius:999px}
.credential-meter progress::-webkit-progress-value{background:var(--meter-color,#94a3b8);border-radius:999px}
.credential-meter progress::-moz-progress-bar{background:var(--meter-color,#94a3b8);border-radius:999px}
.credential-meter[data-level='1']{--meter-color:#dc2626}.credential-meter[data-level='2']{--meter-color:#ca8a04}.credential-meter[data-level='3']{--meter-color:#0d9488}.credential-meter[data-level='4']{--meter-color:#15803d}
.credential-status{color:var(--muted);font-size:11px;line-height:1.4;font-weight:600;flex:1;min-width:145px}
input[aria-invalid='true']{border-color:#dc2626!important;box-shadow:0 0 0 2px rgba(220,38,38,.12)}
html[data-theme=dark] .form-error-summary{background:#4d2329;color:#fecaca;border-color:#7f3b45}
html[data-theme=dark] .field-feedback.is-error{color:#fda4af}
html[data-theme=dark] .credential-meter progress,html[data-theme=dark] .credential-meter progress::-webkit-progress-bar{background:#334155}
html[data-theme=dark] .credential-meter[data-level='1']{--meter-color:#fb7185}html[data-theme=dark] .credential-meter[data-level='2']{--meter-color:#facc15}html[data-theme=dark] .credential-meter[data-level='3']{--meter-color:#5eead4}html[data-theme=dark] .credential-meter[data-level='4']{--meter-color:#86efac}
@media(max-width:600px){.credential-meter{gap:6px}.credential-meter progress{width:72px}}


/* v1.1.21 production UX: legible trial badges, compact public settings and touch affordances */
.status.trial{background:#d8f4ed;color:#075b4e;border:1px solid #95dcca}
html[data-theme=dark] .status.trial{background:#153f3a;color:#8bf4dd;border-color:#266e62}
.public-preferences:not([open]){padding:0;max-width:calc(100vw - 24px)}
.public-preferences-toggle{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;min-height:44px;min-width:158px;font-size:13px;font-weight:750;border-radius:14px}
.public-preferences-toggle::-webkit-details-marker{display:none}
.public-preferences-toggle:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.public-preferences[open] .public-preferences-toggle{margin-bottom:8px;border-bottom:1px solid var(--line);border-radius:12px 12px 0 0}
.public-preferences[open]{max-width:min(100vw - 24px,520px)}
.public-preferences[open] .public-prefs-form{padding-bottom:2px}
@media(max-width:480px){.public-preferences[open]{width:min(350px,calc(100vw - 24px))}.public-prefs-form{display:grid;grid-template-columns:1fr 1fr}.public-prefs-form .btn{grid-column:1/-1}.public-prefs-form select{max-width:none;width:100%}}
@media(max-width:900px){.main{padding-inline:16px}.card{padding:17px}.table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}}
@media(max-width:560px){.main{padding-inline:12px}.card{padding:14px}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.team-password-form .btn,.form-stack>.btn{min-height:44px}}
:where(a,button,summary,input,select,textarea):focus-visible{outline:3px solid var(--brand);outline-offset:3px}
html[data-theme=dark] .registration-choice,html[data-theme=dark] .permission-option,html[data-theme=dark] .plan-card{box-shadow:none}
html[data-theme=dark] .status.trial{filter:none}
/* Final visual smoke fixes: prevent light sticky header and low-contrast trial badges in night mode. */
html[data-theme=dark] .topbar{background:rgba(14,21,32,.96);color:var(--ink);border-bottom-color:var(--line)}
html[data-theme=dark] .topbar h1,html[data-theme=dark] .topbar-dashboard-link{color:var(--ink)}
html[data-theme=dark] .status.trial:not(.active):not(.warning):not(.danger){background:#153f3a;color:#8bf4dd;border:1px solid #266e62;filter:none}

/* Touch-friendly management forms are outside the horizontally scrolling store table. */
.store-manage-header{display:grid;gap:11px}.store-manage-header h2{font-size:clamp(22px,3vw,30px)}.store-manage-facts{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.store-manage-facts>span{border:1px solid var(--line);border-radius:12px;padding:10px 13px;background:var(--panel);font-size:13px}
.store-manage-header>.btn{justify-self:start}.store-manage-sections{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr);gap:22px}.store-manage-sections .mini-form{display:grid;gap:13px;margin:17px 0;padding-bottom:18px;border-bottom:1px solid var(--line)}.store-manage-sections .mini-form:last-child{padding-bottom:0;border-bottom:0}.store-suspend-form{border-top:1px solid var(--line);padding-top:18px}.store-manage-sections .form-stack label{font-size:13px}
@media(max-width:850px){.store-manage-sections{grid-template-columns:1fr}}

/* v1.1.23: shared theme tokens and RTL/layout corrections. */
html[data-theme="dark"] .dashboard-hero,html[data-theme="dark"] .owner-hero{background:linear-gradient(125deg,#1b3042,#173c3a);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .dashboard-hero h2,html[data-theme="dark"] .dashboard-hero .eyebrow{color:var(--ink)}
html[data-theme="dark"] .dashboard-hero p:not(.eyebrow){color:var(--muted)}
html[data-theme="dark"] .team-intro,html[data-theme="dark"] .team-member,html[data-theme="dark"] .permission-fieldset,html[data-theme="dark"] .empty{background:var(--panel);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .quick:not(.primary),html[data-theme="dark"] .plan-row,html[data-theme="dark"] .notice{background:#203247;color:var(--ink);border-color:var(--line)}
.settings-layout{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:1180px;margin-inline:auto}
.settings-layout>.settings-card{width:100%;max-width:none;min-width:0;margin:0}
.settings-layout .theme-choices{min-width:0}
html[dir="rtl"] .settings-layout,html[dir="rtl"] .team-intro{direction:rtl}
html[dir="rtl"] .settings-layout input,html[dir="rtl"] .team-intro input[name="username"],html[dir="rtl"] .team-intro input[name="password"]{direction:ltr;text-align:start}
html[dir="rtl"] .team-intro .section-head{flex-wrap:wrap;align-items:flex-start}
html[dir="rtl"] .permission-option{direction:rtl;text-align:start;align-items:flex-start;overflow-wrap:anywhere}
html[dir="rtl"] .permission-option input{flex:0 0 18px}
html[dir="rtl"] .setting-link{flex-direction:row}
html[dir="rtl"] .team-intro .form-grid>*{min-width:0}
html[dir="rtl"] .team-intro .field-feedback{direction:rtl;text-align:start}
@media(max-width:900px){.settings-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:540px){.theme-choices{grid-template-columns:minmax(0,1fr)}.permission-grid{grid-template-columns:minmax(0,1fr)}.team-intro .section-head{flex-wrap:wrap}}
