/* Shared colour and action system, for both appearance modes. */
.sanctioned-mapping-dialog{width:min(960px,94vw);max-width:960px;max-height:90vh}
.sanctioned-mapping-dialog[open],.sanctioned-mapping-dialog form{display:flex;flex-direction:column;overflow:hidden}
.sanctioned-mapping-dialog form{max-height:calc(90vh - 44px)}
.sanctioned-mapping-body{overflow:auto;min-height:0;position:relative;padding:2px 4px}
.sanctioned-mapping-dialog fieldset{border:0;padding:0;margin:0 0 14px;min-width:0}
.sanctioned-mapping-dialog .wide{grid-column:1/-1}
.sanctioned-mapping-dialog .dialog-heading,.sanctioned-mapping-dialog .dialog-actions{flex-shrink:0}
.sanctioned-mapping-dialog .dialog-actions{margin-top:14px;flex-wrap:wrap}
.sanctioned-mapping-dialog .mapping-confirm{display:flex;gap:10px;align-items:flex-start;margin-top:14px;line-height:23px}
.mapping-confirm input{width:18px;height:18px;flex:none;margin-top:3px}
.sanctioned-mapping-dialog .table-wrap{max-height:260px;overflow:auto}
.sanctioned-mapping-dialog th{position:sticky;top:0;background:var(--panel)}
.return-state{display:inline-flex;align-items:center;border:1px solid currentColor;border-radius:999px;padding:2px 8px;font-size:12px;line-height:18px;font-weight:700;white-space:nowrap}
.return-state[data-state=awaiting_review]{color:#93c5fd;background:#3b82f624}
.return-state[data-state=accepted]{color:#6ee7b7;background:#10b98124}
.return-state[data-state=draft]{color:#fcd34d;background:#f59e0b20}
.return-state[data-state=returned]{color:#fda4af;background:#f43f5e20}
.return-state[data-state=missing]{color:#cbd5e1;background:#94a3b81a}
:root[data-theme=light] .return-state[data-state=awaiting_review]{color:#1e40af}
:root[data-theme=light] .return-state[data-state=accepted]{color:#065f46}
:root[data-theme=light] .return-state[data-state=draft]{color:#854d0e}
:root[data-theme=light] .return-state[data-state=returned]{color:#9f1239}
:root[data-theme=light] .return-state[data-state=missing]{color:#475569}
.daily-status-cell[data-report-state=awaiting_review]{background:#3b82f615;border-left:3px solid #60a5fa}
.daily-status-cell[data-report-state=accepted]{background:#10b98115;border-left:3px solid #34d399}
.daily-return-label{margin-top:5px}
.return-state-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}
:root[data-theme=dark]{--accent-blue:#60a5fa;--accent-violet:#c4b5fd;--accent-teal:#5eead4;--accent-amber:#fcd34d;--panel-tint:#122840;--action-blue:#245bc2;--action-teal:#087b69;--action-violet:#6941c6;--action-amber:#916000;--action-red:#b33252;--action-neutral:#364b68}
:root[data-theme=light]{--accent-blue:#2563eb;--accent-violet:#7c3aed;--accent-teal:#0f766e;--accent-amber:#a16207;--panel-tint:#eaf2ff;--action-blue:#245bc2;--action-teal:#087b69;--action-violet:#6941c6;--action-amber:#916000;--action-red:#b33252;--action-neutral:#465d79}
:root[data-theme] body{background:radial-gradient(ellipse at 0 0,color-mix(in srgb,var(--accent-blue) 10%,transparent),transparent 45%),radial-gradient(ellipse at 100% 0,color-mix(in srgb,var(--accent-violet) 9%,transparent),transparent 45%),var(--bg)}
:root[data-theme] .panel{border-radius:12px;border-left:3px solid var(--accent-blue);background:linear-gradient(115deg,color-mix(in srgb,var(--accent-blue) 4%,var(--panel)),var(--panel) 40%)}
:root[data-theme] .panel:nth-of-type(3n+2){border-left-color:var(--accent-violet)}
:root[data-theme] .panel:nth-of-type(3n){border-left-color:var(--accent-teal)}
:root[data-theme] .navbar{border-bottom:2px solid var(--accent-blue);background:linear-gradient(110deg,var(--header),color-mix(in srgb,var(--accent-violet) 9%,var(--header)))}
:root[data-theme] .linkbar a{border-radius:8px;transition:background .15s,color .15s}
:root[data-theme] .linkbar a.active{background:var(--action-blue);color:#fff;box-shadow:none}
:root[data-theme] th{background:color-mix(in srgb,var(--accent-blue) 13%,var(--panel2));color:var(--text)}
:root[data-theme] tbody tr:nth-child(even){background:color-mix(in srgb,var(--accent-blue) 3%,var(--panel))}
:root[data-theme] button,:root[data-theme] .button{border-radius:8px;background:var(--action-blue);border-color:color-mix(in srgb,var(--action-blue) 65%,white);color:#fff;box-shadow:0 3px 8px #00000014;transition:filter .15s,transform .15s}
:root[data-theme] button:hover,:root[data-theme] .button:hover{background:var(--action-blue);color:#fff;filter:brightness(1.15);border-color:var(--accent-blue)}
:root[data-theme] button:active,:root[data-theme] .button:active{transform:translateY(1px)}
:root[data-theme] .primary,:root[data-theme] .action-tone-teal{background:var(--action-teal);color:#fff;border-color:var(--accent-teal)}
:root[data-theme] .amber,:root[data-theme] .action-tone-amber{background:var(--action-amber);color:#fff;border-color:var(--accent-amber)}
:root[data-theme] .danger,:root[data-theme] .action-tone-red{background:var(--action-red);color:#fff;border-color:#ee819c}
:root[data-theme] .action-tone-violet{background:var(--action-violet);border-color:var(--accent-violet)}
:root[data-theme] .action-tone-neutral{background:var(--action-neutral);border-color:var(--border)}
:root[data-theme] .action-tone-blue{background:var(--action-blue);border-color:var(--accent-blue)}
:root[data-theme] .primary:hover,:root[data-theme] .action-tone-teal:hover{background:var(--action-teal)}
:root[data-theme] .danger:hover,:root[data-theme] .action-tone-red:hover{background:var(--action-red)}
:root[data-theme] .amber:hover,:root[data-theme] .action-tone-amber:hover{background:var(--action-amber)}
:root[data-theme] .action-tone-violet:hover{background:var(--action-violet)}
:root[data-theme] .action-tone-neutral:hover{background:var(--action-neutral)}
:root[data-theme] .action-tone-blue:hover{background:var(--action-blue)}
.action-icon{width:19px;height:19px;flex:0 0 19px;pointer-events:none}
.action-caption,.action-only .sr-only{pointer-events:none}
:root[data-theme] .action-only{width:38px;min-width:38px;min-height:38px;height:38px;padding:8px;font-size:14px;border-radius:9px;flex:0 0 auto}
:root[data-theme] .action-with-label{gap:7px;min-height:38px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:root[data-theme] dialog{border-radius:16px;border:1px solid var(--accent-blue);box-shadow:0 24px 100px #0006}
:root[data-theme] .number-step{background:var(--panel2);color:var(--text);box-shadow:none;transform:none;border-radius:0}
:root[data-theme] .password-toggle,:root[data-theme] .theme-toggle{background:var(--panel2);color:var(--text)}
@media(prefers-reduced-motion:reduce){button,.button,.linkbar a{transition:none!important;transform:none!important}}
@media(max-width:700px){:root[data-theme] .account .action-only{width:34px;min-width:34px;height:34px;min-height:34px}.action-icon{width:18px;height:18px;flex-basis:18px}}
