/* JanCares 2026 clarity pass — loaded last in both authenticated portals.
   Keep the financial ledger and authentication behavior unchanged. */
:root{
  --jc-motion-fast:125ms;
  --jc-motion-drawer:155ms;
}
body.admin-authenticated .main,
body.member-authenticated .main{font-size:14px;line-height:1.5}
body.admin-authenticated .main :is(.footnote,.jc-hint,.jc-rule),
body.member-authenticated .main :is(.footnote,.jc-hint,.jc-rule){line-height:1.48}
body.admin-authenticated .main :is(.panel,.jc-2026-guide,.jc-book,.jc-2026-member-balance),
body.member-authenticated .main :is(.panel,.jc-2026-guide,.jc-book,.jc-2026-member-balance){overflow-wrap:break-word}
:is(button,a,[role="button"],.side .nav button,.scheme-btn){touch-action:manipulation;-webkit-tap-highlight-color:transparent}
:is(button,a,[role="button"],.scheme-btn){transition-duration:var(--jc-motion-fast)!important}
body.admin-authenticated .side,
body.member-authenticated .side{
  transition:transform var(--jc-motion-drawer) cubic-bezier(.22,.8,.2,1),
    visibility var(--jc-motion-drawer) linear!important;
}
body.admin-authenticated .top,
body.member-authenticated .top{transition:transform var(--jc-motion-fast) ease,opacity var(--jc-motion-fast) ease!important}
.jc-nav-backdrop{transition:opacity var(--jc-motion-fast) ease!important}

/* The older theme sheets hardcode light backgrounds and pale figures. Reset
   the semantic surfaces together to prevent invisible values. */
html[data-jc-theme="dark"]{
  color-scheme:dark;
  --jc-bg:#111b29;
  --jc-surface:#1c2b3d;
  --jc-canvas:#101b29;
  --jc-text:#f0f6ff;
  --jc-muted:#c2d3e5;
  --jc-outline:#39536b;
  --jc-navy:#f0f6ff;
  --jc-ink:#e9f3ff;
  --jc-sub:#c2d3e5;
  --jc-line:#385168;
}
html[data-jc-theme="dark"] body,
html[data-jc-theme="dark"] body.admin-authenticated .main,
html[data-jc-theme="dark"] body.member-authenticated .main{
  background:#111e2e!important;color:#ecf4ff!important;
}
html[data-jc-theme="dark"] body.admin-authenticated :is(.top,.side),
html[data-jc-theme="dark"] body.member-authenticated :is(.top,.side){
  background-color:#1b2b3e!important;border-color:#38516a!important;
}
html[data-jc-theme="dark"] body.admin-authenticated :is(.panel,.stats,.stat,.jc-2026-guide,.jc-book,.jc-2026-member-balance,.jc-overview-disclosure,.lock),
html[data-jc-theme="dark"] body.member-authenticated :is(.panel,.stats,.stat,.jc-2026-guide,.jc-book,.jc-2026-member-balance,.jc-overview-disclosure,.lock){
  background:#1c2b3d!important;color:#edf5ff!important;border-color:#39546e!important;
}
html[data-jc-theme="dark"] body.admin-authenticated :is(.scheme-metric,.report-card,.jc-book-cell,.jc-balance-cell,.jc-payment-state-card,.jc-payment-card),
html[data-jc-theme="dark"] body.member-authenticated :is(.scheme-metric,.report-card,.jc-book-cell,.jc-balance-cell,.jc-payment-state-card,.jc-payment-card){
  background:#263b52!important;color:#edf6ff!important;border-color:#405c77!important;
  box-shadow:none!important;
}
html[data-jc-theme="dark"] body.admin-authenticated :is(.scheme-metric,.report-card,.jc-book-cell,.jc-balance-cell,.jc-payment-state-card,.jc-payment-card) strong,
html[data-jc-theme="dark"] body.member-authenticated :is(.scheme-metric,.report-card,.jc-book-cell,.jc-balance-cell,.jc-payment-state-card,.jc-payment-card) strong{
  color:#fff!important;opacity:1!important;
}
html[data-jc-theme="dark"] :is(.stat strong,.stat label,.stat span,.scheme-metric strong,.scheme-metric small,.scheme-metric span,.report-card strong,.report-card small,.jc-book-cell strong,.jc-balance-cell strong,.jc-figure strong,.jc-payment-state-value){
  opacity:1!important;
}
html[data-jc-theme="dark"] :is(.stat label,.stat span,.scheme-metric small,.scheme-metric span,.jc-book-cell small,.jc-book-cell span,.jc-balance-cell small,.jc-balance-cell span,.jc-figure small,.jc-control-line label,.jc-status,.footnote,.jc-hint,.jc-payment-state-note){
  color:#c7d9eb!important;
}
html[data-jc-theme="dark"] :is(.stat strong,.panel h3,.panel h4,.jc-guide-side h3,.jc-2026-guide h2,.jc-book h2,.jc-2026-member-balance h2,.jc-figure strong,.jc-book-detail dd,.jc-payment-head strong,.jc-book-detail h3){
  color:#eff7ff!important;
}
html[data-jc-theme="dark"] :is(.jc-kicker,.jc-positive,.jc-figure strong.jc-highlight){color:#91c8ff!important}
html[data-jc-theme="dark"] :is(.jc-guide-grid,.jc-guide-side+.jc-guide-side,.jc-figure,.jc-book-grid,.jc-balance-grid,.jc-book-detail article,.jc-separator){border-color:#39536d!important}
html[data-jc-theme="dark"] :is(.jc-book-grid,.jc-balance-grid){background:#39536d!important}
html[data-jc-theme="dark"] :is(.jc-rule,.notice,.empty,.jc-status:not([data-error="true"]),.jc-empty-account){
  background:#21374d!important;border-color:#42688a!important;color:#cfe1f3!important;
}
html[data-jc-theme="dark"] :is(.jc-book-detail dt,.jc-book-detail dd,.jc-balance-head p,.jc-guide-side p,.jc-payment-card p,.panel p,.panel label,.panel small,.panel span){
  color:inherit;
}
html[data-jc-theme="dark"] :is(.jc-book-detail dt,.panel .footnote,.panel .jc-hint,.panel .jc-rule){color:#c4d6e9!important}
html[data-jc-theme="dark"] body.admin-authenticated .main :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
html[data-jc-theme="dark"] body.member-authenticated .main :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
html[data-jc-theme="dark"] :is(.lock input,.lock select,.lock textarea,.jc-control-line input,.jc-control-line select){
  background:#17283b!important;color:#f4f9ff!important;border-color:#4b6783!important;
}
html[data-jc-theme="dark"] :is(input,textarea)::placeholder{color:#aec4dc!important;opacity:1}
html[data-jc-theme="dark"] :is(.scheme-btn:not(.selected),.jc-refresh,.report-period button:not(.active),.jc-book-date button,.jc-outline-btn,.jc-pay-copy){
  background:#2c4158!important;color:#e2f1ff!important;border-color:#4d6b87!important;
}
html[data-jc-theme="dark"] :is(.scheme-btn.selected,.report-period button.active,.jc-pay-tabs button.active){
  background:#2074cd!important;color:#fff!important;border-color:#3998ee!important;
}
html[data-jc-theme="dark"] :is(.jc-pay-pending,.jc-pay-verified,.jc-pay-rejected,.jc-payment-status-chip){font-weight:760}
html[data-jc-theme="dark"] .jc-pay-pending{color:#ffe09c!important;background:#4b3c25!important}
html[data-jc-theme="dark"] .jc-pay-verified{color:#a2efc2!important;background:#1d4839!important}
html[data-jc-theme="dark"] .jc-pay-rejected{color:#ffc0c7!important;background:#582a38!important}

/* The sign-in and application flow uses a separate page shell. */
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding){background:#101b29!important;color:#eef6ff!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) :is(.brand,.eyebrow,.jc-kicker){color:#90c7ff!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) :is(.gate-intro p,.welcome p,.lock>p,.lock small,.footnote){color:#bfd2e7!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) :is(h1,h2,h3,label){color:#edf6ff!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) .lock{background:#1b2c3e!important;border-color:#3a5570!important;color:#edf6ff!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) :is(input,select,textarea){background:#122438!important;color:#f2f8ff!important;border-color:#506f8b!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) :is(input,textarea)::placeholder{color:#bfd4e8!important;opacity:1}
html[data-jc-theme="dark"] .jc-theme-switch,
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) .jc-theme-switch{background:#244360!important;color:#edf7ff!important;border:1px solid #507ba0!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) a,
html[data-jc-theme="dark"] #memberOnboarding :is(#resumeMemberOtp,#signinFromSignup){color:#99ceff!important}
html[data-jc-theme="dark"] :is(#adminGate,#memberOnboarding) :is(button,.btn):focus-visible{outline-color:#99caff!important}

/* A compact audit list, not an automatic missed-payment decision. */
.jc-skip-review{margin:17px 0 0;border:1px solid #d8e5f1;border-radius:15px;background:#f8fbff;overflow:hidden}
.jc-skip-review>summary{padding:13px 16px;cursor:pointer;font-weight:800;color:#22547e;list-style-position:inside}
.jc-skip-content{padding:0 14px 14px}
.jc-skip-list{display:grid;gap:7px}
.jc-skip-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e1eaf4;border-radius:11px;background:#fff}
.jc-skip-person{display:grid;gap:3px;min-width:0}
.jc-skip-person strong{font-size:13px;color:#1f3e5d;overflow-wrap:anywhere}
.jc-skip-person small{font-size:11px;color:#627b94}
.jc-skip-chip{flex:none;white-space:nowrap;padding:5px 8px;border-radius:9px;font-size:11px;font-weight:800;background:#eaf3fc;color:#295a7b}
.jc-skip-chip.jc-skip-paid_on_time{background:#e1f5eb;color:#216e4b}
.jc-skip-chip.jc-skip-paid_late,.jc-skip-chip.jc-skip-skip_review{background:#fff0d7;color:#865514}
.jc-skip-chip.jc-skip-pending_verification,.jc-skip-chip.jc-skip-ledger_review{background:#fff4da;color:#745e21}
html[data-jc-theme="dark"] .jc-skip-review{background:#21344a;border-color:#45627d}
html[data-jc-theme="dark"] .jc-skip-review>summary{color:#c1e0ff}
html[data-jc-theme="dark"] .jc-skip-row{background:#293e56;border-color:#415e77}
html[data-jc-theme="dark"] .jc-skip-person strong{color:#f2f8ff}
html[data-jc-theme="dark"] .jc-skip-person small{color:#c0d5e8}
html[data-jc-theme="dark"] .jc-skip-chip{background:#345573;color:#edf6ff}
html[data-jc-theme="dark"] .jc-skip-chip.jc-skip-paid_on_time{background:#275140;color:#a8efce}
html[data-jc-theme="dark"] .jc-skip-chip.jc-skip-paid_late,
html[data-jc-theme="dark"] .jc-skip-chip.jc-skip-skip_review{background:#5b492d;color:#ffe4aa}

/* Keep navigation and authenticated forms legible on small phones. */
@media(max-width:760px){
  body.admin-authenticated .main :is(.jc-2026-guide,.jc-book,.jc-2026-member-balance),
  body.member-authenticated .main :is(.jc-2026-guide,.jc-book,.jc-2026-member-balance){padding:17px 15px!important}
  body.admin-authenticated .main :is(.panel,.jc-2026-guide,.jc-book,.jc-2026-member-balance) h2,
  body.member-authenticated .main :is(.panel,.jc-2026-guide,.jc-book,.jc-2026-member-balance) h2{line-height:1.25}
  .jc-book-cell,.jc-balance-cell{padding:13px!important}
  .jc-skip-row{padding:9px 10px}.jc-skip-person{max-width:58%}
}
@media(prefers-reduced-motion:reduce){
  body.admin-authenticated .side,body.member-authenticated .side,
  body.admin-authenticated .top,body.member-authenticated .top,
  .jc-nav-backdrop{transition:none!important}
}
