/* Theme system: default "Original Dasher" is untouched in styles.css. */
html[data-dash-theme="gilded"] body{
 --bg:#090b0c;--panel:#151719;--stroke:#55452d;--text:#f8f1e5;--muted:#b9aa94;
 --green:#dfbd7b;--green2:#ae874c;--gold:#f8dc9b;--gold2:#9e7540;
 --shadow:0 20px 55px rgba(0,0,0,.56);--radius:24px;
 font-family:Georgia,"Times New Roman",serif;
 background:radial-gradient(ellipse 90% 36% at 100% 0%,rgba(182,132,54,.18),transparent 75%),
 radial-gradient(ellipse 80% 35% at -15% 45%,rgba(185,128,57,.12),transparent 72%),
 repeating-linear-gradient(125deg,transparent 0 110px,rgba(229,192,115,.015) 111px 112px),
 #090b0c;
}
html[data-dash-theme="gilded"] body .topbar{padding-top:30px;padding-bottom:22px;border-bottom:1px solid rgba(204,164,97,.23);position:relative}
html[data-dash-theme="gilded"] body .topbar:after{content:"✦";position:absolute;bottom:-10px;left:50%;color:#d8b46c;background:#0b0d0e;padding:0 14px}
html[data-dash-theme="gilded"] body .brand .title{font:500 clamp(26px,5vw,37px)/1.1 Georgia,serif;letter-spacing:-.7px;color:#f8dfad;text-shadow:0 0 25px rgba(225,178,88,.17)}
html[data-dash-theme="gilded"] body .brand .subtitle{font:italic 13px Georgia,serif;letter-spacing:1px;color:#bd9b68;margin-top:8px}
html[data-dash-theme="gilded"] body .card{background:linear-gradient(142deg,rgba(35,32,28,.94),rgba(16,19,19,.97) 66%);border:1px solid rgba(220,174,102,.34);border-radius:24px;box-shadow:inset 0 1px rgba(255,235,182,.09),0 22px 50px rgba(0,0,0,.4)}
html[data-dash-theme="gilded"] body .card:after{content:"";pointer-events:none;position:absolute;inset:6px;border:1px solid rgba(223,179,111,.11);border-radius:19px}
html[data-dash-theme="gilded"] body .card.glow:before{background:radial-gradient(380px 190px at 0 0,rgba(231,176,87,.14),transparent 72%),radial-gradient(350px 200px at 100% 100%,rgba(218,155,74,.10),transparent 72%)}
html[data-dash-theme="gilded"] body .section-h,html[data-dash-theme="gilded"] body .section-title{font:500 25px Georgia,serif;letter-spacing:.1px;color:#f6dfb1}
html[data-dash-theme="gilded"] body .section-title{margin-top:30px}
html[data-dash-theme="gilded"] body .stat-value{font:500 clamp(29px,5vw,39px) Georgia,serif;color:#f7dca4}
html[data-dash-theme="gilded"] body .stat-label{font:italic 13px Georgia,serif;letter-spacing:.3px}
html[data-dash-theme="gilded"] body .stat-grid{gap:10px}
html[data-dash-theme="gilded"] body .stat{padding:12px 8px;border-left:1px solid rgba(211,172,104,.16)}
html[data-dash-theme="gilded"] body .stat:first-child{border-left:0}
html[data-dash-theme="gilded"] body .icon-btn,html[data-dash-theme="gilded"] body .btn,html[data-dash-theme="gilded"] body .chip,html[data-dash-theme="gilded"] body .small-btn,html[data-dash-theme="gilded"] body .xbtn{border-radius:13px;border:1px solid rgba(209,168,101,.42);background:linear-gradient(150deg,#2c281f,#141717);color:#f6dfb1;box-shadow:inset 0 1px rgba(255,229,166,.09);font-family:Georgia,serif}
html[data-dash-theme="gilded"] body .goldbtn,html[data-dash-theme="gilded"] body .greenbtn,html[data-dash-theme="gilded"] body .chip-gold{background:linear-gradient(125deg,#ffe4a5,#bc9254 52%,#e8c17e);border-color:#c9a66b;color:#24190d}
html[data-dash-theme="gilded"] body .badge{color:#f3d49b;border-color:rgba(218,175,104,.4);background:#30271b;font-family:Georgia,serif}
html[data-dash-theme="gilded"] body input,html[data-dash-theme="gilded"] body select{background:#101314;border:1px solid rgba(215,177,109,.29);border-radius:12px;color:#f8f1e5;font:15px Georgia,serif}
html[data-dash-theme="gilded"] body input:focus,html[data-dash-theme="gilded"] body select:focus{border-color:#e9c480;box-shadow:0 0 0 3px rgba(232,186,108,.11)}
html[data-dash-theme="gilded"] body .field label{color:#d2b98e;font:italic 13px Georgia,serif}
html[data-dash-theme="gilded"] body .zone-chip,html[data-dash-theme="gilded"] body .session-card,html[data-dash-theme="gilded"] body .dropdown,html[data-dash-theme="gilded"] body .modal-card{background:linear-gradient(140deg,#29261f,#121616);border:1px solid rgba(215,172,104,.32);border-radius:18px}
html[data-dash-theme="gilded"] body .modal-title,html[data-dash-theme="gilded"] body .dropdown-title{color:#f4d69d;font:500 23px Georgia,serif}
html[data-dash-theme="gilded"] body .session-card{padding:19px}
html[data-dash-theme="gilded"] body .week-opt{background:#201e1a;border-color:rgba(214,169,95,.28);color:#e7c993}
html[data-dash-theme="gilded"] body .warn{background:#33281b;color:#f7d99b;border-color:#8f6d38}
html[data-dash-theme="gilded"] body .divider{background:rgba(219,171,100,.25)}
html[data-dash-theme="gilded"] body .container{padding-top:25px}
.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.theme-choice{padding:0;border-radius:17px;overflow:hidden;border:2px solid #4c5048;background:#121814;text-align:left;color:#f4f5ef;cursor:pointer;min-width:0}
.theme-choice[aria-pressed="true"]{border-color:#f2c14e;box-shadow:0 0 0 3px rgba(242,193,78,.16)}
.theme-preview{height:88px;padding:13px;display:flex;flex-direction:column;gap:8px}
.theme-preview .preview-line{width:65%;height:9px;border-radius:9px;background:currentColor;opacity:.65}
.theme-preview .preview-blocks{display:flex;gap:7px;flex:1}
.theme-preview .preview-blocks i{display:block;flex:1;border:1px solid currentColor;border-radius:8px;opacity:.7}
.theme-preview.original{background:radial-gradient(at top left,#194b38,#09100d);color:#43dfa0}
.theme-preview.gilded{background:radial-gradient(at top right,#6c4b28,#101316 78%);color:#edcb88}
.theme-choice strong,.theme-choice small{display:block;padding:0 12px}
.theme-choice strong{font-size:13px;padding-top:10px}
.theme-choice small{font-size:11px;color:#aaa;padding-top:3px;padding-bottom:12px}
@media(max-width:480px){html[data-dash-theme="gilded"] body .topbar{gap:10px}html[data-dash-theme="gilded"] body .brand .title{font-size:25px}html[data-dash-theme="gilded"] body .stat{padding:8px 3px}html[data-dash-theme="gilded"] body .stat-value{font-size:28px}html[data-dash-theme="gilded"] body .stat-label{font-size:11px}}

/* Shared weekly summary layout — applies to every theme. */
.weekly-summary{overflow:visible!important}
.weekly-heading{text-align:center;display:flex;flex-direction:column;align-items:center;gap:7px;padding:6px 4px 18px;position:relative;z-index:1}
.weekly-title{font-weight:900;font-size:19px;letter-spacing:.2px;color:var(--gold)}
.weekly-heading #weekRange{font-size:13px;line-height:1.5;white-space:normal}
.weekly-summary .stat-grid{position:relative;z-index:1}
.timeline-action{display:flex;justify-content:flex-end;margin-top:18px;position:relative;z-index:2}
.timeline-action #weekChip{min-width:145px;padding:12px 18px;font-size:13px;white-space:nowrap}
.weekly-summary .dropdown{position:relative;z-index:5}
html[data-dash-theme="gilded"] body .weekly-title{font:500 25px Georgia,serif;color:#f8dca4}
html[data-dash-theme="gilded"] body .weekly-heading #weekRange{font:14px Georgia,serif;letter-spacing:.2px}
/* Replace ornate center separator with a clean continuous rule. */
html[data-dash-theme="gilded"] body .topbar:after{content:none!important;display:none!important}
html[data-dash-theme="gilded"] body .topbar{border-bottom:1px solid rgba(204,164,97,.28)!important}
@media(max-width:680px){.weekly-summary .stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}.weekly-summary .stat{min-width:0}.weekly-summary .stat-value{overflow-wrap:anywhere;font-size:clamp(20px,5vw,28px)}.weekly-heading #weekRange{font-size:12px}}

/* Shared timeline and zone management across every theme */
.timeline-page{padding:14px 0 30px}.timeline-page-header{margin-bottom:22px}.timeline-page-header h2{font-size:28px;margin:23px 0 8px;color:var(--gold)}.timeline-weeks{display:grid;gap:12px}.timeline-week{display:grid;grid-template-columns:1fr auto;gap:7px 12px;text-align:left;padding:17px;border-radius:var(--radius);border:1px solid var(--stroke);background:var(--panel);color:var(--text);cursor:pointer;font:inherit}.timeline-week strong{font-size:17px;color:var(--gold)}.timeline-week span{grid-column:1/-1;color:var(--text);font-size:14px}.timeline-week small{font-size:12px;color:var(--muted)}.timeline-week b{grid-column:2;grid-row:1;font-size:12px;color:var(--green)}.timeline-week:focus-visible{outline:2px solid var(--gold)}.timeline-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:20px}.timeline-pagination .btn:disabled{opacity:.35}.timeline-pagination span{font-size:12px;color:var(--muted)}.zone-remove-row{display:flex;align-items:center;gap:10px;margin-top:20px;padding-top:15px;border-top:1px solid var(--stroke)}.zone-remove-row input{flex:1;min-width:0}.zone-remove-row button{white-space:nowrap}.zone-chip{padding:10px 15px!important}.zone-chip .zone-x{display:none!important}@media(max-width:480px){.zone-remove-row{flex-wrap:wrap}.zone-remove-row button{width:100%}.timeline-week{padding:14px}}

/* Collapsible Zones manager shared by all themes */
.zones-accordion{margin-top:14px;border:1px solid var(--stroke);border-radius:19px;background:var(--panel);overflow:hidden;box-shadow:var(--shadow)}.zones-toggle{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:17px 20px;border:0;background:transparent;color:var(--text);font:800 19px system-ui,sans-serif;text-align:left;cursor:pointer}.zones-toggle-right{display:flex;align-items:center;gap:12px;font-size:12px;font-weight:500;color:var(--muted)}.zones-chevron{font-size:26px;line-height:1;color:var(--gold);transition:transform .2s}.zones-toggle[aria-expanded="true"] .zones-chevron{transform:rotate(180deg)}.zones-content{padding:5px 19px 19px;border-top:1px solid var(--stroke)}.zones-content[hidden]{display:none!important}html[data-dash-theme="gilded"] body .zones-accordion{background:linear-gradient(145deg,#28241d,#111516);border-color:rgba(220,174,102,.34);border-radius:24px}html[data-dash-theme="gilded"] body .zones-toggle{font:500 23px Georgia,serif;color:#f6dfb1}html[data-dash-theme="gilded"] body .zones-toggle-right{font:italic 12px Georgia,serif;color:#c8aa7b}

/* Native button reset + fully themed Zones controls */
.zones-accordion .zones-toggle,.zones-accordion button,.zones-accordion input{appearance:none;-webkit-appearance:none;box-sizing:border-box}
.zones-accordion .zones-toggle{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;color:var(--text)!important;font-family:inherit!important}
.zones-accordion .zones-toggle:focus-visible{outline:2px solid var(--gold);outline-offset:-4px}
.zones-accordion .row{margin-top:14px;align-items:stretch}
.zones-accordion .row input,.zones-accordion .zone-remove-row input{flex:1 1 180px;min-width:0;width:auto;min-height:46px;border:1px solid var(--stroke);border-radius:14px;background:rgba(0,0,0,.24);color:var(--text);padding:12px 14px;font:500 14px inherit;box-shadow:none}
.zones-accordion .row button,.zones-accordion .zone-remove-row button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;min-width:112px;padding:11px 16px;border-radius:14px;font:800 13px system-ui,sans-serif;letter-spacing:.15px;cursor:pointer;white-space:nowrap;transition:filter .15s,transform .15s}
.zones-accordion #btnAddZone{background:linear-gradient(145deg,var(--gold),var(--gold2));color:#1a160b;border:1px solid var(--gold2)}
.zones-accordion #btnRemoveZone{background:linear-gradient(145deg,#ec7777,#b84040);color:#1f0b0b;border:1px solid #ad4545}
.zones-accordion .row button:active,.zones-accordion .zone-remove-row button:active{transform:scale(.98)}
.zones-accordion .chips{margin-top:18px!important;gap:8px}
.zones-accordion .zone-chip{border:1px solid var(--stroke);border-radius:999px;background:rgba(0,0,0,.22);color:var(--text);padding:9px 15px;font:700 13px system-ui,sans-serif}
html[data-dash-theme="gilded"] body .zones-accordion .row button,html[data-dash-theme="gilded"] body .zones-accordion .zone-remove-row button{font:600 14px Georgia,serif;border-radius:13px}
html[data-dash-theme="gilded"] body .zones-accordion #btnAddZone{background:linear-gradient(125deg,#ffe4a5,#bc9254 52%,#e8c17e);border-color:#c9a66b;color:#24190d}
html[data-dash-theme="gilded"] body .zones-accordion #btnRemoveZone{background:linear-gradient(145deg,#50302d,#301b1b);color:#ffb3a5;border-color:#835047}
html[data-dash-theme="gilded"] body .zones-accordion .zone-chip{font:500 14px Georgia,serif;border-color:rgba(215,172,104,.35);background:linear-gradient(145deg,#30291f,#191a18);color:#f8dca4}
@media(max-width:480px){.zones-accordion .row{flex-wrap:wrap}.zones-accordion .row button,.zones-accordion .zone-remove-row button{width:100%}}

/* Shared account header and settings actions */
.topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.account-role-badge{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:8px 14px;border:1px solid var(--gold2);border-radius:999px;background:linear-gradient(130deg,rgba(242,193,78,.16),rgba(0,0,0,.16));color:var(--gold);font:800 12px system-ui,sans-serif;letter-spacing:.25px;white-space:nowrap}
.topbar-actions #btnSettings{font:800 12px system-ui,sans-serif;padding:10px 14px;min-height:39px;white-space:nowrap}
.settings-account{border:1px solid var(--stroke);background:rgba(0,0,0,.13);border-radius:14px;padding:14px}
.settings-account-email{font-size:14px;font-weight:800;overflow-wrap:anywhere;margin:7px 0}
#cloudSyncStatus{margin-top:8px}
.settings-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.settings-action-grid .btn{min-height:45px;white-space:normal}
.settings-action-grid #accountLogout{grid-column:1/-1;border-color:rgba(255,107,107,.45);color:#ffb2b2}
html[data-dash-theme="gilded"] body .account-role-badge{font:600 13px Georgia,serif;color:#f6dfb1;border-color:#bd9356;background:linear-gradient(130deg,#3c2e1d,#191b1a)}
html[data-dash-theme="gilded"] body .topbar-actions #btnSettings{font:600 13px Georgia,serif}
html[data-dash-theme="gilded"] body .settings-account{border-color:rgba(220,174,102,.3);background:linear-gradient(145deg,#2a251e,#141818)}
@media(max-width:520px){.topbar{align-items:center;gap:10px}.topbar-actions{gap:7px}.account-role-badge{padding:7px 10px;font-size:11px;min-height:35px}.topbar-actions #btnSettings{padding:8px 10px;min-height:35px}.brand{min-width:0}.brand .title{font-size:clamp(19px,5vw,28px)}html[data-dash-theme="gilded"] body .brand .title{font-size:clamp(20px,5vw,25px)}}

/* Driver help desk */
.support-dialog{max-height:88dvh;overflow-y:auto}.support-tabs{display:flex;gap:9px;margin:14px 0}.support-tabs .btn{flex:1}.support-form{display:grid;gap:14px}.support-form label{display:grid;gap:7px;color:var(--text);font-weight:700;font-size:13px}.support-form input,.support-form select,.support-form textarea,.support-reply textarea{width:100%;min-height:45px;padding:12px;border-radius:13px;border:1px solid var(--stroke);background:var(--panel);color:var(--text);font:inherit;resize:vertical}.support-form textarea,.support-reply textarea{min-height:110px}.support-ticket-list{display:grid;gap:10px}.support-ticket-item{display:grid;gap:5px;text-align:left;width:100%;padding:14px;background:var(--panel);color:var(--text);border:1px solid var(--stroke);border-radius:13px;cursor:pointer}.support-ticket-item small{color:var(--muted)}.support-thread h3{margin:15px 0}.support-message{display:grid;gap:6px;padding:12px;margin:9px 0;border:1px solid var(--stroke);border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}.support-message small{color:var(--muted);font-size:11px}.support-reply{display:grid;gap:10px;margin-top:15px}html[data-dash-theme="gilded"] body .support-form label{font-family:Georgia,serif;color:#f7dca4}

/* Mobile modal scrolling and danger controls */
body.modal-scroll-lock{position:fixed!important;left:0;right:0;width:100%;overflow:hidden!important}.modal{overflow:hidden;overscroll-behavior:contain;align-items:flex-end;padding-bottom:max(14px,env(safe-area-inset-bottom))}.modal .modal-card{max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;min-height:0}.modal .modal-head{position:sticky;top:0;z-index:2;background:var(--panel);padding:8px 0}html[data-dash-theme="gilded"] body .modal .modal-head{background:#22211c}#weekPreset,#customWeekDay{margin-top:9px}#customWeekField{margin-top:12px}.settings-action-grid{margin-top:12px}html body #btnWipeAll,html[data-dash-theme="gilded"] body #btnWipeAll{background:linear-gradient(145deg,#43191d,#281214)!important;border:1px solid #b34b55!important;color:#ffb9bd!important;box-shadow:none!important}#btnWipeAll span{margin-right:6px}
