/* Electrical Workbench preferences and accessible light appearance */
.settings-stack{display:grid;gap:15px;max-width:930px}
.settings-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.settings-card{padding:20px}
.settings-card h2{margin-bottom:8px}
.settings-card p{color:var(--muted);font-size:13px;line-height:1.55;margin:0 0 16px}
.settings-row{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}
.settings-row>div:first-child{flex:1 1 220px}
.settings-title{display:block;font-weight:750;color:var(--text);margin-bottom:5px}
.settings-hint{display:block;font-size:12px;color:var(--muted);line-height:1.5}
.settings-switch{display:flex;align-items:stretch;gap:4px;padding:5px;border:1px solid var(--line);border-radius:13px;background:var(--panel2)}
.settings-choice{width:110px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font-weight:750;font-size:13px}
.settings-choice[aria-pressed="true"]{background:var(--panel);border-color:var(--gold2);color:var(--text);box-shadow:0 2px 8px #0002}
.settings-choice:focus-visible,.settings-card button:focus-visible,.settings-card select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.settings-input{width:min(290px,100%);flex:1 1 215px}
.settings-divider{height:1px;background:var(--line);margin:17px 0}
.settings-status{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted);line-height:1.5}
.settings-status::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--gold);flex:0 0 7px}
.settings-footer-links{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:600px){.settings-card{padding:17px}.settings-switch{width:100%}.settings-choice{flex:1}.settings-input{width:100%;max-width:none}}

/* Native radio-driven page navigation works even before app logic initializes. */
#view-settings:checked ~ .app #settings{display:block}
#view-settings:checked ~ .app .nav-btn[data-go="settings"]{color:#f6e2af;background:#2a2924;box-shadow:inset 3px 0 var(--gold)}

/* Complete light palette; graphite-and-gold dark mode remains the default. */
:root[data-theme="light"]{
 color-scheme:light;
 --bg:#f4f6fa;--panel:#ffffff;--panel2:#edf1f6;--line:#d7dde5;
 --text:#202a38;--muted:#526171;--gold:#865908;--gold2:#ab7927;
 --red:#af333e;--green:#17734e;--shadow:0 12px 36px #26364e20;
}
:root[data-theme="light"] body{background:var(--bg);color:var(--text)}
:root[data-theme="light"] .sidebar{background:#fff}
:root[data-theme="light"] .topbar{background:#f9fbfbee}
:root[data-theme="light"] .nav-title,
:root[data-theme="light"] .sidebar-foot,
:root[data-theme="light"] .footer-note,
:root[data-theme="light"] .count{color:#5b6877}
:root[data-theme="light"] .nav-btn,
:root[data-theme="light"] .app .nav-btn.active{color:#364357}
:root[data-theme="light"] .nav-btn:hover{background:#f2e6ca;color:#704905}
:root[data-theme="light"] :is(#view-home:checked,#view-jobs:checked,#view-panels:checked,#view-inventory:checked,#view-materials:checked,#view-tasks:checked,#view-specs:checked,#view-bending:checked,#view-electrical:checked,#view-conversions:checked,#view-history:checked,#view-backup:checked,#view-cloud:checked,#view-settings:checked) ~ .app .nav-btn.active{
 background:#f7e8ca;color:#704905;box-shadow:inset 3px 0 var(--gold);
}
:root[data-theme="light"] #view-settings:checked ~ .app .nav-btn[data-go="settings"]{background:#f7e8ca;color:#704905}
:root[data-theme="light"] .metric strong{color:#273347}
:root[data-theme="light"] .field label{color:#344052}
:root[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
:root[data-theme="light"] textarea,
:root[data-theme="light"] select{background:#fff;color:#202a38;border-color:#b7c2d0}
:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder{color:#68778a}
:root[data-theme="light"] .btn:not(.gold):not(.danger){background:#eef2f6;border-color:#c4ceda;color:#202a38}
:root[data-theme="light"] .btn.ghost{background:transparent!important}
:root[data-theme="light"] .btn.gold{background:#946714;color:#fff;border-color:#946714}
:root[data-theme="light"] .btn.danger{background:#fff6f6;color:#9e2531}
:root[data-theme="light"] .list-item,
:root[data-theme="light"] .photo-tile,
:root[data-theme="light"] .cloud-stats>div{background:#f6f8fb;border-color:#d7dee7}
:root[data-theme="light"] .pill,
:root[data-theme="light"] .cloud-badge{color:#714b08;background:#f9edcf;border-color:#d6bd86}
:root[data-theme="light"] .alert,
:root[data-theme="light"] .result{background:#fff7e9;border-color:#b8985d;color:#6a4b1c}
:root[data-theme="light"] .result-caption{color:#665d50}
:root[data-theme="light"] .tab{background:#eef2f6;color:#344052;border-color:#c4ceda}
:root[data-theme="light"] .tab.selected{background:#f7e7c7;color:#694707;border-color:#ae8b48}
:root[data-theme="light"] .chart,
:root[data-theme="light"] .panel-grid{background:#f3f6f9;border-color:#d4dde6}
:root[data-theme="light"] .modal,
:root[data-theme="light"] .panel-breaker-editor,
:root[data-theme="light"] .panel-settings{background:#fff;color:var(--text);border-color:#c6d0dc}
:root[data-theme="light"] .toast:not(.error){background:#fffaf0;color:#674608;border-color:#b89b62}
:root[data-theme="light"] .toast.error{background:#fce8e8!important;color:#91252d!important;border-color:#cc6670!important}
:root[data-theme="light"] .panel-cell{background:#fff;color:var(--text);border-color:#bdc9d4}
:root[data-theme="light"] .panel-cell.used{background:#eaf1f7}
:root[data-theme="light"] .panel-cell.selected{background:#fff1d4;border-color:#946714}
:root[data-theme="light"] .panel-cell .n{background:#e9edf2;color:#75500a}
:root[data-theme="light"] .panel-mid{background:#e9eef3;color:#39465a;border-color:#c7d1db}
:root[data-theme="light"] .panel-selection,
:root[data-theme="light"] .panel-warning{background:#fff3d9;color:#63420d;border-color:#c5a061}
:root[data-theme="light"] .cloud-stats small{color:#667385}
:root[data-theme="light"] .cloud-stats strong{color:#865908}
:root[data-theme="light"] .account-entry-button{background:linear-gradient(120deg,#fff8e7,#f1f4f9);color:#674708;border-color:#ceba89}
:root[data-theme="light"] .account-entry-copy small{color:#6d675b}
:root[data-theme="light"] .account-entry-chevron{color:#725716}
:root[data-theme="light"] .auth-dialog{background:linear-gradient(155deg,#fff,#f1f4f8);border-color:#d4bc86;color:var(--text)}
:root[data-theme="light"] .auth-close{background:#f2f5f8;border-color:#c4ceda;color:#584514}
:root[data-theme="light"] .auth-mode-tabs{background:#eaf0f6;border-color:#cad4dd}
:root[data-theme="light"] .auth-mode-tabs button{color:#536174}
:root[data-theme="light"] .auth-mode-tabs button[aria-selected="true"]{background:#f8e9ca;color:#63430a;box-shadow:inset 0 0 0 1px #c9a666}
:root[data-theme="light"] .auth-feedback{background:#fff8e7;color:#66470b;border-color:#d5ba7f}
:root[data-theme="light"] .auth-feedback.error{background:#fce7e7;color:#9f2732;border-color:#c66a70}
:root[data-theme="light"] .auth-feedback.success{background:#e5f5ee;color:#136642;border-color:#6bb38d}
:root[data-theme="light"] .auth-signed-email{color:#6e4c0f}
:root[data-theme="light"] #runtimeBanner{color:var(--text)}

/* Match the release notice to the selected light theme. */
:root[data-theme="light"] #ew-update-prompt{background:#fff!important;color:#243043!important;border-color:#c3a46b!important;box-shadow:0 12px 35px #26364e24!important}
:root[data-theme="light"] #ew-update-prompt button:nth-child(2){background:#f0f3f7!important;color:#273347!important;border-color:#c2ccd7!important}

/* Inventory: turn the entire no-materials notice into a clear tap target. */
.empty-action{display:block;width:100%;min-height:112px;background:var(--panel2);color:var(--text);font:inherit;text-align:center;cursor:pointer;touch-action:manipulation;transition:border-color .18s ease,background .18s ease}
.empty-action:hover{border-color:var(--gold);background:var(--panel)}
.empty-action:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.empty-action-sub{display:block;margin-top:8px;font-size:13px;font-weight:650;color:var(--gold)}

/* Custom shoe setup management: maintain compact, touch-friendly controls. */
.shoe-profile-actions{margin-top:10px;gap:8px;flex-wrap:wrap}
.shoe-profile-actions button{min-height:40px}
#cancelProfileEdit[hidden]{display:none!important}
#editProfile:disabled,#deleteProfile:disabled{opacity:.45;cursor:not-allowed}

/* A clearly labeled job selector, visible throughout the workbench. */
.current-job-picker{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;min-width:175px;max-width:250px;padding:8px 10px;border:1px solid var(--gold2);border-radius:11px;background:var(--panel2)}
.current-job-caption{color:var(--gold);font-size:10px;font-weight:850;letter-spacing:.11em;line-height:1.2}
.current-job-picker .top-job{max-width:none;width:100%;min-width:0;padding:8px 10px;font-size:13px;font-weight:750;color:var(--text);border:1px solid var(--line);border-radius:8px;background:var(--panel);text-overflow:ellipsis}
.current-job-hint{color:var(--muted);font-size:10px;line-height:1.25}
.current-job-picker:focus-within{outline:2px solid var(--gold);outline-offset:2px}
.job-actions{margin-top:11px}
.job-card{cursor:default}
:root[data-theme="light"] .current-job-picker{background:#fff8e8;border-color:#c49a4e}
:root[data-theme="light"] .current-job-caption{color:#865908}
@media(max-width:700px){
 .topbar{flex-wrap:wrap;row-gap:8px}
 .topbar>.actions{width:100%;min-width:0;justify-content:flex-end;gap:7px}
 .current-job-picker{order:-1;flex:1 1 170px;max-width:none;min-width:0}
 .current-job-picker .top-job{max-width:none}
 .current-job-hint{display:none}
}

/* Introduction screen: clear onboarding without duplicating active-job details. */
#home .intro-hero{
 position:relative;overflow:hidden;isolation:isolate;
 padding:clamp(24px,4vw,46px);
 border:1px solid var(--gold2);border-radius:20px;
 background:linear-gradient(115deg,var(--panel) 0%,var(--panel2) 72%,rgba(224,184,101,.13) 100%);
 margin-bottom:27px;
}
#home .intro-hero::after{
 content:"ϟ";position:absolute;right:3%;top:50%;transform:translateY(-52%);
 color:var(--gold);opacity:.09;font-size:clamp(110px,20vw,230px);font-weight:700;line-height:1;
 pointer-events:none;z-index:-1;
}
#home .intro-eyebrow{display:flex;align-items:center;gap:9px;color:var(--gold);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.11em}
#home .intro-bolt{width:28px;height:28px;display:grid;place-items:center;background:rgba(224,184,101,.12);border:1px solid var(--gold2);border-radius:9px;font-size:19px}
#home .intro-hero h1{max-width:680px;font-size:clamp(26px,4.2vw,45px);letter-spacing:-.04em;line-height:1.12;margin:22px 0 15px}
#home .intro-hero p{max-width:675px;color:var(--muted);line-height:1.7;font-size:clamp(14px,1.35vw,16px);margin:0}
#home .intro-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:24px}
#home .intro-actions .btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
#home .intro-section-title{display:flex;justify-content:space-between;align-items:end;gap:16px;flex-wrap:wrap;margin:0 0 16px}
#home .intro-section-title h2{font-size:clamp(20px,2.5vw,25px);letter-spacing:-.025em;margin:6px 0 0}
#home .intro-section-title p{max-width:400px;margin:0;color:var(--muted);font-size:13px;line-height:1.5}
#home .intro-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#home .intro-step{display:flex;flex-direction:column;gap:11px;min-height:228px}
#home .intro-step h3{font-size:16px;line-height:1.4;margin:0}
#home .intro-step p{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 6px}
#home .intro-step p strong{color:var(--text)}
#home .intro-number{color:var(--gold);font-size:12px;letter-spacing:.1em;font-weight:850}
#home .intro-text-link{align-self:flex-start;margin-top:auto;padding:8px 0;border:0;background:none;color:var(--gold);font-size:13px;font-weight:750;text-align:left}
#home .intro-text-link:hover{text-decoration:underline}
#home .intro-text-link:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:3px}
#home .intro-explore-heading{margin-top:29px}
#home .intro-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
#home .intro-feature{
 display:flex;align-items:flex-start;gap:13px;min-width:0;min-height:105px;
 width:100%;text-align:left;color:var(--text);transition:border-color .15s,transform .15s;
}
#home .intro-feature:hover{border-color:var(--gold2);transform:translateY(-1px)}
#home .intro-feature:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
#home .intro-feature-icon{flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;background:var(--panel2);border-radius:9px;color:var(--gold);font-size:21px}
#home .intro-feature-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
#home .intro-feature-copy strong{font-size:14px;line-height:1.3}
#home .intro-feature-copy>span{font-size:12px;line-height:1.5;color:var(--muted)}
#home .intro-feature-arrow{color:var(--gold);font-size:16px;margin-left:2px;align-self:center}
#home .intro-footnote{margin:18px 2px 0;color:var(--muted);font-size:11px;line-height:1.7}
:root[data-theme="light"] #home .intro-hero{background:linear-gradient(115deg,#fffdf7 0%,#f7f3e9 68%,#ebd6ae 100%);border-color:#c5a267}
:root[data-theme="light"] #home .intro-bolt{background:#fff3d9}
@media(max-width:1020px){#home .intro-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){#home .intro-steps{grid-template-columns:1fr}#home .intro-step{min-height:0}#home .intro-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){
 #home .intro-hero{padding:22px 18px;margin-bottom:22px}
 #home .intro-hero h1{margin:19px 0 12px}
 #home .intro-actions{flex-direction:column;align-items:stretch}
 #home .intro-actions .btn{width:100%}
 #home .intro-section-title{align-items:start;gap:5px}
 #home .intro-feature-grid{grid-template-columns:1fr}
 #home .intro-feature{min-height:82px}
 #home .intro-explore-heading{margin-top:23px}
}
@media(prefers-reduced-motion:reduce){#home .intro-feature{transition:none}}

/* Account registration on the Introduction page, linked to existing Supabase Auth. */
#home .intro-account{
 display:flex;align-items:flex-start;gap:19px;margin:0 0 19px;
 border-color:var(--gold2);
 background:linear-gradient(112deg,var(--panel2),var(--panel));
 padding:clamp(19px,3vw,27px);
}
#home .intro-account-icon{
 flex:0 0 53px;width:53px;height:53px;display:grid;place-items:center;
 border-radius:14px;color:var(--gold);background:rgba(224,184,101,.11);
 border:1px solid var(--gold2);font-size:28px;line-height:1;
}
#home .intro-account-body{flex:1;min-width:0}
#home .intro-account h2{
 margin:6px 0 10px;font-size:clamp(20px,2.6vw,25px);line-height:1.24;
 letter-spacing:-.025em;
}
#home .intro-account-body>p:not(.intro-account-hint){
 margin:0;color:var(--muted);font-size:13px;line-height:1.6;max-width:760px;
}
#home .intro-account-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
#home .intro-account-actions .btn,
#home .intro-account-member .btn{min-height:43px}
#home .intro-account-member{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin-top:16px}
#home .intro-account-member[hidden],#home .intro-account-actions[hidden]{display:none!important}
#home .intro-account-signed{
 display:flex;align-items:center;gap:10px;
 flex:1;min-width:180px;padding:10px 12px;
 border:1px solid var(--line);border-radius:10px;background:var(--panel2);
}
#home .intro-account-signed>span:first-child{
 color:var(--gold);font-size:19px;font-weight:900;
}
#home .intro-account-signed>div{
 display:flex;flex-direction:column;gap:3px;min-width:0;font-size:12px;
}
#home .intro-account-signed strong{color:var(--text);font-size:13px}
#home #introAccountEmail,#home #introAccountWorkspace{
 color:var(--muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere;
}
#home .intro-account-hint{
 margin:13px 0 0;font-size:11px!important;line-height:1.5!important;
 color:var(--muted);max-width:760px;
}
:root[data-theme="light"] #home .intro-account{
 background:linear-gradient(112deg,#fffdf7,#f5f1e7);border-color:#c5a267;
}
@media(max-width:580px){
 #home .intro-account{gap:12px;padding:17px 15px}
 #home .intro-account-icon{flex-basis:37px;width:37px;height:37px;border-radius:10px;font-size:21px}
 #home .intro-account-actions{flex-direction:column}
 #home .intro-account-actions .btn{width:100%}
 #home .intro-account-member{flex-direction:column;align-items:stretch;gap:10px}
 #home .intro-account-member .btn{width:100%}
}
