body.theme-day .settings-head{background:rgba(255,255,255,.88);border-radius:12px;padding:16px 20px;margin-bottom:14px}
body.theme-day .settings-head h1{color:#123e57!important;text-shadow:none!important}
body.theme-day .settings-head small,body.theme-day .settings-head p{color:#315c73!important;text-shadow:none!important}
body:not(.theme-day) .settings-head h1{color:#f1f8ff!important}
body:not(.theme-day) .settings-head p,body:not(.theme-day) .settings-head small{color:#c8deee!important}
body.settings-large-text :is(.settings-row b,.settings-card-title h2,.sidebar button,.sidebar a,.page label,.page input,.page select,.page textarea,.page p,.page td,.page th,.open-job-card b){font-size:18px!important;line-height:1.4!important}
body.settings-large-text :is(.settings-row small,.settings-card-title p,.sidebar small,.page small,.open-job-card small){font-size:15px!important;line-height:1.4!important}
body.settings-large-text .settings-row{min-height:76px}
body.settings-large-text .settings-row select{max-width:48%;width:auto}
body.settings-high-contrast .page :is(input,select,textarea,button){border:2px solid currentColor!important}
body.settings-priority-highlight .priority-job{box-shadow:inset 5px 0 #f19900!important}

.delete-record{background:#fff4f4!important;color:#a11717!important;border:1px solid #bd5555!important;border-radius:7px;padding:8px 12px;cursor:pointer}.csr-inbox-entry{position:relative;margin-bottom:10px}.csr-inbox-entry>.csr-inbox-card{width:100%}.csr-inbox-entry>.delete-record{margin:4px 0 8px}

.csr-inbox-entry>.delete-record{position:absolute;top:8px;right:8px;margin:0;width:34px;height:34px;padding:7px;display:grid;place-items:center;z-index:1}.csr-inbox-entry>.csr-inbox-card{padding-right:52px}.delete-record:focus-visible{outline:3px solid #087aba;outline-offset:2px}

/* Notification card follows the same active theme as the page. */
#preference-alert{--notice-bg:rgba(13,37,62,.97);--notice-text:#eef7ff;--notice-muted:#c4d8ea;--notice-accent:#6dcfff;--notice-border:#4383ac;--notice-button:#214d70;position:fixed;right:20px;top:90px;width:380px;max-width:calc(100vw - 32px);box-sizing:border-box;display:flex;align-items:flex-start;gap:14px;padding:20px;border:1px solid var(--notice-border);border-left:4px solid var(--notice-accent);border-radius:18px;background:var(--notice-bg);color:var(--notice-text);z-index:99999;box-shadow:0 12px 36px #00172c40;backdrop-filter:blur(14px);font-family:inherit;text-align:left}
body.theme-day #preference-alert{--notice-bg:rgba(248,252,255,.97);--notice-text:#163b53;--notice-muted:#456379;--notice-accent:#168dd0;--notice-border:#b8d9ec;--notice-button:#e3f1fb}
#preference-alert[hidden]{display:none!important}
#preference-alert .notice-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:13px;background:var(--notice-button);color:var(--notice-accent)}
#preference-alert .notice-icon svg{width:25px;height:25px}
#preference-alert .notice-copy{min-width:0;flex:1}
#preference-alert .notice-title{display:block;color:var(--notice-text);font-size:16px;font-weight:750;line-height:1.4;margin:0 0 5px}
#preference-alert .notice-message{display:block;font-size:14px;line-height:1.55;color:var(--notice-muted);overflow-wrap:anywhere}
#preference-alert .notice-dismiss{display:block;margin:14px 0 0;padding:9px 17px;min-height:40px;border:1px solid var(--notice-border);border-radius:10px;background:var(--notice-button);color:var(--notice-text);font:inherit;font-size:13px;font-weight:700;cursor:pointer;box-shadow:none}
#preference-alert .notice-dismiss:hover{filter:brightness(1.08)}
#preference-alert .notice-dismiss:focus-visible{outline:3px solid var(--notice-accent);outline-offset:3px}
@media(max-width:600px){#preference-alert{right:16px;top:calc(76px + env(safe-area-inset-top,0px));width:calc(100vw - 32px);padding:16px;gap:12px}}

/* Day-mode switches: light off track, blue on track. */
body.theme-day #settings .settings-row input[type="checkbox"]{background:#d7e4ee!important;border-color:#8faabd!important}
body.theme-day #settings .settings-row input[type="checkbox"]::after{background:#fff;box-shadow:0 1px 3px #173b5240}
body.theme-day #settings .settings-row input[type="checkbox"]:checked{background:#087dbb!important;border-color:#087dbb!important}
body.theme-day #settings .settings-row input[type="checkbox"]:disabled{opacity:.55;cursor:not-allowed!important}
body.settings-hide-freddy #freddy-cat{display:none!important}
body.settings-custom-background #freddy-cat{display:none!important}
.freddy-costume-setting[hidden]{display:none!important}.freddy-costume-setting .settings-row-icon svg{width:22px;height:22px;display:block}

/* Per-user desktop-style background controls. */
.background-settings{margin:8px 12px 14px;padding:16px;border:1px solid rgba(91,142,171,.38);border-radius:15px;background:rgba(17,67,94,.13)}
.background-settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.background-settings-head b{display:block;font-size:13px}.background-settings-head small{display:block;margin-top:3px;color:#9eb7c6;font-size:10px}.background-account-badge{flex:0 0 auto;padding:5px 8px;border-radius:999px;background:#1487c31c;color:#65caff;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.background-preview{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:16/6;min-height:108px;max-height:190px;overflow:hidden;border:1px solid rgba(108,157,184,.45);border-radius:12px;background:linear-gradient(135deg,#0d3047,#061b2a);background-position:center;background-repeat:no-repeat;color:#9fb8c7}.background-preview::after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px #ffffff0d;pointer-events:none}.background-preview.has-image span{display:none}.background-preview span{font-size:11px;font-weight:750}
.background-controls{display:grid;grid-template-columns:auto minmax(150px,1fr) auto;align-items:end;gap:10px;margin-top:12px}.background-upload,.background-restore{display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:0 13px;border:1px solid #2c7ba5;border-radius:10px;background:#0b5683;color:#fff;font-size:11px;font-weight:800;cursor:pointer}.background-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.background-upload svg{width:18px;height:18px}.background-upload:hover,.background-restore:hover:not(:disabled){filter:brightness(1.1)}.background-layout{display:flex;flex-direction:column;gap:5px;color:#9eb7c6;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.background-layout select{width:100%;min-height:42px;padding:0 11px;border:1px solid rgba(98,147,174,.5);border-radius:10px;background:#092438;color:#edf7ff;font:inherit;font-size:11px;text-transform:none}.background-restore{background:transparent;color:#c7deeb;border-color:rgba(105,151,177,.52)}.background-restore:disabled{opacity:.42;cursor:not-allowed}.background-status{min-height:17px;margin:10px 1px 0!important;color:#9eb7c6;font-size:10px!important;line-height:1.45}.background-status.is-error{color:#ff9b9b}
body.theme-day .background-settings{background:rgba(222,240,250,.44);border-color:#b5d0df}.theme-day .background-settings-head small,.theme-day .background-layout,.theme-day .background-status{color:#58768a}.theme-day .background-account-badge{background:#dff2fc;color:#0875ad}.theme-day .background-preview{background:linear-gradient(135deg,#d9edf8,#f4faff);border-color:#accbdb;color:#58768a}.theme-day .background-layout select{background:#fff;color:#173b52;border-color:#a8c5d5}.theme-day .background-restore{color:#315b70;border-color:#9bbdce}
body.settings-custom-background .app-shell,body.settings-custom-background #home{background-color:#031321!important;background-image:linear-gradient(rgba(1,14,24,.16),rgba(1,14,24,.25)),var(--user-background-image)!important;background-position:var(--user-background-position)!important;background-size:var(--user-background-size)!important;background-repeat:var(--user-background-repeat)!important;background-attachment:fixed!important}
@media(max-width:620px){.background-settings{margin:8px 0 14px;padding:13px}.background-settings-head{align-items:flex-start;flex-direction:column}.background-controls{grid-template-columns:1fr 1fr}.background-upload{grid-column:1/-1}.background-preview{aspect-ratio:16/8}.background-restore{min-height:42px}}
