/* Focused compatibility fixes loaded after the legacy and interface bundles. */
input,
select,
textarea,
.field-input,
.select-input,
.task-note-input {
    color: var(--ink);
    background-color: var(--card);
    border-color: var(--line);
    caret-color: var(--ink);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.admin-task-field input,
.admin-task-field select,
.admin-task-field textarea,
.admin-task-client-results,
.admin-task-client-results button,
.admin-task-worker {
    color: var(--ink);
    background: var(--card);
}

.admin-task-client-results button {
    cursor: pointer;
}

.admin-task-client-results button:hover,
.admin-task-client-results button:focus-visible {
    color: var(--ink);
    background: var(--primary-soft);
    outline: 0;
}

.admin-task-client-results strong,
.admin-task-worker strong,
.admin-task-all-day strong {
    color: var(--ink);
}

.admin-task-worker input[type="checkbox"] {
    display: grid;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    place-content: center;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid #9ca8bc;
    border-radius: 4px;
    cursor: pointer;
}

.admin-task-worker input[type="checkbox"]::after {
    width: 11px;
    height: 11px;
    content: "";
    background: #fff;
    clip-path: polygon(14% 44%, 0 59%, 42% 100%, 100% 20%, 84% 5%, 40% 62%);
    transform: scale(0);
}

.admin-task-worker input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.admin-task-worker input[type="checkbox"]:checked::after {
    transform: scale(1);
}

.admin-task-worker input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--primary-soft);
    outline-offset: 2px;
}

.tracking-place-result {
    display: block;
    min-height: 68px;
    padding: 11px 12px;
    color: var(--ink);
    background: var(--card);
    cursor: default;
}

.tracking-place-result-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}

.tracking-place-result-summary > span:first-child {
    display: grid;
    min-width: 0;
    gap: 4px;
    text-align: left;
}

.tracking-place-save-icon {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    justify-self: end;
    color: var(--primary);
    background: var(--primary-soft);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.tracking-place-save-icon svg {
    width: 18px;
    height: 18px;
}

.tracking-place-save-icon:hover,
.tracking-place-save-icon:focus-visible,
.tracking-place-save-icon[aria-expanded="true"] {
    color: #fff;
    background: var(--primary);
}

.tracking-place-edit {
    padding-top: 13px;
    margin-top: 13px;
    border-top: 1px solid var(--line);
}

.tracking-place-edit[hidden] {
    display: none;
}

.tracking-place-edit label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
}

.tracking-place-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.tracking-place-edit-row input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.tracking-place-edit-row input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}

.tracking-place-confirm {
    min-width: 118px;
    min-height: 46px;
}

.admin-month-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-month-metric {
    min-width: 0;
}

.admin-month-metric + .admin-month-metric {
    padding-top: 0;
    padding-left: 12px;
    border-top: 0;
    border-left: 1px solid var(--line);
}

.admin-month-metric > div,
.admin-stats-rbh > div {
    min-width: 0;
}

.admin-month-metric small,
.admin-stats-rbh small {
    overflow-wrap: anywhere;
}

.admin-month-metric strong,
.admin-stats-rbh strong {
    display: block;
    max-width: 100%;
    color: var(--ink);
    font-size: clamp(18px, 1.35vw, 23px);
    line-height: 1.1;
    white-space: nowrap;
}

.admin-month-metrics > button {
    position: static;
    align-self: center;
    justify-self: end;
}

.admin-attendance-card {
    padding: 0;
    overflow: hidden;
}

.admin-attendance-summary {
    height: 100%;
    min-height: 112px;
    margin: 0;
    padding: 18px;
    border: 0;
    background: var(--card);
}

.admin-attendance-summary > span:nth-child(2) {
    min-width: 0;
    gap: 3px;
}

.admin-attendance-summary small {
    color: var(--muted);
    line-height: 1.3;
}

.admin-attendance-summary strong {
    color: var(--ink);
    line-height: 1;
}

[data-theme="dark"] body,
[data-theme="dark"] .app-shell,
[data-theme="dark"] .screen-root {
    color: var(--ink);
    background: var(--page);
}

[data-theme="dark"] .app-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .admin-task-form,
[data-theme="dark"] .admin-task-worker,
[data-theme="dark"] .admin-task-client-results,
[data-theme="dark"] .admin-task-client-results button,
[data-theme="dark"] .tracking-place-result,
[data-theme="dark"] .admin-attendance-summary {
    color: var(--ink);
    background: var(--card);
    border-color: var(--line);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] label,
[data-theme="dark"] legend,
[data-theme="dark"] strong,
[data-theme="dark"] .card-title,
[data-theme="dark"] .admin-task-field > span {
    color: var(--ink);
}

[data-theme="dark"] .app-topbar .topbar-copy > p,
[data-theme="dark"] .app-topbar .topbar-copy > h1 {
    color: var(--ink) !important;
}

[data-theme="dark"] .app-topbar .topbar-copy > p {
    color: var(--muted) !important;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .field-input,
[data-theme="dark"] .select-input,
[data-theme="dark"] .task-note-input,
[data-theme="dark"] .admin-task-field input,
[data-theme="dark"] .admin-task-field textarea {
    color: var(--ink);
    background: #11192a;
    border-color: var(--line);
}

[data-theme="dark"] .admin-task-all-day,
[data-theme="dark"] .task-note-readonly,
[data-theme="dark"] .task-empty,
[data-theme="dark"] .dashboard-empty-state {
    color: var(--ink-soft);
    background: #121b2d;
    border-color: var(--line);
}

[data-theme="dark"] .admin-task-worker.has-conflict {
    background: #332719;
    border-color: #765021;
}

[data-theme="dark"] .admin-task-worker input[type="checkbox"] {
    background: #11192a;
    border-color: #73809a;
}

[data-theme="dark"] .admin-task-worker input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .admin-worker-availability.busy,
[data-theme="dark"] .admin-task-worker.has-conflict .admin-worker-availability {
    color: #ffbd73;
}

[data-theme="dark"] .dashboard-card-icon,
[data-theme="dark"] .tracking-place-save-icon {
    color: var(--primary-strong);
    background: var(--primary-soft);
}

[data-theme="dark"] .admin-attendance-summary small,
[data-theme="dark"] .admin-stats-rbh small,
[data-theme="dark"] .admin-month-metric small {
    color: var(--muted);
}

@media (max-width: 760px) {
    .tracking-place-edit-row {
        grid-template-columns: 1fr;
    }

    .tracking-place-confirm {
        width: 100%;
    }

    .admin-month-metrics {
        grid-template-columns: minmax(0, 1fr) 34px;
    }

    .admin-month-metric {
        grid-column: 1;
    }

    .admin-month-metric + .admin-month-metric {
        padding-top: 10px;
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .admin-month-metrics > button {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

/* Unified dark theme layer. Keep application surfaces dark and document previews light. */
[data-theme="dark"] {
    --dark-page: #0e1422;
    --dark-surface: #171f31;
    --dark-surface-raised: #1c263a;
    --dark-surface-soft: #11192a;
    --dark-border: #303a52;
    --dark-text: #f3f5ff;
    --dark-muted: #9aa7c5;
    --dark-placeholder: #71809f;
    /* Zmienne odziedziczone przez starsze widoki nie mogą zostać w wersji jasnej. */
    --muted: #b5c2dd;
    --ink-soft: #c8d3e9;
}

[data-theme="dark"] body,
[data-theme="dark"] .app-shell,
[data-theme="dark"] .app-main,
[data-theme="dark"] .page-content,
[data-theme="dark"] .screen,
[data-theme="dark"] .screen-content {
    color: var(--dark-text);
    background: var(--dark-page);
}

[data-theme="dark"] :where(
    .app-card,
    .dashboard-card,
    .dashboard-panel,
    .admin-dashboard-card,
    .admin-task-list,
    .admin-task-date-group,
    .admin-task-card,
    .admin-task-detail,
    .admin-task-form,
    .admin-task-duplicate-modal,
    .admin-task-duplicate-workers,
    .client-search-card,
    .client-list,
    .client-card,
    .client-profile-card,
    .offer-list,
    .offer-form,
    .order-list,
    .order-detail-screen,
    .vehicle-card,
    .vehicle-terms,
    .vehicle-policy,
    .vehicle-files,
    .work-time-card,
    .work-time-editor-modal,
    .work-time-team-picker,
    .notification-list,
    .notification-item,
    .attachment-list,
    .invoice-preview-modal
) {
    color: var(--dark-text);
    border-color: var(--dark-border);
    background: var(--dark-surface);
    box-shadow: none;
}

[data-theme="dark"] :where(
    .admin-task-card,
    .admin-task-duplicate-source,
    .admin-task-duplicate-worker,
    .task-note-readonly,
    .task-empty,
    .offer-list-item,
    .offer-item-editor,
    .offer-orders,
    .order-items,
    .vehicle-term,
    .vehicle-policy,
    .vehicle-file,
    .attachment-row,
    .punch-row,
    .time-metric,
    .work-time-day-card,
    .work-time-team-row,
    .work-time-current-entry,
    .dashboard-empty-state,
    .notification-empty-state,
    .profile-note
) {
    color: var(--dark-text);
    border-color: var(--dark-border);
    background: var(--dark-surface-soft);
}

[data-theme="dark"] :where(
    .app-card,
    .dashboard-card,
    .admin-task-card,
    .admin-task-detail,
    .admin-task-duplicate-modal,
    .client-card,
    .client-profile-card,
    .offer-list,
    .offer-form,
    .offer-item-editor,
    .order-list,
    .order-detail-screen,
    .vehicle-card,
    .vehicle-term,
    .vehicle-policy,
    .vehicle-file,
    .attachment-row,
    .notification-item,
    .work-time-card,
    .work-time-day-card,
    .work-time-editor-modal,
    .work-time-team-row
) :where(h1, h2, h3, h4, strong, label, legend, em) {
    color: var(--dark-text);
}

[data-theme="dark"] :where(
    .app-card,
    .dashboard-card,
    .admin-task-card,
    .admin-task-detail,
    .client-card,
    .client-profile-card,
    .offer-list,
    .offer-form,
    .order-list,
    .order-detail-screen,
    .vehicle-card,
    .notification-item,
    .work-time-card,
    .work-time-day-card
) :where(p, small, time, .muted, .subtitle, .meta) {
    color: var(--dark-muted);
}

[data-theme="dark"] :where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    .client-search-field,
    .admin-task-client-search,
    .admin-task-archive-search,
    .work-time-input
) {
    color: var(--dark-text) !important;
    border-color: var(--dark-border) !important;
    background-color: var(--dark-surface-soft) !important;
    caret-color: var(--primary-strong);
}

[data-theme="dark"] :where(input, textarea)::placeholder {
    color: var(--dark-placeholder) !important;
    opacity: 1;
}

[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill:hover,
[data-theme="dark"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--dark-text);
    box-shadow: 0 0 0 1000px var(--dark-surface-soft) inset;
    transition: background-color 9999s ease-out;
}

[data-theme="dark"] :where(.client-search-field, .admin-task-client-search) > svg,
[data-theme="dark"] :where(.client-search-field, .admin-task-client-search) > span {
    color: var(--dark-muted);
    background: transparent;
}

[data-theme="dark"] :where(.admin-task-worker, .work-time-team-row) input[type="checkbox"] {
    border: 2px solid #6f7d9d;
    background: var(--dark-surface-soft);
}

[data-theme="dark"] :where(.admin-task-worker, .work-time-team-row) input[type="checkbox"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

[data-theme="dark"] :where(.alert, .form-alert, .status-alert, .message-banner) {
    border-color: var(--dark-border);
    background: var(--dark-surface-raised);
}

[data-theme="dark"] .profile-alert {
    border-color: var(--dark-border);
}

[data-theme="dark"] .profile-alert.error {
    color: #ffc7d5;
    background: #3b1420;
    border-color: #6a2840;
}

[data-theme="dark"] .profile-alert.success {
    color: #8ee6b7;
    background: #163026;
    border-color: #2e6041;
}

[data-theme="dark"] .app-topbar {
    background: var(--dark-page);
    border-color: transparent;
}

[data-theme="dark"] :where(.alert-success, .message-success) {
    color: #8de8b5;
    border-color: #286344;
    background: #143526;
}

[data-theme="dark"] :where(.alert-warning, .message-warning) {
    color: #ffd39a;
    border-color: #71491d;
    background: #3b2915;
}

[data-theme="dark"] :where(.alert-danger, .alert-error, .message-error) {
    color: #ffadba;
    border-color: #783244;
    background: #40202a;
}

[data-theme="dark"] :where(.alert-info, .message-info) {
    color: #b8d4ff;
    border-color: #2b568b;
    background: #172c4a;
}

[data-theme="dark"] :where(.badge, .status-badge, .task-status, .relative-date-badge, .admin-task-travel) {
    color: #d9def2;
    border-color: var(--dark-border);
    background: #202a40;
}

[data-theme="dark"] :where(.admin-task-duplicate-backdrop, .work-time-editor-backdrop, .invoice-preview-backdrop) {
    background: rgba(5, 9, 18, .78);
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .admin-task-duplicate-modal,
[data-theme="dark"] .work-time-editor-modal,
[data-theme="dark"] .invoice-preview-modal {
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
    background: var(--dark-surface);
}

[data-theme="dark"] .admin-task-duplicate-source,
[data-theme="dark"] .admin-task-duplicate-workers,
[data-theme="dark"] .admin-task-duplicate-worker {
    border-color: var(--dark-border);
    background: var(--dark-surface-soft);
}

[data-theme="dark"] .admin-task-duplicate-worker.available {
    border-color: #286344;
    background: #143526;
}

[data-theme="dark"] .admin-task-duplicate-worker.busy {
    border-color: #71491d;
    background: #3b2915;
}

[data-theme="dark"] .offer-list-item,
[data-theme="dark"] .offer-orders > button,
[data-theme="dark"] .order-list > button,
[data-theme="dark"] .order-items article {
    border-color: var(--dark-border);
}

[data-theme="dark"] .offer-list-item > button,
[data-theme="dark"] .offer-orders > button,
[data-theme="dark"] .order-list > button {
    color: var(--dark-text);
    background: transparent;
}

[data-theme="dark"] :where(.offer-list-item, .offer-orders, .order-list, .order-items) small,
[data-theme="dark"] :where(.offer-list-item, .offer-orders, .order-list, .order-items) span {
    color: var(--dark-muted);
}

[data-theme="dark"] .offer-item-editor {
    border: 1px solid var(--dark-border);
    background: #11192a;
}

[data-theme="dark"] .offer-item-editor :where(input, select, textarea) {
    color: var(--dark-text) !important;
    background: var(--dark-surface-soft) !important;
}

[data-theme="dark"] .offer-form > .app-card {
    background: var(--dark-surface);
}

[data-theme="dark"] .offer-form {
    background: var(--dark-page);
}

[data-theme="dark"] .offer-form-actions {
    padding: 0;
    background: var(--dark-page);
}

/* Zamówienia: pozycje i wpisy listy mają własne, czytelne powierzchnie. */
[data-theme="dark"] .order-detail-screen > .app-card {
    background: #1c263a;
    border-color: #36435f;
}

[data-theme="dark"] .order-detail-screen {
    background: var(--dark-page);
}

[data-theme="dark"] .order-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

[data-theme="dark"] .order-list .card-title {
    margin: 0 2px 2px;
}

[data-theme="dark"] .order-list > button {
    padding: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    background: #11192a;
}

[data-theme="dark"] .order-list > button:last-of-type {
    border-bottom: 1px solid var(--dark-border);
}

[data-theme="dark"] .order-items article {
    padding: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    background: #11192a;
}

[data-theme="dark"] .order-items article strong {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

[data-theme="dark"] .order-items article :where(span, em) {
    font-size: 16px;
}

[data-theme="dark"] .order-detail-screen .info-row {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    align-items: start;
}

[data-theme="dark"] .order-detail-screen .info-row strong {
    overflow-wrap: anywhere;
    text-align: right;
}

/* WZ */
[data-theme="dark"] .wz-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

[data-theme="dark"] .wz-list .card-title {
    margin: 0 2px 2px;
}

[data-theme="dark"] .wz-list-item {
    padding: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    background: #11192a;
    color: var(--dark-text);
}

[data-theme="dark"] .wz-document-icon {
    background: #202b43;
    color: #8b7cff;
}

[data-theme="dark"] .wz-list-item :where(small, em) {
    color: var(--dark-muted);
}

[data-theme="dark"] .wz-list-item > svg {
    color: #8b7cff;
}

[data-theme="dark"] .wz-list-item .badge-green {
    color: #86efac;
    background: #153426;
}

[data-theme="dark"] .wz-list-item .badge-orange {
    color: #fcd58a;
    background: #3b2b14;
}

[data-theme="dark"] .wz-status-tabs {
    background: #11192a;
    border-color: var(--dark-border);
}

[data-theme="dark"] .wz-status-tabs button {
    color: var(--dark-muted);
}

[data-theme="dark"] .wz-status-tabs button.active {
    color: #fff;
    background: #4f46e5;
}

[data-theme="dark"] .wz-detail {
    background: var(--dark-page);
}

[data-theme="dark"] .wz-detail > .app-card {
    background: #1c263a;
    border-color: #36435f;
}

[data-theme="dark"] .wz-detail .wz-contact,
[data-theme="dark"] .wz-detail .wz-detail-items > div {
    padding: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    background: #11192a;
}

[data-theme="dark"] .wz-detail .wz-contact strong,
[data-theme="dark"] .wz-detail .wz-contact a,
[data-theme="dark"] .wz-detail .wz-files a {
    color: var(--dark-text);
}

[data-theme="dark"] .wz-detail .wz-files a {
    background: #11192a;
    border-color: var(--dark-border);
}

[data-theme="dark"] .wz-form .wz-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Flota na żywo */
[data-theme="dark"] .tracking-vehicle-list {
    gap: 10px;
}

[data-theme="dark"] .tracking-vehicle {
    padding: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    background: #11192a;
}

[data-theme="dark"] .tracking-vehicle:last-child {
    border-bottom: 1px solid var(--dark-border);
}

[data-theme="dark"] .tracking-vehicle-status,
[data-theme="dark"] .tracking-map-button {
    width: 42px;
    height: 42px;
    color: #8b7cff;
    background: #202b43;
    border: 1px solid #303a52;
    border-radius: 10px;
}

[data-theme="dark"] .tracking-vehicle-status svg,
[data-theme="dark"] .tracking-map-button svg {
    width: 21px;
    height: 21px;
}

[data-theme="dark"] .tracking-vehicle.stopped .tracking-vehicle-status {
    color: #f6cf78;
    background: #3b2b14;
    border-color: #63491f;
}

[data-theme="dark"] .tracking-vehicle :where(.tracking-registration, small, em) {
    color: var(--dark-muted);
}

[data-theme="dark"] .tracking-vehicle > .badge-pill {
    color: #c7c2ff;
    background: #29234a;
}

@media (max-width: 640px) {
    [data-theme="dark"] .tracking-vehicle > .tracking-map-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

[data-theme="dark"] .tracking-vehicle {
    display: block;
}

[data-theme="dark"] .tracking-vehicle-content {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

[data-theme="dark"] .tracking-vehicle-info {
    display: grid;
    min-width: 0;
    gap: 4px;
}

[data-theme="dark"] .tracking-vehicle-info strong {
    font-size: 17px;
    line-height: 1.35;
}

[data-theme="dark"] .tracking-vehicle-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .tracking-vehicle-actions .tracking-map-button {
    flex: 0 0 42px;
}

[data-theme="dark"] .tracking-route-list {
    gap: 10px;
}

[data-theme="dark"] .tracking-trip {
    padding: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    background: #11192a;
}

[data-theme="dark"] .tracking-trip:last-child {
    border-bottom: 1px solid var(--dark-border);
}

[data-theme="dark"] .tracking-trip-time {
    padding-top: 2px;
}

[data-theme="dark"] .tracking-trip-time strong {
    color: var(--dark-text);
    font-size: 18px;
}

[data-theme="dark"] .tracking-trip-time span,
[data-theme="dark"] .tracking-trip-content > small {
    color: var(--dark-muted);
    font-size: 13px;
}

[data-theme="dark"] .tracking-trip-content {
    display: grid;
    gap: 8px;
}

[data-theme="dark"] .tracking-trip-stop {
    min-width: 0;
}

[data-theme="dark"] .tracking-trip-location,
[data-theme="dark"] .tracking-trip-stop > strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 0;
    color: var(--dark-text);
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

[data-theme="dark"] .tracking-trip-location span {
    overflow-wrap: anywhere;
}

[data-theme="dark"] .tracking-trip-location svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #8b7cff;
}

[data-theme="dark"] .tracking-trip-connector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-muted);
    font-size: 13px;
}

[data-theme="dark"] .tracking-trip-connector i {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #8b7cff;
    border-radius: 50%;
    background: #202b43;
}

@media (max-width: 640px) {
    [data-theme="dark"] .tracking-vehicle-content {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    [data-theme="dark"] .tracking-vehicle-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }
}

/* Podgląd faktury */
.invoice-paper-items > .invoice-paper-item {
    display: grid;
    gap: 8px;
}

.invoice-paper-items > .invoice-paper-item em {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-style: normal;
}

.invoice-paper-items > .invoice-paper-item em small {
    margin: 0;
}

[data-theme="dark"] .invoice-paper {
    color-scheme: dark;
    color: var(--dark-text) !important;
    border-color: var(--dark-border) !important;
    background: #11192a !important;
    box-shadow: none;
}

[data-theme="dark"] .invoice-paper :where(h1, h2, h3, h4, strong, label, legend, em, b) {
    color: var(--dark-text) !important;
}

[data-theme="dark"] .invoice-paper :where(p, span, small, time) {
    color: var(--dark-muted) !important;
}

[data-theme="dark"] .invoice-paper :where(
    .invoice-paper-brand,
    .invoice-paper-title,
    .invoice-paper-parties > div,
    .invoice-paper-dates > div,
    .invoice-paper-total,
    .invoice-paper-payment,
    .invoice-paper-items,
    .invoice-payments
) {
    border-color: var(--dark-border) !important;
    background: #171f31 !important;
}

[data-theme="dark"] .invoice-paper-total {
    background: #29234a !important;
}

[data-theme="dark"] .invoice-paper-total strong {
    color: #c7c2ff !important;
}

[data-theme="dark"] .invoice-paper-payment:not(.paid) {
    color: #fcd58a !important;
    background: #3b2b14 !important;
}

[data-theme="dark"] .invoice-paper-payment.paid {
    color: #86efac !important;
    background: #153426 !important;
}

[data-theme="dark"] .invoice-paper-items > .invoice-paper-item {
    padding: 12px;
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    background: #11192a;
}

[data-theme="dark"] .invoice-paper-items > .invoice-paper-item em {
    padding-top: 8px;
    border-top: 1px solid var(--dark-border);
}

[data-theme="dark"] .invoice-paper-items > .invoice-paper-item em strong {
    color: #c7c2ff !important;
    white-space: nowrap;
}

[data-theme="dark"] .vehicle-card-head span,
[data-theme="dark"] .vehicle-meta,
[data-theme="dark"] .vehicle-file span,
[data-theme="dark"] .vehicle-term span,
[data-theme="dark"] .vehicle-policy span {
    color: var(--dark-muted);
}

[data-theme="dark"] .vehicle-term,
[data-theme="dark"] .vehicle-policy,
[data-theme="dark"] .vehicle-file,
[data-theme="dark"] .attachment-row {
    border: 1px solid var(--dark-border);
    background: var(--dark-surface-soft);
}

[data-theme="dark"] .attachment-row :where(span, strong),
[data-theme="dark"] .vehicle-file :where(span, strong) {
    color: var(--dark-text);
}

[data-theme="dark"] .notification-item.unread {
    border-color: #4d4a86;
    background: #202943;
}

[data-theme="dark"] .notification-read-switch {
    color: var(--dark-muted);
    border-color: var(--dark-border);
}

[data-theme="dark"] .notification-read-switch > span {
    background: #56627c;
}

[data-theme="dark"] .work-time-day-card,
[data-theme="dark"] .punch-row,
[data-theme="dark"] .time-metric,
[data-theme="dark"] .work-time-team-row,
[data-theme="dark"] .work-time-current-entry {
    border-color: var(--dark-border);
    background: var(--dark-surface-soft);
}

[data-theme="dark"] .work-time-editor-hint,
[data-theme="dark"] .work-time-day-card small,
[data-theme="dark"] .punch-row small,
[data-theme="dark"] .time-metric span {
    color: var(--dark-muted);
}

[data-theme="dark"] .admin-month-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 42px;
    align-items: stretch;
}

[data-theme="dark"] .admin-month-metric {
    min-width: 0;
    border-color: var(--dark-border);
    background: var(--dark-surface-soft);
}

[data-theme="dark"] .admin-month-metric strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--dark-text);
    font-size: 24px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .admin-month-metrics > button {
    position: static;
    grid-column: 3;
    grid-row: 1;
    align-self: center;
}

@media (max-width: 760px) {
    [data-theme="dark"] .admin-month-metrics {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
    }

    [data-theme="dark"] .admin-month-metric strong {
        font-size: 18px;
    }
}

/* Admin dashboard: one compact operational summary without duplicate cards. */
.admin-dashboard .admin-overview-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Dashboard plan: compact heading and a date badge instead of stacked separators. */
.admin-today-tasks > .dashboard-side-title {
    align-items: center;
    padding: 0 0 12px;
    border: 0;
}

.admin-today-tasks .dashboard-side-title > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.admin-today-tasks .dashboard-side-title h2 {
    padding: 0;
    border: 0;
}

.admin-today-tasks .dashboard-side-title small {
    padding: 4px 8px;
    color: #516488;
    border-radius: 999px;
    background: #edf1ff;
}

.admin-dashboard-task-heading {
    grid-template-columns: auto minmax(0, 1fr) 28px;
    gap: 9px;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: #f5f7fc;
}

.admin-dashboard-task-heading small {
    height: 28px;
    color: #334cc8;
    background: #e8edff;
}

[data-theme="dark"] .admin-today-tasks .dashboard-side-title small {
    color: #beb7ff;
    background: #2b2754;
}

[data-theme="dark"] .admin-dashboard-task-heading {
    background: #111a2b;
}

[data-theme="dark"] .admin-dashboard-task-heading strong {
    color: var(--dark-text);
}

[data-theme="dark"] .admin-dashboard-task-heading span {
    color: var(--dark-muted);
}

[data-theme="dark"] .admin-dashboard-task-heading small {
    color: #c4bdff;
    background: #292451;
}

/* Zlecenia: stały nagłówek i osobny, uporządkowany pasek działań. */
.admin-task-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-task-card-main {
    display: grid;
    align-content: start;
    gap: 0;
}

.admin-task-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-task-card-heading > div {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.admin-task-card-heading > div > strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    font-weight: 760;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-task-card-heading .badge-pill {
    flex: 0 0 auto;
    margin-top: 0;
}

.admin-task-card-main .admin-task-card-heading p,
.admin-task-card-main .admin-task-card-heading > div > small {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.admin-task-card-main .task-worker-list {
    gap: 5px;
    margin-top: 8px;
}

.admin-task-card-actions {
    width: 100%;
    justify-content: flex-end;
    min-height: 42px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.admin-task-card-actions .admin-task-protocol {
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    margin-right: auto;
}

.admin-task-card-actions .icon-button {
    width: 40px;
    height: 40px;
}

/* Keep the protocol action and adjacent icon actions on one baseline. */
.admin-task-card-actions {
    align-items: stretch;
    min-height: 46px;
}

.admin-task-card-actions .admin-task-protocol,
.admin-task-card-actions .icon-button {
    min-height: 46px !important;
    height: 46px !important;
}

.admin-task-card-actions .icon-button {
    width: 46px !important;
}

.admin-task-card-actions .admin-task-protocol {
    display: inline-flex;
    align-items: center;
}

.admin-task-form-danger-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.admin-task-form-actions {
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
}

.admin-task-form-actions .primary-action,
.admin-task-form-danger-actions .danger-action {
    white-space: nowrap;
}

.admin-task-form-actions .primary-action {
    width: auto;
    min-width: 176px;
    margin-left: auto;
}

.admin-task-form-danger-actions .cancel-task-action {
    color: #a95c08;
    background: #fff4df;
    border-color: #f6d08a;
}

[data-theme="dark"] .admin-task-form-danger-actions .cancel-task-action {
    color: #ffd39a;
    background: #3b2915;
    border-color: #71491d;
}

@media (max-width: 780px) {
    .admin-task-form-actions .admin-task-form-danger-actions .danger-action {
        display: inline-grid;
        width: 48px;
        min-width: 48px;
        height: 48px;
        padding: 0;
        place-items: center;
    }

    .admin-task-form-danger-actions .danger-action span { display: none; }
    .admin-task-form-actions .primary-action { min-width: 0; flex: 1 1 auto; }
}

@media (max-width: 390px) {
    .admin-task-form-actions .primary-action {
        display: inline-grid;
        width: 48px;
        min-width: 48px;
        padding: 0;
        place-items: center;
    }

    .admin-task-form-actions .primary-action span { display: none; }
}

[data-theme="dark"] .admin-task-card-heading > div > strong {
    color: var(--dark-text);
}

[data-theme="dark"] .admin-task-card-main .admin-task-card-heading > div > small {
    color: var(--dark-muted);
}

[data-theme="dark"] .admin-task-card-actions {
    border-color: var(--dark-border);
}

.leave-empty-state.compact {
    min-height: 76px;
    grid-template-columns: 24px minmax(0, 1fr);
    justify-content: start;
    align-items: center;
    align-content: center;
    gap: 10px;
    padding: 16px;
    text-align: left;
}

.leave-empty-state.compact strong {
    font-size: 13px;
}

.notification-unread-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    color: #53658b;
    border: 1px solid #e0e6f1;
    border-radius: 999px;
    background: #f7f9fd;
    font-size: 11px;
    font-weight: 650;
}

.notification-unread-counter svg {
    width: 15px;
    height: 15px;
    color: #6255d7;
}

.notification-unread-counter strong {
    color: #263b77;
    font-size: 14px;
    line-height: 1;
}

[data-theme="dark"] .notification-unread-counter {
    color: var(--dark-muted);
    border-color: #303d59;
    background: #151e31;
}

[data-theme="dark"] .notification-unread-counter strong {
    color: var(--dark-text);
}

.attendance-resolution-backdrop{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:20px;background:rgba(8,14,29,.64);backdrop-filter:blur(4px)}
.attendance-resolution-modal{width:min(680px,100%);max-height:min(760px,calc(100dvh - 40px));overflow:auto;padding:22px;border:1px solid #dfe5f0;border-radius:18px;background:#f8faff;box-shadow:0 24px 64px rgba(8,18,45,.28)}
.attendance-resolution-modal>header,.attendance-resolution-modal>header>div,.attendance-resolution-item-head,.attendance-resolution-item-head>div{display:flex;align-items:center}.attendance-resolution-modal>header{justify-content:space-between;gap:16px;margin-bottom:18px}.attendance-resolution-modal>header>div{gap:12px}.attendance-resolution-modal h2{margin:0;color:#101b3d;font-size:20px}.attendance-resolution-modal header p,.attendance-resolution-item p{margin:3px 0 0;color:#68799c;font-size:13px}.attendance-resolution-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:12px;background:#eeeaff;color:#5547dd}.attendance-resolution-icon svg{width:21px}.attendance-resolution-list{display:grid;gap:12px}.attendance-resolution-item{display:grid;gap:12px;padding:16px;border:1px solid #dfe5f0;border-radius:14px;background:#fff}.attendance-resolution-item-head{justify-content:space-between;gap:12px}.attendance-resolution-item-head>div{align-items:flex-start;flex-direction:column;gap:3px}.attendance-resolution-item-head strong{color:#13234c}.attendance-resolution-item-head span:not(.badge-pill){display:inline-flex;align-items:center;gap:5px;color:#6d7fa5;font-size:13px}.attendance-resolution-item-head span svg{width:14px}.attendance-resolution-choices{display:flex;gap:8px}.attendance-resolution-choices label{cursor:pointer}.attendance-resolution-choices input{position:absolute;opacity:0}.attendance-resolution-choices span{display:block;padding:7px 10px;border:1px solid #dce3ef;border-radius:8px;color:#52668f;font-size:13px;font-weight:650}.attendance-resolution-choices input:checked+span{border-color:#7162ec;background:#eeecff;color:#4e40da}.attendance-resolution-fields{display:grid;grid-template-columns:minmax(0,1fr) 100px 100px;gap:10px}.attendance-resolution-fields label{display:grid;gap:5px}.attendance-resolution-fields label>span{color:#66789d;font-size:12px;font-weight:650}.attendance-resolution-item>.primary-action{justify-self:end}.attendance-resolution-empty{display:grid;justify-items:center;gap:10px;padding:36px 16px;color:#53688e;text-align:center}.attendance-resolution-empty svg{width:32px;height:32px;color:#20a55a}
[data-theme="dark"] .attendance-resolution-modal{border-color:#33415f;background:#172238;box-shadow:0 24px 64px rgba(0,0,0,.48)}[data-theme="dark"] .attendance-resolution-modal h2,[data-theme="dark"] .attendance-resolution-item-head strong{color:var(--dark-text)}[data-theme="dark"] .attendance-resolution-item{border-color:#33415f;background:#101a2d}[data-theme="dark"] .attendance-resolution-item p,[data-theme="dark"] .attendance-resolution-modal header p,[data-theme="dark"] .attendance-resolution-item-head span:not(.badge-pill),[data-theme="dark"] .attendance-resolution-fields label>span{color:var(--dark-muted)}[data-theme="dark"] .attendance-resolution-choices span{border-color:#354360;color:var(--dark-muted);background:#172238}[data-theme="dark"] .attendance-resolution-choices input:checked+span{border-color:#8175ff;background:#29235a;color:#e8e5ff}
@media(max-width:560px){.attendance-resolution-backdrop{padding:0;place-items:end center}.attendance-resolution-modal{max-height:92dvh;padding:18px;border-radius:18px 18px 0 0}.attendance-resolution-fields{grid-template-columns:1fr 1fr}.attendance-resolution-fields label:first-child{grid-column:1/-1}.attendance-resolution-item>.primary-action{width:100%;justify-content:center}}

/* Tablica rejestracyjna: zachowuje kontrast także na ciemnej tablicy. */
.dashboard-vehicle-head .vehicle-registration-plate,.vehicle-card-head .vehicle-registration-plate{position:relative;display:inline-flex;align-items:center;min-height:52px;padding:8px 14px 8px 31px;color:#10182c;background:#f8f9fc;border-color:#111827;letter-spacing:.055em;isolation:isolate}
.dashboard-vehicle-head .vehicle-registration-plate::before,.vehicle-card-head .vehicle-registration-plate::before{position:absolute;z-index:-1;inset:2px auto 2px 2px;width:21px;border-radius:5px 0 0 5px;background:#1749ad;content:""}
.dashboard-vehicle-head .vehicle-registration-plate::after,.vehicle-card-head .vehicle-registration-plate::after{position:absolute;left:7px;top:8px;color:#fff;font-family:Arial,sans-serif;font-size:7px;font-weight:800;letter-spacing:0;content:"PL"}
[data-theme="dark"] .dashboard-vehicle-head .vehicle-registration-plate,[data-theme="dark"] .vehicle-card-head .vehicle-registration-plate{color:#0d1730;background:linear-gradient(180deg,#fff 0%,#edf1f8 100%);border-color:#aeb9cf;box-shadow:0 2px 7px rgba(0,0,0,.25)}

/* Zlecenia: nagłówki grup nie mogą odziedziczyć jasnych teł. */
[data-theme="dark"] .admin-task-date-group{border-color:var(--dark-border);background:var(--dark-surface)}
[data-theme="dark"] .admin-task-date-heading{border-color:var(--dark-border);background:var(--dark-surface-raised)}
[data-theme="dark"] .admin-task-date-heading h3{color:var(--dark-text)}
[data-theme="dark"] .admin-task-date-heading span,[data-theme="dark"] .admin-task-date-empty{color:var(--dark-muted)}
[data-theme="dark"] .admin-task-date-heading>strong{color:#bdb5ff;background:#29235a}
[data-theme="dark"] .admin-task-date-group.tomorrow .admin-task-date-heading{background:#162b2a}
[data-theme="dark"] .admin-task-date-group.tomorrow .admin-task-date-heading>strong{color:#70e2b0;background:#173e38}
[data-theme="dark"] .admin-task-date-group.overdue .admin-task-date-heading{background:#351f29}
[data-theme="dark"] .admin-task-date-group.overdue .admin-task-date-heading>strong{color:#ffb1bc;background:#512534}

/* Czas pracy: szczegółowe karty nie mogą pozostać jasne w ciemnym motywie. */
[data-theme="dark"] .admin-day-row{border-color:var(--dark-border);background:var(--dark-surface-soft)}
[data-theme="dark"] .admin-day-row.working{border-color:#285449;background:#132b28}
[data-theme="dark"] .admin-day-row.muted{background:var(--dark-surface-soft)}
[data-theme="dark"] .admin-day-worker strong,[data-theme="dark"] .admin-day-times span,[data-theme="dark"] .admin-day-balance strong,[data-theme="dark"] .punch-date strong,[data-theme="dark"] .punch-worked strong{color:var(--dark-text)}
[data-theme="dark"] .admin-day-worker small,[data-theme="dark"] .admin-day-times b,[data-theme="dark"] .admin-day-balance span,[data-theme="dark"] .punch-note,[data-theme="dark"] .punch-worked span{color:var(--dark-muted)}
[data-theme="dark"] .admin-day-times span,[data-theme="dark"] .admin-day-balance,[data-theme="dark"] .punch-box,[data-theme="dark"] .punch-times span{border-color:#303d59;background:#172238}
[data-theme="dark"] .work-total{border-color:var(--dark-border)}
[data-theme="dark"] .protocol-save-alert{color:#8df0bc;border-color:#285c46;background:#123326}

/* Plan zadań: kolor paska pochodzi z kolorów przypisanych pracowników w CRM. */
.dashboard-task{
    margin-top:8px;
    border:1px solid #e7ebf3;
    border-radius:8px;
}
.dashboard-task::before{
    top:0;
    bottom:0;
    background:var(--task-worker-color,#4f46e5);
    border-radius:7px 0 0 7px;
}
.dashboard-task+.dashboard-task{margin-top:8px;border-top:1px solid #e7ebf3}
.dashboard-task .dashboard-task-workers{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:3px}.dashboard-task .dashboard-task-worker{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:11px;font-weight:650;line-height:1.25;white-space:nowrap}.dashboard-task .dashboard-task-worker i{display:block;width:7px;height:7px;flex:0 0 auto;border-radius:50%}
[data-theme="dark"] .dashboard-task{background:var(--dark-surface-soft);border-color:var(--dark-border)}
[data-theme="dark"] .dashboard-task+.dashboard-task{border-color:var(--dark-border)}
[data-theme="dark"] .dashboard-task strong{color:var(--dark-text)}
[data-theme="dark"] .dashboard-task span{color:var(--dark-muted)}
[data-theme="dark"] .dashboard-task-status{color:#cec8ff;background:#2a2755}

/* Kalendarz tygodniowy: siatka i lista wydarzeń w palecie ciemnego motywu. */
[data-theme="dark"] .admin-calendar-weekdays{color:var(--dark-muted);border-color:var(--dark-border);background:var(--dark-surface-raised)}
[data-theme="dark"] .admin-calendar-board{background:var(--dark-surface-soft)}
[data-theme="dark"] .admin-calendar-week{border-color:var(--dark-border)}
[data-theme="dark"] .admin-calendar-week-number{color:var(--dark-muted);border-color:var(--dark-border);background:var(--dark-surface-raised)}
[data-theme="dark"] .admin-calendar-day{color:var(--dark-text);border-color:#303d59}
[data-theme="dark"] .admin-calendar-day.muted{color:#59657e}
[data-theme="dark"] .admin-calendar-day.today{color:#ff9daa}
[data-theme="dark"] .admin-calendar-event-bar.pending{color:#a9e9c4;border-color:#3b7e5c;background:#173b2d}
[data-theme="dark"] .admin-calendar-list-item{border-color:var(--dark-border);background:var(--dark-surface-soft)}
[data-theme="dark"] .admin-calendar-list-item.green{background:#12251f}
[data-theme="dark"] .admin-calendar-list-item strong{color:var(--dark-text)}
[data-theme="dark"] .admin-calendar-list-item span,[data-theme="dark"] .admin-calendar-list-item small{color:var(--dark-muted)}

/* Edycja czasu pracy: bez jasnego kafelka na ciemnym tle. */
[data-theme="dark"] .work-time-icon-action{color:#b9b2ff !important;border-color:#3b3974 !important;background:#29255a !important}
[data-theme="dark"] .work-time-icon-action:hover{background:#373078 !important}
[data-theme="dark"] .work-time-icon-action.finish{color:#ffb3c0 !important;border-color:#71384b !important;background:#40212d !important}

[data-theme="dark"] .punch-source {
    width: fit-content;
    padding: 4px 7px;
    color: #c4bcff;
    background: #27214f;
    border: 1px solid #3c3670;
    border-radius: 6px;
}

[data-theme="dark"] .punch-history { color: #91b7ff; }

/* Flota na żywo: ten sam układ kart w obu motywach (mark-up ma wewnętrzny kontener). */
.tracking-vehicle-list{gap:10px}
.tracking-vehicle{display:block;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff}
.tracking-vehicle:last-child{border-bottom:1px solid var(--line)}
.tracking-vehicle-content{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:start;gap:12px}
.tracking-vehicle-info{display:grid;min-width:0;gap:4px}
.tracking-vehicle-info strong{font-size:17px;line-height:1.35}
.tracking-vehicle-actions{display:flex;align-items:center;gap:8px}
.tracking-vehicle-actions .tracking-map-button{flex:0 0 34px}
@media(max-width:640px){.tracking-vehicle-content{grid-template-columns:42px minmax(0,1fr)}.tracking-vehicle-actions{grid-column:1/-1;justify-content:space-between}}

@media (max-width: 680px) {
    .admin-task-card-heading > div > strong {
        white-space: normal;
    }
}

[data-theme="dark"] .admin-dashboard-overview {
    gap: 14px;
    padding: 20px;
    border-color: var(--dark-border);
    background: linear-gradient(135deg, #18233a 0%, #151d30 100%) !important;
}

[data-theme="dark"] .admin-overview-copy > span,
[data-theme="dark"] .admin-overview-copy p,
[data-theme="dark"] .admin-overview-metric > small {
    color: var(--dark-muted) !important;
}

[data-theme="dark"] .admin-overview-copy h2,
[data-theme="dark"] .admin-overview-metric > strong {
    color: var(--dark-text) !important;
}

[data-theme="dark"] .admin-overview-metric {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 3px 9px;
    padding: 12px;
    border-color: #32405e;
    background: #101829 !important;
}

[data-theme="dark"] .admin-overview-metric > span {
    width: 36px;
    height: 36px;
    color: #a79bff;
    border: 0;
    background: #292451;
}

[data-theme="dark"] .admin-overview-metric.warning > span { color: #f7bb63; background: #3a2a16; }
[data-theme="dark"] .admin-overview-metric.work > span { color: #65d6a5; background: #15392e; }
[data-theme="dark"] .admin-overview-metric.service > span { color: #a79bff; background: #292451; }
[data-theme="dark"] .admin-overview-metric > svg { display: none; }

[data-theme="dark"] .admin-quick-grid .dashboard-shortcut span:first-child {
    color: #a79bff;
    border-color: #374363;
    background: #202a43;
}

.dashboard-admin-work-actions {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.admin-dashboard .dashboard-admin-work-actions .dashboard-admin-action {
    min-width: 142px;
    margin-top: 0;
}

.dashboard-attendance-inline {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    min-width: 245px;
    padding: 7px 10px;
    border: 1px solid #e7eaf2;
    border-radius: 7px;
    color: #141c3d;
    background: #fbfcff;
    text-align: left;
}

.dashboard-attendance-inline > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.dashboard-attendance-inline small {
    overflow: hidden;
    color: #71809f;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-attendance-inline strong {
    color: #111936;
    font-size: 17px;
    line-height: 1.1;
}

.dashboard-attendance-inline > svg {
    width: 16px;
    color: #8792ad;
}

.dashboard-attendance-inline-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    color: #be123c;
    background: #fff1f2;
}

.dashboard-attendance-inline-icon svg {
    width: 17px;
}

.notification-empty-state {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 18px;
}

.notification-empty-state > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 7px;
    color: #687797;
    background: #f1f4fa;
}

.notification-empty-state > span svg {
    width: 20px;
}

.notification-empty-state > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.notification-empty-state strong {
    color: #111936;
    font-size: 14px;
}

.notification-empty-state small {
    color: #71809f;
    font-size: 11px;
}

[data-theme="dark"] .dashboard-attendance-inline,
[data-theme="dark"] .notification-empty-state > span {
    border-color: var(--line);
    background: #121b2d;
}

[data-theme="dark"] .dashboard-attendance-inline strong,
[data-theme="dark"] .notification-empty-state strong {
    color: var(--ink);
}

[data-theme="dark"] .dashboard-attendance-inline small,
[data-theme="dark"] .notification-empty-state small {
    color: var(--muted);
}

[data-theme="dark"] .dashboard-admin-empty {
    border-color: var(--dark-border, var(--line)) !important;
    color: var(--dark-muted, var(--muted)) !important;
    background: var(--dark-surface-soft, #121b2d) !important;
}

[data-theme="dark"] .admin-dashboard .dashboard-admin-action {
    border-color: transparent !important;
    color: #fff !important;
    background: #6255d7 !important;
}

[data-theme="dark"] .dashboard-admin-work-card {
    border-color: var(--dark-border) !important;
    background: #171f31 !important;
}

[data-theme="dark"] .dashboard-admin-work-card .dashboard-side-title > h2,
[data-theme="dark"] .dashboard-admin-work-card .dashboard-side-title > .badge-pill {
    color: var(--dark-text) !important;
}

[data-theme="dark"] .dashboard-admin-work-card .dashboard-admin-empty {
    border-style: solid !important;
    border-color: #2c3854 !important;
    background: #121a2a !important;
}

[data-theme="dark"] .dashboard-attendance-inline {
    border-color: #2f3b57 !important;
    background: #121a2a !important;
}

[data-theme="dark"] .dashboard-attendance-inline-icon {
    color: #fb7185;
    background: #3a1d2a;
}

[data-theme="dark"] .dashboard-attendance-inline > svg {
    color: #8e9bb8;
}

[data-theme="dark"] .dashboard-admin-work-card .dashboard-admin-action:hover {
    background: #7568e6 !important;
}

[data-theme="dark"] .admin-upcoming-leave .employee-dot,
[data-theme="dark"] .dashboard-upcoming-leave .employee-dot {
    box-shadow: 0 0 0 2px var(--dark-surface-raised, var(--card));
}

@media (max-width: 760px) {
    .admin-dashboard .admin-overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-dashboard .admin-overview-metric {
        min-width: 0;
        padding: 8px 6px;
    }

    .admin-dashboard .admin-overview-metric strong {
        font-size: 16px;
    }

    .admin-dashboard .admin-overview-metric small {
        font-size: 8px;
        line-height: 1.2;
    }

    .dashboard-admin-work-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-dashboard .dashboard-admin-work-actions .dashboard-admin-action,
    .dashboard-attendance-inline {
        width: 100%;
        min-width: 0;
    }
}
[data-theme="dark"] {
    --dark-page: #0e1422;
    --dark-surface: #171f31;
    --dark-surface-raised: #171f31;
    --dark-surface-soft: #171f31;
    --page: #0e1422;
    --background: #0e1422;
    --card: #171f31;
    --surface: #171f31;
    --surface-secondary: #171f31;
}

html[data-theme="dark"],
[data-theme="dark"] body,
[data-theme="dark"] #app,
[data-theme="dark"] .app-shell,
[data-theme="dark"] .app-frame,
[data-theme="dark"] .app-main,
[data-theme="dark"] .app-view,
[data-theme="dark"] .page-content,
[data-theme="dark"] .screen-root,
[data-theme="dark"] .screen,
[data-theme="dark"] .screen-content,
[data-theme="dark"] .dashboard-layout,
[data-theme="dark"] .admin-dashboard,
[data-theme="dark"] .admin-dashboard-ordered {
    background-color: var(--dark-page) !important;
    background-image: none !important;
}

[data-theme="dark"] .admin-dashboard-block {
    background: transparent !important;
}

[data-theme="dark"] :where(
    .desktop-sidebar,
    .bottom-nav,
    .admin-dashboard-overview,
    .app-card,
    .dashboard-card,
    .dashboard-panel,
    .admin-dashboard-card,
    .dashboard-attendance-inline,
    .dashboard-admin-empty,
    .notification-empty-state,
    .notification-empty-state > span
) {
    background-color: var(--dark-surface) !important;
    background-image: none !important;
}

[data-theme="dark"] .app-topbar {
    background-color: var(--dark-page) !important;
    background-image: none !important;
}

/* Admin header: keep the profile avatar and brand mark deliberate, not faded tiles. */
[data-theme="dark"] .app-topbar .profile-button {
    background: transparent;
}

[data-theme="dark"] .app-topbar .dashboard-avatar {
    width: 38px;
    height: 38px;
    border-color: #c9d2ff;
    box-shadow: none;
}

[data-theme="dark"] .admin-dashboard-topbar .topbar-brand-mark {
    width: 28px;
    height: 28px;
    padding: 0;
    opacity: 1;
    background: transparent;
    border-radius: 0;
    filter: none;
}

[data-theme="dark"] .preference-icon {
    color: #8b7cff;
    background: var(--dark-surface-raised);
    border: 1px solid var(--dark-border);
}

[data-theme="dark"] .notification-icon {
    color: #8b7cff;
    background: var(--dark-surface-raised);
    border: 1px solid var(--dark-border);
}

[data-theme="dark"] .client-logo {
    color: var(--client-accent-dark, #8b7cff);
    background: var(--client-soft-dark, var(--dark-surface-raised));
    border: 1px solid var(--dark-border);
}

[data-theme="dark"] .vehicle-card-head strong {
    color: var(--dark-text);
    background: var(--dark-surface-raised);
    border-color: var(--dark-border);
}

[data-theme="dark"] .vehicle-star {
    color: var(--dark-muted);
    background: var(--dark-surface-raised);
    border-color: var(--dark-border);
}

[data-theme="dark"] .vehicle-star.active {
    color: #ffd39a;
    background: #3b2915;
    border-color: #71491d;
}

[data-theme="dark"] .profile-progress {
    background: var(--dark-border);
}

.offer-editor-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.offer-editor-actions > button {
    width: 100%;
    min-width: 0;
    justify-content: center;
}

[data-theme="dark"] .offer-editor-actions .offer-cancel-action {
    color: #ffc7d5;
    background: #3b1420;
    border-color: #6a2840;
}

.offer-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.offer-list .card-title {
    margin: 0 2px 2px;
}

.offer-list-item,
.offer-list-item:last-child {
    grid-template-columns: minmax(0, 1fr) 54px;
    overflow: hidden;
    border: 1px solid #e0e6f1;
    border-radius: 10px;
    background: #f8faff;
}

.offer-list-item > button:not(.icon-button) {
    padding: 14px;
}

.offer-list-item > button:not(.icon-button):hover {
    background: #f0f3ff;
}

.offer-list-item > .icon-button {
    width: 42px;
    height: 42px;
    margin-right: 10px;
    padding: 0;
    color: #ffffff;
    background: #4f46e5;
    border: 0;
    border-radius: 8px;
}

.offer-list-item > .icon-button:hover {
    background: #4338ca;
}

.offer-list-item > .icon-button svg {
    display: block !important;
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

[data-theme="dark"] .offer-list-item,
[data-theme="dark"] .offer-list-item:last-child {
    border-color: var(--dark-border);
    background: var(--dark-surface-soft);
}

[data-theme="dark"] .offer-list-item > button:not(.icon-button):hover {
    background: var(--dark-surface-raised);
}

[data-theme="dark"] .offer-list-item > .icon-button {
    color: #ffffff;
    background: #5146e5;
}

[data-theme="dark"] .attendance-admin-count {
    color: var(--dark-muted);
    background: var(--dark-surface-raised);
    border: 1px solid var(--dark-border);
}

[data-theme="dark"] .attendance-admin-count.has-alert {
    color: #ffc7d5;
    background: #3b1420;
    border-color: #6a2840;
}

[data-theme="dark"] .preference-divider,
[data-theme="dark"] .preference-number {
    border-color: var(--dark-border);
}

[data-theme="dark"] .preference-divider {
    background: var(--dark-border);
}

[data-theme="dark"] .preference-number {
    column-gap: 10px;
}

[data-theme="dark"] .preference-number em {
    margin-left: 12px;
}

[data-theme="dark"] .profile-passkey-info {
    color: var(--dark-muted);
    background: var(--dark-surface-soft);
    border-color: var(--dark-border);
}

[data-theme="dark"] .profile-passkey-info strong {
    color: var(--dark-text);
}

[data-theme="dark"] .profile-passkey-info.enabled {
    color: #9ee9bf;
    background: #163026;
    border-color: #2e6041;
}

[data-theme="dark"] .profile-passkey-info.enabled strong {
    color: #b9f5d2;
}

[data-theme="dark"] .profile-passkey-info.enabled svg {
    color: #64d99a;
}

[data-theme="dark"] .profile-passkey-info.unsupported {
    background: var(--dark-surface-soft);
    border-color: var(--dark-border);
}

/* Leave administration: the legacy history cards used light-only fills. */
[data-theme="dark"] .leave-admin-item,
[data-theme="dark"] .leave-admin-item.history.green,
[data-theme="dark"] .leave-admin-item.history.red,
[data-theme="dark"] .leave-admin-employee,
[data-theme="dark"] .leave-admin-note,
[data-theme="dark"] .leave-admin-employee-grid div {
    background: var(--dark-surface-soft) !important;
    border-color: var(--dark-border) !important;
}

[data-theme="dark"] .leave-admin-item.history.green {
    border-left: 3px solid #35c878;
}

[data-theme="dark"] .leave-admin-item.history.red {
    border-left: 3px solid #ef6b7d;
}

[data-theme="dark"] .leave-admin-main strong,
[data-theme="dark"] .leave-admin-employee-grid strong {
    color: var(--dark-text) !important;
}

[data-theme="dark"] .leave-admin-main span,
[data-theme="dark"] .leave-admin-main small,
[data-theme="dark"] .leave-admin-note,
[data-theme="dark"] .leave-admin-employee-grid span {
    color: var(--dark-muted) !important;
}

[data-theme="dark"] .leave-admin-item.history.green .leave-list-status span {
    color: #a5f0c3;
    background: #173a2a;
}

[data-theme="dark"] .leave-admin-item.history.red .leave-list-status span {
    color: #ffc2ce;
    background: #3b1420;
}

/* Leave calendar: make the selected-day roster visible without relying on tiny bars. */
.leave-calendar-selection {
    display: grid;
    gap: 7px;
    padding: 0 16px 13px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.leave-calendar-selection > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.leave-calendar-selection button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px 8px;
    color: var(--ink-soft);
    background: var(--primary-soft);
    border: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

.leave-calendar-selection i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.leave-calendar-selection em {
    padding: 5px 7px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    font-style: normal;
}

.leave-calendar-selection small { color: var(--muted); }
.leave-calendar-bar-short { display: none; }

[data-theme="dark"] .leave-calendar-selection { color: var(--dark-muted); }
[data-theme="dark"] .leave-calendar-selection button,
[data-theme="dark"] .leave-calendar-selection em { color: #c4bcff; background: #27214f; }
[data-theme="dark"] .leave-calendar-selection small { color: var(--dark-muted); }

/* Company plan: show the selected-day roster above the dense month grid. */
.calendar-selection-summary {
    display: grid;
    gap: 7px;
    padding: 0 16px 13px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.calendar-selection-summary > div { display: flex; flex-wrap: wrap; gap: 6px; }
.calendar-selection-summary button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px 8px;
    color: var(--ink-soft);
    background: var(--primary-soft);
    border: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}
.calendar-selection-summary i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.calendar-selection-summary em { padding: 5px 7px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; font-style: normal; }
.calendar-selection-summary small { color: var(--muted); }

[data-theme="dark"] .calendar-selection-summary { color: var(--dark-muted); }
[data-theme="dark"] .calendar-selection-summary button,
[data-theme="dark"] .calendar-selection-summary em { color: #c4bcff; background: #27214f; }
[data-theme="dark"] .calendar-selection-summary small { color: var(--dark-muted); }

[data-theme="dark"] .admin-calendar-list-item,
[data-theme="dark"] .admin-calendar-list-item.green {
    background: var(--dark-surface-soft) !important;
    border-color: var(--dark-border) !important;
}
[data-theme="dark"] .admin-calendar-list-item strong { color: var(--dark-text) !important; }
[data-theme="dark"] .admin-calendar-list-item span,
[data-theme="dark"] .admin-calendar-list-item small { color: var(--dark-muted) !important; }

/* Kalendarz firmowy: pasek zlecenia dzieli się kolorami przypisanej brygady. */
.admin-calendar-list-item{position:relative;border-left:0!important}.admin-calendar-list-item::before{content:"";position:absolute;top:0;bottom:0;left:0;width:4px;border-radius:7px 0 0 7px;background:var(--event-color,var(--primary))}
.admin-calendar-workers{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:7px}.admin-calendar-workers span.admin-calendar-worker{display:inline-flex;align-items:center;gap:5px;width:auto;height:auto;color:var(--muted);background:transparent;border:0;box-shadow:none;font-size:11px;font-weight:650;line-height:1.25}.admin-calendar-worker-dot{display:block;width:8px;height:8px;flex:0 0 auto;border:1px solid #fff;border-radius:50%;box-shadow:0 0 0 1px var(--line)}.admin-calendar-workers .admin-calendar-worker b{color:inherit;font:inherit;white-space:nowrap}[data-theme="dark"] .admin-calendar-workers span.admin-calendar-worker{color:var(--dark-muted)}

/* Task details: the crew-arrival panel is a legacy light surface. */
[data-theme="dark"] .admin-task-arrival-panel {
    color: var(--dark-text);
    background: var(--dark-surface-soft) !important;
    border-color: var(--dark-border) !important;
}

[data-theme="dark"] .admin-task-arrival-panel > strong { color: var(--dark-text); }
[data-theme="dark"] .admin-task-travel {
    color: #d9def2 !important;
    background: #202a40 !important;
    border-color: var(--dark-border) !important;
}
[data-theme="dark"] .admin-task-travel.onsite,
[data-theme="dark"] .admin-task-travel.arrived { color: #a5f0c3 !important; background: #173a2a !important; border-color: #2d6d4c !important; }
[data-theme="dark"] .admin-task-travel.departed,
[data-theme="dark"] .admin-task-travel.enroute { color: #b8d4ff !important; background: #172c4a !important; border-color: #2b568b !important; }

/* WZ: make order search usable without opening a long native select list. */
.wz-order-search-help,
.wz-order-search-more {
    margin: 6px 0 12px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.35;
}

.wz-order-suggestions {
    display: grid;
    gap: 5px;
    margin: 7px 0 12px;
}

.wz-order-suggestion {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 9px 11px;
    color: var(--text);
    text-align: left;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
}

.wz-order-suggestion strong { color: var(--primary); font-size: .88rem; }
.wz-order-suggestion span { overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.wz-order-suggestion:hover,
.wz-order-suggestion:focus-visible,
.wz-order-suggestion.selected { border-color: var(--primary); background: var(--primary-soft); outline: none; }

[data-theme="dark"] .wz-order-search-help,
[data-theme="dark"] .wz-order-search-more,
[data-theme="dark"] .wz-order-suggestion span { color: var(--dark-muted); }
[data-theme="dark"] .wz-order-suggestion { color: var(--dark-text); background: var(--dark-surface-soft); border-color: var(--dark-border); }
[data-theme="dark"] .wz-order-suggestion strong { color: #b9b0ff; }
[data-theme="dark"] .wz-order-suggestion:hover,
[data-theme="dark"] .wz-order-suggestion:focus-visible,
[data-theme="dark"] .wz-order-suggestion.selected { color: var(--dark-text); border-color: #6e61de; background: #25204d; }

.settings-app-version {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding: 8px 2px 2px;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .02em;
    opacity: .7;
    text-align: center;
}

.settings-app-version .icon-button{width:27px;height:27px;color:inherit}.settings-app-version .icon-button:hover{color:var(--primary);background:var(--primary-soft)}.settings-app-version .icon-button:disabled{opacity:.55}
.gamification-hero{display:flex;align-items:center;gap:16px;background:linear-gradient(135deg,#392d83,#6a57dc);color:#fff}.gamification-rank-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:18px;background:rgba(255,255,255,.16)}.gamification-rank-icon svg{width:34px;height:34px;color:#ffe08a}.gamification-hero h2,.gamification-hero p{margin:3px 0}.gamification-hero strong{font-size:26px}.gamification-hero small{opacity:.78}.gamification-progress{height:8px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.25)}.gamification-progress i{display:block;height:100%;border-radius:inherit;background:#ffe08a}.gamification-ranking>div,.gamification-history>div{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #e4e9f2}.gamification-ranking>div>span{width:20px;color:#7280a1;font-weight:800;text-align:center}.gamification-ranking>div>i{width:10px;height:10px;border-radius:50%}.gamification-ranking em,.gamification-history strong{margin-left:auto;font-style:normal;font-weight:800}.gamification-history span{display:grid;gap:2px}.gamification-history small{color:#71809e;font-size:10px}.gamification-history .positive{color:#149457}.gamification-history .negative{color:#d84e5e}.gamification-trophies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gamification-trophies>div{display:grid;gap:5px;padding:13px;border:1px solid #dfe5f0;border-radius:13px;color:#8793ad;background:#f7f9fc}.gamification-trophies>div.earned{border-color:#e6ba4d;color:#815f10;background:#fff7df}.gamification-trophies svg{width:24px;height:24px}.gamification-trophies small{font-size:10px}[data-theme="dark"] .gamification-ranking>div,[data-theme="dark"] .gamification-history>div{border-color:var(--dark-border)}[data-theme="dark"] .gamification-trophies>div{border-color:var(--dark-border);background:var(--dark-surface);color:var(--dark-muted)}[data-theme="dark"] .gamification-trophies>div.earned{border-color:#80621a;background:#342b10;color:#f7d979}[data-theme="dark"] .gamification-history small{color:var(--dark-muted)}
/* Rank shields: one coherent Hydra asset sheet, static in lists and alive in the competition profile. */
.gamification-hero{min-height:156px}.gamification-shield-stage{width:122px;height:122px;flex:0 0 122px;display:grid;place-items:center;perspective:700px}.gamification-shield{--rank-x:0%;--rank-y:0%;position:relative;display:block;width:100%;height:100%;overflow:hidden;isolation:isolate;background-image:url('../img/gamification-ranks-v1.png');background-repeat:no-repeat;background-size:500% 200%;background-position:var(--rank-x) var(--rank-y);filter:drop-shadow(0 8px 12px rgba(5,9,30,.26));clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%);transform-style:preserve-3d}.gamification-shield::after{content:'';position:absolute;inset:-10% -45%;z-index:2;pointer-events:none;background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.66) 50%,transparent 60%);transform:translateX(-120%) skewX(-18deg);mix-blend-mode:screen}.gamification-shield.rank-1{--rank-x:0%;--rank-y:0%}.gamification-shield.rank-2{--rank-x:25%;--rank-y:0%}.gamification-shield.rank-3{--rank-x:50%;--rank-y:0%}.gamification-shield.rank-4{--rank-x:75%;--rank-y:0%}.gamification-shield.rank-5{--rank-x:100%;--rank-y:0%}.gamification-shield.rank-6{--rank-x:0%;--rank-y:100%}.gamification-shield.rank-7{--rank-x:25%;--rank-y:100%}.gamification-shield.rank-8{--rank-x:50%;--rank-y:100%}.gamification-shield.rank-9{--rank-x:75%;--rank-y:100%}.gamification-shield.rank-10{--rank-x:100%;--rank-y:100%}.gamification-hero-shield{animation:rank-shield-turn 7.2s ease-in-out infinite}.gamification-hero-shield::after{animation:rank-shield-sheen 5.8s ease-in-out infinite}.gamification-hero-shield.rank-6{filter:drop-shadow(0 0 14px rgba(137,255,164,.56))}.gamification-hero-shield.rank-7{filter:drop-shadow(0 0 15px rgba(100,157,255,.63))}.gamification-hero-shield.rank-8{filter:drop-shadow(0 0 17px rgba(190,103,255,.7))}.gamification-hero-shield.rank-9{filter:drop-shadow(0 0 18px rgba(119,67,255,.78))}.gamification-hero-shield.rank-10{filter:drop-shadow(0 0 21px rgba(170,224,255,.88))}.gamification-rank-mini{width:30px;height:30px;flex:0 0 30px;filter:drop-shadow(0 2px 4px rgba(5,9,30,.2))}.gamification-rank-mini::after{display:none}.gamification-ranking>div{min-height:42px}.gamification-ranking>div>span{flex:0 0 20px}@keyframes rank-shield-turn{0%,100%{transform:rotateX(2deg) rotateY(-11deg) translateY(0)}50%{transform:rotateX(-2deg) rotateY(11deg) translateY(-3px)}}@keyframes rank-shield-sheen{0%,18%{transform:translateX(-120%) skewX(-18deg);opacity:0}28%,58%{opacity:.85}74%,100%{transform:translateX(120%) skewX(-18deg);opacity:0}}@media (prefers-reduced-motion:reduce){.gamification-hero-shield,.gamification-hero-shield::after{animation:none!important}}@media(max-width:560px){.gamification-hero{align-items:flex-start}.gamification-shield-stage{width:92px;height:92px;flex-basis:92px}.gamification-hero strong{font-size:22px}.gamification-ranking>div{gap:8px}}
.gamification-hero{min-height:132px;padding:20px 24px;gap:20px;background:linear-gradient(135deg,#1c2944,#273d67)}.gamification-shield-stage{width:92px;height:92px;flex-basis:92px}.gamification-hero>div:last-child{display:grid;gap:2px;min-width:0}.gamification-hero h2{font-size:30px;line-height:1.05;margin:0}.gamification-hero strong{font-size:22px;line-height:1.1}.gamification-hero p{font-size:14px;line-height:1.3;margin:4px 0 5px}.gamification-hero small{font-size:12px;letter-spacing:.01em}.gamification-progress{max-width:360px}.gamification-rank-mini{width:26px;height:26px;flex-basis:26px}.gamification-ranking>div{min-height:48px;gap:12px}.gamification-ranking strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gamification-ranking em{font-size:12px;white-space:nowrap}@media(max-width:560px){.gamification-hero{min-height:0;padding:16px;gap:14px}.gamification-shield-stage{width:72px;height:72px;flex-basis:72px}.gamification-hero h2{font-size:24px}.gamification-hero strong{font-size:19px}.gamification-hero p{font-size:12px}.gamification-progress{max-width:100%}.gamification-ranking em{font-size:11px}}
.gamification-shield-stage{width:82px;height:116px;flex-basis:82px}.gamification-shield{width:68px;height:112px;clip-path:polygon(50% 14%,88% 22%,95% 33%,95% 67%,87% 81%,50% 95%,13% 81%,5% 67%,5% 33%,12% 22%)}.gamification-rank-mini{width:23px;height:38px;flex-basis:23px}.gamification-ranking>div{min-height:50px}@media(max-width:560px){.gamification-shield-stage{width:62px;height:86px;flex-basis:62px}.gamification-shield{width:52px;height:86px}.gamification-rank-mini{width:20px;height:33px;flex-basis:20px}}
.gamification-shield-stage{width:108px;height:126px;flex-basis:108px}.gamification-shield{width:104px;height:126px;overflow:visible;clip-path:none;background:none}.gamification-shield>img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 12px rgba(5,9,30,.28))}.gamification-rank-mini{width:30px;height:38px;flex-basis:30px;filter:none}.gamification-rank-mini>img{filter:drop-shadow(0 2px 3px rgba(5,9,30,.24))}.gamification-rank-mini::after{display:none}@media(max-width:560px){.gamification-shield-stage{width:78px;height:94px;flex-basis:78px}.gamification-shield{width:76px;height:94px}.gamification-rank-mini{width:26px;height:32px;flex-basis:26px}}
.gamification-hero-shield::after{display:none}.gamification-hero-shield{animation:rank-shield-turn 7.2s ease-in-out infinite}
.gamification-hero-shield{animation:rank-shield-turn 4.8s cubic-bezier(.45,.05,.55,.95) infinite;will-change:transform}.gamification-hero-shield>img{animation:rank-emblem-glow 4.8s ease-in-out infinite;will-change:filter}@keyframes rank-shield-turn{0%,100%{transform:rotateX(4deg) rotateY(-18deg) translateY(0) scale(1)}50%{transform:rotateX(-4deg) rotateY(18deg) translateY(-6px) scale(1.035)}}@keyframes rank-emblem-glow{0%,100%{filter:drop-shadow(0 7px 10px rgba(5,9,30,.28)) brightness(1)}50%{filter:drop-shadow(0 12px 17px rgba(104,129,255,.52)) brightness(1.13)}}@media (prefers-reduced-motion:reduce){.gamification-hero-shield,.gamification-hero-shield>img{animation:none!important}}
.gamification-admin-preview .gamification-preview-switch{animation:gamification-preview-switch .76s ease-in-out both!important}.gamification-admin-preview .gamification-preview-switch>img{animation:rank-emblem-glow 4.8s ease-in-out infinite}@keyframes gamification-preview-switch{0%,100%{opacity:1;transform:scale(1) rotateY(0)}46%{opacity:.04;transform:scale(.9) rotateY(32deg)}54%{opacity:.04;transform:scale(.9) rotateY(-32deg)}}@media (prefers-reduced-motion:reduce){.gamification-admin-preview .gamification-preview-switch{animation:none!important}}
.live-refresh-preloader{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:24px;background:rgba(6,12,25,.54);backdrop-filter:blur(6px)}.live-refresh-preloader[hidden]{display:none}.live-refresh-preloader>div{display:grid;justify-items:center;gap:9px;min-width:230px;padding:22px 26px;border:1px solid #394969;border-radius:18px;background:#172238;box-shadow:0 20px 52px rgba(0,0,0,.38);color:#eaf0ff;font-size:13px;font-weight:750;text-align:center}.live-refresh-preloader>div>i{display:block;width:30px;height:30px;border:3px solid rgba(160,173,255,.26);border-top-color:#9386ff;border-radius:50%;animation:live-refresh-spin .8s linear infinite}.live-refresh-preloader small{color:#a8b8d7;font-size:11px;font-weight:700}.live-refresh-progress{display:block;width:100%;height:7px;overflow:hidden;border:1px solid #435474;border-radius:999px;background:#10192b}.live-refresh-progress em{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6e5dff,#c1b4ff);box-shadow:0 0 10px rgba(149,129,255,.7);transition:width .45s ease}@keyframes live-refresh-spin{to{transform:rotate(360deg)}}
.admin-task-status.in_progress{background:#164b3a;color:#80f1c4}.admin-task-status.completed{background:#17375f;color:#9dcbff}.admin-task-status.closed{background:#2f2758;color:#c7b9ff}.admin-task-status.cancelled{background:#542333;color:#ffadc0}.admin-task-status.scheduled{background:#302866;color:#c9c0ff}
.gamification-progress{position:relative;height:11px;isolation:isolate;border:1px solid rgba(180,191,255,.16);background:linear-gradient(90deg,#26324b,#3b4862);box-shadow:inset 0 1px 3px rgba(0,0,0,.42),0 0 0 1px rgba(255,255,255,.03);z-index:0}.gamification-progress::after{content:'';position:absolute;z-index:1;top:-45%;bottom:-45%;width:22%;left:-30%;pointer-events:none;background:linear-gradient(105deg,transparent 14%,rgba(215,226,255,.08) 34%,rgba(255,255,255,.64) 50%,rgba(184,199,255,.12) 66%,transparent 86%);filter:blur(1px);transform:skewX(-20deg);animation:rank-progress-track-ray 6.8s ease-in-out infinite}.gamification-progress i{position:relative;z-index:2;overflow:hidden;background:linear-gradient(90deg,#6552ed 0%,#9b87ff 45%,#d1c4ff 70%,#7967f5 100%);background-size:220% 100%;box-shadow:0 0 9px rgba(142,113,255,.88),inset 0 1px 1px rgba(255,255,255,.58);animation:rank-progress-shimmer 3.2s linear infinite}.gamification-progress i::after{content:'';position:absolute;inset:-70% -28%;background:linear-gradient(108deg,transparent 38%,rgba(255,255,255,.88) 50%,transparent 62%);transform:translateX(-115%) skewX(-20deg);animation:rank-progress-fill-ray 3.9s ease-in-out infinite}@keyframes rank-progress-track-ray{0%,70%,100%{transform:translateX(0) skewX(-20deg);opacity:0}12%{opacity:.76}42%{transform:translateX(590%) skewX(-20deg);opacity:.32}}@keyframes rank-progress-shimmer{to{background-position:220% 0}}@keyframes rank-progress-fill-ray{0%,18%{transform:translateX(-115%) skewX(-20deg);opacity:0}32%,54%{opacity:.92}78%,100%{transform:translateX(115%) skewX(-20deg);opacity:0}}@media (prefers-reduced-motion:reduce){.gamification-progress::after,.gamification-progress i,.gamification-progress i::after{animation:none!important}}
.gamification-rank-mini{width:46px;height:56px;flex-basis:46px}.gamification-ranking>div{min-height:66px}.gamification-loader{min-height:310px;display:grid;place-items:center;align-content:center;gap:18px;overflow:hidden;text-align:center;background:radial-gradient(circle at 50% 38%,#2c2962 0,#1b2945 42%,#152038 100%)}.gamification-loader>div:last-child{display:grid;gap:5px}.gamification-loader small{color:#b9adff;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.gamification-loader h2{margin:0;color:#fff;font-size:25px}.gamification-loader p{margin:0;color:#aab9dc;font-size:13px}.gamification-loader-aura{position:relative;display:grid;place-items:center;width:132px;height:132px;border:1px solid rgba(179,159,255,.45);border-radius:50%;background:radial-gradient(circle,rgba(145,111,255,.28),rgba(80,65,161,.06) 54%,transparent 70%);box-shadow:0 0 26px rgba(128,102,255,.32),inset 0 0 22px rgba(174,158,255,.18);animation:gamification-loader-orbit 3.4s linear infinite}.gamification-loader-aura::before,.gamification-loader-aura::after{content:'';position:absolute;border-radius:50%;border:1px solid rgba(197,183,255,.34)}.gamification-loader-aura::before{inset:-11px;border-left-color:transparent;border-bottom-color:transparent;animation:gamification-loader-orbit 2.5s linear infinite reverse}.gamification-loader-aura::after{inset:14px;border-right-color:transparent;border-top-color:transparent;animation:gamification-loader-orbit 4.6s linear infinite}.gamification-loader-shield{position:relative;z-index:2;width:84px;height:104px;animation:gamification-loader-float 1.8s ease-in-out infinite}.gamification-loader-shield>img{animation:rank-emblem-glow 2.5s ease-in-out infinite}.gamification-loader-rune{position:absolute;z-index:3;color:#e7dcff;font-size:20px;text-shadow:0 0 12px #a68aff;animation:gamification-loader-float 1.5s ease-in-out infinite}.gamification-loader-rune.rune-one{top:4px;right:13px}.gamification-loader-rune.rune-two{bottom:9px;left:11px;animation-delay:-.8s}@keyframes gamification-loader-orbit{to{transform:rotate(360deg)}}@keyframes gamification-loader-float{0%,100%{transform:translateY(-3px) scale(1)}50%{transform:translateY(4px) scale(1.045)}}@media(max-width:560px){.gamification-rank-mini{width:36px;height:44px;flex-basis:36px}.gamification-ranking>div{min-height:56px}.gamification-loader{min-height:260px}}@media (prefers-reduced-motion:reduce){.gamification-loader-aura,.gamification-loader-aura::before,.gamification-loader-aura::after,.gamification-loader-shield,.gamification-loader-shield>img,.gamification-loader-rune{animation:none!important}}
.gamification-loader-aura{animation:none}.gamification-loader-aura::before{animation:gamification-loader-orbit 2.5s linear infinite reverse}.gamification-loader-aura::after{animation:gamification-loader-orbit 4.6s linear infinite}.gamification-loader-shield,.gamification-loader-shield>img,.gamification-loader-rune{animation:none!important}.gamification-loader-rune{opacity:.78}.gamification-loader>div:last-child{width:min(310px,100%);gap:7px}.gamification-loader-progress{height:8px;margin:5px 0 2px;overflow:hidden;border:1px solid rgba(192,181,255,.35);border-radius:999px;background:#101932;box-shadow:inset 0 1px 3px rgba(0,0,0,.45)}.gamification-loader-progress i{display:block;width:8%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6957ef,#bdaeff,#e7e0ff,#7a66f6);background-size:210% 100%;box-shadow:0 0 11px rgba(162,140,255,.86);animation:gamification-loader-progress 2s ease-in-out infinite}.gamification-loader-steps{display:grid;gap:4px;text-align:left}.gamification-loader-steps span{display:flex;align-items:center;gap:6px;color:#8292b8;font-size:10px;font-weight:750;opacity:.32;animation:gamification-loader-step 2s ease-in-out infinite}.gamification-loader-steps span:nth-child(2){animation-delay:.5s}.gamification-loader-steps span:nth-child(3){animation-delay:1s}.gamification-loader-steps svg{width:13px;height:13px;color:#b7a8ff}@keyframes gamification-loader-progress{0%{width:8%;background-position:0 0}70%{width:92%;background-position:150% 0}100%{width:100%;background-position:210% 0}}@keyframes gamification-loader-step{0%,18%{opacity:.32;color:#8292b8}28%,62%{opacity:1;color:#e6e2ff}74%,100%{opacity:.42;color:#8292b8}}@media (prefers-reduced-motion:reduce){.gamification-loader-aura::before,.gamification-loader-aura::after,.gamification-loader-progress i,.gamification-loader-steps span{animation:none!important}.gamification-loader-progress i{width:70%}.gamification-loader-steps span{opacity:1}}

/* Każda ranga ma własną energię tarczy i kolor postępu. */
.rank-tone-1{--rank-fill:#ae7541;--rank-glow:rgba(196,130,69,.48)}.rank-tone-2{--rank-fill:#88a8a5;--rank-glow:rgba(151,205,199,.48)}.rank-tone-3{--rank-fill:#5dc7a6;--rank-glow:rgba(82,220,177,.53)}.rank-tone-4{--rank-fill:#4ba5e8;--rank-glow:rgba(75,165,232,.58)}.rank-tone-5{--rank-fill:#9772e8;--rank-glow:rgba(160,113,246,.62)}.rank-tone-6{--rank-fill:#e05a9b;--rank-glow:rgba(239,86,167,.65)}.rank-tone-7{--rank-fill:#df9a43;--rank-glow:rgba(244,174,72,.68)}.rank-tone-8{--rank-fill:#e65d56;--rank-glow:rgba(244,93,83,.72)}.rank-tone-9{--rank-fill:#c84eff;--rank-glow:rgba(201,78,255,.78)}.rank-tone-10{--rank-fill:#8eeaff;--rank-glow:rgba(123,232,255,.9)}.gamification-hero[class*="rank-tone-"] .gamification-progress i,.dashboard-gamification-card[class*="rank-tone-"] .dashboard-gamification-progress i{background:linear-gradient(90deg,color-mix(in srgb,var(--rank-fill),#fff 58%),var(--rank-fill),color-mix(in srgb,var(--rank-fill),#111a34 12%));box-shadow:0 0 11px var(--rank-glow)}.rank-tone-1 .gamification-shield>img,.rank-tone-2 .gamification-shield>img,.rank-tone-3 .gamification-shield>img,.rank-tone-4 .gamification-shield>img,.rank-tone-5 .gamification-shield>img,.rank-tone-6 .gamification-shield>img,.rank-tone-7 .gamification-shield>img,.rank-tone-8 .gamification-shield>img,.rank-tone-9 .gamification-shield>img,.rank-tone-10 .gamification-shield>img{filter:drop-shadow(0 0 12px var(--rank-glow))}.gamification-legend-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.gamification-legend-entry>div{display:flex;align-items:center;gap:10px}.gamification-legend-entry span{display:grid;width:38px;height:38px;place-items:center;border-radius:11px;color:#c6bfff;background:#292656}.gamification-legend-entry span svg{width:20px}.gamification-legend-entry h2{margin:0;color:var(--dark-text);font-size:15px}.gamification-legend-entry p{margin:3px 0 0;color:var(--dark-muted);font-size:11px}.gamification-legend-entry>button{display:grid;width:38px;height:38px;place-items:center;border:0;border-radius:10px;background:#232e4b;color:#c5cdef}.gamification-legend-backdrop{position:fixed;z-index:6000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(4,10,22,.7);backdrop-filter:blur(6px)}.gamification-legend-modal{width:min(680px,100%);max-height:calc(100dvh - 36px);overflow:auto;padding:20px;border:1px solid #3c4a68;border-radius:18px;background:#172238;box-shadow:0 22px 70px rgba(0,0,0,.55)}.gamification-legend-modal>header,.gamification-legend-modal>header>div{display:flex;align-items:center}.gamification-legend-modal>header{justify-content:space-between;gap:12px}.gamification-legend-modal>header>div{gap:10px}.gamification-legend-modal>header>div>span{display:grid;width:40px;height:40px;place-items:center;border-radius:12px;background:#282558;color:#c6bfff}.gamification-legend-modal h2,.gamification-legend-modal h3{margin:0;color:var(--dark-text)}.gamification-legend-modal header small{color:#b9adff;font-size:10px;font-weight:850;text-transform:uppercase}.gamification-legend-intro{margin:16px 0;color:var(--dark-muted);font-size:12px;line-height:1.45}.gamification-rank-guide{display:grid;gap:9px}.gamification-rank-guide article{display:grid;grid-template-columns:62px minmax(0,1fr);gap:10px;align-items:center;padding:10px;border:1px solid #35445f;border-radius:13px;background:#101a2d}.gamification-rank-guide-shield{display:grid;place-items:center;width:58px;height:72px;border-radius:12px;background:radial-gradient(circle,var(--rank-glow),transparent 68%)}.gamification-guide-shield{width:48px;height:62px}.gamification-rank-guide small,.gamification-rank-guide em{color:#9baacc;font-size:10px;font-style:normal}.gamification-rank-guide h3{margin:2px 0 4px;font-size:15px}.gamification-rank-guide p{margin:2px 0;color:#c4cfe3;font-size:11px;line-height:1.35}.gamification-rank-guide p strong{color:#e9edff}.gamification-crm-rules{display:grid;gap:7px;margin-top:16px;padding-top:14px;border-top:1px solid #35445f}.gamification-crm-rules h3{font-size:14px}.gamification-crm-rules>div{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border-radius:9px;background:#101a2d;color:#c7d1e6;font-size:11px}.gamification-crm-rules>div strong{color:#82dfad}.gamification-crm-rules>div.disabled strong{color:#f1a1af}@media(max-width:560px){.gamification-legend-backdrop{padding:0;place-items:end center}.gamification-legend-modal{max-height:90dvh;padding:16px;border-radius:18px 18px 0 0}.gamification-rank-guide article{grid-template-columns:54px minmax(0,1fr);padding:8px}.gamification-rank-guide-shield{width:50px;height:64px}.gamification-guide-shield{width:42px;height:54px}}

.gamification-admin form{display:grid;gap:10px}.gamification-admin label{display:grid;grid-template-columns:minmax(0,1fr) 90px auto;align-items:center;gap:9px;color:#607293;font-size:12px;font-weight:700}.gamification-admin em{font-size:11px;font-style:normal;color:#7483a1}[data-theme="dark"] .gamification-admin label,[data-theme="dark"] .gamification-admin em{color:var(--dark-muted)}
.gamification-trophies>div{position:relative}.gamification-trophies>div>small{min-height:28px;line-height:1.3}.gamification-trophies>div>span{font-size:11px;font-weight:800;color:inherit}.gamification-trophy-progress{height:5px;overflow:hidden;border-radius:99px;background:rgba(98,113,143,.24)}.gamification-trophy-progress>i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7763ed,#b6aaff);box-shadow:0 0 7px rgba(123,101,237,.58)}.gamification-trophies>div.earned .gamification-trophy-progress>i{background:linear-gradient(90deg,#d59528,#ffe08a)}
.gamification-my-place .card-title{align-items:center}.gamification-high-scores{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:6px 10px;color:#5142c8;background:#eeebff;border:1px solid #d8d1ff;border-radius:9px;font-size:11px;font-weight:850;cursor:pointer}.gamification-high-scores svg{width:15px;height:15px}.gamification-no-place{display:grid;gap:3px;justify-items:start;padding:8px 0 4px}.gamification-no-place strong{color:#8b98b7;font-size:28px;line-height:1}.gamification-no-place span{color:var(--ink-soft);font-size:13px;font-weight:750}.gamification-no-place small{color:var(--muted);font-size:11px}.gamification-high-scores-list{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.gamification-high-scores-list h3{margin:0 0 4px;font-size:13px}.gamification-ranking-me>div{border-bottom:0!important}.gamification-ranking-me strong{color:var(--primary)}[data-theme="dark"] .gamification-high-scores{color:#d1cbff;background:#292653;border-color:#4b4589}[data-theme="dark"] .gamification-no-place strong{color:#9eacc8}[data-theme="dark"] .gamification-no-place span{color:#d0daf0}[data-theme="dark"] .gamification-no-place small{color:var(--dark-muted)}[data-theme="dark"] .gamification-high-scores-list{border-color:var(--dark-border)}[data-theme="dark"] .gamification-ranking-me strong{color:#c6beff}

/* Liga HT: punktacja uznaniowa administratora. */
.gamification-crm-link{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:17px 18px;text-decoration:none!important;border-color:#ddd8fb;background:linear-gradient(135deg,#fff 0%,#f9f7ff 100%);box-shadow:0 8px 24px rgba(69,54,151,.06);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.gamification-crm-link:hover{border-color:#bfb4fa;box-shadow:0 12px 30px rgba(69,54,151,.11);transform:translateY(-1px)}.gamification-crm-link:focus-visible{outline:3px solid rgba(104,86,235,.24);outline-offset:3px}.gamification-crm-link-icon{display:grid;width:46px;height:46px;place-items:center;border:1px solid #d9d2ff;border-radius:14px;color:#5b49d7;background:#eeebff}.gamification-crm-link-icon svg{width:22px;height:22px}.gamification-crm-link-copy{display:grid;gap:2px;min-width:0}.gamification-crm-link-copy small{color:#6b57d4;font-size:10px;font-style:normal;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.gamification-crm-link-copy strong{color:var(--ink);font-size:16px;line-height:1.25}.gamification-crm-link-copy em{color:var(--muted);font-size:12px;font-style:normal;line-height:1.4}.gamification-crm-link-action{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #d9d2ff;border-radius:10px;color:#5142c8;background:#eeebff;font-size:11px;font-weight:850;white-space:nowrap}.gamification-crm-link-action svg{width:15px;height:15px}.gamification-crm-link:hover .gamification-crm-link-action{color:#fff;border-color:#6856eb;background:#6856eb}
[data-theme="dark"] .gamification-crm-link{border-color:#3e3a6d;background:linear-gradient(135deg,#171f31 0%,#1b2038 100%);box-shadow:0 10px 28px rgba(0,0,0,.13)}[data-theme="dark"] .gamification-crm-link:hover{border-color:#62599c;box-shadow:0 14px 34px rgba(0,0,0,.2)}[data-theme="dark"] .gamification-crm-link-icon{color:#c8beff;border-color:#50498d;background:#292653}[data-theme="dark"] .gamification-crm-link-copy small{color:#b9adff}[data-theme="dark"] .gamification-crm-link-copy strong{color:var(--dark-text)}[data-theme="dark"] .gamification-crm-link-copy em{color:var(--dark-muted)}[data-theme="dark"] .gamification-crm-link-action{color:#d5ceff;border-color:#4c4686;background:#292653}[data-theme="dark"] .gamification-crm-link:hover .gamification-crm-link-action{color:#fff;border-color:#7666ee;background:#6856eb}
.gamification-admin-profile{display:grid;gap:15px;border-color:#e1ddf7;background:linear-gradient(145deg,#fff 0%,#fcfbff 100%)}.gamification-admin-profile-heading{display:flex;align-items:center;gap:11px}.gamification-admin-profile-heading>span{display:grid;width:40px;height:40px;flex:0 0 40px;place-items:center;border:1px solid #ddd7ff;border-radius:12px;color:#5b49d7;background:#f0edff}.gamification-admin-profile-heading>span svg{width:19px;height:19px}.gamification-admin-profile-heading small{display:block;margin-bottom:2px;color:#6b57d4;font-size:9px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.gamification-admin-profile-heading h2{margin:0;color:var(--ink);font-size:17px}.gamification-employee-field{display:grid;gap:7px}.gamification-employee-field>span:first-child{color:var(--ink-soft);font-size:11px;font-weight:850}.gamification-employee-select{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;min-height:50px;overflow:hidden;border:1px solid #dcd7f2;border-radius:12px;color:#6b57d4;background:#fff;box-shadow:0 5px 16px rgba(61,49,126,.05);transition:border-color .18s ease,box-shadow .18s ease}.gamification-employee-select:focus-within{border-color:#8b7cf1;box-shadow:0 0 0 3px rgba(104,86,235,.12),0 7px 18px rgba(61,49,126,.08)}.gamification-employee-select>svg{width:18px;height:18px;margin:0 14px}.gamification-employee-select>svg:last-child{width:17px;height:17px;margin-left:10px;pointer-events:none}.gamification-employee-select select{width:100%;height:50px;min-width:0;padding:0;border:0;outline:0;appearance:none;-webkit-appearance:none;color:var(--ink);background:transparent;font:inherit;font-size:14px;font-weight:800;cursor:pointer}.gamification-employee-summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:11px 12px;border:1px solid #e8e4f8;border-radius:12px;background:#f8f6ff}.gamification-employee-summary>span{display:grid;width:30px;height:30px;place-items:center;border-radius:9px;color:#6553d7;background:#ebe7ff}.gamification-employee-summary>span svg{width:15px;height:15px}.gamification-employee-summary div{display:grid;gap:1px;min-width:0}.gamification-employee-summary small{color:var(--muted);font-size:9px;font-weight:750}.gamification-employee-summary strong{overflow:hidden;color:var(--ink);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.gamification-employee-summary em,.gamification-employee-summary b{padding:5px 8px;border-radius:999px;font-size:10px;font-style:normal;font-weight:850;white-space:nowrap}.gamification-employee-summary em{color:#705bcf;background:#eeeaff}.gamification-employee-summary b{color:#23765b;background:#e5f7ef}
[data-theme="dark"] .gamification-admin-profile{border-color:#343f59;background:linear-gradient(145deg,#171f31 0%,#182136 100%)}[data-theme="dark"] .gamification-admin-profile-heading>span{color:#c8beff;border-color:#50498d;background:#292653}[data-theme="dark"] .gamification-admin-profile-heading small{color:#b9adff}[data-theme="dark"] .gamification-admin-profile-heading h2{color:var(--dark-text)}[data-theme="dark"] .gamification-employee-field>span:first-child{color:#cbd5eb}[data-theme="dark"] .gamification-employee-select{color:#b9adff;border-color:#3e4b68;background:#11192a;box-shadow:0 6px 18px rgba(0,0,0,.12)}[data-theme="dark"] .gamification-employee-select:focus-within{border-color:#7666d9;box-shadow:0 0 0 3px rgba(136,116,255,.14),0 8px 20px rgba(0,0,0,.16)}[data-theme="dark"] .gamification-employee-select select{color:var(--dark-text);background:#11192a}[data-theme="dark"] .gamification-employee-select option{color:var(--dark-text);background:#182136}[data-theme="dark"] .gamification-employee-summary{border-color:#35435e;background:#202a3f}[data-theme="dark"] .gamification-employee-summary>span{color:#c8beff;background:#292653}[data-theme="dark"] .gamification-employee-summary small{color:var(--dark-muted)}[data-theme="dark"] .gamification-employee-summary strong{color:var(--dark-text)}[data-theme="dark"] .gamification-employee-summary em{color:#d1caff;background:#302b60}[data-theme="dark"] .gamification-employee-summary b{color:#8ce3c2;background:#163f38}
.gamification-manual-award{display:grid;gap:18px;overflow:hidden;border-color:#ddd8fb;background:linear-gradient(145deg,#fff 0%,#fbfaff 100%)}
.gamification-award-heading{display:flex;align-items:flex-start;gap:13px}.gamification-award-heading>span{display:grid;width:46px;height:46px;flex:0 0 46px;place-items:center;border:1px solid #d9d2ff;border-radius:14px;color:#5b49d7;background:#eeebff}.gamification-award-heading>span svg{width:23px;height:23px}.gamification-award-heading small{color:#6b57d4;font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.gamification-award-heading h2{margin:2px 0 4px;color:var(--ink);font-size:19px}.gamification-award-heading p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
.gamification-manual-award form{display:grid;gap:14px}.gamification-award-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gamification-manual-award label{display:grid;gap:6px;min-width:0}.gamification-manual-award label>span{color:var(--ink-soft);font-size:11px;font-weight:850}.gamification-manual-award :is(.field-input,.select-input){border-radius:10px;background:#fff}.gamification-award-points{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:end;gap:12px;padding:12px;border:1px solid #e6e2f7;border-radius:12px;background:#f7f5ff}.gamification-award-points p{margin:0 0 5px;color:#6f7895;font-size:11px;line-height:1.4}.gamification-award-points input[readonly]{color:#5142c8;background:#eeebff;font-weight:900}.gamification-award-reason textarea.field-input{height:auto;min-height:96px;padding:12px 14px;resize:vertical;line-height:1.45}.gamification-award-reason small{color:var(--muted);font-size:10px}.gamification-manual-award .primary-action{width:max-content;min-width:190px}.gamification-manual-award .primary-action svg{width:17px;height:17px}
[data-theme="dark"] .gamification-manual-award{border-color:#3e3a6d;background:linear-gradient(145deg,#171f31 0%,#1b2038 100%)}[data-theme="dark"] .gamification-award-heading>span{color:#c8beff;border-color:#50498d;background:#292653}[data-theme="dark"] .gamification-award-heading small{color:#b9adff}[data-theme="dark"] .gamification-award-heading h2{color:var(--dark-text)}[data-theme="dark"] .gamification-award-heading p,[data-theme="dark"] .gamification-award-reason small{color:var(--dark-muted)}[data-theme="dark"] .gamification-manual-award label>span{color:#cbd5eb}[data-theme="dark"] .gamification-award-points{border-color:var(--dark-border);background:var(--dark-surface-soft)}[data-theme="dark"] .gamification-award-points p{color:var(--dark-muted)}[data-theme="dark"] .gamification-award-points input[readonly]{color:#d5ceff!important;border-color:#4c4686!important;background:#292653!important}
@media(max-width:620px){.gamification-crm-link{grid-template-columns:auto minmax(0,1fr);gap:11px;padding:15px}.gamification-crm-link-icon{width:42px;height:42px}.gamification-crm-link-action{grid-column:2;justify-self:start;padding:7px 10px}.gamification-employee-summary{grid-template-columns:auto minmax(0,1fr) auto}.gamification-employee-summary em{grid-column:2;justify-self:start}.gamification-employee-summary b{grid-column:3;grid-row:1/3}.gamification-award-grid,.gamification-award-points{grid-template-columns:1fr}.gamification-award-points{align-items:stretch}.gamification-manual-award .primary-action{width:100%}.gamification-award-heading h2{font-size:17px}}

/* Faktury: szybkie priorytety płatności i rejestracja wpłaty z telefonu. */
.invoice-payment-filters{padding:14px}.invoice-payment-filters .card-title{margin-bottom:10px}.invoice-filter-chips{display:flex;flex-wrap:wrap;gap:7px}.invoice-filter-chips button{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--surface);color:var(--ink-soft);border-radius:999px;padding:7px 10px;font:inherit;font-size:12px;font-weight:750;cursor:pointer}.invoice-filter-chips button b{display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:99px;background:rgba(104,86,235,.13);color:var(--primary);font-size:10px}.invoice-filter-chips button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.invoice-filter-chips button.active b{background:rgba(255,255,255,.22);color:#fff}.invoice-due-meta{margin-top:-4px;color:var(--ink-soft)}.invoice-payment-form{display:grid;gap:9px;margin-top:14px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}.invoice-payment-form>p{margin:0;color:var(--muted);font-size:12px}.invoice-payment-form>div{display:grid;grid-template-columns:1fr 1fr;gap:9px}.invoice-payment-form label{display:grid;gap:4px;font-size:11px;font-weight:750;color:var(--ink-soft)}.invoice-payment-form .primary-action{justify-self:start}.badge-pill.danger{background:#fee2e2;color:#b4233c}[data-theme="dark"] .invoice-filter-chips button{background:#202a3f;border-color:#35435e;color:#c9d4ed}[data-theme="dark"] .invoice-payment-form{background:#202a3f;border-color:#35435e}[data-theme="dark"] .badge-pill.danger{background:#4a2330;color:#ffb5c2}

/* Pracownik: wszystkie pomocnicze kafle muszą dziedziczyć pełną paletę ciemną. */
[data-theme="dark"] .dashboard-stat { background:#202a3f; border-color:#35435e; }
[data-theme="dark"] .dashboard-stat span { color:#aebbd7; }
[data-theme="dark"] .dashboard-stat strong { color:var(--dark-text); }
[data-theme="dark"] .dashboard-work-card .dashboard-label,
[data-theme="dark"] .dashboard-work-copy > span,
[data-theme="dark"] .dashboard-work-meta span { color:#bdc9e2; }
[data-theme="dark"] .dashboard-work-meta b { color:#b5adff; }
[data-theme="dark"] .dashboard-shortcut { color:var(--dark-text); }
[data-theme="dark"] .dashboard-shortcut span:first-child { color:#a99dff; background:#292651; border:1px solid #413d78; }
[data-theme="dark"] .dashboard-shortcut strong { color:var(--dark-text); }
[data-theme="dark"] .dashboard-current-card h2,[data-theme="dark"] .dashboard-current-card { border-color:var(--dark-border); }

[data-theme="dark"] .leave-hero-card,[data-theme="dark"] .leave-form-card,[data-theme="dark"] .leave-balance-card { background:var(--dark-surface) !important; border-color:var(--dark-border) !important; }
[data-theme="dark"] .leave-hero-copy span,[data-theme="dark"] .leave-hero-copy small,[data-theme="dark"] .leave-balance-card span,[data-theme="dark"] .leave-balance-card small,[data-theme="dark"] .leave-form-card .card-title p { color:var(--dark-muted); }
[data-theme="dark"] .leave-hero-copy strong,[data-theme="dark"] .leave-balance .leave-balance-card strong { color:var(--dark-text); }
[data-theme="dark"] .leave-balance-card.blue { background:#20234c !important; border-color:#3b4178 !important; }
[data-theme="dark"] .leave-balance-card.neutral { background:#202a3c !important; border-color:#344158 !important; }
[data-theme="dark"] .leave-balance-card.amber { background:#362d1c !important; border-color:#644d24 !important; }
[data-theme="dark"] .leave-usage-summary.ok { color:#bdeed1; background:#173a2a; border-color:#2c674c; }
[data-theme="dark"] .leave-usage-summary.warning,[data-theme="dark"] .leave-usage-summary.danger { color:#ffd1d9; background:#3a1d29; border-color:#714053; }
[data-theme="dark"] .leave-usage-summary span,[data-theme="dark"] .leave-usage-summary small,[data-theme="dark"] .leave-usage-summary p { color:#b7c5df; }
[data-theme="dark"] .leave-usage-summary strong { color:var(--dark-text); }
[data-theme="dark"] .leave-usage-summary.ok strong { color:#71e0a1; }
[data-theme="dark"] .leave-list-item { border-color:var(--dark-border); }
[data-theme="dark"] .leave-list-main strong { color:var(--dark-text); }
[data-theme="dark"] .leave-list-main p,[data-theme="dark"] .leave-list-main small { color:var(--dark-muted); }
[data-theme="dark"] .leave-list-item.green .leave-type-pill,[data-theme="dark"] .leave-list-item.green .leave-list-status span { color:#88eab0; background:#173a2a; }
[data-theme="dark"] .leave-list-item.orange .leave-type-pill,[data-theme="dark"] .leave-list-item.orange .leave-list-status span { color:#ffc17d; background:#3b2919; }
[data-theme="dark"] .leave-list-item.amber .leave-type-pill,[data-theme="dark"] .leave-list-item.amber .leave-list-status span { color:#ffd58a; background:#3b3018; }
[data-theme="dark"] .leave-list-item.red .leave-type-pill,[data-theme="dark"] .leave-list-item.red .leave-list-status span { color:#ffb5c2; background:#3b1623; }

[data-theme="dark"] .profile-term { background:var(--dark-surface-raised); border-color:var(--dark-border); }
[data-theme="dark"] .profile-term-date,[data-theme="dark"] .profile-term-date small { color:var(--dark-muted); }
[data-theme="dark"] .profile-term-date span { color:var(--dark-text); }
[data-theme="dark"] .profile-progress { background:#34415b; }
[data-theme="dark"] .profile-term .badge-pill { color:var(--dark-text); background:#111a2d; border-color:#3a4967; }

/* Historia godzin: status urlopu nie może wracać do jasnej powierzchni. */
[data-theme="dark"] .punch-leave-state { background:#173a2a; border-color:#2e674b; }
[data-theme="dark"] .punch-leave-state strong { color:#86eab1 !important; }
[data-theme="dark"] .punch-leave-state.leave-orange { background:#3a2918; border-color:#704a22; }
[data-theme="dark"] .punch-leave-state.leave-orange strong { color:#ffc481 !important; }
[data-theme="dark"] .punch-note-leave,
[data-theme="dark"] .punch-row.leave .punch-worked span { color:#86eab1; }
[data-theme="dark"] .punch-row.leave-orange .punch-note-leave,
[data-theme="dark"] .punch-row.leave .punch-worked.leave-orange span { color:#ffc481; }
.settings-app-version>span{display:grid;gap:2px;text-align:left}.settings-app-version strong{font-size:11px}.settings-app-version small{font-size:10px}.settings-app-activity-link{border:0;background:transparent;color:var(--primary);font:inherit;font-size:11px;font-weight:750;cursor:pointer}.app-activity-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:rgba(8,14,29,.64);backdrop-filter:blur(4px)}.app-activity-modal{width:min(620px,100%);max-height:min(760px,calc(100dvh - 40px));overflow:auto;padding:22px;border:1px solid #dfe5f0;border-radius:18px;background:#f8faff;box-shadow:0 24px 64px rgba(8,18,45,.28)}.app-activity-modal>header,.app-activity-modal>header>div{display:flex;align-items:center}.app-activity-modal>header{justify-content:space-between;gap:16px;margin-bottom:18px}.app-activity-modal>header>div{gap:12px}.app-activity-modal h2,.app-activity-modal h3{margin:0;color:#101b3d}.app-activity-modal header p,.app-activity-section>p{margin:3px 0 0;color:#68799c;font-size:13px}.app-activity-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:12px;background:#eeeaff;color:#5547dd}.app-activity-icon svg{width:21px}.app-activity-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.app-activity-summary>div{display:grid;gap:4px;padding:13px;border:1px solid #dfe5f0;border-radius:12px;background:#fff}.app-activity-summary span{color:#68799c;font-size:11px;font-weight:650}.app-activity-summary strong{color:#17264b;font-size:21px}.app-activity-section{margin-top:20px}.app-activity-section h3{font-size:15px}.app-activity-person{display:flex;align-items:center;gap:9px;padding:11px 0;border-bottom:1px solid #e4e9f2}.app-activity-person>i{width:10px;height:10px;flex:0 0 auto;border-radius:50%;box-shadow:0 0 0 4px #eef1fa}.app-activity-person>span{display:grid;gap:2px;min-width:0}.app-activity-person strong{color:#17264b;font-size:13px}.app-activity-person small{color:#68799c;font-size:11px}.app-activity-person em{margin-left:auto;color:#68799c;font-size:10px;font-style:normal}.app-activity-section:last-child .app-activity-person:last-child{border-bottom:0}[data-theme="dark"] .app-activity-modal{border-color:#33415f;background:#172238;box-shadow:0 24px 64px rgba(0,0,0,.48)}[data-theme="dark"] .app-activity-modal h2,[data-theme="dark"] .app-activity-modal h3,[data-theme="dark"] .app-activity-summary strong,[data-theme="dark"] .app-activity-person strong{color:var(--dark-text)}[data-theme="dark"] .app-activity-modal header p,[data-theme="dark"] .app-activity-section>p,[data-theme="dark"] .app-activity-summary span,[data-theme="dark"] .app-activity-person small,[data-theme="dark"] .app-activity-person em{color:var(--dark-muted)}[data-theme="dark"] .app-activity-summary>div{border-color:#33415f;background:#101a2d}[data-theme="dark"] .app-activity-person{border-color:#33415f}[data-theme="dark"] .app-activity-person>i{box-shadow:0 0 0 4px #101a2d}@media(max-width:560px){.app-activity-backdrop{padding:0;place-items:end center}.app-activity-modal{max-height:92dvh;padding:18px;border-radius:18px 18px 0 0}.app-activity-summary{gap:7px}.app-activity-summary>div{padding:10px}.app-activity-summary strong{font-size:18px}}

/* Ustawienia na telefonie: pola nie mogą ściskać opisu ani wychodzić poza kartę. */
@media (max-width: 600px) {
    .preference-number {
        grid-template-columns:74px minmax(0, 1fr);
        gap:8px 10px;
    }
    .preference-number > span { grid-column:1 / -1; }
    .preference-number em { margin-left:0; align-self:center; }
    [data-theme="dark"] .preference-number em { margin-left:0; }
    .quiet-hours { grid-template-columns:minmax(0, 1fr); gap:8px; }
    .quiet-hours label { min-width:0; }
}

[data-theme="dark"] .settings-app-version { color: var(--dark-muted); }

/* Notification read state is informational; opening the notification marks it as read. */
.notification-read-state {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px 13px;
    color: var(--muted);
    font-size: .78rem;
    pointer-events: none;
}

.notification-read-state svg { width: 17px; height: 17px; }
.notification-read-state.unread { color: var(--primary); }
.notification-read-state.read { color: var(--muted); }
[data-theme="dark"] .notification-read-state.read { color: var(--dark-muted); }
[data-theme="dark"] .notification-read-state.unread { color: #b9b0ff; }

.notification-item-state-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 16px 13px}.notification-item-state-actions .notification-read-state{padding:0}.notification-reminder-button{width:34px;height:34px;min-height:34px;color:var(--primary);background:var(--primary-soft);border-color:transparent}.notification-reminder-button svg{width:17px;height:17px}.notification-reminder-overlay{position:fixed;z-index:3000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(19,28,50,.48);backdrop-filter:blur(5px)}.notification-reminder-modal{display:grid;gap:14px;width:min(440px,100%);padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:0 22px 60px rgba(20,31,60,.22)}.notification-reminder-modal header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.notification-reminder-modal h2{margin:0;font-size:20px}.notification-reminder-modal header small{display:block;margin-top:3px;color:var(--muted)}.notification-reminder-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px}.notification-reminder-presets button{min-height:40px;color:var(--ink);background:var(--surface-soft);border:1px solid var(--line);border-radius:9px;font-weight:650}.notification-reminder-presets button.active,.notification-reminder-presets button:hover{color:var(--primary);border-color:var(--primary);background:var(--primary-soft)}.notification-reminder-actions{display:flex;gap:9px}.notification-reminder-actions>*{flex:1}[data-theme="dark"] .notification-reminder-button{color:#b9b0ff;background:#282452}[data-theme="dark"] .notification-reminder-modal{border-color:var(--dark-border);background:var(--dark-surface)}[data-theme="dark"] .notification-reminder-modal h2{color:var(--dark-text)}[data-theme="dark"] .notification-reminder-modal header small{color:var(--dark-muted)}[data-theme="dark"] .notification-reminder-presets button{color:var(--dark-text);border-color:var(--dark-border);background:var(--dark-surface-soft)}[data-theme="dark"] .notification-reminder-presets button.active,[data-theme="dark"] .notification-reminder-presets button:hover{color:#c9c2ff;border-color:#6e61de;background:#282452}
.notification-item-state-actions{box-sizing:border-box;width:100%;min-width:0;padding-right:20px}.notification-item-state-actions .notification-read-toggle{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:34px;height:34px;flex:0 0 34px;padding:0;border:0;background:transparent;cursor:pointer;pointer-events:auto;overflow:visible}.notification-item-state-actions .notification-read-toggle:hover{background:var(--primary-soft);border-radius:8px}

/* Protokół: godziny oraz informacja o przejeździe w ciemnym motywie. */
.protocol-completion-hint{display:flex;align-items:flex-start;gap:11px;margin:16px 0 4px;padding:13px 14px;border:1px solid;border-radius:12px}.protocol-completion-hint>span{display:grid;width:34px;height:34px;flex:0 0 34px;place-items:center;border-radius:10px}.protocol-completion-hint>span svg{width:18px;height:18px}.protocol-completion-hint>div{display:grid;gap:3px;min-width:0}.protocol-completion-hint strong{font-size:13px;line-height:1.3}.protocol-completion-hint small{font-size:10px;line-height:1.4}.protocol-completion-hint ul{display:grid;gap:4px;margin:5px 0 0;padding:0;list-style:none}.protocol-completion-hint li{position:relative;padding-left:15px;font-size:11px;font-weight:750;line-height:1.35}.protocol-completion-hint li::before{position:absolute;left:1px;top:.48em;width:6px;height:6px;border-radius:50%;background:currentColor;content:""}.protocol-completion-hint.warning{color:#574d86;border-color:#ded8f5;background:#f8f6ff}.protocol-completion-hint.warning>span{color:#6657c7;background:#ece8ff}.protocol-completion-hint.warning small{color:#7a7398}.protocol-completion-hint.ready{color:#207357;border-color:#bce6d5;background:#edfbf5}.protocol-completion-hint.ready>span{color:#16805d;background:#d8f4e8}.protocol-completion-hint.ready small{color:#557e6f}
[data-theme="dark"] .protocol-completion-hint.warning{color:#d9d4ff;border-color:#403c67;background:#201e36}[data-theme="dark"] .protocol-completion-hint.warning>span{color:#c9c1ff;background:#2d294d}[data-theme="dark"] .protocol-completion-hint.warning small{color:#aaa5c5}[data-theme="dark"] .protocol-completion-hint.ready{color:#8df0bc;border-color:#285c46;background:#123326}[data-theme="dark"] .protocol-completion-hint.ready>span{color:#8df0bc;background:#194b38}[data-theme="dark"] .protocol-completion-hint.ready small{color:#9fcdb9}
[data-theme="dark"] .protocol-worker-edit,
[data-theme="dark"] .protocol-day-total {
    background:var(--dark-surface-soft);
    border-color:var(--dark-border);
}
[data-theme="dark"] .protocol-worker-edit > strong,
[data-theme="dark"] .protocol-day-total strong { color:var(--dark-text); }
[data-theme="dark"] .protocol-worker-edit .protocol-time-grid label,
[data-theme="dark"] .protocol-day-total span { color:var(--dark-muted); }
[data-theme="dark"] .protocol-worker-edit .protocol-time-grid input {
    color:var(--dark-text);
    background:var(--dark-surface-raised);
    border-color:var(--dark-border);
}
[data-theme="dark"] .protocol-worker-hours { color:#8df0bc; background:#163a2a; }
[data-theme="dark"] .protocol-cartrack-no-match {
    color:var(--dark-muted);
    background:var(--dark-surface-raised);
    border-color:var(--dark-border);
}

/* Protokół: modal przepisywania opisu w ciemnym motywie. */
[data-theme="dark"] .protocol-description-modal {
    color:var(--dark-text);
    background:var(--dark-surface);
    border-color:var(--dark-border);
}
[data-theme="dark"] .protocol-description-modal .modal-mobile-head strong { color:var(--dark-text); }
[data-theme="dark"] .protocol-description-modal .modal-mobile-head span,
[data-theme="dark"] .protocol-description-modal .protocol-description-all,
[data-theme="dark"] .protocol-description-modal .modal-loading { color:var(--dark-muted); }
[data-theme="dark"] .protocol-description-modal .protocol-description-search {
    background:var(--dark-surface-raised);
    border-color:var(--dark-border);
}
[data-theme="dark"] .protocol-description-modal .protocol-description-search svg { color:var(--dark-muted); }
[data-theme="dark"] .protocol-description-modal .protocol-description-search input {
    color:var(--dark-text);
    background:transparent;
}
[data-theme="dark"] .protocol-description-modal .protocol-description-search input::placeholder { color:var(--dark-muted); }
[data-theme="dark"] .protocol-description-modal .protocol-description-result {
    background:var(--dark-surface-soft);
    border-color:var(--dark-border);
}
[data-theme="dark"] .protocol-description-modal .protocol-description-result strong { color:var(--dark-text); }
[data-theme="dark"] .protocol-description-modal .protocol-description-result small,
[data-theme="dark"] .protocol-description-modal .protocol-description-result p { color:var(--dark-muted); }

/* Lista zleceń: przycisk statusu protokołu jak akcje po prawej stronie. */
[data-theme="dark"] .admin-task-card-actions .admin-task-protocol {
    color:var(--dark-text);
    background:var(--dark-surface-raised);
    border:1px solid var(--dark-border);
}
[data-theme="dark"] .admin-task-card-actions .admin-task-protocol svg { color:#b9b0ff; }

/* Zlecenia: nagłówki dni i pojedyncze kafelki, bez trzech zagnieżdżonych ramek. */
.admin-task-list-section > .card-title { margin:0 0 14px; }
.protocol-list-section > .card-title { margin:0 0 14px; }
.protocol-card-actions{display:flex;justify-content:flex-end;min-height:46px;margin-top:4px;padding-top:10px;border-top:1px solid var(--line)}.protocol-card-actions .icon-button{width:46px;height:46px;min-height:46px;color:var(--primary);background:var(--primary-soft)}[data-theme="dark"] .protocol-card-actions{border-color:var(--dark-border)}[data-theme="dark"] .protocol-card-actions .icon-button{color:#c9c2ff;background:var(--dark-surface-raised)}
.protocol-card-workers{display:flex;flex-wrap:wrap;gap:5px 12px;align-items:center}.protocol-card-workers .protocol-card-worker{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:700;line-height:1.35}.protocol-card-worker-dot{display:block;width:9px;height:9px;flex:0 0 auto;border:1px solid #fff;border-radius:50%;box-shadow:0 0 0 1px var(--line)}[data-theme="dark"] .protocol-card-workers .protocol-card-worker{color:var(--dark-muted)}[data-theme="dark"] .protocol-card-worker-dot{border-color:var(--dark-card);box-shadow:0 0 0 1px var(--dark-border)}
.orders-screen .order-list-section{display:grid;gap:14px;background:transparent}.orders-screen .order-list-section>.card-title{margin:0}.orders-screen .order-list{display:grid;gap:14px;padding:0;background:transparent;border:0;box-shadow:none}.orders-screen .order-list>button{padding:18px 24px;border:1px solid var(--line);border-radius:16px;background:var(--card)}[data-theme="dark"] .orders-screen .order-list-section,[data-theme="dark"] .orders-screen .order-list{background:var(--dark-page)}[data-theme="dark"] .orders-screen .order-list>button{background:var(--dark-card);border-color:var(--dark-border)}
.offers-screen .offer-list-section{display:grid;gap:14px;background:transparent}.offers-screen .offer-list-section>.card-title{margin:0}.offers-screen .offer-list{display:grid;gap:14px;padding:0;background:transparent;border:0;box-shadow:none}[data-theme="dark"] .offers-screen .offer-list-section,[data-theme="dark"] .offers-screen .offer-list{background:var(--dark-page)}
.wz-screen .wz-list-section{display:grid;gap:14px;background:transparent}.wz-screen .wz-list-section>.card-title{margin:0}.wz-screen .wz-list{display:grid;gap:14px;padding:0;background:transparent;border:0;box-shadow:none}[data-theme="dark"] .wz-screen .wz-list-section,[data-theme="dark"] .wz-screen .wz-list{background:var(--dark-page)}[data-theme="dark"] .wz-screen .wz-list-item{background:var(--dark-card);border-color:var(--dark-border)}
.tracking-screen .tracking-vehicles-section{display:grid;gap:14px;background:transparent}.tracking-screen .tracking-vehicles-section>.card-title{margin:0}.tracking-screen .tracking-vehicle-list{display:grid;gap:14px;padding:0;background:transparent;border:0;box-shadow:none}[data-theme="dark"] .tracking-screen .tracking-vehicles-section,[data-theme="dark"] .tracking-screen .tracking-vehicle-list{background:var(--dark-page)}[data-theme="dark"] .tracking-screen .tracking-vehicle{background:var(--dark-card);border-color:var(--dark-border)}

/* Flota: zwarta lista pojazdów — lokalizacja i kierowca mają własne symbole. */
.tracking-screen .tracking-vehicle-list{gap:10px}.tracking-screen .tracking-vehicle{padding:10px 12px;border-radius:14px}.tracking-screen .tracking-vehicle-content{grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px}.tracking-screen .tracking-vehicle-status{width:40px;height:40px;border-radius:12px}.tracking-screen .tracking-vehicle-status svg{width:21px;height:21px}.tracking-screen .tracking-vehicle-info{gap:2px}.tracking-screen .tracking-vehicle-info strong{font-size:16px;line-height:1.2}.tracking-screen .tracking-registration{font-size:12px}.tracking-screen .tracking-vehicle-place,.tracking-screen .tracking-vehicle-driver{display:flex;align-items:center;gap:5px;margin:2px 0 0;font-size:12px;line-height:1.25}.tracking-screen .tracking-vehicle-place svg,.tracking-screen .tracking-vehicle-driver svg{width:14px;height:14px;flex:0 0 auto;color:var(--primary)}.tracking-screen .tracking-vehicle-driver svg{color:#67b8ff}.tracking-screen .tracking-vehicle-actions{align-self:center;gap:6px}.tracking-screen .tracking-vehicle-actions .badge-pill{padding:6px 9px;font-size:12px}.tracking-screen .tracking-vehicle-actions .tracking-map-button{width:38px;height:38px;min-width:38px;flex-basis:38px;border-radius:11px}.tracking-screen .tracking-crew{display:none}@media(max-width:640px){.tracking-screen .tracking-vehicle-content{grid-template-columns:40px minmax(0,1fr) auto}.tracking-screen .tracking-vehicle-actions{grid-column:auto;justify-content:initial}.tracking-screen .tracking-vehicle-actions .badge-pill{display:none}.tracking-screen .tracking-vehicle-actions .tracking-map-button{display:grid}}
.invoices-screen .invoice-list-section{display:grid;gap:14px;background:transparent}.invoices-screen .invoice-list-section>.card-title{margin:0}.invoices-screen .invoice-list{display:grid;gap:14px;padding:0;background:transparent;border:0;box-shadow:none}.invoices-screen .invoice-item{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--card)}.invoices-screen .invoice-item:last-of-type{border-bottom:1px solid var(--line)}[data-theme="dark"] .invoices-screen .invoice-list-section,[data-theme="dark"] .invoices-screen .invoice-list{background:var(--dark-page)}[data-theme="dark"] .invoices-screen .invoice-item{background:var(--dark-card);border-color:var(--dark-border)}[data-theme="dark"] .invoices-screen .invoice-item:last-of-type{border-bottom-color:var(--dark-border)}

/* Podgląd faktury: zwarte grupy danych zamiast kolejnych, przypadkowych pól. */
.invoice-preview-modal:not(.loading){gap:16px;padding:20px}.invoice-paper{gap:16px;padding:18px;border-radius:16px}.invoice-paper-brand{padding:0 0 14px;border-bottom:1px solid var(--line)}.invoice-paper-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:2px 0 14px}.invoice-paper-parties,.invoice-paper-dates{gap:10px}.invoice-paper-parties>div,.invoice-paper-dates>div{padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft,#f8faff)}.invoice-paper-parties>div strong,.invoice-paper-dates>div strong{font-size:14px}.invoice-paper-total,.invoice-paper-payment{padding:14px 16px;border-radius:12px}.invoice-paper-items{margin-top:2px}.invoice-paper-items>strong,.invoice-payments>strong{display:block;margin-bottom:4px}.invoice-preview-files{display:grid;gap:8px;padding:14px 16px;border:1px solid var(--line);border-radius:12px}
[data-theme="dark"] .invoice-preview-modal:not(.loading){background:var(--dark-surface)}[data-theme="dark"] .invoice-paper{background:var(--dark-card)!important;border-color:var(--dark-border)!important}[data-theme="dark"] .invoice-paper-brand,[data-theme="dark"] .invoice-paper-title{background:transparent!important;border-color:var(--dark-border)!important}[data-theme="dark"] .invoice-paper-brand>strong{color:#f5f6ff!important}[data-theme="dark"] .invoice-paper-parties>div,[data-theme="dark"] .invoice-paper-dates>div{background:var(--dark-surface-raised)!important;border-color:var(--dark-border)!important;border-radius:10px}[data-theme="dark"] .invoice-paper-items,[data-theme="dark"] .invoice-payments{background:transparent!important;border-color:var(--dark-border)!important}[data-theme="dark"] .invoice-preview-files{background:var(--dark-surface-raised);border-color:var(--dark-border)}

/* Urlopy: pokazuj wszystkie wpisy tygodnia zamiast znacznika "+ więcej". */
.leave-calendar-board .admin-calendar-week-body{min-height:126px;max-height:none}.leave-calendar-board .admin-calendar-bars{min-height:126px;grid-auto-rows:17px;max-height:none}.leave-calendar-board .admin-calendar-event-bar.leave{min-height:17px;height:17px;padding:0 4px;border-radius:4px}.leave-calendar-board .admin-calendar-event-bar.leave .leave-calendar-bar-full{display:none}.leave-calendar-board .admin-calendar-event-bar.leave .leave-calendar-bar-short{display:block}.leave-calendar-selection>div{flex-wrap:wrap}

/* Samochody: identyczna tablica rejestracyjna PL jak na dashboardzie. */
html[data-theme="dark"] .cars-screen .vehicle-card-head .vehicle-registration-plate{position:relative;display:inline-flex;align-items:center;min-height:52px;padding:8px 14px 8px 31px;color:#0d1730!important;background:linear-gradient(180deg,#fff 0%,#edf1f8 100%)!important;border:2px solid #aeb9cf!important;letter-spacing:.055em;box-shadow:0 2px 7px rgba(0,0,0,.25)}
html[data-theme="dark"] .cars-screen .vehicle-card-head .vehicle-registration-plate::before{z-index:0;background:#1749ad}html[data-theme="dark"] .cars-screen .vehicle-card-head .vehicle-registration-plate::after{z-index:1;color:#fff}
html[data-theme="dark"] .invoice-preview-files a{color:#c9c2ff;background:var(--dark-card);border:1px solid var(--dark-border)}html[data-theme="dark"] .invoice-preview-files a:hover{background:var(--dark-surface)}html[data-theme="dark"] .invoice-preview-files a svg{color:#aaa5ff}

/* Dashboard admina: ciemne karty osób i dyskretny status Cartrack pod godziną wejścia. */
html[data-theme="dark"] .admin-dashboard .dashboard-admin-work-row{background:var(--dark-card)!important;border-color:var(--dark-border)!important}html[data-theme="dark"] .admin-dashboard .dashboard-admin-work-row strong{color:var(--dark-text)!important}html[data-theme="dark"] .admin-dashboard .dashboard-admin-work-row small{color:var(--dark-muted)!important}.admin-work-status{display:flex!important;align-items:flex-start;gap:4px;margin-top:4px;color:#617394!important;font-size:9px!important;font-weight:650!important;line-height:1.2}.admin-work-status svg{width:11px;height:11px;flex:0 0 auto;margin-top:1px}.admin-work-status span{display:grid;gap:1px}.admin-work-status.service{color:#16835a!important}.admin-work-status.moving{color:#4f46e5!important}.admin-work-status.returning{color:#c26a18!important}.admin-work-status.complete{color:#14834f!important}.admin-work-vehicle{color:#617394!important}.admin-work-vehicle svg{color:#6575a4!important}html[data-theme="dark"] .admin-work-status.service{color:#74d9a5!important}html[data-theme="dark"] .admin-work-status.moving{color:#aaa5ff!important}html[data-theme="dark"] .admin-work-status.returning{color:#f7c873!important}html[data-theme="dark"] .admin-work-status.complete{color:#74d9a5!important}html[data-theme="dark"] .admin-work-vehicle{color:#9aa8c7!important}html[data-theme="dark"] .admin-work-vehicle svg{color:#9aa8c7!important}html[data-theme="dark"] .work-time-icon-action.phone{color:#78c8ff!important;border-color:#28597a!important;background:#152f48!important}html[data-theme="dark"] .work-time-icon-action.phone:hover{background:#1a3c5b!important}

/* Dashboard: ten sam status Cartrack na skróconych kartach zleceń co na ekranie Zadań. */
.admin-dashboard .dashboard-task .admin-task-travel{display:flex;margin-top:8px;max-width:100%;font-size:10px;line-height:1.25}.admin-dashboard .dashboard-task .admin-task-travel>span{min-width:0}.admin-dashboard .dashboard-task .admin-task-travel small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}
.admin-task-date-groups { gap:20px; }
.admin-task-date-group {
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
}
.admin-task-date-heading,
.admin-task-date-group.tomorrow .admin-task-date-heading,
.admin-task-date-group.overdue .admin-task-date-heading {
    padding:2px 0 9px;
    border:0;
    background:transparent;
}
.admin-task-date-group .admin-task-list { padding:0; }
.admin-task-date-group > .admin-task-list { background:transparent !important; border:0 !important; }
.admin-task-date-empty { padding:1px 0; }
[data-theme="dark"] .admin-task-date-group { background:transparent; }
[data-theme="dark"] .admin-task-date-heading,
[data-theme="dark"] .admin-task-date-group.tomorrow .admin-task-date-heading,
[data-theme="dark"] .admin-task-date-group.overdue .admin-task-date-heading { background:transparent; }
[data-theme="dark"] .admin-task-date-groups,
[data-theme="dark"] .admin-task-date-group,
[data-theme="dark"] .admin-task-date-group > .admin-task-list { background:var(--dark-page) !important; }

/* Czas pracy: nagłówek oraz pojedyncze karty, bez dodatkowej ramki kontenera. */
.admin-day-summary-section { display:grid; gap:14px; background:transparent; }
.admin-day-summary-section > .card-title { margin:0; }
.admin-day-summary-section .admin-day-list { gap:14px; background:transparent; }
[data-theme="dark"] .admin-day-summary-section,
[data-theme="dark"] .admin-day-summary-section .admin-day-list { background:var(--dark-page) !important; }

/* Ekran wykonywania operacji musi zachować ciemną paletę, również podczas usuwania. */
[data-theme="dark"] .operation-overlay { background:rgba(3, 8, 19, .78); }
[data-theme="dark"] .operation-dialog {
    background:var(--dark-surface);
    border-color:var(--dark-border);
    box-shadow:0 22px 60px rgba(0, 0, 0, .42);
}
[data-theme="dark"] .operation-dialog strong { color:var(--dark-text); }
[data-theme="dark"] .operation-dialog span:not(.operation-spinner) { color:var(--dark-muted); }
[data-theme="dark"] .operation-spinner { border-color:#2a3751; border-top-color:#9b91ff; }

/* Plan firmy: każde zlecenie jest widoczne w swoim dniu, bez zbiorczego "+ więcej". */
.admin-calendar-screen .admin-calendar-week-body,
.admin-calendar-screen .admin-calendar-board.week .admin-calendar-week-body {
    min-height:126px !important;
    max-height:none;
}
.admin-calendar-screen .admin-calendar-days {
    position:relative;
    min-height:126px;
}
.admin-calendar-screen .admin-calendar-day {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:4px;
    min-height:126px;
    padding:6px 4px 7px;
}
.admin-calendar-screen .admin-calendar-day-heading {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:2px;
}
.admin-calendar-screen .admin-calendar-day-dots { padding-top:9px; }
.admin-calendar-screen .admin-calendar-day-events {
    display:grid;
    align-content:start;
    gap:3px;
    min-width:0;
}
.admin-calendar-screen .admin-calendar-day-event {
    display:block;
    min-width:0;
    padding:2px 4px;
    color:#fff;
    background:var(--event-color, var(--primary));
    border-radius:3px;
    font-size:8px;
    font-weight:750;
    line-height:1.25;
    text-align:left;
    box-shadow:none;
}
.admin-calendar-screen .admin-calendar-day-event > span {
    display:block;
    overflow-x:auto;
    scrollbar-width:none;
    white-space:nowrap;
}
.admin-calendar-screen .admin-calendar-day-event > span::-webkit-scrollbar { display:none; }

/* Modal przepisywania opisu jest dodawany dynamicznie — wymuszamy ciemną planszę. */
html[data-theme="dark"] .protocol-description-overlay { background:rgba(3, 8, 19, .78); }
html[data-theme="dark"] .protocol-description-modal {
    color:#f3f5ff !important;
    background:#171f31 !important;
    border-color:#303a52 !important;
}
html[data-theme="dark"] .protocol-description-modal .protocol-description-search {
    background:#1c263a !important;
    border-color:#303a52 !important;
}
html[data-theme="dark"] .protocol-description-modal .protocol-description-search input {
    color:#f3f5ff !important;
    background:transparent !important;
}
html[data-theme="dark"] .protocol-description-modal .protocol-description-result { background:#11192a !important; }

/* Protokół: wyniki Cartrack nie mogą używać jasnej karty ani jasnych pól. */
html[data-theme="dark"] .protocol-cartrack-card {
    color:#f3f5ff;
    background:#171f31;
    border-color:#303a52;
}
html[data-theme="dark"] .protocol-cartrack-title,
html[data-theme="dark"] .protocol-cartrack-head strong,
html[data-theme="dark"] .protocol-cartrack-grid strong { color:#f3f5ff; }
html[data-theme="dark"] .protocol-cartrack-head span,
html[data-theme="dark"] .protocol-cartrack-grid span,
html[data-theme="dark"] .protocol-cartrack-meta span { color:#9aa7c5; }
html[data-theme="dark"] .protocol-cartrack-grid div {
    background:#1c263a;
    border-color:#303a52;
}
html[data-theme="dark"] .protocol-cartrack-card-empty { background:#171f31; }
html[data-theme="dark"] .protocol-cartrack-card-empty .protocol-cartrack-head em {
    color:#c2ccdf;
    background:#253149;
}

/* Zlecenia: pusty termin jako dyskretny badge, a nie pasek na całą szerokość. */
.admin-task-date-empty {
    display:inline-flex;
    align-items:center;
    gap:6px;
    width:auto;
    margin:2px 0 4px;
    padding:6px 9px;
    color:#74809b;
    background:#f4f6fb;
    border:1px dashed #d7deec;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
}
.admin-task-date-empty svg { width:14px; height:14px; color:#8c82f4; }
[data-theme="dark"] .admin-task-date-empty {
    color:#9aa7c5;
    background:#171f31;
    border-color:#3b4863;
}
[data-theme="dark"] .admin-task-date-empty svg { color:#aaa5ff; }

.admin-task-field select {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:42px;
    padding:0 12px;
    border:1px solid var(--line);
    border-radius:7px;
}
[data-theme="dark"] .admin-task-field select { color:var(--dark-text); background:var(--dark-surface-soft); border-color:var(--dark-border); }

/* Nadgodziny na pulpicie administratora: bez jasnej pastylki w ciemnym motywie. */
html[data-theme="dark"] .admin-overtime-pill {
    display:inline-flex;
    align-items:center;
    min-height:22px;
    padding:3px 8px;
    color:#c8c3ff !important;
    background:#29254c !important;
    border:1px solid #504a86;
    border-radius:999px;
    font-weight:750;
    line-height:1;
}

/* Prawa kolumna czasu: stała szerokość i wspólna oś dla czasu oraz nadgodzin. */
.admin-dashboard .admin-work-time {
    min-width:116px;
    align-self:stretch;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    justify-content:center;
    gap:7px;
    padding:4px 10px 4px 13px;
}

.admin-dashboard .admin-work-time strong {
    font-size:20px;
    font-variant-numeric:tabular-nums;
    letter-spacing:-.025em;
    line-height:1;
}

/* Karty osób: kolor pracownika jak w zadaniach — jako pasek po lewej, nie kropka. */
.admin-dashboard .dashboard-admin-work-row {
    position:relative;
    grid-template-columns:minmax(0, 1fr) auto auto;
    padding-left:18px;
    overflow:hidden;
}

.admin-dashboard .dashboard-admin-work-row > .employee-dot {
    position:absolute;
    top:-1px;
    bottom:-1px;
    left:-1px;
    width:6px;
    height:auto;
    border-radius:0;
    box-shadow:none;
    pointer-events:none;
}

@media (max-width: 760px) {
    .admin-dashboard .admin-work-time {
        min-width:96px;
        padding-right:4px;
        padding-left:8px;
    }
    .admin-dashboard .admin-work-time strong { font-size:17px; }
}

@media (min-width: 900px) {
    .admin-calendar-screen .admin-calendar-week-body,
    .admin-calendar-screen .admin-calendar-board.week .admin-calendar-week-body,
    .admin-calendar-screen .admin-calendar-days,
    .admin-calendar-screen .admin-calendar-day { min-height:136px !important; }
    .admin-calendar-screen .admin-calendar-day { padding:7px 6px 8px; gap:5px; }
    .admin-calendar-screen .admin-calendar-day-event { padding:3px 5px; font-size:9px; }
}

@media (max-width: 560px) {
    .admin-calendar-board:not(.week) .admin-calendar-event-bar.leave {
        min-height: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 4px;
    }

    .admin-calendar-board:not(.week) .admin-calendar-event-bar.leave .leave-calendar-bar-full { display: none; }
    .admin-calendar-board:not(.week) .admin-calendar-event-bar.leave .leave-calendar-bar-short { display: block; }
    .admin-calendar-board:not(.week) .admin-calendar-bars { grid-auto-rows: 17px; }

    .admin-calendar-board:not(.week) .admin-calendar-event-bar {
        min-height: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 4px;
    }

    .admin-calendar-board:not(.week) .admin-calendar-event-bar .calendar-bar-full { display: none; }
    .admin-calendar-board:not(.week) .admin-calendar-event-bar .calendar-bar-short { display: block; }
}

/* Protokół: odczyt danych w ciemnym motywie musi mieć własne powierzchnie.
   Bazowe komponenty są jasne, dlatego nie mogą dziedziczyć jasnego tła. */
[data-theme="dark"] .protocol-work-description,
[data-theme="dark"] .protocol-worker-row {
    color:var(--dark-text);
    background:var(--dark-surface-soft);
    border-color:var(--dark-border);
}

[data-theme="dark"] .protocol-work-description span,
[data-theme="dark"] .protocol-worker-row span {
    color:var(--dark-muted);
}

[data-theme="dark"] .protocol-work-description p,
[data-theme="dark"] .protocol-worker-row strong {
    color:var(--dark-text);
}

/* Historia protokołu: delikatne separatory zamiast jasnych linii z jasnego motywu. */
[data-theme="dark"] .protocol-history-list {
    border-top-color:var(--dark-border);
}

[data-theme="dark"] .protocol-history-item {
    border-bottom-color:var(--dark-border);
}

[data-theme="dark"] .protocol-history-section hr,
[data-theme="dark"] .protocol-history-list hr {
    border-color:var(--dark-border);
    opacity:1;
}

[data-theme="dark"] .protocol-history-item strong { color:var(--dark-text); }
[data-theme="dark"] .protocol-history-item small,
[data-theme="dark"] .protocol-history-changes { color:var(--dark-muted); }
[data-theme="dark"] .protocol-history-icon {
    color:#b9b0ff;
    background:#282452;
}

/* Podsumowanie dnia: kompaktowe wiersze zamiast wysokich bloków. */
.admin-day-summary-section .admin-day-list { gap:8px; }
.admin-day-row {
    position:relative;
    grid-template-columns:minmax(0, 1fr) auto;
    grid-template-areas:
        "worker actions"
        "times balance";
    align-items:center;
    gap:8px 10px;
    min-height:0;
    padding:11px 12px 11px 17px;
    overflow:hidden;
}
.admin-day-row::before {
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    width:5px;
    background:var(--employee-color, #4f46e5);
}
.admin-day-row .admin-day-worker { grid-area:worker; gap:0; }
.admin-day-row .admin-day-worker > .employee-dot { display:none; }
.admin-day-row .admin-day-worker strong { font-size:14px; }
.admin-day-row .admin-day-worker small { margin-top:2px; }
.admin-day-row .admin-day-times {
    grid-area:times;
    display:flex;
    gap:5px;
}
.admin-day-row .admin-day-times span {
    display:flex;
    align-items:baseline;
    justify-content:center;
    gap:4px;
    flex:1 1 0;
    min-height:34px;
    padding:5px 6px;
    border-radius:7px;
    font-size:13px;
}
.admin-day-row .admin-day-times b {
    display:inline;
    margin:0;
    font-size:9px;
}
.admin-day-row .admin-day-balance {
    grid-area:balance;
    min-width:76px;
    min-height:34px;
    padding:5px 8px;
    border-radius:7px;
}
.admin-day-row .admin-day-balance strong { font-size:13px; }
.admin-day-row .work-time-row-actions {
    grid-area:actions;
    gap:6px;
}
.admin-day-row .work-time-icon-action {
    width:36px;
    height:36px;
    min-height:36px;
    flex-basis:36px;
    border-radius:9px;
}
.admin-day-row .work-time-icon-action svg { width:18px; height:18px; }
.admin-day-row.leave { grid-template-areas:"worker worker"; min-height:58px; }

/* Godziny w podsumowaniu: liczba jest zawsze w osi pola, podpis tylko w tle. */
.admin-day-row .admin-day-times span,.admin-day-row .admin-day-balance{position:relative;display:grid;place-items:center;min-width:0;overflow:hidden}.admin-day-row .admin-day-times span{min-height:42px;padding:4px}.admin-day-row .admin-day-times b,.admin-day-row .admin-day-balance span{position:absolute;top:5px;left:7px;margin:0;color:rgba(135,153,190,.58);font-size:8px;font-weight:850;letter-spacing:.06em;line-height:1;text-transform:uppercase;pointer-events:none}.admin-day-row .admin-day-times strong,.admin-day-row .admin-day-balance strong{position:relative;z-index:1;display:block;margin:0;color:var(--dark-text);font-size:15px;line-height:1;text-align:center;white-space:nowrap}.admin-day-row .admin-day-times .start{border-color:rgba(28,180,111,.42);background:rgba(28,180,111,.10)}.admin-day-row .admin-day-times .start strong{color:#48d395}.admin-day-row .admin-day-times .end{border-color:rgba(235,87,87,.42);background:rgba(235,87,87,.10)}.admin-day-row .admin-day-times .end strong{color:#ff8994}.admin-day-row .admin-day-times .total{background:rgba(111,142,205,.10)}.admin-day-row .admin-day-balance{min-height:42px;padding:4px 6px}.admin-day-row .admin-day-balance strong{font-size:15px}

/* Historia godzin na telefonie: krótka data i akcja nadal w tym samym wierszu. */
.punch-row{gap:7px;padding:7px 0}.punch-date strong{font-size:13px}.punch-source,.punch-history{margin-top:3px;font-size:10px}.punch-source{padding:2px 5px!important}.punch-task-list{margin-top:3px;font-size:10px}@media(max-width:479px){.punch-row.has-actions{grid-template-columns:minmax(70px,.8fr) minmax(94px,1fr) auto auto;gap:6px}.punch-row.has-actions>.work-time-row-actions{grid-column:auto}.punch-row.has-actions .work-time-row-actions{gap:4px}.punch-row.has-actions .work-time-icon-action{width:34px;height:34px;min-height:34px;flex-basis:34px}.punch-times{gap:4px}.punch-times span{min-height:24px;font-size:11px}}

/* Dashboard pracownika: skrót do rangi i aktualnego postępu. */
.dashboard-gamification-card{display:grid;grid-template-columns:54px minmax(0,1fr) 20px;align-items:center;gap:12px;cursor:pointer}.dashboard-gamification-card:hover{border-color:#7970d9;transform:translateY(-1px)}.dashboard-gamification-icon{display:grid;width:54px;height:62px;place-items:center;border-radius:14px;background:radial-gradient(circle,#34316d 0%,#20284b 68%)}.dashboard-gamification-icon>svg{width:26px;height:26px;color:#bdb4ff}.dashboard-gamification-shield{width:48px!important;height:58px!important;filter:drop-shadow(0 5px 9px rgba(92,80,235,.32))}.dashboard-gamification-copy{display:grid;gap:3px;min-width:0}.dashboard-gamification-copy>small{color:var(--dark-muted);font-size:11px;font-weight:750}.dashboard-gamification-copy>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.dashboard-gamification-copy h2{margin:0;color:var(--dark-text);font-size:17px}.dashboard-gamification-copy strong{color:#c6c0ff;font-size:13px;white-space:nowrap}.dashboard-gamification-copy p{margin:0;color:var(--dark-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-gamification-progress{height:7px;overflow:hidden;border:1px solid #455577;border-radius:999px;background:#1a2740}.dashboard-gamification-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6e5cff,#b7a7ff);box-shadow:0 0 10px rgba(155,140,255,.75)}.dashboard-gamification-arrow{width:18px;height:18px;color:#a9b7d2}.dashboard-gamification-card.loading{min-height:82px}.dashboard-gamification-card.loading h2{margin:2px 0 0;color:var(--dark-text);font-size:15px}@media(max-width:420px){.dashboard-gamification-card{grid-template-columns:46px minmax(0,1fr) 16px;gap:9px}.dashboard-gamification-icon{width:46px;height:56px}.dashboard-gamification-shield{width:42px!important;height:52px!important}.dashboard-gamification-copy h2{font-size:16px}}

/* Informacje o wersji i aktywności są częścią sekcji „Więcej”. */
.more-app-status{display:flex;align-items:center;gap:10px;padding:13px 14px}.more-app-status>div{display:grid;gap:2px;min-width:0;margin-right:auto}.more-app-status small{color:var(--dark-muted);font-size:10px;font-weight:750}.more-app-status strong{color:var(--dark-text);font-size:12px}.more-app-status>button[data-app-activity-open]{display:flex;align-items:center;gap:7px;min-width:0;padding:7px 9px;border:1px solid var(--dark-border);border-radius:9px;background:var(--dark-surface-raised);color:var(--dark-text);font:inherit;font-size:11px;font-weight:750}.more-app-status>button[data-app-activity-open] svg{width:16px;height:16px;color:#b9b0ff}.more-app-status>button[data-app-activity-open] em{color:#8ea0c3;font-size:10px;font-style:normal;white-space:nowrap}.more-app-status>.icon-button{width:36px;height:36px;min-height:36px;flex:0 0 36px}
@media(max-width:560px){.more-app-status{display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:9px 10px}.more-app-status>div{grid-column:1/-1;margin:0}.more-app-status>button[data-app-activity-open]{width:100%;justify-content:flex-start}.more-app-status>button[data-app-activity-open] em{margin-left:auto}.more-app-status>.icon-button{grid-column:2;grid-row:2}}

/* Podsumowanie dnia: same wartości, bez oczywistych podpisów wejścia i wyjścia. */
.admin-day-row .admin-day-times b{display:none}.admin-day-row .admin-day-times .total{border-color:rgba(79,157,235,.42);background:rgba(79,157,235,.11)}.admin-day-row .admin-day-times .total strong{color:#82c6ff}.admin-day-row .admin-day-balance.positive{border-color:rgba(28,180,111,.42);background:rgba(28,180,111,.10)}.admin-day-row .admin-day-balance.positive strong{color:#4cda9b}.admin-day-row .admin-day-balance.negative{border-color:rgba(235,87,87,.42);background:rgba(235,87,87,.10)}.admin-day-row .admin-day-balance.negative strong{color:#ff8994}

@media (max-width: 430px) {
    .admin-day-row { gap:7px 8px; padding-right:10px; }
    .admin-day-row .admin-day-times span { font-size:12px; padding:4px; }
    .admin-day-row .admin-day-balance { min-width:65px; padding:4px 5px; }
    .admin-day-row .work-time-icon-action { width:34px; height:34px; min-height:34px; flex-basis:34px; }
}

/* Modal kończenia pracy: lista brygady nie może dziedziczyć jasnego tekstu z wersji light. */
[data-theme="dark"] .work-time-team-heading strong,
[data-theme="dark"] .work-time-team-row > span:last-child strong {
    color: var(--dark-text);
}

[data-theme="dark"] .work-time-team-heading small,
[data-theme="dark"] .work-time-team-row > span:last-child small,
[data-theme="dark"] .work-time-team-empty {
    color: var(--dark-muted);
}

[data-theme="dark"] .work-time-team-row.primary-worker {
    border-color: #51499a;
    background: #222653;
}


