/* ServiDesk UX 2.1 - progressive layer over existing style.css and Bootstrap 5.3.9 */
:root {--sd-accent:#608ef3;--sd-accent-rgb:96,142,243;--bs-primary:#608ef3;--bs-primary-rgb:96,142,243}
html[data-sd-accent="teal"] {--sd-accent:#14b8a6;--sd-accent-rgb:20,184,166;--bs-primary:#14b8a6;--bs-primary-rgb:20,184,166}
html[data-sd-accent="violet"] {--sd-accent:#9876ee;--sd-accent-rgb:152,118,238;--bs-primary:#9876ee;--bs-primary-rgb:152,118,238}
html[data-theme="light"] {
 color-scheme:light;--ink:#172740;--muted:#64748b;--line:#dce5ef;--blue:#2758b5;
 --blue2:#ebf2ff;--canvas:#f4f7fb;--white:#fff;--nav:#14233b;--green:#047857;--red:#b91c3b;--amber:#92610c;
 --shadow:0 8px 24px rgba(21,41,73,.065);
 --bs-body-bg:#f4f7fb;--bs-body-color:#172740;--bs-border-color:#dce5ef;--bs-secondary-color:#64748b;
}
html[data-theme="dark"] {--bs-body-bg:var(--canvas);--bs-body-color:var(--ink);--bs-border-color:var(--line);--bs-secondary-color:var(--muted)}
body {font-size:14px;line-height:1.52;-webkit-font-smoothing:antialiased}
.workspace {max-width:1660px;width:100%;margin:0 auto}
.card,.metric {border-radius:15px;box-shadow:var(--shadow)}
.card {border:1px solid var(--line)}
.topbar {min-height:86px}
.btn:not(.ghost):not(.danger) {background:var(--sd-accent);color:#fff;border-color:transparent}
.btn:not(.ghost):not(.danger):hover {filter:brightness(1.08);background:var(--sd-accent);color:#fff}
.nav-item.selected {border-left:3px solid var(--sd-accent)}
.field input:focus,.field select:focus,.field textarea:focus {border-color:var(--sd-accent);box-shadow:0 0 0 3px rgba(var(--sd-accent-rgb),.16)}
.sd-theme-toolbar {display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.sd-theme-toggle,.sd-accent-label select {min-height:36px;padding:6px 12px;border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:9px;cursor:pointer;font-weight:600;font-size:12px}
.sd-theme-toggle:focus-visible,.sd-accent-label select:focus-visible {outline:2px solid var(--sd-accent);outline-offset:2px}
.sd-accent-label {display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.sd-login-themes {position:fixed;top:14px;right:14px;z-index:10;background:var(--white);padding:7px 9px;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.sd-cep-section {grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:11px 14px;background:rgba(var(--sd-accent-rgb),.09);border:1px solid rgba(var(--sd-accent-rgb),.19);border-radius:9px;margin:5px 0 0}
.sd-cep-section b {font-size:13px;color:var(--ink)}
.sd-cep-section small {font-size:12px;color:var(--muted)}
.sd-cep-hint {grid-column:1/-1;font-size:12px;color:var(--muted);min-height:20px;margin-top:-5px}
.sd-cep-hint[data-status="success"] {color:var(--green)}
.sd-cep-hint[data-status="error"] {color:var(--red)}
.sd-cep-hint[data-status="loading"] {color:var(--sd-accent)}
.field [data-sd-cep] {font-variant-numeric:tabular-nums}
html[data-theme="light"] body,html[data-theme="light"] .main,html[data-theme="light"] .workspace,html[data-theme="light"] .topbar {color:var(--ink);background:var(--canvas)}
html[data-theme="light"] .topbar {background:#fff;border-color:var(--line)}
html[data-theme="light"] .topright,html[data-theme="light"] .foot,html[data-theme="light"] .muted {color:var(--muted)}
html[data-theme="light"] .card,html[data-theme="light"] .metric,html[data-theme="light"] .subtle,html[data-theme="light"] .metric-input-group,html[data-theme="light"] .signature-area,html[data-theme="light"] .photos-upload {background:#fff;color:var(--ink);border-color:var(--line)}
html[data-theme="light"] .field>span,html[data-theme="light"] .field span {color:#3c506c}
html[data-theme="light"] .field input,html[data-theme="light"] .field select,html[data-theme="light"] .field textarea,html[data-theme="light"] .share-link {color:#172740;background:#fff;border-color:#bdcbdc;color-scheme:light}
html[data-theme="light"] .field input::placeholder,html[data-theme="light"] .field textarea::placeholder {color:#7c8da4}
html[data-theme="light"] .field input:focus,html[data-theme="light"] .field select:focus,html[data-theme="light"] .field textarea:focus {border-color:var(--sd-accent)}
html[data-theme="light"] select option {background:#fff;color:#172740}
html[data-theme="light"] table th {background:#eff3f9;color:#455c78;border-color:var(--line)}
html[data-theme="light"] table td {background:transparent;color:var(--ink);border-color:var(--line)}
html[data-theme="light"] table tbody tr:hover {background:#f4f7fd}
html[data-theme="light"] .table-wrap {border-color:var(--line)}
html[data-theme="light"] .pill {background:#ebf2ff;color:#315d9d}
html[data-theme="light"] .btn.ghost {background:#edf3fc;color:#31558a;border-color:#c9d8ef}
html[data-theme="light"] .btn.ghost:hover {background:#dceaff;color:#163d7a}
html[data-theme="light"] .notice {background:#fff7e6;border-color:#e7cd8e;color:#855e17}
html[data-theme="light"] .notice.success {background:#e8f7f0;border-color:#a5dcc4;color:#186f4b}
html[data-theme="light"] .status {background:#ecf1fa;color:#344f71}
html[data-theme="light"] .s-scheduled {background:#e1edff;color:#2455a6}
html[data-theme="light"] .s-in_progress {background:#fff0d4;color:#825300}
html[data-theme="light"] .s-awaiting_review {background:#f0e8ff;color:#6543a2}
html[data-theme="light"] .s-approved,html[data-theme="light"] .s-paid {background:#def9ec;color:#166746}
html[data-theme="light"] .s-pending,html[data-theme="light"] .s-cancelled {background:#ffe5e9;color:#a12846}
html[data-theme="light"] .cal-day,html[data-theme="light"] .cal-day.empty {background:#fff;border-color:var(--line)}
html[data-theme="light"] .cal-day strong {color:#243d60}
html[data-theme="light"] .cal-day a {background:#e6f0ff;color:#28599b}
html[data-theme="light"] .cal-day a.s-approved {background:#d9f6e9;color:#166b4b}
html[data-theme="light"] .cal-day a.s-in_progress {background:#fff0cc;color:#815000}
html[data-theme="light"] .cal-day a.s-pending {background:#ffe5eb;color:#943a4b}
html[data-theme="light"] .cal-day a.s-awaiting_review {background:#eee6ff;color:#613f9b}
html[data-theme="light"] .sd-field-final,html[data-theme="light"] .sd-field-hero {color:#f6f8ff}
html[data-theme="light"] .sd-field-final p,html[data-theme="light"] .sd-field-hero p {color:#d8e9ff}
html[data-theme="light"] .sd-gps-record {background:#f4f8ff;border-color:#cdd9ea}
html[data-theme="light"] .sd-gps-record strong {color:#172740}
html[data-theme="light"] .sd-gps-record span {color:#64748b}
html[data-theme="light"] .auth {background:radial-gradient(circle at 15% 15%,#e4ebff,transparent 48%),linear-gradient(125deg,#f7faff,#e7effb)}
html[data-theme="light"] .auth .card {background:#fff;color:#172740;border-color:#dce5ef}
html[data-theme="light"] .auth p {color:#64748b}
html[data-theme="light"] .photo,html[data-theme="light"] .photo-preview-grid figure {background:#f7f9fc;border-color:#dce5ef}
html[data-theme="light"] .photo figcaption,html[data-theme="light"] .photo-preview-grid figcaption {color:#526c89}
@media(max-width:900px){.sd-theme-toolbar {gap:6px}.topright{display:flex;flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:650px){.sd-theme-toolbar {width:100%;justify-content:flex-start}.sd-theme-toggle,.sd-accent-label select{min-height:40px}.sd-login-themes{top:8px;right:8px}}
@media print {.sd-theme-toolbar,.sd-login-themes{display:none!important}html[data-theme="dark"]{color-scheme:light} }
/* The existing password reveal control has inline dark colors. Keep it legible in light mode. */
html[data-theme="light"] .sd-password-reveal [data-sd-password-toggle] {background:#eaf2ff!important;color:#214d87!important;border-color:#bfd0e7!important}
