/* 12 Nov refresh. Loaded last so these section-coloured rules win. */

/* ---------- Every date field wears its section's colours ---------- */
html:not([data-theme="light"]) body[data-section] input[type="date"]:not(#nvHomeDate):not([id^="md"]),
html:not([data-theme="light"]) body[data-section] #lyShiftDialog input[type="time"]{
 color-scheme:dark;
 background:linear-gradient(135deg,color-mix(in srgb,var(--section-panel) 70%,#0b0c0e),color-mix(in srgb,var(--section-accent) 16%,var(--section-panel)))!important;
 border:1px solid color-mix(in srgb,var(--section-accent) 55%,transparent)!important;
 color:color-mix(in srgb,var(--section-accent) 18%,#fff)!important;
}
html[data-theme="light"] body[data-section] input[type="date"]:not(#nvHomeDate):not([id^="md"]),
html[data-theme="light"] body[data-section] #lyShiftDialog input[type="time"]{
 background:linear-gradient(135deg,#fff,color-mix(in srgb,var(--section-accent) 18%,#fff))!important;
 border:1px solid color-mix(in srgb,var(--section-accent) 70%,#667)!important;
 color:var(--section-ink)!important;
}
body[data-section] input[type="date"]:focus-visible,body[data-section] #lyShiftDialog input[type="time"]:focus-visible{outline:2px solid var(--section-accent)!important;outline-offset:2px}
/* The little calendar / clock glyph takes the section colour too. */
body[data-section] input[type="date"]::-webkit-calendar-picker-indicator,
body[data-section] #lyShiftDialog input[type="time"]::-webkit-calendar-picker-indicator{
 background-image:none;background-color:var(--section-accent);cursor:pointer;opacity:1;
 -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat;
 mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat;
}
body[data-section] #lyShiftDialog input[type="time"]::-webkit-calendar-picker-indicator{
 -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
 mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
}

/* ---------- Macros day bar: graphite with the Macros teal ---------- */
#macrosPage .nv-daybar label{
 background:linear-gradient(115deg,#141615,#1b2624 55%,#23403b)!important;
 border:1px solid #60cdb966!important;box-shadow:inset 0 1px 0 #ffffff0d,0 8px 22px #0006;
}
#macrosPage .nv-daybar label span{color:#7fe0cf!important}
#macrosPage .nv-daybar input{color:#effaf7!important;color-scheme:dark}
#macrosPage .nv-daybar .nv-icon{
 background:linear-gradient(140deg,#161918,#22403b)!important;border:1px solid #60cdb966!important;color:#9aeadb!important;
 transition:transform .12s,border-color .15s,filter .15s;
}
#macrosPage .nv-daybar .nv-icon:hover{border-color:#9aeadb!important;filter:brightness(1.15);transform:translateY(-1px)}
#macrosPage .nv-daybar .nv-today{
 background:linear-gradient(115deg,#3bb7a2,#60cdb9 55%,#a4eede)!important;color:#06231e!important;
 border:1px solid #a4eede!important;border-radius:15px!important;min-height:44px;padding:0 16px!important;font-weight:850;
 box-shadow:0 6px 18px #0a2a2455;
}
#macrosPage .nv-daybar .nv-today[hidden]{display:none!important}
html[data-theme="light"] #macrosPage .nv-daybar label,html[data-theme="light"] #macrosPage .nv-daybar .nv-icon{background:linear-gradient(115deg,#fff,#e4f5f1 55%,#c4e9e1)!important;border-color:#2f9c8a88!important;color:#0f4037!important;box-shadow:none}
html[data-theme="light"] #macrosPage .nv-daybar label span{color:#197a6a!important}
html[data-theme="light"] #macrosPage .nv-daybar input{color:#0f2b27!important;color-scheme:light}

/* ---------- Log a drink ---------- */
#novaWater .nv-drink-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 16px}
#novaWater .nv-drink-chips button{
 display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:8px 14px!important;border-radius:999px!important;
 background:linear-gradient(160deg,#1a3442,#22485a)!important;border:1px solid #77cafa44!important;color:#eef8ff!important;
 font-size:13px;font-weight:750;transition:transform .12s,border-color .15s,background .15s;
}
#novaWater .nv-drink-chips button:hover{border-color:#a9defc!important;transform:translateY(-1px)}
#novaWater .nv-drink-chips button.is-picked{background:linear-gradient(115deg,#4fa6cf,#77cafa 55%,#a9defc)!important;border-color:#d9f1ff!important;color:#08202e!important}
#novaWater .nv-drink-chips .nv-drink-add{background:transparent!important;border-style:dashed!important;color:#a9defc!important}
.nv-drink-mix{display:flex;flex-wrap:wrap;gap:6px 8px;margin:8px 0 0}
.nv-drink-mix:empty{display:none}
.nv-drink-mix>span{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;background:#77cafa1c;border:1px solid #77cafa40;color:#d9f1ff;font-size:12px;font-weight:650}
.nv-drink-mix b{font-weight:850;color:#a9defc}
#novaWater .nv-water-picks button[data-usual]{border-color:#a9defc!important;box-shadow:inset 0 0 0 1px #a9defc55}
#novaWater .nv-water-picks.is-learned::before{content:'Your usual amounts';grid-column:1/-1;font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:#a9defc}
html[data-theme="light"] #novaWater .nv-drink-chips button{background:#ffffffaa!important;color:#0e2a38!important;border-color:#4fa6cf77!important}
html[data-theme="light"] #novaWater .nv-drink-chips .nv-drink-add{color:#1d5f80!important}
html[data-theme="light"] .nv-drink-mix>span{background:#4fa6cf1f;border-color:#4fa6cf66;color:#0e2a38}
html[data-theme="light"] .nv-drink-mix b,html[data-theme="light"] #novaWater .nv-water-picks.is-learned::before{color:#1d5f80}
@media(max-width:480px){#novaWater .nv-drink-chips{gap:6px}#novaWater .nv-drink-chips button{padding:7px 11px!important;font-size:12px}}

/* ---------- Passive Income ---------- */
/* Plus stays on screen as an X while Log a shift is open. */
body[data-section="work"] #lyShiftDialog>#lyShiftPlus.is-open{
 display:grid!important;place-items:center;position:fixed;
 background:linear-gradient(135deg,#fff,#dedee3 52%,#888b94)!important;color:#16171b!important;border:1px solid #ffffff90!important;
}
@media(max-width:700px){#lyShiftDialog:has(>#lyShiftPlus.is-open) .work-panel{padding-bottom:88px!important}}
/* A quick way back to the usual time after a field jumped to now. */
#lyShiftDialog .ly-time-restore svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#lyShiftDialog .ly-time-restore{display:inline-flex!important;align-items:center;gap:7px;
 justify-self:start;align-self:flex-start;width:auto!important;min-height:0!important;margin-top:6px;padding:5px 10px!important;border-radius:999px!important;
 background:transparent!important;border:1px solid color-mix(in srgb,var(--section-accent) 55%,transparent)!important;
 color:var(--section-accent)!important;font-size:12px!important;font-weight:750!important;
}
/* Repaid history: gold, not plain white. */
#workPage .ly-repaid-history>summary{color:#f0c987!important;letter-spacing:.01em}
#workPage .ly-repaid-history>summary::marker{color:#e0b774}
#workPage .ly-repaid-history>summary:hover{color:#ffe0ac!important}
html[data-theme="light"] #workPage .ly-repaid-history>summary{color:#7a5417!important}
/* Shift history periods: a bolder, thicker gold frame. */
#workPage #workHistory .ly-shift-week{
 border:2.5px solid #e0b774d9!important;border-radius:16px!important;
 box-shadow:0 0 0 1px #0006,0 6px 18px #0005,inset 0 0 0 1px #e0b77426!important;
 transition:border-color .15s,box-shadow .15s;
}
#workPage #workHistory .ly-shift-week:hover,#workPage #workHistory .ly-shift-week[open]{border-color:#f6d08f!important;box-shadow:0 0 0 1px #0006,0 8px 24px #0006,0 0 18px #e0b77433,inset 0 0 0 1px #e0b77440!important}
html[data-theme="light"] #workPage #workHistory .ly-shift-week{border-color:#b98632!important;box-shadow:0 4px 14px #7a541722!important}

/* ---------- Sidebar: every icon keeps its coloured tile, not just the selected one ---------- */
@media(min-width:761px){
 #lyRail .ly-rail-btn[data-page]:not(.ly-rail-profile){border-radius:16px!important;background:#050505!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rail-accent,#5865f2) 45%,transparent)!important}
 #lyRail .ly-rail-btn[data-page]:not(.ly-rail-profile):hover{background:#0d0e12!important}
 #lyRail .ly-rail-btn[data-page].is-active:not(.ly-rail-profile){box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rail-accent,#5865f2) 45%,transparent),0 0 0 2px #121318,0 0 0 4px #ffffffd9!important}
 html[data-theme="light"] #lyRail .ly-rail-btn[data-page].is-active:not(.ly-rail-profile){box-shadow:0 0 0 2px #e3e5ea,0 0 0 4px #2b2f3ad9!important}
}
@media(max-width:760px){
 #lyRail .ly-rail-btn[data-page]:not(.ly-rail-profile) .ly-rail-ico{border-radius:13px!important;background:#050505!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rail-accent,#5865f2) 45%,transparent)!important}
 #lyRail .ly-rail-btn[data-page].is-active:not(.ly-rail-profile) .ly-rail-ico{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rail-accent,#5865f2) 45%,transparent),0 0 0 2px #ffffffd9!important}
}
#lyRail .ly-rail-profile img{border-radius:16px!important}
/* Home's gradient tile and Macros' old black tile now follow the same black-tile rule as the others. */
@media(min-width:761px){#lyRail .ly-rail-btn[data-page=home]:not(.ly-rail-profile){background:#050505!important}}
@media(max-width:760px){#lyRail .ly-rail-btn[data-page=home] .ly-rail-ico{background:#050505!important}}

/* Drink picker ("Other") */
.nv-dp{border:0;padding:0;background:transparent;width:min(560px,calc(100vw - 24px));max-height:90dvh;overflow:visible;color:#eaf6ff}
.nv-dp::backdrop{background:rgba(3,8,14,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.nv-dp-card{box-sizing:border-box;max-height:90dvh;display:flex;flex-direction:column;padding:22px;border-radius:22px;background:radial-gradient(120% 80% at 0% 0%,rgba(119,202,250,.18),transparent 55%),linear-gradient(160deg,rgba(24,38,52,.95),rgba(12,18,26,.96));border:1px solid rgba(169,222,252,.25);box-shadow:0 30px 70px rgba(0,0,0,.55);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.nv-dp-head{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center}
.nv-dp-ico{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;font-size:24px;background:linear-gradient(150deg,rgba(119,202,250,.3),rgba(79,166,207,.12));border:1px solid rgba(169,222,252,.35)}
.nv-dp-head h2{margin:0;font-size:20px;font-weight:800;color:#fff}.nv-dp-head p{margin:3px 0 0;font-size:13px;color:#9cb8cc}
.nv-dp .nv-dp-x{display:grid;place-items:center;width:38px;height:38px;min-height:38px!important;padding:0!important;border-radius:12px!important;border:1px solid rgba(255,255,255,.14)!important;background:rgba(255,255,255,.06)!important;color:#d8ecfa!important;box-shadow:none!important;cursor:pointer}
.nv-dp .nv-dp-x:hover{background:rgba(255,255,255,.12)!important}
.nv-dp svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.nv-dp-search{display:flex;align-items:center;gap:10px;margin:18px 0 6px;min-height:48px;padding:0 14px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:#9cb8cc}
.nv-dp-search:focus-within{border-color:rgba(119,202,250,.7);box-shadow:0 0 0 3px rgba(119,202,250,.16)}
.nv-dp .nv-dp-search input{flex:1;min-width:0;height:44px;border:0!important;background:transparent!important;color:#fff!important;font:inherit;font-size:16px;outline:none;box-shadow:none!important;padding:0!important}
.nv-dp-list{overflow:auto;margin:0 -6px;padding:0 6px 4px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}
.nv-dp-group{margin:14px 2px 8px;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#7fb2d3}
.nv-dp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.nv-dp .nv-dp-item{display:flex;align-items:center;gap:10px;min-height:54px;padding:8px 10px!important;border-radius:13px!important;border:1px solid rgba(255,255,255,.1)!important;background:rgba(255,255,255,.04)!important;color:#eaf6ff!important;text-align:left;box-shadow:none!important;cursor:pointer;transition:background .15s,border-color .15s,transform .1s}
.nv-dp .nv-dp-item:hover{background:rgba(119,202,250,.1)!important;border-color:rgba(119,202,250,.45)!important;transform:translateY(-1px)}
.nv-dp .nv-dp-item.is-picked{background:rgba(119,202,250,.16)!important;border-color:rgba(169,222,252,.7)!important}
.nv-dp-emoji{font-size:22px;line-height:1;flex:0 0 auto}
.nv-dp-item strong{display:block;font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nv-dp-item small{display:block;font-size:12px;color:#9cb8cc}
.nv-dp-item>span:last-child{min-width:0}
.nv-dp .nv-dp-add{width:100%;min-height:50px;margin-top:12px;border-radius:13px!important;border:1px dashed rgba(169,222,252,.5)!important;background:rgba(119,202,250,.06)!important;color:#a9defc!important;font:inherit;font-weight:800!important;font-size:14px!important;box-shadow:none!important;cursor:pointer}
@media(max-width:520px){.nv-dp-card{padding:18px}.nv-dp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-theme="light"] .nv-dp-card{background:radial-gradient(120% 80% at 0% 0%,rgba(79,166,207,.18),transparent 55%),linear-gradient(160deg,#ffffff,#eef6fb);border-color:rgba(29,95,128,.2);color:#0e2a38}
html[data-theme="light"] .nv-dp-head h2,html[data-theme="light"] .nv-dp .nv-dp-search input{color:#0e2a38!important}
html[data-theme="light"] .nv-dp .nv-dp-item{background:#ffffffcc!important;color:#0e2a38!important;border-color:rgba(29,95,128,.18)!important}
