/* Shared browser-local appearance for all AlTime pages. */
.theme-toolbar{display:flex;justify-content:flex-end;margin:0 0 20px}
.theme-picker{display:inline-flex;align-items:center;gap:10px;margin:0;color:var(--muted,#8ea8c5);font:600 12px/1.5 Inter,ui-sans-serif,system-ui,sans-serif}
.theme-picker select{min-width:100px;min-height:36px;padding:6px 30px 6px 10px;border:1px solid var(--line,rgba(157,196,235,.3));border-radius:9px;background:var(--panel,#0d2038);color:var(--text,#eef6ff);font:inherit;cursor:pointer}
.theme-picker select:focus-visible{outline:2px solid var(--blue,#48aaff);outline-offset:3px}
:root[data-theme="light"]{color-scheme:light;--bg:#f3f7fc;--panel:#fff;--panel2:#eaf2fb;--line:#c5d3e3;--text:#172f48;--muted:#4c647d;--blue:#0969b5;--cyan:#08728d;--green:#16764d;--amber:#8a5700;--red:#b42338}
html[data-theme="light"] body{background:radial-gradient(ellipse at 50% -20%,#dcecff 0,transparent 50%),var(--bg);color:var(--text)}
html[data-theme="light"] :is(.panel,.card,.config-option,.detail-panel,.field,.field.is-readonly,.module-link){background:linear-gradient(145deg,#fff,#f5f9ff);border-color:var(--line);box-shadow:0 8px 24px #2347660d}
html[data-theme="light"] :is(.table-wrap,.config-text,.field-value,.field-control,.form-control,.country-input-row select,.tax-json-help pre,.tax-json-preview,.time-clock-box,.time-wheels,.login-page .item){background:#fff;color:var(--text);border-color:var(--line)}
html[data-theme="light"] :is(.button,.icon-button,.refresh,.status-pill,.live,.text-template-button,.edit-mode-button){background:#eaf2fb;color:#24577f;border-color:var(--line)}
html[data-theme="light"] :is(.button,.icon-button,.refresh,.text-template-button,.edit-mode-button):hover{background:#dbeafa;color:#123f65;border-color:var(--blue)}
html[data-theme="light"] .button.primary{background:linear-gradient(135deg,#176cb0,#12548e);color:#fff;border-color:#12548e}
html[data-theme="light"] .button.primary:hover{background:#124e82;color:#fff}
html[data-theme="light"] :is(.config-recipient,.detail-value,.field-section-heading,.tax-json-help summary,.tax-json-entries dt,.field.is-readonly label){color:#274e73}
html[data-theme="light"] :is(.field-hint,.field-value.is-empty,.save-error-hint){color:var(--muted)}
html[data-theme="light"] .field.is-readonly label{background:#eaf2fb;border-color:var(--line)}
html[data-theme="light"] :is(.customer-deactivate-button,.position-cancel-button,.required-marker,.connection-status.is-error){color:var(--red)}
html[data-theme="light"] .invoice-paid-button{color:var(--text)}
html[data-theme="light"] .invoice-paid-button .paid-check{stroke:var(--green)}
html[data-theme="light"] .position-save-button{color:var(--green)}
html[data-theme="light"] .connection-status.is-warning{color:var(--amber)}
html[data-theme="light"] :is(.invoice-run-dialog,.tax-json-dialog-header,.sso-menu-dialog){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-theme="light"] :is(.sso-menu-header h2,.sso-menu-link,.sso-menu-status){color:var(--text)}
html[data-theme="light"] .sso-menu-link{background:#f3f7fc;border-color:var(--line)}
html[data-theme="light"] .sso-menu-link small{color:var(--muted)}
html[data-theme="light"] :is(.sso-menu-link:hover,.sso-menu-link[aria-current=page],.sso-controls button.sso-icon-button:hover,.sso-menu-dialog button.sso-icon-button:hover){background:#dbeafa;color:var(--text);border-color:var(--blue)}
html[data-theme="light"] :is(.config-error,.save-error-box){background:#fff0f2;color:var(--red);border-color:#d58b96}
html[data-theme="light"] :is(.save-error-title,.save-error-message){color:#912338}
html[data-theme="light"] .clock-wheel-option{color:#56718a}
html[data-theme="light"] .clock-wheel-option.is-selected{color:#123f65}
html[data-theme="light"] .clock-wheel-body:after{color:var(--blue)}
html[data-theme="light"] .login-page .registration-link a{color:var(--blue)}
html[data-theme="light"] .module-laser-head{stroke:var(--blue)}
/* The standalone XML checker uses its own layout and needs both palettes. */
html[data-theme] body.zugferd-check-page{background:var(--bg);color:var(--text)}
html[data-theme] .zugferd-check-page main{background:var(--panel);border-color:var(--line)}
.zugferd-check-page .theme-toolbar{padding:16px 24px;margin:0}
html[data-theme] .zugferd-check-page :is(.upload-box,.result-card,textarea){background:var(--panel2);color:var(--text);border-color:var(--line)}
html[data-theme] .zugferd-check-page :is(.result-card h2,#status,.hint,input[type=file],.result-state.pending){color:var(--muted)}
html[data-theme] .zugferd-check-page .result-state.valid{color:var(--green)}
html[data-theme] .zugferd-check-page .result-state.invalid{color:var(--red)}
html[data-theme] .zugferd-check-page .result-state.warning{color:var(--amber)}
:root[data-theme="dark"]{color-scheme:dark;--bg:#071629;--panel:#0d2038;--panel2:#102945;--line:rgba(157,196,235,.13);--text:#eef6ff;--muted:#8ea8c5;--blue:#48aaff;--cyan:#69dcff;--green:#51dfb0;--amber:#ffca72;--red:#ff8290}

.theme-toolbar{align-items:center;gap:14px;flex-wrap:wrap}
.theme-feedback{max-width:440px;color:var(--muted);font-size:12px}
.theme-picker select{min-width:150px}
:root[data-theme="fancy"]{color-scheme:dark;--bg:#100e29;--panel:#211d43;--panel2:#302858;--line:#605185;--text:#f6f0ff;--muted:#bdb3d7;--blue:#b3a0ff;--cyan:#78e9df;--green:#6ee7b7;--amber:#ffd38c;--red:#ffa6b4}
html[data-theme="fancy"] body{background:radial-gradient(ellipse at 8% 5%,#52318677,transparent 45%),radial-gradient(ellipse at 96% 25%,#0c827344,transparent 45%),radial-gradient(ellipse at 50% 95%,#75254a33,transparent 50%),var(--bg);background-attachment:fixed;color:var(--text)}
html[data-theme="fancy"] :is(.panel,.card,.config-option,.detail-panel,.field,.field.is-readonly,.module-link){background:linear-gradient(135deg,#342856e8,#171c37ed);border-color:#78619c88;box-shadow:0 14px 40px #06051a55,inset 0 1px 0 #e1bdff1a}
html[data-theme="fancy"] .module-grid{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
html[data-theme="fancy"] .module-link{min-height:166px;max-width:none;padding:26px 64px 26px 26px;border-radius:22px;overflow:hidden}
html[data-theme="fancy"] .module-link::before{content:"";position:absolute;right:-30px;top:-70px;width:180px;height:180px;background:radial-gradient(circle,#b47bff29,transparent 68%);pointer-events:none}
html[data-theme="fancy"] .module-link:nth-child(3n+2){background:linear-gradient(135deg,#183b45ed,#1c1c3ced);border-color:#78e9df55}
html[data-theme="fancy"] .module-link:nth-child(3n){background:linear-gradient(135deg,#402747ed,#201b3fed);border-color:#e9a1cb55}
html[data-theme="fancy"] .module-link:hover,html[data-theme="fancy"] .module-link:focus-visible{box-shadow:0 18px 45px #08041e88,0 0 24px #b48dff2e;border-color:var(--cyan);transform:translateY(-3px)}
html[data-theme="fancy"] .title{background:linear-gradient(100deg,#fff 5%,#d7b7ff 48%,#78e9df 95%);background-clip:text;-webkit-background-clip:text;color:transparent}
html[data-theme="fancy"] .eyebrow{letter-spacing:.22em}
html[data-theme="fancy"] .module-tag{align-self:flex-start;padding:3px 9px;border:1px solid #78e9df44;background:#78e9df0c;border-radius:99px;font-size:10px}
html[data-theme="fancy"] .module-arrow{display:grid;place-items:center;width:34px;height:34px;border:1px solid #b3a0ff55;border-radius:50%;font-size:21px;right:20px}
html[data-theme="fancy"] :is(.table-wrap,.config-text,.field-value,.field-control,.form-control,.country-input-row select,.tax-json-help pre,.tax-json-preview,.time-clock-box,.time-wheels,.login-page .item){background:#14152e;color:var(--text);border-color:var(--line)}
html[data-theme="fancy"] :is(.button,.icon-button,.refresh,.status-pill,.live,.text-template-button,.edit-mode-button){background:#2b2549;color:#e0d5ff;border-color:var(--line)}
html[data-theme="fancy"] :is(.button,.icon-button,.refresh,.text-template-button,.edit-mode-button):hover{background:#443265;border-color:var(--cyan);color:#fff}
html[data-theme="fancy"] .button.primary{background:linear-gradient(125deg,#6446ab,#335d85);color:#fff;border-color:#b3a0ff}
html[data-theme="fancy"] :is(.invoice-run-dialog,.tax-json-dialog-header,.sso-menu-dialog){background:#211d3c;color:var(--text);border-color:var(--line)}
html[data-theme="fancy"] :is(.sso-menu-header h2,.sso-menu-link,.sso-menu-status){color:var(--text)}
html[data-theme="fancy"] .sso-menu-link{background:#2d284a;border-color:var(--line)}
html[data-theme="fancy"] .sso-menu-link small{color:var(--muted)}
html[data-theme="fancy"] :is(.sso-menu-link:hover,.sso-menu-link[aria-current=page],.sso-controls button.sso-icon-button:hover,.sso-menu-dialog button.sso-icon-button:hover){background:#443265;color:#fff;border-color:var(--cyan)}
html[data-theme="fancy"] .theme-picker select{background:linear-gradient(125deg,#45315f,#203b4b);border-color:#a78bfa;color:#f6f0ff;box-shadow:0 0 20px #9b7bff1a}
html[data-theme="fancy"] .theme-picker option{background:#211d43;color:#f6f0ff}
html[data-theme="fancy"] .zugferd-check-page header{background:linear-gradient(115deg,#51317c,#176b71)}
@media(max-width:680px){html[data-theme="fancy"] .module-grid{grid-template-columns:1fr;gap:12px}html[data-theme="fancy"] .module-link{min-height:148px;padding:22px 62px 22px 22px}}
@media(prefers-reduced-motion:reduce){html[data-theme="fancy"] .module-link{transition:none;transform:none}}
