body.has-theme-background{--theme-wash:rgba(244,246,251,.72);--surface:rgba(255,255,255,.88);--bg:rgba(241,245,249,.76);min-height:100vh;background-color:#e9eef5!important;background-image:linear-gradient(var(--theme-wash),var(--theme-wash)),var(--theme-bg-image)!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;background-attachment:fixed!important}
body.dark.has-theme-background{--theme-wash:rgba(7,10,17,.72);--surface:rgba(20,25,36,.88);--bg:rgba(11,15,24,.78);--text:#f8fafc;--muted:#cbd5e1;--line:rgba(226,232,240,.22);background-color:#0b0f18!important}
body.has-theme-background header,body.has-theme-background .box,body.has-theme-background .table,body.has-theme-background .filters,body.has-theme-background .metrics article,body.has-theme-background .profile-panel,body.has-theme-background .admin-nav-submenu{backdrop-filter:blur(15px) saturate(1.14);-webkit-backdrop-filter:blur(15px) saturate(1.14);box-shadow:0 12px 34px rgba(15,23,42,.18)}
body.has-theme-background .button,body.has-theme-background button:not(.danger):not(.history-delete-x):not(.profile-close),body.has-theme-background nav .section-link.active,body.has-theme-background .admin-nav-menu[open]>summary{background:var(--primary)!important;border-color:color-mix(in srgb,var(--primary) 72%,#000)!important;color:var(--theme-primary-contrast,#fff)!important;box-shadow:0 7px 18px color-mix(in srgb,var(--primary) 38%,transparent)!important}
body.has-theme-background nav .section-link:not(.active),body.has-theme-background .admin-nav-menu>summary{background:color-mix(in srgb,var(--primary) 15%,var(--surface))!important;color:color-mix(in srgb,var(--primary) 76%,var(--text))!important;border-color:color-mix(in srgb,var(--primary) 24%,var(--line))!important}
body.has-theme-background nav .section-link:not(.active):hover{background:color-mix(in srgb,var(--primary) 27%,var(--surface))!important;color:var(--text)!important}
body.has-theme-background input,body.has-theme-background select,body.has-theme-background textarea{background:color-mix(in srgb,var(--surface) 94%,transparent);border-color:color-mix(in srgb,var(--primary) 22%,var(--line))}
body.has-theme-background .week-days article{background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 86%,#fff 14%),color-mix(in srgb,var(--primary) 84%,#000 16%))!important;border-color:color-mix(in srgb,var(--primary) 68%,var(--theme-primary-contrast))!important;color:var(--theme-primary-contrast)!important;box-shadow:0 8px 20px color-mix(in srgb,var(--primary) 38%,transparent)!important}
body.has-theme-background .week-days article span,body.has-theme-background .week-days article strong,body.has-theme-background .week-days article small,body.has-theme-background .week-days article em{color:var(--theme-primary-contrast)!important;text-shadow:0 1px 2px color-mix(in srgb,var(--theme-primary-contrast) 15%,transparent)!important}
body.has-theme-background .week-days article:hover,body.has-theme-background .week-days article:focus{background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 76%,#fff 24%),color-mix(in srgb,var(--primary) 76%,#000 24%))!important;border-color:var(--theme-primary-contrast)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 30%,transparent),0 14px 28px color-mix(in srgb,var(--primary) 48%,transparent)!important}
body.has-theme-background .week-days article.selected{background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 68%,#000 32%),color-mix(in srgb,var(--primary) 48%,#000 52%))!important;border-color:var(--theme-primary-contrast)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 34%,transparent),0 16px 34px color-mix(in srgb,var(--primary) 55%,transparent)!important}
.theme-background-trigger{position:absolute;top:50%;right:160px;z-index:10;width:40px;height:40px;padding:0!important;transform:translateY(-50%);border:1px solid var(--line)!important;background:var(--surface)!important;color:var(--text)!important;box-shadow:none!important;font-size:17px}
.theme-background-panel{position:fixed;top:76px;right:20px;z-index:5000;width:min(560px,calc(100vw - 24px));padding:18px;border:1px solid var(--line);border-radius:17px;background:var(--surface);color:var(--text);box-shadow:0 24px 70px rgba(15,23,42,.42);backdrop-filter:blur(20px) saturate(1.2);-webkit-backdrop-filter:blur(20px) saturate(1.2)}
.theme-background-panel[hidden]{display:none}.theme-background-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.theme-background-heading h2{margin:0;font-size:18px}.theme-background-heading p{margin:3px 0 0;color:var(--muted);font-size:12px}.theme-background-close{width:32px;height:32px;padding:0!important;border-radius:50%!important}
.theme-mode-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}.theme-mode-actions button{padding:9px!important}.theme-mode-actions button.is-active{outline:3px solid color-mix(in srgb,var(--primary) 25%,transparent)}.theme-mode-actions [data-use-avatar-demo]{border-color:#3287a5;background:linear-gradient(135deg,#19394c,#0a1c28);color:#d8f4ff}.theme-avatar-demo-note{display:block;margin-top:6px;font-size:10px;line-height:1.25;opacity:.82}
.theme-background-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.theme-background-option{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text)}.theme-background-option>strong{font-size:13px}.theme-background-file{display:block;padding:9px 8px;border:1px dashed color-mix(in srgb,var(--primary) 60%,var(--line));border-radius:9px;color:var(--primary);font-size:12px;font-weight:800;text-align:center;cursor:pointer}.theme-background-file input{display:none}.theme-background-state{min-height:18px;color:var(--muted);font-size:11px}.theme-background-remove{padding:7px 9px!important;background:color-mix(in srgb,var(--danger) 14%,var(--surface))!important;color:var(--danger)!important;box-shadow:none!important}.theme-background-note{margin:13px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
@media(max-width:800px){.theme-background-trigger{top:18px;right:142px;transform:none}.theme-background-panel{top:70px;right:12px}}
@media(max-width:600px){.theme-background-options{grid-template-columns:1fr}.theme-background-panel{max-height:calc(100dvh - 82px);overflow:auto}.theme-mode-actions{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){body.has-theme-background{background-attachment:scroll!important}}
