/* Saved device preference overrides the operating system theme. */
:root[data-theme="light"],:root[data-theme="light"] #kupol-calendar{color-scheme:light}
:root[data-theme="dark"],:root[data-theme="dark"] #kupol-calendar{color-scheme:dark}
:root{--theme-page:#edf0f5;--theme-surface:#fff;--theme-raised:#f5f7fb;--theme-line:#d8e0ec;--theme-text:#293d57;--theme-muted:#65758c;--theme-accent:#2268c8;--theme-glow:transparent}
:root[data-theme="dark"]{--theme-page:#1a202b;--theme-surface:#212733;--theme-raised:#293241;--theme-line:#384456;--theme-text:#edf2fa;--theme-muted:#a8b7cc;--theme-accent:#91bcfa;--theme-glow:#91bcfa17}
body{background:var(--theme-page);color:var(--theme-text);transition:background-color .18s ease,color .18s ease}
.theme-bar{display:flex;align-items:center;justify-content:flex-end;gap:20px;padding:14px 28px;border-bottom:1px solid var(--theme-line);background:var(--theme-page)}
.theme-choice{display:flex;gap:3px;padding:4px;border:1px solid var(--theme-line);border-radius:11px;background:var(--theme-surface)}.theme-choice button{display:flex;align-items:center;gap:8px;min-height:32px;padding:6px 12px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--theme-muted);font-size:12px}.theme-choice button[aria-pressed="true"]{background:var(--theme-raised);color:var(--theme-accent);border-color:var(--theme-line);box-shadow:0 2px 6px #0000000a}.theme-choice button:focus-visible{outline:2px solid var(--theme-accent);outline-offset:3px}.theme-choice svg{height:16px;width:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#workspace{padding:0 22px 24px}.account-bar{padding:18px 4px;gap:12px}.account-bar button{border-radius:7px}.account-bar span:first-child{font-size:13px}.connection{display:inline-flex;align-items:center;gap:9px;color:var(--theme-muted);min-height:24px}.connection:before{content:'';flex:none;width:15px;height:15px;border:2px solid #53677f;border-top-color:#91bcfa;border-radius:50%;animation:theme-ring 1.2s linear infinite}.connection[data-connection="online"]:before{border-color:#67d3a6;box-shadow:0 0 10px #67d3a62b;animation:none}.connection[data-connection="offline"]:before{border-color:#e8bc70;box-shadow:0 0 12px #e8bc7026;animation:none}
html[data-theme="dark"] #kupol-calendar{--bg:#212733;--text:#edf2fa;--muted:#a8b7cc;--line:#364153;--soft:#262f3d;--blue:#368ec1;--green:#287959;--red:#a3424e;--grey:#626d7f;--bartext:#fff;border-radius:12px;box-shadow:0 14px 45px #00000016;overflow:clip}
html[data-theme="dark"] #kupol-calendar .kc-top{padding:23px 24px;background:linear-gradient(110deg,#253040 0,#212733 65%)}
html[data-theme="dark"] #kupol-calendar .kc-brand{letter-spacing:3.4px;color:#f0f5ff;text-shadow:0 0 24px #91bcfa24}
html[data-theme="dark"] #kupol-calendar .kc-btn{border-radius:7px;background:#242d3b;transition:border-color .15s,background-color .15s}
html[data-theme="dark"] #kupol-calendar .kc-btn:hover{border-color:#607b9c;background:#2c394b}
html[data-theme="dark"] #kupol-calendar .kc-primary,html[data-theme="dark"] #kupol-calendar .kc-view-nav .kc-btn[aria-pressed="true"]{background:#91bcfa;color:#17283f;border-color:#91bcfa;box-shadow:0 0 18px #91bcfa13}
html[data-theme="dark"] #kupol-calendar .kc-primary:hover{background:#acd0ff}
html[data-theme="dark"] #kupol-calendar .kc-view-nav{padding-top:16px;padding-bottom:16px}
html[data-theme="dark"] #kupol-calendar .kc-field,html[data-theme="dark"] #kupol-calendar .kc-month,html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#1d2531;border-color:#3a485e;color:#edf2fa;border-radius:7px}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#8e9eb6;opacity:1}
html[data-theme="dark"] #kupol-calendar .kc-field:focus,html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{outline:2px solid #91bcfa;outline-offset:1px;box-shadow:0 0 0 5px #91bcfa10}
html[data-theme="dark"] #kupol-calendar .kc-board th{background:#222b39;color:#bdcbe0;padding-top:10px;padding-bottom:10px}
html[data-theme="dark"] #kupol-calendar .kc-board th.weekend{background:#293446;color:#8ebeff}
html[data-theme="dark"] #kupol-calendar .kc-board th.today{color:#ffa3a7;background:#3d2c37}
html[data-theme="dark"] #kupol-calendar .kc-now{background:#f9828c;box-shadow:0 0 6px #f9828c40}
html[data-theme="dark"] #kupol-calendar .kc-group td{background:#2b3545}
html[data-theme="dark"] #kupol-calendar .kc-group button{padding-top:13px;padding-bottom:13px;color:#dce7f7}
html[data-theme="dark"] #kupol-calendar .kc-group small{color:#a7b6ce}
html[data-theme="dark"] #kupol-calendar .kc-bar{border:1px solid #ffffff0f;border-radius:5px;font-weight:550;box-shadow:inset 0 1px #ffffff13}
html[data-theme="dark"] #kupol-calendar .kc-bar:hover{filter:brightness(1.13);box-shadow:0 0 0 2px #212733,0 0 0 3px #a4caff}
html[data-theme="dark"] #kupol-calendar .kc-popup{background:#293343;border-color:#4c5f7b;box-shadow:0 12px 35px #0006;border-radius:10px}
html[data-theme="dark"] #kupol-calendar .kc-drawer{background:#212936;border-color:#41516a;box-shadow:-15px 0 40px #0005}
html[data-theme="dark"] #kupol-calendar .kc-shade{background:#080e187a}
html[data-theme="dark"] #kupol-calendar .kc-private-note,html[data-theme="dark"] .kr-review-note{background:#3a3325;color:#f1d49e;border-color:#d6af60}
html[data-theme="dark"] .kc-paused,html[data-theme="dark"] .kr-warning{color:#f1c878}html[data-theme="dark"] .kc-issued{color:#87d8b0}
html[data-theme="dark"] .kc-order-history li{border-color:#364153}html[data-theme="dark"] .kc-order-history time{color:#a8b7cc}
html[data-theme="dark"] .kr-badge{background:#354256;color:#d6e1f4}html[data-theme="dark"] .kr-badge.submitted{background:#2c4260;color:#b1d1ff}html[data-theme="dark"] .kr-badge.returned{background:#473b27;color:#f4d293}html[data-theme="dark"] .kr-badge.approved{background:#284738;color:#a6e2bf}html[data-theme="dark"] .kr-error{color:#ffadb3}html[data-theme="dark"] .kr-actions a{color:#bdd8ff;text-decoration:none}
html[data-theme="dark"] .login-card,html[data-theme="dark"] dialog{background:#212733;border-color:#3c4a60;box-shadow:0 20px 70px #0004}
html[data-theme="dark"] #kupol-update-bar{background:#293e59;color:#dfebff;border-bottom:1px solid #446080}html[data-theme="dark"] #kupol-update-bar button{background:#91bcfa;color:#17283f}
html[data-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}html[data-theme="dark"] ::-webkit-scrollbar-track{background:#1c2330}html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#53637c;border:2px solid #1c2330;border-radius:10px}html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#6e829f}
@keyframes theme-ring{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){body{transition:none}.connection:before{animation:none}}
@media(max-width:650px){.theme-bar{padding:12px 14px;gap:8px}.theme-choice button{padding:6px 9px}#workspace{padding:0 10px 14px}.account-bar{gap:10px}.connection{order:3;flex-basis:100%}html[data-theme="dark"] #kupol-calendar .kc-top{padding:18px 16px}}
