/* Visual refresh only: keep the existing page grid, navigation and panel positions. */
html.crm-modern {
    --app-bg: #17222d;
    --app-nav-glass: rgba(26, 38, 52, .58);
    --app-nav-border: rgba(180, 196, 232, .38);
    --app-nav-sheen: rgba(255, 255, 255, .16);
    --app-nav-control: rgba(255, 255, 255, .06);
    --app-nav-control-border: rgba(190, 204, 238, .26);
    --app-nav-text: #dbe3f0;
    --app-panel: #1e2a37;
    --app-raised: #243140;
    --app-field: #243140;
    --app-line: #334151;
    --app-text: #e7ecf3;
    --app-muted: #9aa8b9;
    --app-faint: #7c8fa5;
    --app-accent: #7b73e4;
    --app-purple: #a39afa;
    --app-green: #6bc9a5;
    --app-amber: #e6c879;
    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--app-text);
    --bs-border-color: var(--app-line);
    --bs-secondary-color: var(--app-muted);
    --bs-tertiary-bg: var(--app-raised);
    color-scheme: dark;
}
html.crm-modern[data-bs-theme="light"] {
    --app-bg: #f3f5f9;
    --app-nav-glass: rgba(255, 255, 255, .52);
    --app-nav-border: rgba(147, 160, 206, .5);
    --app-nav-sheen: rgba(255, 255, 255, .85);
    --app-nav-control: rgba(255, 255, 255, .42);
    --app-nav-control-border: rgba(141, 156, 199, .32);
    --app-nav-text: #242930;
    --app-panel: #fff;
    --app-raised: #f7f8fc;
    --app-field: #f7f8fb;
    --app-line: #dce3ed;
    --app-text: #111318;
    --app-muted: #242930;
    --app-faint: #343c47;
    --app-accent: #675bc8;
    --app-purple: #463494;
    --app-green: #075334;
    --app-amber: #684606;
    color-scheme: light;
}
html.crm-modern[data-bs-theme="dark"] {
    --crm-dark-bg: var(--app-bg);
    --crm-dark-surface: var(--app-panel);
    --crm-dark-elevated: var(--app-raised);
    --crm-dark-soft: var(--app-field);
    --crm-dark-border: var(--app-line);
    --crm-dark-text: var(--app-text);
    --crm-dark-muted: var(--app-muted);
    --crm-dark-blue: var(--app-purple);
    --crm-dark-green: var(--app-green);
    --av-bg: var(--app-bg);
    --av-panel: var(--app-panel);
    --av-soft: var(--app-raised);
    --av-border: var(--app-line);
    --av-text: var(--app-text);
    --av-muted: var(--app-muted);
    --av-accent: var(--app-accent);
}
html.crm-modern .app-shell {
    margin: 0;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    letter-spacing: .005em;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
.crm-modern button, .crm-modern input, .crm-modern select, .crm-modern textarea { font-family: inherit; }
.crm-modern :focus-visible { outline: 2px solid var(--app-purple); outline-offset: 3px; }
.crm-modern a { color: var(--app-purple); text-underline-offset: 3px; }
.crm-modern .app-shell .text-muted, .crm-modern .app-shell .text-body-secondary, .crm-modern .app-shell .form-text { color: var(--app-muted) !important; }
.crm-modern .app-shell .text-body { color: var(--app-text) !important; }
.crm-modern .app-shell .text-success { color: var(--app-green) !important; }
.crm-modern .app-shell .bg-white, .crm-modern .app-shell .bg-light { background-color: var(--app-panel) !important; }
/* Liquid-glass navigation: clear edges, a moving reflection, and unchanged menu geometry. */
.crm-modern .app-shell .crm-navbar {
    --glass-x: 50%;
    --glass-y: 0%;
    background:
        radial-gradient(240px 100px at var(--glass-x) var(--glass-y), #ffffff65, transparent 78%),
        linear-gradient(180deg, #ffffff52 0%, #ffffff08 42%, transparent 60%, #ffffff20 100%),
        linear-gradient(115deg, transparent 8%, #ffffff30 20%, transparent 36%, transparent 70%, #ffffff20 86%, transparent 100%),
        linear-gradient(115deg, #ffffff26 0%, #ffffff08 30%, transparent 52%, #ffffff18 100%),
        radial-gradient(ellipse at 12% 0%, #a696f542, transparent 52%),
        radial-gradient(ellipse at 88% 100%, #7fcaeb2e, transparent 48%),
        var(--app-nav-glass) !important;
    border-bottom: 1px solid var(--app-nav-border);
    border-radius: 0 0 16px 16px;
    box-shadow: inset 0 1px 0 var(--app-nav-sheen), inset 1px 0 0 #ffffff66, inset -1px 0 0 #ffffff55, inset 0 -2px 1px #ffffff99, 0 2px 4px #24335b0a, 0 8px 24px #24335b1a;
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    backdrop-filter: blur(28px) saturate(150%);
    position: relative;
    z-index: 1030;
}
.crm-modern .app-shell .crm-navbar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 2px 3px #ffffff55, inset 0 -5px 8px #ffffff24;
}
.crm-modern .app-shell .crm-navbar .btn-outline-light,
.crm-modern .app-shell .crm-navbar .crm-navbar-city .form-select {
    background-color: var(--app-nav-control);
    border-color: var(--app-nav-control-border);
    color: var(--app-nav-text);
    border-radius: 12px;
    background-image: linear-gradient(160deg, #ffffff40, transparent 48%, #ffffff14);
    box-shadow: inset 0 1px 0 var(--app-nav-sheen), inset 0 -1px 0 #ffffff33, 0 2px 5px #24335b0c;
}
.crm-modern .app-shell .crm-navbar .btn-outline-light:hover {
    background-color: #9284d826;
    border-color: var(--app-purple);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .crm-modern .app-shell .crm-navbar { background: var(--app-panel) !important; }
}
.crm-modern .app-shell .crm-navbar .navbar-brand { color: var(--app-text) !important; letter-spacing: -.5px; }
.crm-modern .app-shell .crm-navbar .nav-link { color: var(--app-nav-text); font-weight: 500; border-radius: 12px; transition: color .2s, background-color .2s, box-shadow .2s; }
.crm-modern .app-shell .crm-navbar .nav-link:hover { background: linear-gradient(150deg, #ffffff4d, #ffffff08), #8a7cce14; color: var(--app-text); box-shadow: inset 0 1px 0 var(--app-nav-sheen), inset 0 -1px 0 #ffffff40, 0 3px 8px #24335b0d; }
.crm-modern .app-shell .crm-navbar .nav-link.is-active { background: linear-gradient(150deg, #ffffff40, transparent 55%, #ffffff20), #8a7cce28; color: #d6ccff; border-color: #9081db42; box-shadow: inset 0 1px 0 var(--app-nav-sheen), inset 0 -1px 0 #ffffff66, 0 3px 8px #24335b16; }
.crm-modern[data-bs-theme="light"] .app-shell .crm-navbar .nav-link.is-active { color: #6254b4; }
.crm-modern .app-shell .crm-navbar-user { color: var(--app-nav-text); }
.crm-modern[data-bs-theme="light"] .crm-navbar .navbar-toggler-icon { filter: brightness(.35); }
.crm-modern[data-bs-theme="light"] .crm-navbar-city .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236d7e94' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.crm-modern .app-shell .crm-navbar-city .form-select { background-color: var(--app-field); color: var(--app-text); border-color: var(--app-line); font-weight: 500; }
.crm-modern .app-shell .crm-navbar-city .form-select option { color: var(--app-text); background: var(--app-panel); }
.crm-modern .app-shell .crm-navbar-price-button { background: #8f7be221; border-color: #8f7be24a; color: var(--app-purple) !important; }
.crm-modern .app-shell .crm-navbar .navbar-collapse { border-color: var(--app-line); }
@media (prefers-reduced-motion: reduce) {
    .crm-modern .app-shell .crm-navbar .nav-link { transition: none; }
}
.crm-modern .app-shell .card, .crm-modern .app-shell .modal-content, .crm-modern .app-shell .dropdown-menu, .crm-modern .app-shell .list-group-item { background: var(--app-panel); color: var(--app-text); border-color: var(--app-line); }
.crm-modern .app-shell .card { border-radius: 12px; }
.crm-modern .app-shell .shadow-sm { box-shadow: 0 3px 14px #080e1a08 !important; }
.crm-modern .app-shell .card-header { background: var(--app-raised); color: var(--app-text); border-color: var(--app-line); font-weight: 550; }
.crm-modern .app-shell .card-footer { background: var(--app-raised); color: var(--app-muted); border-color: var(--app-line); }
.crm-modern .app-shell .card-header:first-child { border-radius: 11px 11px 0 0; }
.crm-modern .app-shell .card-footer:last-child { border-radius: 0 0 11px 11px; }
.crm-modern .app-shell .modal-content { border-radius: 15px; box-shadow: 0 24px 80px #080e1a66; }
.crm-modern .app-shell .modal-header, .crm-modern .app-shell .modal-footer { border-color: var(--app-line); }
.crm-modern .app-shell .modal-title { font-size: 19px; font-weight: 550; letter-spacing: -.3px; }
.crm-modern .app-shell .modal-backdrop { background: #080f1d; --bs-backdrop-opacity: .65; }
.crm-modern .app-shell .dropdown-menu { border-radius: 10px; box-shadow: 0 12px 32px #080e1a40; }
.crm-modern .app-shell .dropdown-item { color: var(--app-text); font-size: 13px; border-radius: 6px; }
.crm-modern .app-shell .dropdown-item:hover { background: var(--app-field); }
.crm-modern .app-shell .btn { border-radius: 8px; font-size: .85rem; font-weight: 500; box-shadow: none; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.crm-modern .app-shell .btn-sm { border-radius: 7px; font-size: .77rem; }
.crm-modern .app-shell .btn-primary { background: var(--app-accent); border-color: #9288ed; color: #fff; }
.crm-modern .app-shell .btn-primary:hover { background: #8c82ec; border-color: #a295ff; }
.crm-modern .app-shell .btn-success { background: #4a9c83; border-color: #60b196; color: #fff; }
.crm-modern .app-shell .btn-outline-primary { background: #8e7ada0c; color: var(--app-purple); border-color: #8e7ada55; }
.crm-modern .app-shell .btn-outline-primary:hover { background: #8e7ada24; border-color: var(--app-purple); }
.crm-modern .app-shell .btn-outline-secondary, .crm-modern .app-shell .btn-outline-light, .crm-modern .app-shell .btn-outline-dark { color: var(--app-muted); border-color: var(--app-line); background: var(--app-field); }
.crm-modern .app-shell .btn-outline-secondary:hover, .crm-modern .app-shell .btn-outline-light:hover { color: var(--app-text); background: var(--app-raised); border-color: var(--app-muted); }
.crm-modern .app-shell .btn-outline-success { color: var(--app-green); background: #5dbb9b0b; border-color: #5dbb9b44; }
.crm-modern .app-shell .btn-warning { color: var(--app-amber); background: #d3b15b20; border-color: #d3b15b44; }
.crm-modern .app-shell .btn-danger, .crm-modern .app-shell .btn-outline-danger { color: #e39aa5; background: #cc667519; border-color: #cc667555; }
.crm-modern .app-shell .form-control, .crm-modern .app-shell .form-select, .crm-modern .app-shell .input-group-text { background-color: var(--app-field); color: var(--app-text); border-color: var(--app-line); border-radius: 8px; font-weight: 400; box-shadow: none; }
.crm-modern .app-shell .form-control::placeholder { color: var(--app-faint); opacity: 1; }
.crm-modern .app-shell .form-control:focus, .crm-modern .app-shell .form-select:focus { border-color: var(--app-purple); box-shadow: 0 0 0 3px #8c7cdb16; }
.crm-modern .app-shell .form-control:disabled, .crm-modern .app-shell .form-select:disabled { opacity: .65; }
.crm-modern .app-shell .form-label { color: var(--app-muted); font-weight: 500; }
html.crm-modern .app-shell .request-data-grid .form-label { color: var(--app-muted); font-weight: 500; }
html.crm-modern .app-shell .request-data-grid .form-control, html.crm-modern .app-shell .request-data-grid .form-select { background-color: var(--app-field); color: var(--app-text); border-color: var(--app-line); box-shadow: none; }
html.crm-modern .app-shell .request-data-grid .form-control:focus, html.crm-modern .app-shell .request-data-grid .form-select:focus { border-color: var(--app-purple); box-shadow: 0 0 0 3px #8c7cdb16; transform: none; }
.crm-modern .app-shell .form-check-input { background-color: var(--app-field); border-color: var(--app-line); }
.crm-modern .app-shell .form-check-input:checked { background-color: var(--app-accent); border-color: var(--app-accent); }
.crm-modern .app-shell .form-check-label { color: var(--app-muted); }
.crm-modern .app-shell .table { --bs-table-bg: var(--app-panel); --bs-table-color: var(--app-text); --bs-table-border-color: var(--app-line); --bs-table-hover-bg: #8798b90b; --bs-table-hover-color: var(--app-text); --bs-table-striped-bg: #8798b907; --bs-table-striped-color: var(--app-text); color: var(--app-text); }
.crm-modern .app-shell .table th { background: var(--app-raised); color: var(--app-muted); font-weight: 550; letter-spacing: .15px; border-color: var(--app-line); }
.crm-modern .app-shell .table td { border-color: var(--app-line); }
.crm-modern .app-shell .table-light { --bs-table-bg: var(--app-raised); --bs-table-color: var(--app-text); --bs-table-border-color: var(--app-line); }
.crm-modern .app-shell .badge { border-radius: 6px; font-weight: 500; }
.crm-modern .app-shell .text-bg-primary { color: var(--app-purple) !important; background: #8f7adb20 !important; }
.crm-modern .app-shell .text-bg-success { color: var(--app-green) !important; background: #52b49520 !important; }
.crm-modern .app-shell .text-bg-warning { color: var(--app-amber) !important; background: #cfad5320 !important; }
.crm-modern .app-shell .text-bg-danger { color: #e39aa5 !important; background: #ca657720 !important; }
.crm-modern .app-shell .alert { border-radius: 10px; color: var(--app-text); border-color: var(--app-line); background: var(--app-raised); }
.crm-modern .app-shell .alert-success { border-color: #4ab59640; background: #4ab59612; }
.crm-modern .app-shell .alert-danger { border-color: #ce657540; background: #ce657512; }
.crm-modern .app-shell .alert-warning { border-color: #d1b46240; background: #d1b46212; }
.crm-modern .app-shell .page-link { background: var(--app-panel); border-color: var(--app-line); color: var(--app-muted); }
.crm-modern .app-shell .page-item.active .page-link { background: var(--app-accent); color: #fff; border-color: var(--app-accent); }
.crm-modern .app-shell .list-group-item:hover { background: var(--app-field); }
.crm-modern .app-shell .border, .crm-modern .app-shell .border-bottom, .crm-modern .app-shell .border-top { border-color: var(--app-line) !important; }
.crm-modern .app-main h1, .crm-modern .app-main h2, .crm-modern .app-main h3, .crm-modern .app-main h4, .crm-modern .app-main h5 { color: var(--app-text); letter-spacing: -.35px; font-weight: 550; }
.crm-modern .app-shell .legacy-home { background: var(--app-bg) !important; }
.crm-modern .app-shell .legacy-home-title, .crm-modern .app-shell .legacy-home-subtitle { color: var(--app-text); }
.crm-modern .app-shell .legacy-home-title > span { color: var(--app-muted); }
.crm-modern[data-bs-theme="dark"] .app-shell .btn-close { filter: invert(1) grayscale(1); }
.crm-modern[data-bs-theme="light"] .app-shell .btn-close { filter: none; }
html.crm-modern .app-shell #monitoring-city-switch, html.crm-modern .app-shell #monitoring-master-filter { background-color: var(--app-field); color: var(--app-text); border: 1px solid var(--app-line); font-weight: 450; }
html.crm-modern .app-shell #monitoring-master-filter option { background: var(--app-panel); color: var(--app-text); }
html.crm-modern .app-shell .monitoring-master-active { background: #8878cf12; border-color: #8878cf40; color: var(--app-text); }
html.crm-modern .app-shell .monitoring-page .requests-table { font-family: inherit; font-size: .82rem; }
html.crm-modern .app-shell .monitoring-page .requests-table th { color: var(--app-muted); font-weight: 550; font-size: .72rem; }
html.crm-modern .app-shell .monitoring-page .requests-table td { font-weight: 450; }
html.crm-modern .app-shell .request-date-value { font-weight: 500; }
html.crm-modern .app-shell .request-time-value { color: var(--app-muted); font-weight: 450; }
html.crm-modern .app-shell .request-source-label { color: var(--app-muted); font-weight: 400; }
html.crm-modern .app-shell .request-amount-value { font-weight: 550; }
html.crm-modern .app-shell .executor-filter-link { color: var(--app-text); font-weight: 450; text-decoration: none; }
html.crm-modern .app-shell .request-status-pill { display: inline-block; border-radius: 6px; padding: 3px 5px; color: var(--app-muted); background: #9baac01a; font-size: .65rem; font-weight: 500; white-space: nowrap; }
html.crm-modern .app-shell .request-status-pill.status-assigned { color: var(--app-text); background: transparent; padding: 0; font-size: inherit; font-weight: inherit; }
html.crm-modern .app-shell .request-status-pill.status-working { color: var(--app-amber); background: #c7a24722; }
html.crm-modern .app-shell .request-status-pill.status-done { color: var(--app-green); background: #54b49022; }
html.crm-modern .app-shell .request-status-pill.status-cancelled { color: #e49aa6; background: #c9657822; }
html.crm-modern .app-shell .work-stage-label { font-weight: 500; font-size: .64rem; }
html.crm-modern .app-shell .requests-panel > .card-footer { color: var(--app-muted) !important; font-size: .75rem; }
html.crm-modern .app-shell .requests-panel > .card-footer strong { color: var(--app-text); font-weight: 550; }
html.crm-modern .app-shell .statistics-table { font-size: .78rem; }
html.crm-modern .app-shell .statistics-table th { word-break: normal; overflow-wrap: normal; font-size: .67rem; }
html.crm-modern .app-shell .statistics-table td { word-break: normal; overflow-wrap: normal; }
html.crm-modern .app-shell .statistics-table td:not(:first-child) { white-space: nowrap; }
html.crm-modern .app-shell .statistics-table .table-success { --bs-table-bg: var(--app-raised); --bs-table-color: var(--app-text); }
html.crm-modern .app-shell .filter-calendar-chevron { color: var(--app-muted); }
html.crm-modern .app-shell .request-context-menu { border-radius: 12px; overflow: hidden; border-color: var(--app-line); background: var(--app-panel); }
/* A custom calendar at the same original anchor. */
html.crm-modern .app-shell .requests-calendar { background: var(--app-raised); border: 1px solid var(--app-line); border-radius: 15px; padding: 16px; color: var(--app-text); }
html.crm-modern #filter-requests-calendar { width: 350px; max-width: calc(100vw - 32px); }
html.crm-modern #filter-requests-calendar .requests-calendar { box-shadow: 0 18px 55px #070e204a; }
html.crm-modern .app-shell .calendar-header { font-size: 14px; margin-bottom: 15px; }
html.crm-modern .app-shell .calendar-header strong { font-weight: 550; }
html.crm-modern .app-shell .calendar-nav { width: 34px; height: 34px; color: var(--app-purple); background: var(--app-bg); border: 1px solid #8a78d640; border-radius: 9px; font-size: 23px; line-height: 1; box-shadow: none; }
html.crm-modern .app-shell .calendar-grid { grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
html.crm-modern .app-shell .calendar-weekdays { text-transform: uppercase; color: var(--app-purple); font-size: 10px; letter-spacing: .7px; margin-bottom: 10px; text-align: center; }
html.crm-modern .app-shell .calendar-day, html.crm-modern .app-shell .calendar-empty { height: 39px; min-height: 39px; font-size: 13px; }
html.crm-modern .app-shell .calendar-day { color: var(--app-text); background: transparent; border-radius: 9px; border: 1px solid transparent; box-shadow: none; }
html.crm-modern .app-shell .calendar-day:hover { background: #8b78d51a; border-color: var(--app-line); }
html.crm-modern .app-shell .calendar-day.selected, html.crm-modern .app-shell .calendar-day.range-start, html.crm-modern .app-shell .calendar-day.range-end { background: #575184; color: #fff; border-color: #6f659e; }
html.crm-modern .app-shell .calendar-day.in-range { background: #8a77d322; }
html.crm-modern .app-shell .calendar-day.today > strong { width: auto; height: auto; border: 0; color: inherit; }
html.crm-modern .app-shell .calendar-day strong { font-weight: 450; }
html.crm-modern .app-shell .calendar-closed-count { color: #52cda8; }
html.crm-modern .app-shell .calendar-open-count { color: #ff3347; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-nav { background: var(--app-bg); color: var(--app-purple); box-shadow: none; border-color: #8a78d640; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day { min-height: 41px; height: 41px; background: transparent; border: 1px solid transparent; box-shadow: none; border-radius: 9px; font-size: 14px; color: var(--app-text); }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day:hover { background: #8c81d618; border-color: var(--app-line); }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day.outside { color: var(--app-faint); opacity: .65; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day.today { border-color: #9d8df766; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day.selected { background: #575184; color: #fff; border-color: #6f659e; box-shadow: none; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day strong { display: inline; font-size: 14px; font-weight: 450; border: 0; border-radius: 0; background: transparent; width: auto; height: auto; color: inherit; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-weekdays { color: var(--app-purple); font-size: 10px; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-closed-count, html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-open-count { min-width: 0; width: auto; height: auto; min-height: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; font-size: 11px; font-weight: 650; right: 3px; line-height: 1; transform: none; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-closed-count { color: #52cda8; top: 1px; bottom: auto; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-open-count { color: #ff3347; font-size: 12px; font-weight: 800; bottom: 1px; top: auto; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day.selected .calendar-closed-count { color: #e5deff; }
html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day.selected .calendar-open-count { color: #e00020; background: #fff; border-radius: 3px; padding: 1px 2px; right: 1px; bottom: 0; }
html.crm-modern .app-shell .filter-calendar-shortcuts { gap: 6px; border-color: var(--app-line); padding-bottom: 12px; margin-bottom: 12px; }
html.crm-modern .app-shell .filter-calendar-shortcuts button { background: var(--app-bg); color: var(--app-text); border: 1px solid var(--app-line); border-radius: 8px; font-size: 10px; padding: 8px 10px; font-weight: 500; box-shadow: none; }
html.crm-modern .app-shell .filter-calendar-shortcuts button[data-date-filter="today"] { color: var(--app-purple); background: #8577d329; }
html.crm-modern .app-shell .statistics-calendar-hint { color: var(--app-muted); font-size: 10px; }
html.crm-modern .app-shell .statistics-calendar-month .calendar-day, html.crm-modern .app-shell .statistics-calendar-month .calendar-empty { min-height: 29px; height: 29px; font-size: 11px; }
.crm-modern .app-nav-loading::after { content: ''; position: fixed; top: 0; left: 0; height: 2px; width: 70%; background: var(--app-purple); z-index: 2000; animation: app-loading 1.4s ease infinite; }
/* Stronger text contrast belongs to the light palette only. */
html.crm-modern[data-bs-theme="light"] .app-shell { font-weight: 500; -webkit-font-smoothing: auto; }
html.crm-modern[data-bs-theme="light"] .app-shell .crm-navbar .nav-link,
html.crm-modern[data-bs-theme="light"] .app-shell .btn,
html.crm-modern[data-bs-theme="light"] .app-shell .form-label,
html.crm-modern[data-bs-theme="light"] .app-shell .form-check-label { font-weight: 600; }
html.crm-modern[data-bs-theme="light"] .app-shell .table th,
html.crm-modern[data-bs-theme="light"] .app-shell .card-header { color: #20252c; font-weight: 650; }
html.crm-modern[data-bs-theme="light"] .app-shell .monitoring-page .requests-table td,
html.crm-modern[data-bs-theme="light"] .app-shell .statistics-table td { font-weight: 550; }
html.crm-modern[data-bs-theme="light"] .app-shell .request-time-value,
html.crm-modern[data-bs-theme="light"] .app-shell .request-source-label,
html.crm-modern[data-bs-theme="light"] .app-shell .statistics-to-send { color: #242930; font-weight: 500; opacity: 1; }
html.crm-modern[data-bs-theme="light"] .app-shell .request-status-pill { font-weight: 650; }
html.crm-modern[data-bs-theme="light"] .app-shell .form-control,
html.crm-modern[data-bs-theme="light"] .app-shell .form-select { font-weight: 500; }
html.crm-modern[data-bs-theme="light"] .app-shell .request-status-pill.status-cancelled,
html.crm-modern[data-bs-theme="light"] .app-shell .text-bg-danger { color: #9f263b !important; }
html.crm-modern[data-bs-theme="light"] .app-shell .btn-danger,
html.crm-modern[data-bs-theme="light"] .app-shell .btn-outline-danger { color: #9f263b; }
html.crm-modern[data-bs-theme="light"] .app-shell .btn-primary:hover { background: #594eb7; border-color: #675bc8; }
html.crm-modern[data-bs-theme="light"] .app-shell .crm-navbar .nav-link.is-active { color: var(--app-purple); }
html.crm-modern[data-bs-theme="light"] .app-shell .calendar-closed-count,
html.crm-modern[data-bs-theme="light"] #filter-requests-calendar .calendar-closed-count { color: #156347; }
html.crm-modern[data-bs-theme="light"] .app-shell .calendar-open-count,
html.crm-modern[data-bs-theme="light"] #filter-requests-calendar .calendar-open-count { color: #e00020; }
html.crm-modern[data-bs-theme="light"] #filter-requests-calendar .calendar-day.outside { opacity: .85; }
@keyframes app-loading { from { transform: translateX(-80%); } to { transform: translateX(140%); } }
@view-transition { navigation: auto; }
@media (max-width: 575px) {
    html.crm-modern #filter-requests-calendar { width: min(330px,calc(100vw - 32px)); }
    html.crm-modern[data-bs-theme] #filter-requests-calendar .calendar-day { min-height: 37px; height: 37px; }
    html.crm-modern .app-shell .requests-calendar { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .crm-modern *, .crm-modern *::before, .crm-modern *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Keep overdue warning badges clearly visible in both themes. */
html.crm-modern .app-shell .text-bg-warning,
html.crm-modern[data-bs-theme] .monitoring-page .overdue-requests-alert .text-bg-warning {
    background: #ffc107 !important;
    color: #161616 !important;
    font-weight: 700;
    border-color: #e0a800 !important;
}

/* Restore the original action colours in the request menu. */
html.crm-modern[data-bs-theme="light"] #request-context-menu :is(.list-group-item-success, .list-group-item-warning, .list-group-item-danger, .list-group-item-primary, .list-group-item-secondary) {
    background: var(--bs-list-group-bg);
    color: var(--bs-list-group-color);
    border-color: var(--bs-list-group-border-color);
}
html.crm-modern[data-bs-theme="light"] #request-context-menu :is(.list-group-item-success, .list-group-item-warning, .list-group-item-danger, .list-group-item-primary, .list-group-item-secondary):is(:hover, :focus) {
    background: var(--bs-list-group-action-hover-bg);
    color: var(--bs-list-group-action-hover-color);
}
/* Keep the focused row above positioned executor cells in neighbouring rows. */
html.crm-modern .requests-table .request-row:focus-visible {
    position: relative;
    z-index: 1;
}

/* Three equal, centred shortcuts for the monitoring calendar. */
html.crm-modern .app-shell .filter-calendar-shortcuts {
    justify-content: center;
    gap: 8px;
}
html.crm-modern .app-shell .filter-calendar-shortcuts button {
    min-width: 82px;
    min-height: 38px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
}

/* Fit work-type names on one line without changing monitoring row heights. */
html.crm-modern .requests-table :is(th, td).job-type-column {
    width: 125px;
}
html.crm-modern .requests-table .request-job-type-content > .work-type-label {
    font-size: .70rem;
    line-height: 1.15;
    white-space: nowrap;
}
html.crm-modern .requests-table .request-job-type-content > .work-type-label > span {
    white-space: nowrap;
}

/* Restore a clear blue accent for assigned executor names in monitoring. */
html.crm-modern .requests-table .executor-filter-link {
    color: #0d6efd;
    font-weight: 600;
}
html.crm-modern[data-bs-theme="dark"] .requests-table .executor-filter-link {
    color: #79b5ff;
}

/* Keep request details readable when a user selects the dark theme. */
html.crm-modern[data-bs-theme="dark"] .request-details-page > .card {
    border-color: var(--app-line);
}
html.crm-modern[data-bs-theme="dark"] .request-details-page > .card > .card-header {
    background: var(--app-raised);
    color: var(--app-text);
    border-color: var(--app-line);
}
html.crm-modern[data-bs-theme="dark"] .request-details-table :is(th, td) {
    border-color: var(--app-line);
    color: var(--app-text);
}
html.crm-modern[data-bs-theme="dark"] .request-details-table th {
    background: var(--app-raised);
}
html.crm-modern[data-bs-theme="dark"] .request-details-table td {
    background: var(--app-panel);
}
html.crm-modern[data-bs-theme="dark"] .request-details-page :is(.copy-request-details, .copy-request-value) {
    background: var(--app-field);
    color: var(--app-purple);
    border-color: var(--app-line);
}
html.crm-modern[data-bs-theme="dark"] .request-details-page :is(.copy-request-details, .copy-request-value):is(:hover, :focus-visible, .copied) {
    background: var(--app-raised);
    color: var(--app-purple);
    border-color: var(--app-purple);
}
html.crm-modern[data-bs-theme="dark"] .request-details-page .request-log-card .text-primary {
    color: #79b5ff !important;
}

/* Quiet, persistent feedback for partial navigation and background saves. */
html.crm-page-loading::before { content:''; position:fixed; inset:0 auto auto 0; width:40%; height:3px; background:var(--app-accent); z-index:100000; animation:app-loading 1.2s ease-in-out infinite; pointer-events:none; }
#crm-page-feedback { position:fixed; right:20px; bottom:20px; max-width:min(460px,calc(100vw - 40px)); padding:12px 16px; background:var(--app-panel); color:var(--app-text); border:1px solid var(--app-green); border-radius:10px; box-shadow:0 8px 30px #0002; z-index:100000; }
#crm-page-feedback[data-error="true"] { border-color:#dc3545; }
form[aria-busy="true"] { cursor:progress; }

.crm-detail-overlay { --bs-modal-zindex: 1200; }
.crm-detail-backdrop { --bs-backdrop-zindex: 1190; }
