[hidden] {
    display: none !important;
}


body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #333;
}


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: white;
    background: #c90016;
}


header h1 {
    margin: 0;
    font-size: 24px;
}


.header-home-link {
    color: inherit;
    text-decoration: none;
}


.header-home-link:hover {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
}


nav a {
    margin-left: 20px;
    color: white;
    font-weight: bold;
    text-decoration: none;
}


nav a:hover {
    text-decoration: underline;
}


.container {
    max-width: 1400px;
    margin: auto;
    padding: 20px;
}


.card {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}


.btn-canon {
    color: white;
    background: #c90016;
}


.btn-canon:hover {
    background: #990010;
}


.btn-excel {
    color: white;
    background: #1f8f3a;
}


.btn-excel:hover {
    background: #146b29;
}


table {
    width: 100%;
    border-collapse: collapse;
}


th {
    padding: 10px;
    color: white;
    background: #c90016;
}


td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}


tr.weekend {
    background: #eeeeee;
}


tr.swieto {
    background: #ffd0d0;
}


tr.urlop {
    background: #fff2b3;
}


tr.wolne {
    background: #cfe8ff;
}


.nadgodziny {
    color: red;
    font-weight: bold;
}


input,
textarea,
select {
    padding: 7px;
    border: 1px solid #bbb;
    border-radius: 5px;
}


textarea {
    resize: vertical;
}


/* ==========================================
   GŁÓWNY WYBÓR MIESIĄCA + BOCZNE PRZYCISKI
   ========================================== */


.month-picker {
    position: relative;
    display: flex;
    justify-content: center;
}


.month-picker-main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 330px;
    padding: 17px 28px;

    color: #ffffff;
    background: linear-gradient(
        135deg,
        #d71920,
        #a90012
    );

    border: 1px solid #93000e;
    border-radius: 16px;

    font-family: inherit;
    cursor: pointer;

    box-shadow:
        0 6px 16px rgba(169, 0, 18, 0.27);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


.month-picker-main-button:hover {
    background: linear-gradient(
        135deg,
        #e5232b,
        #b60014
    );

    transform: translateY(-2px);

    box-shadow:
        0 9px 21px rgba(169, 0, 18, 0.32);
}


.month-picker-main-button:active {
    transform: translateY(0);

    box-shadow:
        0 3px 9px rgba(169, 0, 18, 0.23);
}


.month-picker-main-icon {
    font-size: 27px;
    line-height: 1;
}


.month-picker-main-text {
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
}


/* BOCZNE PRZYCISKI MIESIĘCY */

.month-side-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 14px 18px;
    min-width: 145px;

    color: #a00012;
    background: #ffffff;

    border: 1px solid #efc8cd;
    border-radius: 14px;

    text-decoration: none;
    font-weight: 700;

    box-shadow:
        0 4px 10px rgba(120, 0, 12, 0.08);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}


.month-side-button:hover {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #d71920,
        #a90012
    );

    border-color: #980010;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(169, 0, 18, 0.22);
}


.month-side-button:active {
    transform: translateY(0);
}


.month-side-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    font-size: 28px;
    line-height: 1;

    border-radius: 50%;
    background: #fff4f5;
    color: #c90016;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.month-side-button:hover .month-side-button-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}


.month-side-button-text {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}


.month-side-button-next {
    justify-content: flex-end;
}



/* ==========================================
   MINI KALENDARZ MIESIĄCA
   ========================================== */

.picker {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 9px);
    left: 50%;
    display: none;
    width: 320px;
    max-width: calc(100vw - 60px);
    padding: 15px;
    box-sizing: border-box;
    background: white;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    transform: translateX(-50%);
}


.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: white;
    background: #c8102e;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
}


.picker-header span {
    cursor: pointer;
}


.picker-header span:hover {
    text-decoration: underline;
}


.picker-header button {
    padding: 6px 10px;
    color: white;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}


.picker-header button:hover {
    background: rgba(255, 255, 255, 0.14);
}


/* Miesiące */

.miesiace {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}


.miesiace a {
    padding: 12px 5px;
    color: #333;
    background: #f3f3f3;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}


.miesiace a:hover {
    color: white;
    background: #c8102e;
    transform: translateY(-1px);
}


.miesiace a.active {
    color: white;
    background: #c8102e;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(169, 0, 18, 0.22);
}


/* Wybór lat */

.lata {
    margin-top: 15px;
}


.lata-naglowek {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
}


.lata-naglowek button {
    padding: 6px 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}


.lata-naglowek button:hover {
    color: white;
    background: #c8102e;
}


.lista-lat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}


.lista-lat button {
    padding: 10px;
    background: #f3f3f3;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}


.lista-lat button:hover {
    color: white;
    background: #c8102e;
}


/* ==========================================
   NAGŁÓWEK WIDOKU TYGODNIOWEGO
   ========================================== */

.calendar-week-title {
    margin: 2px 0 16px;
    color: #8e0010;
    text-align: center;
}


/* ==========================================
   NAWIGACJA TYGODNIA
   ========================================== */



.week-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 64px;
    padding: 10px 16px;
    color: white;
    background: linear-gradient(
        135deg,
        #d71920,
        #a90012
    );
    border: 1px solid #97000f;
    border-radius: 11px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(169, 0, 18, 0.22);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


.week-button:hover {
    color: white;
    background: linear-gradient(
        135deg,
        #e5242c,
        #bd0015
    );
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(169, 0, 18, 0.28);
}


.week-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 7px rgba(169, 0, 18, 0.22);
}


.week-button-next {
    justify-content: flex-end;
    text-align: right;
}


.week-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    font-size: 30px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}


.week-button-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}


.week-button-text small {
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.82;
}


.week-button-text strong {
    font-size: 15px;
}


.week-range {
    flex: 1;
    padding: 10px 14px;
    color: #8e0010;
    background: white;
    border: 1px solid #ecc3c8;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
}


.week-range span {
    margin: 0 7px;
    color: #c90016;
}


/* ==========================================
   PRZEŁĄCZNIK WIDOKU KALENDARZA
   ========================================== */

.calendar-view-switch-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}


.calendar-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 18px;
    padding: 5px;
    background: #f4f4f4;
    border: 1px solid #dddddd;
    border-radius: 14px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}


.calendar-view-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    padding: 10px 15px;
    color: #555555;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.calendar-view-button:hover {
    color: #a90012;
    background: #ffffff;
    border-color: #e5b9be;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}


.calendar-view-button.active {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #d71920,
        #a90012
    );
    border-color: #980010;
    box-shadow: 0 4px 10px rgba(169, 0, 18, 0.24);
}


.calendar-view-button.active:hover {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #e5222a,
        #b60014
    );
}


.calendar-view-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: #b00014;
    background: #ffffff;
    border: 1px solid #e4c5c8;
    border-radius: 9px;
    font-size: 20px;
}


.calendar-view-button.active .calendar-view-icon {
    color: #a90012;
    border-color: rgba(255, 255, 255, 0.65);
}


.calendar-view-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}


.calendar-view-text small {
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    opacity: 0.72;
}


.calendar-view-text strong {
    font-size: 14px;
    font-weight: 700;
}


/* ==========================================
   WSPÓLNA SZEROKOŚĆ NAWIGACJI
   MIESIĄC / TYDZIEŃ
   ========================================== */

.month-picker-wrap,
.week-navigation {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    align-items: stretch;
    gap: 16px;

    width: 100%;
    max-width: 760px;
    margin: 2px auto 22px;

    box-sizing: border-box;
}


/* Pasek miesięczny */

.month-picker-wrap {
    padding: 0;
}


/* Pasek tygodniowy */

.week-navigation {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}


/* Boczne przyciski mają identyczne kolumny */

.month-side-button,
.week-button {
    width: 100%;
    min-width: 0;
    min-height: 64px;

    box-sizing: border-box;
}


/* Środkowe elementy zajmują całą środkową kolumnę */

.month-picker,
.week-range {
    width: 100%;
    min-width: 0;

    box-sizing: border-box;
}


/* Główny przycisk miesiąca */

.month-picker-main-button {
    width: 100%;
    min-width: 0;
    min-height: 64px;

    box-sizing: border-box;
}


/* Środkowy zakres tygodnia */

.week-range {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 64px;
    padding: 10px 14px;
}


/* ==========================================
   RESPONSYWNOŚĆ NAWIGACJI
   ========================================== */

@media (max-width: 800px) {

    .month-picker-wrap,
    .week-navigation {
        grid-template-columns: 150px minmax(0, 1fr) 150px;
        gap: 10px;

        max-width: 100%;
    }

}


@media (max-width: 700px) {

    .month-picker-wrap,
    .week-navigation {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 10px;

        width: 100%;
        max-width: none;
    }


    .month-picker,
    .week-range {
        grid-column: 1 / -1;
        grid-row: 1;
    }


    .month-side-button,
    .week-button {
        justify-content: center;
    }


    .month-picker-main-button {
        width: 100%;
        min-width: 0;
    }

}


@media (max-width: 600px) {

    .month-picker-main-button {
        padding: 15px 18px;
    }


    .month-picker-main-text {
        font-size: 20px;
    }


    .month-picker-main-icon {
        font-size: 24px;
    }


    .calendar-view-switch {
        display: flex;
        width: 100%;
    }


    .calendar-view-button {
        flex: 1;
        min-width: 0;
        padding: 9px 10px;
    }


    .calendar-view-icon {
        display: none;
    }


    .calendar-view-text strong {
        font-size: 13px;
    }

}

/* Doprecyzowanie wyglądu bocznych przycisków miesiąca */

.month-side-button {
    justify-content: flex-start;
}

.month-side-button-next {
    justify-content: flex-end;
}

.month-side-button-icon {
    flex-shrink: 0;
}

.month-side-button-text {
    flex: 1;
    text-align: center;
}

@media (max-width: 700px) {
    .month-side-button,
    .month-side-button-next {
        justify-content: center;
    }

    .month-side-button-text {
        flex: 0 1 auto;
    }
}

/* ==========================================
   PODSUMOWANIE MIESIĄCA
   ========================================== */

.month-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.summary-tile {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 74px;
    padding: 14px 16px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e5d7d9;
    border-top: 4px solid #c90016;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

.summary-tile span {
    color: #676767;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.summary-tile strong {
    color: #8f0010;
    font-size: 23px;
}

.summary-tile.overtime {
    border-top-color: #e17200;
}

.summary-tile.overtime strong {
    color: #bf4f00;
}

.summary-tile.leave {
    border-top-color: #299543;
}

.summary-tile.leave strong {
    color: #1f7434;
}

.summary-tile.remaining {
    border-top-color: #5c4db1;
}

.summary-tile.remaining strong {
    color: #4b3d98;
}


/* ==========================================
   TABELA EWIDENCJI I EDYCJA DNIA
   ========================================== */

.calendar-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dedede;
    border-radius: 12px;
}

.work-calendar {
    min-width: 1320px;
    margin: 0;
}

.work-calendar thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 9px;
    white-space: nowrap;
}

.work-calendar td {
    vertical-align: top;
    padding: 10px;
}

.work-calendar .date-cell {
    min-width: 108px;
}

.work-calendar .date-cell strong {
    display: block;
    white-space: nowrap;
}

.holiday-name {
    display: block;
    max-width: 135px;
    margin-top: 5px;
    color: #9d0012;
    font-size: 11px;
    line-height: 1.25;
}

.work-calendar .clients-cell {
    min-width: 220px;
}

.work-calendar .clients-cell > small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 10px;
    text-align: left;
}

.work-calendar textarea {
    width: 190px;
    min-height: 84px;
    box-sizing: border-box;
}

.day-row.weekend:not(.urlop):not(.wolne):not(.swieto) {
    background: #fff3ed;
}

.day-row.swieto:not(.urlop):not(.wolne) {
    background: #ffe4e4;
}


/* Wiele wpisów czasu */

.time-entries-cell {
    min-width: 520px;
}

.time-entries {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-entry {
    padding: 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-left: 4px solid #c90016;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.time-entry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #85000e;
}

.time-entry-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #9a0010;
    background: #fff;
    border: 1px solid #e5b9bf;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
}

.time-entry-remove:hover {
    color: #fff;
    background: #c90016;
}

.time-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.time-entry fieldset {
    min-width: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.time-entry legend {
    padding: 0 5px;
    color: #6f0010;
    font-size: 12px;
    font-weight: bold;
}

.time-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.time-pair label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #666;
    font-size: 10px;
    text-align: left;
}

.time-pair input[type="time"] {
    width: 100%;
    min-width: 0;
    padding: 5px;
    box-sizing: border-box;
}

.compact-check {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #666;
    font-size: 10px;
    text-align: left;
}

.compact-check input {
    margin: 0;
    padding: 0;
}

.next-day-check {
    color: #8d0010;
    font-weight: 600;
}

.add-entry-button {
    width: 100%;
    margin-top: 9px;
    padding: 8px 10px;
    color: #950010;
    background: #fff4f5;
    border: 1px dashed #d38b94;
    border-radius: 8px;
}

.add-entry-button:hover {
    color: #fff;
    background: #c90016;
    border-style: solid;
}


/* Klienci */

.client-autocomplete {
    position: relative;
}

.multi-client-input {
    width: 100%;
    box-sizing: border-box;
}

.client-suggestions {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 9px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.client-suggestions[hidden] {
    display: none;
}

.client-suggestions button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    color: #333;
    background: #fff;
    border-radius: 6px;
    text-align: left;
}

.client-suggestions button:hover {
    color: #fff;
    background: #c90016;
}


/* Status i akcje */

.status-option {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    text-align: left;
    white-space: nowrap;
}

.remote-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.remote-time[hidden] {
    display: none;
}

.remote-time input {
    width: 72px;
}

.day-summary-cell {
    min-width: 120px;
}

.day-summary-cell span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 11px;
    text-align: left;
}

.day-summary-cell strong {
    white-space: nowrap;
}

.day-actions {
    min-width: 118px;
}

.day-actions form {
    margin-top: 7px;
}

.action-button,
.delete-day-button {
    width: 100%;
    padding: 9px 10px;
    white-space: nowrap;
}

.delete-day-button {
    color: #8f0010;
    background: #fff;
    border: 1px solid #e2aeb5;
}

.delete-day-button:hover {
    color: #fff;
    background: #9d0012;
}


/* Eksport */

.export-card {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.export-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 14px;
}

.export-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: bold;
}

.export-form input,
.export-form select {
    width: 100%;
    box-sizing: border-box;
}

.export-form button {
    min-height: 40px;
}


@media (max-width: 1100px) {
    .month-summary {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }
}

@media (max-width: 700px) {
    .month-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-tile:last-child {
        grid-column: 1 / -1;
    }

    .export-form {
        grid-template-columns: 1fr;
    }
}


/* ==========================================
   CZYTELNY WIDOK PODSUMOWANIA KALENDARZA
   ========================================== */

.calendar-overview-card {
    overflow: visible;
}

.period-summary {
    width: 100%;
    max-width: 1080px;
    margin: 2px auto 22px;
}

.period-summary-heading {
    margin-bottom: 8px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.period-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.period-summary-grid.week-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 880px;
    margin: 0 auto;
}

.calendar-summary-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.calendar-summary-table {
    width: 100%;
    min-width: 850px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.calendar-summary-table th {
    padding: 13px 14px;
    background: #c90016;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.calendar-summary-table th:first-child {
    border-top-left-radius: 13px;
}

.calendar-summary-table th:last-child {
    border-top-right-radius: 13px;
    border-right: 0;
}

.calendar-summary-table td {
    padding: 13px 14px;
    border: 0;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
    vertical-align: middle;
}

.calendar-summary-table td:last-child {
    border-right: 0;
}

.calendar-summary-table tbody tr:last-child td {
    border-bottom: 0;
}

.summary-day-row {
    position: relative;
    cursor: pointer;
    transition:
        background 0.14s ease,
        box-shadow 0.14s ease,
        transform 0.14s ease;
}

.summary-day-row:hover,
.summary-day-row:focus-visible {
    background: #fff7f8;
    box-shadow: inset 4px 0 0 #c90016;
    outline: none;
}

.summary-day-row:active {
    background: #ffeff1;
}

.summary-day-row.weekend:not(.urlop):not(.wolne):not(.swieto) {
    background: #f6f6f6;
}

.summary-day-row.swieto:not(.urlop):not(.wolne) {
    background: #ffe1e1;
}

.summary-day-row.urlop {
    background: #fff3bd;
}

.summary-day-row.wolne {
    background: #dceeff;
}

.summary-date-cell {
    width: 145px;
}

.summary-date-cell small {
    display: block;
    max-width: 180px;
    margin-top: 4px;
    color: #a00012;
    font-size: 10px;
    line-height: 1.25;
}

.summary-day-link {
    color: #222;
    font-weight: 800;
    text-decoration: none;
}

.summary-day-link:hover {
    color: #c90016;
    text-decoration: underline;
}

.summary-weekday-cell {
    width: 110px;
    color: #555;
    font-weight: 700;
}

.summary-client-cell {
    min-width: 230px;
    font-weight: 600;
    line-height: 1.35;
}

.summary-hours-cell,
.summary-overtime-cell {
    width: 125px;
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

.summary-hours-cell strong,
.summary-overtime-cell strong {
    font-size: 17px;
}

.summary-overtime-cell strong {
    color: #777;
}

.summary-overtime-cell.has-overtime strong {
    color: #c90016;
}

.summary-notes-cell {
    position: relative;
    min-width: 260px;
    padding-right: 42px !important;
    color: #555;
    line-height: 1.35;
}

.row-edit-arrow {
    position: absolute;
    top: 50%;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    color: #c90016;
    background: #fff;
    border: 1px solid #efc9ce;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
    transition:
        color 0.14s ease,
        background 0.14s ease,
        transform 0.14s ease;
}

.summary-day-row:hover .row-edit-arrow {
    color: #fff;
    background: #c90016;
    transform: translateY(-50%) translateX(2px);
}

.empty-summary-value {
    color: #999;
    font-weight: 400;
    font-style: italic;
}

.status-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.leave-chip {
    color: #6e5600;
    background: #ffe889;
}

.free-chip {
    color: #075384;
    background: #bfe2ff;
}


/* ==========================================
   OSOBNA STRONA EDYCJI DNIA
   ========================================== */

.day-editor-page {
    max-width: 1180px;
    margin: 0 auto;
}

.day-editor-topbar {
    margin-bottom: 12px;
}

.back-to-calendar-button,
.secondary-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    color: #8d0010;
    background: #fff;
    border: 1px solid #e8c4c8;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.back-to-calendar-button:hover,
.secondary-action-button:hover {
    color: #8d0010;
    background: #fff3f4;
    border-color: #d99ba3;
    transform: translateY(-1px);
}

.back-to-calendar-button span {
    font-size: 24px;
    line-height: 0.7;
}

.day-editor-card {
    padding: 24px;
}

.day-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9e9e9;
}

.day-editor-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #a00012;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.day-editor-header h2 {
    margin: 0;
    font-size: 26px;
}

.day-editor-holiday {
    margin: 6px 0 0;
    color: #c90016;
    font-size: 13px;
    font-weight: 700;
}

.day-editor-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 8px;
    min-width: 410px;
}

.day-editor-summary > div {
    padding: 11px 13px;
    background: #f7f7f7;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    text-align: center;
}

.day-editor-summary span {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.day-editor-summary strong {
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.day-editor-summary .overtime strong {
    color: #c90016;
}

.day-editor-form {
    display: grid;
    gap: 20px;
}

.day-editor-section {
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading h3 {
    margin: 0;
    font-size: 18px;
}

.section-heading p {
    margin: 0;
    color: #777;
    font-size: 13px;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #fff;
    background: #c90016;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
}

.day-basic-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 18px 22px;
}

.editor-field {
    min-width: 0;
}

.editor-field-wide {
    grid-column: 1 / -1;
}

.editor-field > label:first-child,
.field-label {
    display: block;
    margin-bottom: 7px;
    color: #444;
    font-size: 13px;
    font-weight: 800;
}

.editor-field input[type="text"],
.editor-field input:not([type]),
.editor-field textarea,
.multi-client-input {
    width: 100%;
    box-sizing: border-box;
}

.editor-field small {
    display: block;
    margin-top: 6px;
    color: #777;
}

.status-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-option-large {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 9px;
}

.remote-time-editor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.remote-time-editor {
    flex-wrap: wrap;
}

.remote-duration-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 600;
}

.remote-time-editor .remote-duration-field input {
    width: 78px;
    text-align: center;
}

.day-time-entries {
    display: grid;
    gap: 14px;
}

.day-editor-section .time-entry {
    margin: 0;
    background: #fff;
}

.section-heading-with-action {
    align-items: center;
}

.day-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

.save-day-button {
    min-width: 190px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
}

.delete-day-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.delete-day-button {
    color: #a00012;
    background: #fff;
    border: 1px solid #e5b4ba;
}

.delete-day-button:hover {
    color: #fff;
    background: #a90012;
}


/* ==========================================
   RESPONSYWNOŚĆ NOWYCH WIDOKÓW
   ========================================== */

@media (max-width: 950px) {
    .period-summary-grid,
    .period-summary-grid.week-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .period-summary-grid .summary-tile:last-child {
        grid-column: 1 / -1;
    }

    .day-editor-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .day-editor-summary {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .day-editor-card {
        padding: 15px;
    }

    .day-editor-header h2 {
        font-size: 21px;
    }

    .day-editor-summary {
        grid-template-columns: 1fr;
    }

    .day-basic-grid {
        grid-template-columns: 1fr;
    }

    .editor-field-wide {
        grid-column: auto;
    }

    .section-heading,
    .section-heading-with-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading p {
        padding-left: 38px;
    }

    .add-entry-button {
        width: 100%;
    }

    .day-editor-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .save-day-button,
    .secondary-action-button {
        width: 100%;
        box-sizing: border-box;
    }

    .period-summary-grid,
    .period-summary-grid.week-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .period-summary-grid,
    .period-summary-grid.week-summary-grid {
        grid-template-columns: 1fr;
    }

    .period-summary-grid .summary-tile:last-child {
        grid-column: auto;
    }
}

/* ==========================================
   KONTO, LOGOWANIE I KOMUNIKATY
   ========================================== */

header {
    gap: 20px;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    flex: 1;
}

header nav a {
    margin-left: 0;
}

.header-account {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-user-link {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.header-user-link:hover {
    text-decoration: underline;
}

.header-account form {
    margin: 0;
}

.header-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.header-logout-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.header-close-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    color: #9b0011;
    background: #fff;
    border: 1px solid #fff;
}

.header-close-button:hover {
    color: #76000d;
    background: #fff2f4;
}

.header-action-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flash-list {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.flash-message {
    padding: 11px 14px;
    background: #f2f2f2;
    border: 1px solid #ddd;
    border-radius: 9px;
    font-weight: 700;
}

.flash-message.blad {
    color: #8e0010;
    background: #fff0f2;
    border-color: #e8b8be;
}

.flash-message.sukces {
    color: #146427;
    background: #edf9ef;
    border-color: #b9dfc0;
}

.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 45px;
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
}

.auth-card-wide {
    width: min(560px, 100%);
}

.auth-eyebrow,
.page-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #a00012;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.85px;
}

.auth-card h2,
.page-heading-row h2 {
    margin: 0 0 18px;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label,
.admin-add-user-form label,
.stats-filter-form label {
    display: grid;
    gap: 6px;
    color: #444;
    font-size: 13px;
    font-weight: 800;
}

.auth-form input,
.admin-add-user-form input {
    width: 100%;
    box-sizing: border-box;
}

.auth-submit {
    margin-top: 5px;
    padding: 12px 18px;
}

.narrow-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   HISTORIA KLIENTÓW
   ========================================== */

.page-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.client-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 15px;
}

.client-history-card {
    display: block;
    padding: 18px;
    color: #333;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.client-history-card:hover {
    color: #333;
    border-color: #e0a5ad;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(130, 0, 15, 0.12);
}

.disabled-card {
    opacity: 0.75;
}

.client-card-heading,
.admin-user-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-card-heading h3,
.admin-user-main h3 {
    flex: 1;
    margin: 0;
}

.client-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, #d71920, #990010);
    border-radius: 12px;
    font-size: 19px;
    font-weight: 800;
}

.client-card-arrow {
    color: #c90016;
    font-size: 28px;
}

.client-card-stats,
.client-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.client-card-stats > div,
.client-detail-metrics > div {
    padding: 10px 7px;
    background: #f7f7f7;
    border-radius: 9px;
    text-align: center;
}

.client-card-stats strong,
.client-detail-metrics strong {
    display: block;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.client-card-stats span,
.client-detail-metrics span {
    display: block;
    margin-top: 3px;
    color: #777;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.empty-state,
.empty-timeline {
    padding: 30px;
    color: #777;
    background: #f7f7f7;
    border: 1px dashed #ccc;
    border-radius: 12px;
    text-align: center;
}

.client-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.client-detail-page > .back-to-calendar-button {
    margin-bottom: 12px;
}

.client-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.client-detail-header h2 {
    margin: 0;
    font-size: 28px;
}

.client-detail-metrics {
    min-width: 560px;
    margin-top: 0;
}

.visit-list {
    display: grid;
    gap: 14px;
}

.visit-card {
    padding: 20px;
}

.visit-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.visit-card-header h3 {
    margin: 0;
}

.visit-card-header p {
    margin: 5px 0 0;
    color: #666;
}

.visit-hours {
    min-width: 150px;
    text-align: right;
}

.visit-hours span,
.visit-hours small {
    display: block;
    color: #777;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.visit-hours strong {
    display: block;
    margin: 2px 0;
    color: #a90012;
    font-size: 25px;
}

.timeline {
    padding: 10px 10px 8px;
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow-x: auto;
}

.timeline-axis,
.timeline-track {
    position: relative;
    min-width: 760px;
}

.timeline-axis {
    height: 24px;
    margin: 0 8px;
    border-bottom: 1px solid #ccc;
}

.timeline-axis span {
    position: absolute;
    bottom: 4px;
    color: #666;
    font-size: 10px;
    transform: translateX(-50%);
}

.timeline-axis span::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 50%;
    width: 1px;
    height: 62px;
    background: #e4e4e4;
}

.timeline-track {
    height: 78px;
    margin: 8px;
}

.timeline-segment {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 12px;
    height: 21px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 7px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    white-space: nowrap;
}

.timeline-segment.dojazd {
    top: 2px;
    color: #063d64;
    background: #b8ddf5;
    border: 1px solid #73b8e4;
}

.timeline-segment.praca {
    top: 29px;
    color: #fff;
    background: linear-gradient(135deg, #d71920, #a00012);
    border: 1px solid #90000e;
}

.timeline-segment.powrot {
    top: 56px;
    color: #5c4000;
    background: #f8d88d;
    border: 1px solid #d9ae45;
}

.timeline-icon {
    flex-shrink: 0;
    font-size: 11px;
}

.timeline-label {
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
}

.remote-visit-badge {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 10px;
    color: #075384;
    background: #e2f2ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.visit-edit-link {
    display: block;
    margin-top: 12px;
    color: #a00012;
    font-weight: 800;
    text-align: right;
    text-decoration: none;
}

/* ==========================================
   STATYSTYKI
   ========================================== */

.stats-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.stats-filter-form input,
.stats-filter-form select {
    min-width: 110px;
}

.stats-tabs {
    display: inline-flex;
    gap: 5px;
    margin-bottom: 18px;
    padding: 5px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.stats-tabs a {
    padding: 9px 15px;
    color: #555;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.stats-tabs a.active {
    color: #fff;
    background: #c90016;
}

.stats-period-title {
    margin: 0 0 14px;
}

.stats-primary-grid,
.ranking-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stats-primary-grid article,
.ranking-card {
    padding: 16px;
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
}

.stats-primary-grid span,
.ranking-card > span {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.55px;
}

.stats-primary-grid strong,
.ranking-card strong {
    display: block;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
}

.stats-primary-grid .accent strong,
.ranking-card:nth-child(2) strong {
    color: #c90016;
}

.ranking-card small {
    display: block;
    margin-top: 4px;
    color: #666;
}

.stats-table-wrap {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.stats-table {
    min-width: 700px;
}

.stats-table td,
.stats-table th {
    text-align: left;
}

/* ==========================================
   ADMINISTRACJA UŻYTKOWNIKÓW
   ========================================== */

.admin-user-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
}

.admin-add-user-form {
    display: grid;
    align-self: start;
    gap: 12px;
    padding: 18px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.admin-add-user-form h3 {
    margin: 0 0 5px;
}

.admin-user-list {
    display: grid;
    gap: 10px;
}

.admin-user-card {
    padding: 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.admin-user-card.inactive {
    opacity: 0.62;
}

.admin-user-main p {
    margin: 3px 0 0;
    color: #666;
}

.user-status {
    padding: 5px 8px;
    color: #17632a;
    background: #e9f7ec;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.admin-user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.admin-user-actions form {
    display: flex;
    gap: 5px;
    margin: 0;
}

.admin-user-actions input {
    width: 140px;
}

.danger-button {
    color: #a00012;
    background: #fff0f2;
    border: 1px solid #e2aeb5;
}

.time-entry-client {
    margin-bottom: 12px;
}

.time-entry-client label {
    display: grid;
    gap: 6px;
    color: #444;
    font-size: 12px;
    font-weight: 800;
}

.time-entry-client input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1050px) {
    header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    header nav {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .client-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-detail-metrics {
        width: 100%;
        min-width: 0;
    }

    .stats-primary-grid,
    .ranking-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-heading-row,
    .visit-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-card-stats,
    .client-detail-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .visit-hours {
        text-align: left;
    }

    .admin-user-layout {
        grid-template-columns: 1fr;
    }

    .admin-user-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-actions form,
    .admin-user-actions input,
    .admin-user-actions button {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 520px) {
    .stats-primary-grid,
    .ranking-card-grid,
    .client-card-stats,
    .client-detail-metrics {
        grid-template-columns: 1fr;
    }

    .stats-tabs {
        display: grid;
        width: 100%;
        box-sizing: border-box;
    }

    .stats-tabs a {
        text-align: center;
    }
}

.calendar-client-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.calendar-client-links a,
.calendar-client-links span {
    display: inline-flex;
    padding: 4px 8px;
    color: #8f0010;
    background: #fff1f3;
    border: 1px solid #efc5ca;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.calendar-client-links a:hover {
    color: #fff;
    background: #c90016;
    border-color: #c90016;
}

.stats-client-link {
    color: #a00012;
    font-weight: 800;
    text-decoration: none;
}

.stats-client-link:hover {
    text-decoration: underline;
}

/* ==========================================
   CLOUDFLARE PAGES / SPA
   ========================================== */

.loading-card {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: #777;
}

nav a.active {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.mobile-nav-toggle {
    display: none;
    padding: 7px 11px;
    color: #c90016;
    background: #fff;
    border-radius: 8px;
    font-size: 20px;
}

.app-dialog {
    width: min(460px, calc(100vw - 30px));
    padding: 22px;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.app-dialog::backdrop {
    background: rgba(0, 0, 0, .45);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.calendar-client-link {
    display: inline-flex;
    padding: 4px 8px;
    color: #8e0010;
    background: #fff2f4;
    border: 1px solid #efc7cc;
    border-radius: 999px;
    text-decoration: none;
}

.summary-empty {
    color: #999;
}

.summary-overtime-cell.positive {
    color: #c90016;
    font-weight: 700;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 15px 0 22px;
}

.settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 700;
}

.settings-grid .compact-check {
    flex-direction: row;
    align-items: center;
    font-weight: 600;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#leave-year-form,
#leave-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.timeline-segment.travel,
.timeline-legend i.travel {
    background: #3f82d4;
}

.timeline-segment.work,
.timeline-legend i.work {
    background: #c90016;
}

.timeline-segment.return,
.timeline-legend i.return {
    background: #e3a11a;
}

.time-entry-notes {
    margin-top: 12px;
}

.time-entry-notes label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-user-actions > button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
}

@media (max-width: 1050px) {
    header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        margin-left: 0;
    }

    header#app-header .header-account {
        margin-left: auto;
    }

    header nav {
        display: none;
        order: 4;
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, .25);
    }

    header nav.mobile-open {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    header nav a {
        margin-left: 0;
        padding: 7px 10px;
    }
}

@media (max-width: 760px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .header-account {
        width: 100%;
        justify-content: flex-end;
    }
}


/* ==========================================
   UPROSZCZONY FORMULARZ DNIA
   ========================================== */

.compact-day-summary {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.single-day-form {
    display: grid;
    gap: 18px;
}

.day-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 12px;
}

.delegation-option {
    border-color: #c8b7ee;
    background: #f3efff;
}

.single-time-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.single-time-group {
    display: grid;
    align-content: start;
    gap: 11px;
    min-width: 0;
    padding: 15px;
    border: 1px solid #e3c2c6;
    border-radius: 13px;
    background: #fffafa;
}

.single-time-group legend {
    padding: 0 8px;
    color: #940011;
    font-weight: 800;
}

.single-time-group label:not(.compact-check) {
    display: grid;
    gap: 6px;
    color: #4c4c4c;
    font-size: 13px;
    font-weight: 700;
}

.single-time-group input[type="time"] {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

.auto-time-input:disabled {
    color: #6f6f6f;
    background: #e8e8e8;
    border-color: #c9c9c9;
    opacity: 1;
    cursor: not-allowed;
}

.time-unlock-button {
    justify-self: start;
    padding: 5px 8px;
    color: #8e0010;
    background: transparent;
    border: 1px solid #e3b8bd;
    font-size: 11px;
    font-weight: 700;
}

.time-unlock-button:hover:not(:disabled) {
    color: #ffffff;
    background: #b40015;
}

.time-unlock-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.next-day-option {
    margin-top: 2px;
}

.remote-under-hours {
    max-width: 540px;
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #f8f8f8;
}

.section-disabled .single-time-grid {
    opacity: .55;
}

.day-editor-actions-complete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.day-editor-actions-complete .delete-day-button {
    margin-left: auto;
}

/* ==========================================
   KOLOROWE STATYSTYKI
   ========================================== */

.stats-primary-grid-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-color-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 18px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .13);
}

.stats-color-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -34px;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
}

.stats-color-card span,
.stats-color-card strong {
    position: relative;
    z-index: 1;
    display: block;
}

.stats-color-card span {
    margin-bottom: 9px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .55px;
    opacity: .9;
}

.stats-color-card strong {
    font-size: 29px;
}

.stats-color-card.hours { background: linear-gradient(135deg, #c90016, #8f0010); }
.stats-color-card.overtime { background: linear-gradient(135deg, #e86b12, #b23a00); }
.stats-color-card.workdays { background: linear-gradient(135deg, #2475c9, #174f91); }
.stats-color-card.leave { background: linear-gradient(135deg, #21a35b, #14743d); }
.stats-color-card.free { background: linear-gradient(135deg, #607d8b, #3c525c); }
.stats-color-card.delegation { background: linear-gradient(135deg, #7650c8, #4c2d91); }

@media (max-width: 850px) {
    .single-time-grid,
    .stats-primary-grid-six {
        grid-template-columns: 1fr;
    }

    .day-status-grid {
        grid-template-columns: 1fr;
    }

    .day-editor-actions-complete .delete-day-button {
        margin-left: 0;
        width: 100%;
    }
}

tr.delegacja { background: #f1eaff; }


/* ==========================================
   STATYSTYKI — CZYTELNE KAFELKI I WYBÓR OKRESU
   ========================================== */

.stats-page-heading {
    justify-content: center;
    text-align: center;
}

.stats-page-heading h2 {
    margin-bottom: 4px;
    font-size: 30px;
}

.stats-tabs-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.stats-period-picker-wrap {
    margin-top: 2px;
    margin-bottom: 24px;
}

.stats-period-main-button .month-picker-main-text {
    font-size: 27px;
}

.stats-year-picker-wrap .month-side-button-text {
    white-space: normal;
    text-align: center;
}

.stats-picker .lista-lat button.active {
    color: #ffffff;
    background: #c8102e;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(169, 0, 18, .22);
}

.stats-year-list {
    margin-top: 0;
}

.stats-primary-grid-six {
    gap: 10px;
}

.stats-primary-grid .stats-color-card {
    min-height: 86px;
    padding: 14px 16px;
    border: 0;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

.stats-primary-grid .stats-color-card span {
    margin-bottom: 7px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .45px;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.stats-primary-grid .stats-color-card strong {
    color: #ffffff;
    font-size: 33px;
    line-height: 1.05;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}

.stats-primary-grid .stats-color-card::after {
    right: -30px;
    bottom: -46px;
    width: 100px;
    height: 100px;
}

@media (max-width: 850px) {
    .stats-primary-grid-six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-period-main-button .month-picker-main-text {
        font-size: 23px;
    }
}

@media (max-width: 600px) {
    .stats-period-picker-wrap {
        grid-template-columns: 1fr 1fr;
    }

    .stats-period-picker-wrap .month-picker {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .stats-period-picker-wrap .month-side-button {
        grid-row: 2;
    }

    .stats-page-heading h2 {
        font-size: 27px;
    }
}

@media (max-width: 420px) {
    .stats-primary-grid-six {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   STATYSTYKI V2.3 — KOMPAKTOWE KAFELKI I NAWIGACJA
   ========================================== */

/* Sześć małych kafelków w jednym rzędzie na szerokim ekranie. */
.stats-primary-grid-six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.stats-primary-grid .stats-color-card {
    min-height: 56px;
    padding: 9px 10px;
    border-radius: 11px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .11);
}

.stats-primary-grid .stats-color-card span {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.08;
    letter-spacing: .25px;
}

.stats-primary-grid .stats-color-card strong {
    font-size: 24px;
    line-height: 1;
}

.stats-primary-grid .stats-color-card::after {
    right: -32px;
    bottom: -52px;
    width: 82px;
    height: 82px;
}

/* Mniejszy pasek: poprzedni okres / wybrany okres / następny okres. */
.stats-period-picker-wrap {
    grid-template-columns: 118px minmax(190px, 1fr) 118px;
    gap: 8px;
    max-width: 540px;
    margin: 0 auto 16px;
}

.stats-period-picker-wrap .month-side-button,
.stats-period-picker-wrap .month-picker-main-button {
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 10px;
}

.stats-period-picker-wrap .month-side-button {
    gap: 6px;
}

.stats-period-picker-wrap .month-side-button-icon {
    width: 25px;
    height: 25px;
    font-size: 21px;
}

.stats-period-picker-wrap .month-side-button-text,
.stats-year-picker-wrap .month-side-button-text {
    font-size: 12px;
    line-height: 1.05;
    white-space: normal;
    text-align: center;
}

.stats-period-main-button {
    gap: 8px;
}

.stats-period-main-button .month-picker-main-icon {
    font-size: 19px;
}

.stats-period-main-button .month-picker-main-text {
    font-size: 18px;
}

/* Kompaktowy minikalendarz statystyk. */
.stats-picker {
    width: 280px;
    padding: 11px;
}

.stats-picker .picker-header,
.stats-picker .lata-naglowek {
    font-size: 16px;
}

.stats-picker .miesiace {
    gap: 6px;
    margin-top: 9px;
}

.stats-picker .miesiace a {
    padding: 8px 4px;
    font-size: 12px;
}

.stats-picker .lista-lat {
    gap: 6px;
}

.stats-picker .lista-lat button {
    padding: 8px 4px;
    font-size: 12px;
}

@media (max-width: 1050px) {
    .stats-primary-grid-six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .stats-period-picker-wrap {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
        gap: 7px;
    }

    .stats-period-picker-wrap .month-picker {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .stats-period-picker-wrap .month-side-button {
        grid-row: 2;
        min-height: 38px;
        padding: 6px 8px;
    }

    .stats-period-picker-wrap .month-picker-main-button {
        min-height: 42px;
    }
}

@media (max-width: 600px) {
    .stats-primary-grid-six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .stats-primary-grid .stats-color-card {
        min-height: 52px;
        padding: 8px 9px;
    }

    .stats-primary-grid .stats-color-card span {
        font-size: 10px;
    }

    .stats-primary-grid .stats-color-card strong {
        font-size: 22px;
    }

    .stats-period-main-button .month-picker-main-text {
        font-size: 17px;
    }
}

@media (max-width: 420px) {
    .stats-primary-grid-six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-period-picker-wrap .month-side-button-text,
    .stats-year-picker-wrap .month-side-button-text {
        font-size: 11px;
    }
}


/* ==========================================
   WERSJA V2.4 — UŻYTKOWNICY, USTAWIENIA I WYKRESY
   ========================================== */

.header-home-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.header-canon-logo {
    display: block;
    width: 112px;
    height: auto;
}

.header-home-link > span {
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.header-user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 17px;
    padding: 12px 16px;
    color: #fff;
    background: #c90016;
    border-radius: 12px;
}

.auth-brand img {
    width: 116px;
    height: auto;
}

.auth-brand span {
    font-size: 21px;
    font-weight: 800;
}

/* Drugie, informacyjne kafelki statystyk są również kompaktowe. */
.ranking-card-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ranking-card-grid-compact .ranking-card {
    min-height: 54px;
    padding: 9px 11px;
    border-radius: 10px;
}

.ranking-card-grid-compact .ranking-card > span {
    margin-bottom: 3px;
    font-size: 9px;
    line-height: 1.05;
}

.ranking-card-grid-compact .ranking-card strong {
    font-size: 20px;
    line-height: 1;
}

.ranking-card-grid-compact .ranking-card small {
    margin-top: 3px;
    font-size: 11px;
}

.stats-chart-card {
    margin: 14px 0;
    padding: 14px;
    border: 1px solid #dedede;
    border-radius: 12px;
    background: #fff;
}

.stats-chart-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.stats-chart-heading h3 {
    margin: 0 0 3px;
    color: #8e0010;
    font-size: 17px;
}

.stats-chart-heading p {
    margin: 0;
    color: #777;
    font-size: 12px;
}

.stats-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
}

.stats-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stats-chart-legend i {
    width: 11px;
    height: 11px;
    border-radius: 2px;
}

.stats-chart-legend i.total,
.stats-chart-bar.total { fill: #c90016; background: #c90016; }
.stats-chart-legend i.overtime,
.stats-chart-bar.overtime { fill: #e86b12; background: #e86b12; }

.stats-chart-scroll {
    overflow-x: auto;
    padding-bottom: 3px;
}

.stats-chart {
    display: block;
    width: max(100%, 820px);
    height: 270px;
}

.stats-chart-grid-line { stroke: #e8e8e8; stroke-width: 1; }
.stats-chart-axis { stroke: #aaa; stroke-width: 1; }
.stats-chart-axis-label { fill: #666; font-size: 10px; font-family: Arial, sans-serif; }
.stats-chart-bar { transition: opacity .15s ease; }
.stats-chart-bar:hover { opacity: .72; }

.settings-profile-form,
.settings-password-form,
.settings-leave-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 13px;
}

.settings-profile-form label,
.settings-password-form label,
.settings-leave-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.settings-password-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.norms-table {
    max-width: 680px;
    margin-bottom: 20px;
}

.norms-table input {
    width: 82px;
    box-sizing: border-box;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

.settings-counting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin: 14px 0 18px;
}

.settings-large-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 700;
}

.settings-large-check input {
    width: 20px;
    height: 20px;
}

.settings-save-button {
    font-size: 16px;
}

.settings-year-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-year-form input {
    width: 90px;
}

.leave-auto-note {
    margin-top: 12px;
}

.initial-password-info {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    color: #5c4400;
    background: #fff7d5;
    border: 1px solid #ecd47c;
    border-radius: 9px;
}

.initial-password-info span,
.initial-password-info small { font-size: 12px; }
.initial-password-info strong { font-size: 21px; letter-spacing: 1px; }

.admin-user-actions {
    align-items: center;
}

.export-picker-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0 18px;
}

.export-picker-wrap .month-picker {
    width: min(100%, 360px);
}

.export-period-main-button {
    width: 100%;
    min-width: 0;
}

.export-picker .lista-lat button.active {
    color: #fff;
    background: #c8102e;
}

.export-submit-button {
    display: block;
    min-height: 44px;
    margin: 0 auto;
    padding: 10px 18px;
    font-size: 15px;
}

@media (max-width: 900px) {
    .ranking-card-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-password-form { grid-template-columns: 1fr 1fr; }
    .settings-password-form button { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .header-canon-logo { width: 88px; }
    .header-home-link > span { font-size: 16px; }
    .header-user-name { max-width: 65vw; overflow: hidden; text-overflow: ellipsis; }
    .stats-chart-heading { flex-direction: column; }
    .settings-profile-form,
    .settings-password-form,
    .settings-leave-form { grid-template-columns: 1fr; }
    .settings-password-form button { grid-column: auto; }
    .settings-year-form { width: 100%; }
    .settings-year-form input { flex: 1; }
}

@media (max-width: 430px) {
    .ranking-card-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .ranking-card-grid-compact .ranking-card { padding: 8px; }
    .ranking-card-grid-compact .ranking-card strong { font-size: 18px; }
    .auth-brand { gap: 8px; }
    .auth-brand img { width: 92px; }
    .auth-brand span { font-size: 17px; }
}

/* ==========================================
   WERSJA V2.5 — IMPORT / EKSPORT EXCEL
   ========================================== */
.excel-import-card code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #f3f3f3;
    font-size: .94em;
}

.excel-import-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.header-canon-logo,
.auth-brand img {
    object-fit: contain;
}


/* ==========================================
   WERSJA V2.6 — LOGO, KAFELKOWE MENU I INSTALACJA PWA
   ========================================== */
.header-canon-logo {
    width: 122px;
    height: 27px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto;
}

.auth-brand img {
    width: 128px;
    height: 29px;
    object-fit: contain;
}

header nav {
    gap: 7px;
}

header nav .nav-tile {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 6px 10px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    text-decoration: none;
    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

header nav .users-nav-tile {
    position: relative;
    overflow: visible;
}

.nav-notification-badge {
    position: absolute;
    top: -9px;
    right: -9px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    box-sizing: border-box;
    color: #fff;
    background: #ff1738;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(70, 0, 10, .38);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    animation: nav-notification-pop .24s ease-out;
}

@keyframes nav-notification-pop {
    from { opacity: 0; transform: scale(.55); }
    to { opacity: 1; transform: scale(1); }
}

header nav .nav-tile:hover {
    color: #fff;
    background: rgba(255, 255, 255, .23);
    border-color: rgba(255, 255, 255, .5);
    text-decoration: none;
    transform: translateY(-1px);
}

header nav .nav-tile.active {
    color: #a60014;
    background: #fff;
    border-color: #fff;
    text-decoration: none;
    box-shadow: 0 3px 9px rgba(85, 0, 10, .2);
}

.nav-tile-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    font-size: 18px;
    line-height: 1;
}

.nav-tile-label {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.install-app-button {
    min-height: 44px;
    font-size: 15px;
}

.install-app-button:disabled {
    cursor: default;
    opacity: .72;
}

@media (max-width: 1180px) {
    .nav-tile-label { font-size: 11px; }
    header nav .nav-tile { padding: 6px 8px; }
}

@media (max-width: 1050px) {
    header nav.mobile-open {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }
    header nav .nav-tile {
        justify-content: flex-start;
        width: auto;
        min-height: 46px;
        padding: 8px 10px;
    }
    .nav-tile-label { font-size: 13px; }
    .nav-notification-badge { top: -7px; right: -7px; }
}

@media (max-width: 620px) {
    .header-canon-logo { width: 99px; height: 22px; }
    .header-home-link > span { font-size: 15px; }
    header nav.mobile-open { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
    .header-home-link { gap: 7px; }
    .header-canon-logo { width: 86px; height: 20px; }
    .header-home-link > span { font-size: 14px; }
}

/* ==========================================
   V2.10 — EKSPORT MIESIĄCA Z KALENDARZA
   ========================================== */
.calendar-view-switch-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
}

.calendar-view-switch-spacer {
    min-width: 0;
}

.calendar-view-switch {
    justify-self: center;
}

.calendar-export-button {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 54px;
    padding: 8px 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #2f8f4e, #176b35);
    border: 1px solid #145d2e;
    border-radius: 11px;
    box-shadow: 0 4px 10px rgba(23, 107, 53, 0.22);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}

.calendar-export-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #39a45c, #1d7a3e);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(23, 107, 53, 0.28);
}

.calendar-export-button:disabled {
    cursor: wait;
    opacity: .65;
}

.calendar-export-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    color: #176b35;
    background: #ffffff;
    border-radius: 8px;
    font-size: 18px;
}

.calendar-export-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.12;
    white-space: nowrap;
}

.calendar-export-text small {
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .55px;
    opacity: .86;
}

.calendar-export-text strong {
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .calendar-view-switch-wrapper {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .calendar-view-switch-spacer {
        display: none;
    }

    .calendar-view-switch {
        justify-self: stretch;
        margin-bottom: 0;
    }

    .calendar-export-button {
        justify-self: end;
        min-height: 46px;
        padding: 6px 10px;
    }
}

@media (max-width: 600px) {
    .calendar-export-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        font-size: 16px;
    }

    .calendar-export-text strong {
        font-size: 12px;
    }
}

/* Wyrównanie wiersza przełącznika i eksportu */
.calendar-view-switch-wrapper {
    margin: 0 0 18px;
}

.calendar-view-switch-wrapper .calendar-view-switch {
    margin: 0;
}

/* Loginy automatyczne */
.auth-secondary-link {
  display: inline-flex;
  justify-content: center;
  margin-top: 16px;
  color: #a90012;
  font-weight: 700;
  text-decoration: none;
}
.auth-secondary-link:hover { text-decoration: underline; }
.generated-login-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #edc5ca;
  border-radius: 9px;
  background: #fff7f8;
}
.generated-login-preview span { color: #6b6b6b; font-size: 13px; }
.generated-login-preview strong { color: #a90012; font-size: 18px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .settings-profile-card .settings-profile-form { grid-template-columns: 1fr; }
}


/* V2.13 — kompaktowe podsumowania i role administracyjne */
.period-summary {
    max-width: 780px;
    margin-bottom: 16px;
}
.period-summary-grid,
.period-summary-grid.week-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-width: 780px;
}
.period-summary-grid .summary-tile,
.period-summary-grid .summary-tile:last-child {
    grid-column: auto !important;
    min-height: 58px;
    padding: 9px 11px;
    gap: 3px;
    border-top-width: 3px;
    border-radius: 9px;
}
.period-summary-grid .summary-tile span {
    font-size: 10px;
    line-height: 1.15;
    letter-spacing: .25px;
}
.period-summary-grid .summary-tile strong {
    font-size: 20px;
    line-height: 1.05;
}
.summary-weekday-cell.worked-special-day {
    color: #c90016 !important;
    font-weight: 900;
}
.lata-naglowek {
    justify-content: center;
}
.helper-admin-info p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}
.primary-admin-card {
    border-color: #d6b35d;
    box-shadow: 0 3px 12px rgba(165, 115, 0, .12);
}
@media (max-width: 700px) {
    .period-summary-grid,
    .period-summary-grid.week-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px;
    }
    .period-summary-grid .summary-tile,
    .period-summary-grid .summary-tile:last-child {
        grid-column: auto !important;
        min-height: 52px;
        padding: 8px 9px;
    }
    .period-summary-grid .summary-tile span {
        font-size: 9px;
    }
    .period-summary-grid .summary-tile strong {
        font-size: 18px;
    }
}
@media (max-width: 480px) {
    .period-summary-grid,
    .period-summary-grid.week-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* V2.13 — tabela urlopów przewijana wewnątrz karty na telefonie */
.leave-page {
    min-width: 0;
    overflow: hidden;
}

.leave-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    box-sizing: border-box;
    border-radius: 8px;
}

.leave-table-wrap:focus-visible {
    outline: 2px solid #c90016;
    outline-offset: 2px;
}

.leave-summary-table {
    width: 100%;
    min-width: 620px;
    margin: 0;
}

.leave-summary-table th,
.leave-summary-table td {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .leave-table-wrap {
        scrollbar-width: thin;
    }

    .leave-summary-table {
        width: 620px;
        min-width: 620px;
    }

    .leave-summary-table th,
    .leave-summary-table td {
        padding: 9px 10px;
        font-size: 14px;
    }
}


/* V2.14 — wybór roku urlopowego jak w statystykach rocznych */
.leave-year-picker-wrap {
  margin-top: 4px;
  margin-bottom: 20px;
}
.leave-year-picker-wrap .lista-lat button.active {
  color: #fff;
  background: #c90016;
  font-weight: 700;
}


/* V2.16 — nowa kolorystyka kalendarza */
tr.weekend,
.day-row.weekend:not(.urlop):not(.wolne):not(.swieto),
.summary-day-row.weekend:not(.urlop):not(.wolne):not(.swieto) {
    background: #fff3bd;
}

tr.urlop,
.day-row.urlop,
.summary-day-row.urlop {
    background: #e1f0c2;
}

.calendar-leave-label {
    color: #355f22;
    font-weight: 800;
}

/* V2.19 — delegacja w statystykach i dotykowe etykiety wykresów */
.stats-color-card.delegation {
    color: #4c2d91;
    background: #f1eaff;
    border: 1px solid #d8c8f3;
    box-shadow: 0 8px 20px rgba(76, 45, 145, .12);
}

.stats-color-card.delegation::after {
    background: rgba(118, 80, 200, .10);
}

.stats-table tr.delegacja:not(.urlop):not(.wolne),
.stats-table td.delegacja {
    background: #f1eaff;
}

.stats-table td.delegacja {
    color: #4c2d91;
    font-weight: 800;
}

.stats-chart-card {
    position: relative;
}

.stats-chart-bar {
    cursor: pointer;
    outline: none;
    touch-action: manipulation;
}

.stats-chart-bar:hover,
.stats-chart-bar:focus,
.stats-chart-bar.active {
    opacity: .68;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
}

.stats-chart-tooltip {
    position: absolute;
    z-index: 20;
    min-width: 150px;
    max-width: min(240px, calc(100% - 16px));
    padding: 8px 11px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 9px;
    color: #fff;
    background: rgba(35, 35, 35, .94);
    box-shadow: 0 7px 20px rgba(0, 0, 0, .24);
    text-align: center;
    pointer-events: none;
    transform: translateX(-50%);
}

.stats-chart-tooltip[hidden] {
    display: none;
}

.stats-chart-tooltip strong,
.stats-chart-tooltip span {
    display: block;
}

.stats-chart-tooltip strong {
    margin-bottom: 2px;
    font-size: 12px;
}

.stats-chart-tooltip span {
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 600px) {
    .stats-chart-tooltip {
        min-width: 138px;
        padding: 7px 9px;
    }
}


/* V2.20 — formularz dnia: kolory statusów, kompaktowy układ mobilny i podsumowanie na dole */
.day-status-grid .status-option-large {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    font-weight: 800;
}

.day-status-grid .leave-option {
    color: #355f22;
    background: #e1f0c2;
    border-color: #bfd88c;
}

.day-status-grid .free-option {
    color: #245779;
    background: #cfe8ff;
    border-color: #9bcaf2;
}

.day-status-grid .delegation-option {
    color: #4c2d91;
    background: #f1eaff;
    border-color: #c8b7ee;
}

.day-status-grid .leave-option input { accent-color: #5e8b32; }
.day-status-grid .free-option input { accent-color: #3d86bd; }
.day-status-grid .delegation-option input { accent-color: #7650c8; }

.single-time-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.single-time-pair label {
    min-width: 0;
}

.single-time-pair input[type="time"] {
    min-width: 0;
    box-sizing: border-box;
}

.day-editor-bottom-summary {
    width: 100%;
    min-width: 0;
    margin-top: 0;
}

@media (max-width: 850px) {
    .day-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .day-status-grid .status-option-large {
        min-height: 42px;
        padding: 8px 9px;
        font-size: 13px;
    }

    .single-time-grid {
        grid-template-columns: 1fr;
    }

    .single-time-group {
        padding: 12px;
    }

    .single-time-pair {
        gap: 8px;
    }

    .single-time-pair label {
        font-size: 12px;
    }

    .single-time-pair input[type="time"] {
        padding-right: 3px;
        padding-left: 3px;
        font-size: 15px;
    }
}

@media (max-width: 700px) {
    .day-editor-summary.day-editor-bottom-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .day-editor-bottom-summary > div {
        padding: 10px 8px;
    }

    .day-editor-bottom-summary strong {
        font-size: 19px;
    }
}

@media (max-width: 380px) {
    .day-status-grid .status-option-large {
        padding: 7px;
        font-size: 12px;
    }

    .single-time-group {
        padding-right: 9px;
        padding-left: 9px;
    }

    .single-time-pair {
        gap: 6px;
    }

    .single-time-pair label {
        font-size: 11px;
    }

    .single-time-pair input[type="time"] {
        font-size: 14px;
    }
}


/* V2.21 — obecność użytkowników */
.admin-user-details {
    flex: 1 1 auto;
    min-width: 0;
}

.user-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: min(48%, 245px);
    margin-left: auto;
    white-space: nowrap;
    text-align: center;
}

.user-status::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: currentColor;
    border-radius: 50%;
    content: "";
}

.user-status.presence-online {
    color: #17632a;
    background: #e4f6e9;
    box-shadow: inset 0 0 0 1px #bce2c6;
}

.user-status.presence-offline {
    color: #5f6873;
    background: #eef1f4;
    box-shadow: inset 0 0 0 1px #dce1e6;
}

.user-status.presence-disabled {
    color: #9b2637;
    background: #fae9ec;
    box-shadow: inset 0 0 0 1px #efc6cd;
}

@media (max-width: 560px) {
    .admin-user-main {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
    }

    .admin-user-main .user-status {
        grid-column: 2;
        justify-self: start;
        max-width: 100%;
        margin: 7px 0 0;
        white-space: normal;
        text-align: left;
    }
}


/* V2.22 — kompaktowa nawigacja kalendarza i mobilny formularz dnia */
.calendar-overview-card .month-picker-wrap,
.calendar-overview-card .week-navigation {
    grid-template-columns: 118px minmax(190px, 1fr) 118px;
    gap: 8px;
    max-width: 540px;
    margin: 0 auto 14px;
}

.calendar-overview-card .month-side-button,
.calendar-overview-card .week-button,
.calendar-overview-card .month-picker-main-button,
.calendar-overview-card .week-range {
    min-height: 42px;
}

.calendar-overview-card .month-side-button,
.calendar-overview-card .week-button {
    gap: 6px;
    padding: 7px 9px;
    border-radius: 10px;
}

.calendar-overview-card .month-side-button-icon,
.calendar-overview-card .week-button-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    font-size: 21px;
}

.calendar-overview-card .month-side-button-text,
.calendar-overview-card .week-button-label {
    font-size: 12px;
    line-height: 1.05;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
}

.calendar-overview-card .week-button-label {
    flex: 1 1 auto;
}

.calendar-overview-card .month-picker-main-button {
    gap: 8px;
    min-width: 0;
    padding: 7px 9px;
    border-radius: 10px;
}

.calendar-overview-card .month-picker-main-icon {
    font-size: 19px;
}

.calendar-overview-card .month-picker-main-text {
    font-size: 18px;
}

.calendar-overview-card .week-range {
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 14px;
}

.calendar-overview-card .week-range span {
    margin: 0 5px;
}

.calendar-view-switch-wrapper.week-mode {
    display: flex;
    justify-content: center;
    grid-template-columns: none;
}

.calendar-view-switch-wrapper.week-mode .calendar-view-switch {
    justify-self: auto;
}

@media (max-width: 700px) {
    .calendar-overview-card .month-picker-wrap,
    .calendar-overview-card .week-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
        max-width: 100%;
        margin-bottom: 11px;
    }

    .calendar-overview-card .month-picker,
    .calendar-overview-card .week-range {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .calendar-overview-card .month-side-button,
    .calendar-overview-card .week-button {
        grid-row: 2;
        min-height: 38px;
        padding: 6px 8px;
    }

    .calendar-overview-card .month-picker-main-button,
    .calendar-overview-card .week-range {
        min-height: 42px;
    }

    .calendar-overview-card .month-picker-main-button {
        padding: 7px 9px;
    }

    .calendar-overview-card .month-picker-main-text {
        font-size: 17px;
    }

    .calendar-overview-card .month-picker-main-icon {
        font-size: 18px;
    }

    .calendar-overview-card .month-side-button-icon,
    .calendar-overview-card .week-button-icon {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
        font-size: 19px;
    }

    .calendar-overview-card .month-side-button-text,
    .calendar-overview-card .week-button-label {
        font-size: 11px;
    }

    .calendar-overview-card .week-range {
        font-size: 13px;
    }

    .calendar-view-switch-wrapper.week-mode {
        display: flex;
        gap: 0;
    }

    .day-editor-topbar {
        margin-bottom: 7px;
    }

    .day-editor-page .back-to-calendar-button {
        gap: 5px;
        padding: 7px 10px;
        border-radius: 8px;
        font-size: 13px;
    }

    .day-editor-card {
        padding: 10px;
        border-radius: 10px;
    }

    .day-editor-header {
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 11px;
    }

    .day-editor-eyebrow {
        margin-bottom: 3px;
        font-size: 9px;
    }

    .day-editor-header h2 {
        font-size: 19px;
        line-height: 1.15;
    }

    .day-editor-holiday {
        margin-top: 4px;
        font-size: 12px;
    }

    .single-day-form,
    .day-editor-form {
        gap: 10px;
    }

    .day-editor-section {
        padding: 11px;
        border-radius: 10px;
    }

    .section-heading,
    .section-heading-with-action {
        gap: 5px;
        margin-bottom: 10px;
    }

    .section-heading > div {
        gap: 8px;
    }

    .section-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .section-heading h3 {
        font-size: 16px;
    }

    .section-heading p {
        padding-left: 32px;
        font-size: 11px;
        line-height: 1.3;
    }

    .day-status-grid {
        gap: 6px;
    }

    .day-status-grid .status-option-large {
        min-height: 38px;
        padding: 7px 8px;
        border-radius: 8px;
        font-size: 12px;
    }

    .single-time-grid {
        gap: 9px;
    }

    .single-time-group {
        gap: 7px;
        padding: 9px;
        border-radius: 10px;
    }

    .single-time-group legend {
        padding: 0 6px;
        font-size: 13px;
    }

    .single-time-pair {
        gap: 6px;
    }

    .single-time-group label:not(.compact-check) {
        gap: 4px;
        font-size: 11px;
    }

    .single-time-pair input[type="time"] {
        min-height: 38px;
        padding: 5px 2px;
        font-size: 14px;
    }

    .time-unlock-button {
        padding: 4px 6px;
        border-radius: 6px;
        font-size: 10px;
    }

    .next-day-option {
        font-size: 12px;
    }

    .remote-under-hours {
        max-width: none;
        margin-top: 10px;
        padding: 10px;
        border-radius: 9px;
    }

    .remote-time-editor {
        gap: 6px;
        margin-top: 7px;
    }

    .remote-time-editor .remote-duration-field input {
        width: 66px;
        padding: 6px;
    }

    .day-basic-grid {
        gap: 10px;
    }

    .editor-field > label:first-child,
    .field-label {
        margin-bottom: 5px;
        font-size: 12px;
    }

    .editor-field input[type="text"],
    .editor-field input:not([type]),
    .editor-field textarea,
    .multi-client-input {
        padding: 7px;
        font-size: 14px;
    }

    .editor-field textarea {
        min-height: 70px;
    }

    .editor-field small {
        margin-top: 4px;
        font-size: 11px;
        line-height: 1.25;
    }

    .day-editor-summary.day-editor-bottom-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .day-editor-bottom-summary > div {
        padding: 8px 6px;
        border-radius: 8px;
    }

    .day-editor-summary span {
        margin-bottom: 3px;
        font-size: 9px;
    }

    .day-editor-bottom-summary strong {
        font-size: 18px;
    }

    .day-editor-actions,
    .day-editor-actions-complete {
        gap: 7px;
        padding-top: 0;
    }

    .save-day-button,
    .secondary-action-button,
    .day-editor-actions-complete .delete-day-button {
        min-height: 40px;
        padding: 9px 11px;
        border-radius: 8px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .day-editor-card {
        padding: 8px;
    }

    .day-editor-section {
        padding: 9px;
    }

    .single-time-group {
        padding: 8px 7px;
    }

    .single-time-pair {
        gap: 5px;
    }

    .single-time-pair input[type="time"] {
        font-size: 13px;
    }
}


/* V2.24 — statystyki roczne: neutralna tabela, wykres rodzajów dni i czytelniejsza delegacja */
.stats-color-card.delegation {
    color: #ffffff;
    background: linear-gradient(135deg, #8b68d8, #5b35a7);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(76, 45, 145, .28);
}

.stats-color-card.delegation::after {
    background: rgba(255, 255, 255, .16);
}

.stats-table-annual tbody tr,
.stats-table-annual tbody td {
    color: inherit;
    background: transparent;
    font-weight: inherit;
}

.stats-chart-legend i.leave-days,
.stats-chart-bar.leave-days {
    fill: #7ca84a;
    background: #7ca84a;
}

.stats-chart-legend i.free-days,
.stats-chart-bar.free-days {
    fill: #4b8fc9;
    background: #4b8fc9;
}

.stats-chart-legend i.delegation-days,
.stats-chart-bar.delegation-days {
    fill: #7650c8;
    background: #7650c8;
}

.stats-day-types-chart {
    min-width: 820px;
}

@media (max-width: 600px) {
    .stats-day-types-chart-card .stats-chart-legend {
        gap: 7px 10px;
        font-size: 11px;
    }
}


/* V2.25 — przyciski ręcznego odblokowania bezpośrednio pod właściwym polem */
.time-field-with-unlock {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
}

.time-field-with-unlock > label {
    min-width: 0;
}

.time-field-with-unlock .time-unlock-button {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

@media (max-width: 700px) {
    .time-field-with-unlock {
        gap: 4px;
    }

    .time-field-with-unlock .time-unlock-button {
        min-height: 27px;
        padding: 3px 4px;
        font-size: 9px;
    }
}


/* V2.26 — domyślny rodzaj dnia „Praca” */
.day-status-grid .work-option {
    color: #2f2f2f;
    background: #ffffff;
    border-color: #cfcfcf;
}

.day-status-grid .work-option input {
    accent-color: #b40015;
}

.day-status-grid .status-option-large:has(input:checked) {
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .06);
}

.day-status-grid .work-option:has(input:checked) {
    border-color: #8d8d8d;
}

.day-status-grid {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

@media (max-width: 850px) {
    .day-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* V2.27 — brak automatycznego wyboru rodzaju dnia w weekend i święto */


/* V2.28 — praca zdalna w urlopie/wolnym i równe pola godzin */
.single-time-pair > label,
.single-time-pair > .time-field-with-unlock {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.single-time-pair > label,
.time-field-with-unlock > label {
    align-content: start;
}

.single-time-pair input[type="time"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
}

.section-disabled .remote-under-hours {
    opacity: 1;
}

@media (max-width: 700px) {
    .single-time-pair input[type="time"] {
        height: 38px;
        min-height: 38px;
    }
}

/* V2.30 — odzyskiwanie hasła i weryfikacja adresu e-mail */
.auth-form-note {
    margin: 14px 0 0;
    color: #666;
    font-size: 12px;
    line-height: 1.45;
}

.auth-success-panel {
    padding: 14px;
    border: 1px solid #badfc2;
    border-radius: 9px;
    color: #145c25;
    background: #eef9f0;
}

.auth-success-panel strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.auth-success-panel p {
    margin: 0;
}

.auth-result-button {
    display: inline-flex;
    margin-top: 16px;
    text-decoration: none;
}

.recovery-email-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.recovery-email-heading h2 {
    margin-bottom: 5px;
}

.recovery-email-heading p {
    margin: 0;
    color: #666;
}

.email-verification-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
}

.email-verification-badge.verified {
    color: #17632a;
    background: #e4f6e9;
    box-shadow: inset 0 0 0 1px #bce2c6;
}

.email-verification-badge.unverified {
    color: #8a5200;
    background: #fff3d6;
    box-shadow: inset 0 0 0 1px #edcf8a;
}

.email-verification-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.email-verification-actions small {
    color: #755100;
}

.admin-user-details small {
    display: block;
    margin-top: 3px;
    color: #6a6a6a;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .recovery-email-heading {
        display: grid;
        gap: 9px;
    }

    .email-verification-badge {
        justify-self: start;
    }

    .email-verification-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
    }
}

/* V2.32 — zgłoszenia nowych użytkowników */
.auth-secondary-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}
.auth-secondary-actions .auth-secondary-link {
    margin-top: 0;
}
.auth-register-link {
    padding: 10px 14px;
    color: #fff;
    background: #c90016;
    border-radius: 8px;
    text-decoration: none;
}
.auth-register-link:hover {
    color: #fff;
    background: #ab0013;
    text-decoration: none;
}
.registration-request-card {
    max-width: 650px;
}
.registration-name-grid,
.registration-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.registration-request-form .generated-login-preview small {
    color: #666;
    line-height: 1.35;
}
.pending-registration-section {
    margin: 0 0 20px;
    padding: 16px;
    background: #fff8e5;
    border: 1px solid #efd38b;
    border-radius: 12px;
}
.pending-registration-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.pending-registration-heading h3 {
    margin: 2px 0 0;
}
.pending-registration-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    color: #fff;
    background: #c90016;
    border-radius: 999px;
    font-weight: 800;
}
.pending-registration-list {
    display: grid;
    gap: 10px;
}
.pending-registration-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e7d19b;
    border-radius: 10px;
}
.pending-registration-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}
.pending-registration-main h4 {
    margin: 0 0 5px;
    font-size: 17px;
}
.pending-registration-main p {
    margin: 2px 0;
    overflow-wrap: anywhere;
}
.pending-registration-main small {
    display: block;
    margin-top: 6px;
    color: #666;
    line-height: 1.4;
}
.pending-registration-main .pending-registration-notification-error {
    padding: 7px 9px;
    color: #8f1520;
    background: #fff0f1;
    border: 1px solid #f0c4c8;
    border-radius: 7px;
}
.pending-registration-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.pending-registration-actions button {
    min-height: 40px;
    padding: 8px 14px;
}
.pending-registration-empty {
    padding: 13px;
    color: #666;
    background: rgba(255,255,255,.7);
    border-radius: 9px;
    text-align: center;
}

/* V2.37 — wyróżnienie aktualnego dnia w kalendarzu */
.calendar-summary-table .summary-day-row.is-today > td {
    background-image: linear-gradient(rgba(201, 0, 22, .055), rgba(201, 0, 22, .055));
    box-shadow:
        inset 0 2px 0 #c90016,
        inset 0 -2px 0 #c90016;
}
.calendar-summary-table .summary-day-row.is-today > td:first-child {
    box-shadow:
        inset 5px 0 0 #c90016,
        inset 0 2px 0 #c90016,
        inset 0 -2px 0 #c90016;
}
.calendar-summary-table .summary-day-row.is-today > td:last-child {
    box-shadow:
        inset -2px 0 0 #c90016,
        inset 0 2px 0 #c90016,
        inset 0 -2px 0 #c90016;
}
.calendar-summary-table .summary-day-row.is-today:hover > td,
.calendar-summary-table .summary-day-row.is-today:focus-visible > td {
    background-image: linear-gradient(rgba(201, 0, 22, .095), rgba(201, 0, 22, .095));
}
.calendar-today-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 8px;
    padding: 2px 7px;
    color: #fff;
    background: linear-gradient(135deg, #dd172d, #a90012);
    border-radius: 999px;
    box-shadow: 0 2px 5px rgba(169, 0, 18, .24);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .45px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* V2.38 — informacje o aplikacji */
.auth-app-version {
    margin: 18px 0 0;
    color: #8a8a8a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .45px;
    text-align: center;
}
.about-app-card {
    overflow: hidden;
    border: 1px solid #ead7da;
    background: linear-gradient(145deg, #fff 0%, #fff9fa 100%);
}
.about-app-heading {
    display: flex;
    align-items: center;
    gap: 18px;
}
.about-app-logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 18px;
    box-shadow: 0 7px 18px rgba(169, 0, 18, .2);
}
.about-app-title {
    min-width: 0;
}
.about-app-title h2 {
    margin: 1px 0 4px;
}
.about-app-title p {
    margin: 0;
    color: #626262;
}
.about-app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}
.about-app-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 9px;
    color: #6d3037;
    background: #fff;
    border: 1px solid #edcbd0;
    border-radius: 999px;
    font-size: 11px;
}
.about-app-meta strong {
    margin-left: 4px;
    color: #a00012;
}
.about-app-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding: 12px 14px;
    color: #6b6b6b;
    background: rgba(255, 255, 255, .78);
    border: 1px solid #eee0e2;
    border-radius: 10px;
}
.about-app-author span {
    font-size: 12px;
}
.about-app-author strong {
    color: #8f0010;
}
.about-app-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eadfe1;
}
.about-app-details summary {
    width: fit-content;
    color: #6a3c42;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.about-app-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}
.about-app-tech-grid > div {
    padding: 10px;
    background: #fff;
    border: 1px solid #eee3e4;
    border-radius: 8px;
}
.about-app-tech-grid dt {
    margin-bottom: 3px;
    color: #858585;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.about-app-tech-grid dd {
    margin: 0;
    color: #454545;
    font-size: 12px;
    font-weight: 700;
}
.about-app-copyright {
    margin: 14px 0 0;
    color: #999;
    font-size: 10px;
    text-align: right;
}

/* V2.46 — pełna historia wersji */
.release-history-details {
    margin-top: 16px;
    padding-top: 16px;
}
.release-history-details > summary {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #5f3036;
    background: rgba(255, 255, 255, .88);
    border: 1px solid #ead8db;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
    user-select: none;
}
.release-history-details > summary::-webkit-details-marker {
    display: none;
}
.release-history-details > summary:hover,
.release-history-details > summary:focus-visible {
    background: #fff;
    border-color: #d9aeb4;
    box-shadow: 0 5px 14px rgba(112, 31, 42, .08);
    outline: none;
}
.release-history-details > summary::after {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-left: 2px;
    border-right: 2px solid #9d3c48;
    border-bottom: 2px solid #9d3c48;
    content: "";
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}
.release-history-details[open] > summary {
    background: #fff;
    border-color: #dfb9be;
}
.release-history-details[open] > summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}
.release-history-summary-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}
.release-history-summary-title svg {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    fill: none;
    stroke: #b00014;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.release-history-summary-title > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}
.release-history-summary-title strong {
    color: #61131c;
    font-size: 13px;
}
.release-history-summary-title small {
    overflow: hidden;
    color: #8b7376;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.release-history-count {
    display: inline-flex;
    min-height: 25px;
    margin-left: auto;
    padding: 3px 9px;
    align-items: center;
    justify-content: center;
    color: #8d2632;
    background: #fff1f3;
    border: 1px solid #edcbd0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.release-history-body {
    margin-top: 10px;
    padding: 13px 13px 3px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid #eee1e3;
    border-radius: 12px;
}
.release-history-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 11px 32px;
}
.release-history-legend span,
.release-kind-badge,
.release-current-badge {
    display: inline-flex;
    min-height: 20px;
    box-sizing: border-box;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .35px;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}
.release-history-legend .new,
.release-kind-badge.new {
    color: #9b0012;
    background: #fff0f2;
    border-color: #efc5ca;
}
.release-history-legend .improvement,
.release-kind-badge.improvement {
    color: #1c568a;
    background: #edf6ff;
    border-color: #c8def2;
}
.release-history-legend .fix,
.release-kind-badge.fix {
    color: #805600;
    background: #fff7dd;
    border-color: #ead8a1;
}
.release-current-badge {
    color: #fff;
    background: linear-gradient(135deg, #db1027, #a40013);
    box-shadow: 0 2px 5px rgba(164, 0, 19, .18);
}
.release-history-list {
    position: relative;
    max-height: min(66vh, 680px);
    margin: 0;
    padding: 0 4px 1px 0;
    overflow: auto;
    list-style: none;
    overscroll-behavior: contain;
    scrollbar-color: #d7b4b9 transparent;
    scrollbar-width: thin;
}
.release-history-list::before {
    position: absolute;
    top: 10px;
    bottom: 18px;
    left: 12px;
    width: 2px;
    background: linear-gradient(#d48b95, #eadbdd);
    border-radius: 2px;
    content: "";
}
.release-history-item {
    position: relative;
    padding: 0 0 10px 34px;
}
.release-history-item::before {
    position: absolute;
    top: 16px;
    left: 7px;
    width: 10px;
    height: 10px;
    box-sizing: border-box;
    background: #fff;
    border: 3px solid #c9959c;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
    content: "";
}
.release-history-item.current::before {
    width: 13px;
    height: 13px;
    top: 14px;
    left: 5.5px;
    background: #c90016;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(201, 0, 22, .19);
}
.release-history-item article {
    padding: 11px 12px;
    background: #fff;
    border: 1px solid #eee2e4;
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(72, 30, 36, .035);
}
.release-history-item.current article {
    background: linear-gradient(135deg, #fff 0%, #fff5f6 100%);
    border-color: #e4a7af;
    box-shadow: 0 4px 12px rgba(156, 0, 18, .08);
}
.release-history-item-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.release-version-number {
    margin-right: 2px;
    color: #65131c;
    font-size: 13px;
    letter-spacing: .15px;
}
.release-change-list {
    margin: 7px 0 0;
    padding-left: 17px;
    color: #555;
    font-size: 11px;
    line-height: 1.45;
}
.release-change-list li + li {
    margin-top: 3px;
}
.release-change-list li::marker {
    color: #b23a47;
}
@media (max-width: 600px) {
    .about-app-heading {
        align-items: flex-start;
        gap: 13px;
    }
    .about-app-logo {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 14px;
    }
    .about-app-meta {
        align-items: flex-start;
        flex-direction: column;
    }
    .about-app-author {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
    .about-app-tech-grid {
        grid-template-columns: 1fr;
    }
    .release-history-details > summary {
        gap: 8px;
        padding: 11px;
    }
    .release-history-summary-title {
        gap: 8px;
    }
    .release-history-summary-title svg {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }
    .release-history-count {
        min-height: 22px;
        padding: 2px 7px;
        font-size: 9px;
    }
    .release-history-body {
        padding: 10px 8px 1px;
    }
    .release-history-legend {
        margin-left: 29px;
    }
    .release-history-list {
        max-height: 64vh;
        padding-right: 1px;
    }
    .release-history-list::before {
        left: 10px;
    }
    .release-history-item {
        padding-left: 28px;
    }
    .release-history-item::before {
        left: 5px;
    }
    .release-history-item.current::before {
        left: 3.5px;
    }
    .release-history-item article {
        padding: 10px;
    }
    .release-change-list {
        font-size: 10.5px;
    }
}

/* V2.42 — bardziej kompaktowa tabela kalendarza na telefonie */
@media (max-width: 700px) {
    .calendar-overview-card {
        padding: 12px;
    }
    .calendar-summary-wrap {
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .calendar-summary-table {
        width: 700px;
        min-width: 700px;
        table-layout: fixed;
        font-size: 12px;
    }
    .calendar-summary-table th,
    .calendar-summary-table td {
        box-sizing: border-box;
        padding: 9px 7px;
    }
    .calendar-summary-table th {
        font-size: 11px;
        line-height: 1.15;
        white-space: normal;
    }
    .calendar-summary-table th:nth-child(1),
    .calendar-summary-table td:nth-child(1) { width: 110px; }
    .calendar-summary-table th:nth-child(2),
    .calendar-summary-table td:nth-child(2) { width: 78px; }
    .calendar-summary-table th:nth-child(3),
    .calendar-summary-table td:nth-child(3) { width: 145px; }
    .calendar-summary-table th:nth-child(4),
    .calendar-summary-table td:nth-child(4) { width: 88px; }
    .calendar-summary-table th:nth-child(5),
    .calendar-summary-table td:nth-child(5) { width: 92px; }
    .calendar-summary-table th:nth-child(6),
    .calendar-summary-table td:nth-child(6) { width: 187px; }
    .summary-date-cell,
    .summary-weekday-cell,
    .summary-hours-cell,
    .summary-overtime-cell {
        min-width: 0;
    }
    .summary-client-cell,
    .summary-notes-cell {
        min-width: 0;
        line-height: 1.25;
    }
    .summary-date-cell small {
        max-width: none;
        margin-top: 3px;
        font-size: 9px;
    }
    .summary-day-link {
        font-size: 12.5px;
    }
    .summary-weekday-cell {
        font-size: 11.5px;
    }
    .summary-hours-cell,
    .summary-overtime-cell {
        font-size: 12px;
    }
    .summary-hours-cell strong,
    .summary-overtime-cell strong {
        font-size: inherit;
    }
    .summary-notes-cell {
        padding-right: 7px !important;
        font-size: 11.5px;
    }
    .calendar-client-links {
        gap: 3px;
    }
    .calendar-client-links a,
    .calendar-client-links span {
        padding: 2px 5px;
        font-size: 10.5px;
    }
    .calendar-today-badge {
        display: flex;
        width: fit-content;
        min-height: 17px;
        margin: 4px 0 0;
        padding: 2px 5px;
        font-size: 8px;
    }
}

/* V2.43 — mobilne zamknięcie aplikacji bez wylogowania */
.application-closed-wrap {
    display: grid;
    min-height: calc(100dvh - 145px);
    place-items: center;
}

.application-closed-card {
    width: min(480px, 100%);
    margin: 0;
    box-sizing: border-box;
    text-align: center;
}

.application-closed-icon {
    display: inline-grid;
    width: 62px;
    height: 62px;
    margin-bottom: 8px;
    place-items: center;
    color: #fff;
    background: #c90016;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(150, 0, 18, .22);
    font-size: 31px;
    line-height: 1;
}

.application-closed-power-icon {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.application-closed-card h2 {
    margin: 8px 0 10px;
}

.application-closed-card p {
    margin: 6px 0;
    color: #555;
    line-height: 1.45;
}

.application-closed-session-note {
    font-size: 13px;
}

.application-reopen-button {
    min-height: 44px;
    margin-top: 17px;
}

body.app-is-closed .header-home-link {
    pointer-events: none;
}

@media (max-width: 760px) {
    .header-account {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
    }
    .header-user-name {
        min-width: 0;
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-logout-button,
    .header-close-button {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 12px;
    }
    .header-action-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
    .header-close-button {
        display: inline-flex;
    }
    .application-closed-wrap {
        min-height: calc(100dvh - 130px);
    }
}
@media (max-width: 650px) {
    .registration-name-grid,
    .registration-password-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .pending-registration-section {
        padding: 12px;
    }
    .pending-registration-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }
    .pending-registration-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pending-registration-actions [data-registration-notify] {
        grid-column: 1 / -1;
    }
    .pending-registration-actions button {
        width: 100%;
    }
}

/* V2.47 — wybór motywu i ekran startowy aplikacji mobilnej */
.theme-settings-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.theme-settings-heading h2 {
    margin: 3px 0 5px;
}

.theme-settings-heading p {
    margin: 0;
    color: #666;
}

.theme-settings-heading > svg {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    fill: none;
    stroke: #c90016;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.theme-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 250px));
    gap: 12px;
    margin-top: 18px;
}

.theme-choice {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    box-sizing: border-box;
    padding: 10px 12px;
    background: #fafafa;
    border: 2px solid #e1e1e1;
    border-radius: 13px;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.theme-choice:hover {
    border-color: #d7a7ad;
    transform: translateY(-1px);
}

.theme-choice.is-selected {
    background: #fff7f8;
    border-color: #c90016;
    box-shadow: 0 4px 13px rgba(169, 0, 18, .11);
}

.theme-choice > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.theme-choice:focus-within {
    outline: 3px solid rgba(201, 0, 22, .18);
    outline-offset: 2px;
}

.theme-choice-preview {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    width: 62px;
    height: 48px;
    box-sizing: border-box;
    padding: 15px 7px 7px;
    overflow: hidden;
    border: 1px solid;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}

.theme-choice-preview i {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 9px;
    background: #c90016;
}

.theme-choice-preview b {
    display: block;
    border-radius: 3px;
}

.theme-choice-preview-light {
    background: #f4f4f4;
    border-color: #d8d8d8;
}

.theme-choice-preview-light b {
    background: #fff;
    border: 1px solid #e1e1e1;
}

.theme-choice-preview-dark {
    background: #09090a;
    border-color: #3b3b40;
}

.theme-choice-preview-dark b {
    background: #242427;
    border: 1px solid #44444a;
}

.theme-choice-copy {
    display: grid;
    gap: 3px;
}

.theme-choice-copy strong {
    font-size: 15px;
}

.theme-choice-copy small {
    color: #777;
    font-size: 11px;
}

.theme-choice-mark {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: transparent;
    background: #eee;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 900;
}

.theme-choice.is-selected .theme-choice-mark {
    color: #fff;
    background: #c90016;
}

.theme-selection-status {
    margin: 11px 0 0;
}

.app-splash {
    display: none;
}

html.mobile-app-launch .app-splash {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: max(28px, env(safe-area-inset-top)) 28px max(28px, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 50% 38%, rgba(201, 0, 22, .08), transparent 34%),
        #f5f5f5;
    opacity: 1;
    transition: opacity .3s ease, visibility .3s ease;
}

.app-splash.is-leaving {
    visibility: hidden;
    opacity: 0;
}

.app-splash-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.app-splash-logo {
    width: 104px;
    height: 104px;
    border-radius: 24px;
    box-shadow: 0 13px 32px rgba(131, 0, 16, .22);
    animation: app-splash-logo-in .5s cubic-bezier(.2, .8, .2, 1) both;
}

.app-splash-name {
    margin-top: 21px;
    color: #252525;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.35px;
}

.app-splash-version {
    margin-top: 7px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .55px;
    text-transform: uppercase;
}

.app-splash-loader {
    width: 42px;
    height: 3px;
    margin-top: 28px;
    overflow: hidden;
    background: #dedede;
    border-radius: 999px;
}

.app-splash-loader::after {
    display: block;
    width: 18px;
    height: 100%;
    background: #c90016;
    border-radius: inherit;
    content: "";
    animation: app-splash-loader 1s ease-in-out infinite;
}

@keyframes app-splash-logo-in {
    from { opacity: 0; transform: scale(.88); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes app-splash-loader {
    from { transform: translateX(-20px); }
    50% { transform: translateX(24px); }
    to { transform: translateX(-20px); }
}

@media (max-width: 560px) {
    .theme-choice-grid {
        grid-template-columns: 1fr;
    }

    .theme-choice {
        grid-template-columns: 58px minmax(0, 1fr) 26px;
    }

    .theme-choice-preview {
        width: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-splash-logo,
    .app-splash-loader::after {
        animation: none;
    }
}

/* Ciemny motyw — czarne tło, grafitowe powierzchnie i czerwone akcenty Canon */
html[data-theme="dark"] {
    --dark-bg: #09090a;
    --dark-surface: #171719;
    --dark-surface-raised: #202023;
    --dark-surface-soft: #27272b;
    --dark-border: #3a3a40;
    --dark-border-soft: #303035;
    --dark-table-border: #29292e;
    --dark-table-header-divider: rgba(255, 255, 255, .09);
    --dark-text: #f2f2f3;
    --dark-muted: #b0b0b7;
    --dark-accent: #ff596b;
    --dark-red-soft: #321218;
    --dark-shadow: rgba(0, 0, 0, .48);
}

html[data-theme="dark"] body {
    background: var(--dark-bg);
    color: var(--dark-text);
}

html[data-theme="dark"] header {
    background: linear-gradient(135deg, #c90016, #8f0010);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .picker,
html[data-theme="dark"] .app-dialog,
html[data-theme="dark"] .calendar-summary-table,
html[data-theme="dark"] .client-history-card,
html[data-theme="dark"] .admin-user-card,
html[data-theme="dark"] .pending-registration-card,
html[data-theme="dark"] .stats-chart-card {
    color: var(--dark-text);
    background: var(--dark-surface);
    border-color: var(--dark-border);
    box-shadow: 0 3px 13px var(--dark-shadow);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    color: var(--dark-text);
    background: #101012;
    border-color: #4a4a50;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #85858d;
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] input[readonly],
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled {
    color: #929299;
    background: #242428;
    opacity: 1;
}

html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"] {
    accent-color: #d8001d;
}

html[data-theme="dark"] :where(table th, table td) {
    border-color: var(--dark-table-border);
}

html[data-theme="dark"] :where(
    .calendar-table-wrap,
    .calendar-summary-wrap,
    .stats-table-wrap
) {
    border-color: var(--dark-table-border);
}

html[data-theme="dark"] .calendar-summary-table th {
    border-right-color: var(--dark-table-header-divider);
}

html[data-theme="dark"] code,
html[data-theme="dark"] .excel-import-card code {
    color: #ffd8dc;
    background: #291217;
    border-color: #62313a;
}

html[data-theme="dark"] :where(
    .theme-settings-heading p,
    .theme-choice-copy small,
    .summary-tile span,
    .work-calendar .clients-cell > small,
    .time-pair label,
    .compact-check,
    .period-summary-heading,
    .summary-weekday-cell,
    .summary-overtime-cell strong,
    .summary-notes-cell,
    .day-editor-summary span,
    .section-heading p,
    .editor-field small,
    .client-card-stats span,
    .client-detail-metrics span,
    .empty-state,
    .empty-timeline,
    .visit-card-header p,
    .visit-hours span,
    .visit-hours small,
    .timeline-axis span,
    .stats-primary-grid span,
    .ranking-card > span,
    .ranking-card small,
    .admin-user-main p,
    .admin-user-details small,
    .loading-card,
    .auth-form-note,
    .recovery-email-heading p,
    .pending-registration-main small,
    .pending-registration-empty,
    .about-app-title p,
    .about-app-author,
    .about-app-tech-grid dt,
    .about-app-copyright,
    .release-history-summary-title small,
    .release-change-list,
    .application-closed-card p,
    .settings-help
) {
    color: var(--dark-muted);
}

html[data-theme="dark"] :where(
    .calendar-week-title,
    .week-range,
    .week-range span,
    .calendar-view-button:hover,
    .calendar-view-icon,
    .summary-tile strong,
    .holiday-name,
    .time-entry-heading,
    .time-entry legend,
    .next-day-check,
    .summary-date-cell small,
    .summary-overtime-cell.has-overtime strong,
    .row-edit-arrow,
    .day-editor-eyebrow,
    .day-editor-holiday,
    .day-editor-summary .overtime strong,
    .auth-eyebrow,
    .page-eyebrow,
    .client-card-arrow,
    .visit-hours strong,
    .visit-edit-link,
    .stats-primary-grid .accent strong,
    .stats-client-link,
    .calendar-client-link,
    .summary-overtime-cell.positive,
    .single-time-group legend,
    .time-unlock-button,
    .stats-chart-heading h3,
    .auth-secondary-link,
    .generated-login-preview strong,
    .about-app-meta strong,
    .about-app-author strong,
    .release-history-summary-title strong,
    .release-version-number
) {
    color: var(--dark-accent);
}

html[data-theme="dark"] :where(
    .month-side-button,
    .week-range,
    .calendar-view-switch,
    .calendar-view-icon,
    .summary-tile,
    .time-entry,
    .time-entry-remove,
    .add-entry-button,
    .client-suggestions,
    .client-suggestions button,
    .delete-day-button,
    .row-edit-arrow,
    .back-to-calendar-button,
    .secondary-action-button,
    .day-editor-summary > div,
    .day-editor-section,
    .status-option-large,
    .day-editor-section .time-entry,
    .client-card-stats > div,
    .client-detail-metrics > div,
    .empty-state,
    .empty-timeline,
    .timeline,
    .stats-tabs,
    .stats-primary-grid article,
    .ranking-card,
    .admin-add-user-form,
    .admin-user-actions > button,
    .single-time-group,
    .remote-under-hours,
    .generated-login-preview,
    .day-status-grid .work-option,
    .pending-registration-empty
) {
    color: var(--dark-text);
    background: var(--dark-surface-raised);
    border-color: var(--dark-border);
}

html[data-theme="dark"] .month-side-button-icon {
    color: var(--dark-accent);
    background: #34131a;
}

html[data-theme="dark"] .miesiace a,
html[data-theme="dark"] .lista-lat button {
    color: var(--dark-text);
    background: var(--dark-surface-soft);
}

html[data-theme="dark"] .miesiace a:hover,
html[data-theme="dark"] .lista-lat button:hover {
    color: #fff;
    background: #b90016;
}

html[data-theme="dark"] .calendar-view-button {
    color: #c8c8ce;
}

html[data-theme="dark"] .calendar-view-button:hover {
    background: #2d2d31;
}

html[data-theme="dark"] .calendar-view-button.active,
html[data-theme="dark"] .calendar-view-button.active:hover,
html[data-theme="dark"] .stats-tabs a.active {
    color: #fff;
    background: linear-gradient(135deg, #d71920, #a90012);
}

html[data-theme="dark"] .calendar-view-button.active .calendar-view-icon {
    color: #a90012;
    background: #fff;
}

html[data-theme="dark"] .summary-day-link,
html[data-theme="dark"] .client-suggestions button,
html[data-theme="dark"] .client-history-card,
html[data-theme="dark"] .client-history-card:hover,
html[data-theme="dark"] .editor-field > label:first-child,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .single-time-group label:not(.compact-check),
html[data-theme="dark"] .time-entry-client label,
html[data-theme="dark"] .auth-form label,
html[data-theme="dark"] .admin-add-user-form label,
html[data-theme="dark"] .stats-filter-form label {
    color: var(--dark-text);
}

html[data-theme="dark"] .summary-day-row:hover,
html[data-theme="dark"] .summary-day-row:focus-visible,
html[data-theme="dark"] .summary-day-row:active {
    background: #29292d;
}

html[data-theme="dark"] .summary-tile.overtime strong {
    color: #ff9a54;
}

html[data-theme="dark"] .summary-tile.leave strong,
html[data-theme="dark"] .calendar-leave-label {
    color: #98dda8;
}

html[data-theme="dark"] .summary-tile.remaining strong {
    color: #c9b9ff;
}

html[data-theme="dark"] tr.weekend,
html[data-theme="dark"] .day-row.weekend:not(.urlop):not(.wolne):not(.swieto),
html[data-theme="dark"] .summary-day-row.weekend:not(.urlop):not(.wolne):not(.swieto) {
    background: #332c16;
}

html[data-theme="dark"] tr.swieto,
html[data-theme="dark"] .day-row.swieto:not(.urlop):not(.wolne),
html[data-theme="dark"] .summary-day-row.swieto:not(.urlop):not(.wolne) {
    background: #3b181d;
}

html[data-theme="dark"] tr.urlop,
html[data-theme="dark"] .day-row.urlop,
html[data-theme="dark"] .summary-day-row.urlop {
    background: #183522;
}

html[data-theme="dark"] tr.wolne,
html[data-theme="dark"] .day-row.wolne,
html[data-theme="dark"] .summary-day-row.wolne {
    background: #172e43;
}

html[data-theme="dark"] tr.delegacja,
html[data-theme="dark"] .stats-color-card.delegation,
html[data-theme="dark"] .stats-table tr.delegacja:not(.urlop):not(.wolne),
html[data-theme="dark"] .stats-table td.delegacja,
html[data-theme="dark"] .day-status-grid .delegation-option,
html[data-theme="dark"] .delegation-option {
    color: #d8c8ff;
    background: #2b2143;
    border-color: #5d4b87;
}

html[data-theme="dark"] .day-status-grid .work-option,
html[data-theme="dark"] .day-editor-section .time-entry {
    color: var(--dark-text);
    background: var(--dark-surface-raised);
    border-color: var(--dark-border);
}

html[data-theme="dark"] .day-status-grid .leave-option {
    color: #a7e3b5;
    background: #183522;
    border-color: #39734a;
}

html[data-theme="dark"] .day-status-grid .free-option {
    color: #acd9ff;
    background: #172e43;
    border-color: #376384;
}

html[data-theme="dark"] .calendar-summary-table .summary-day-row.is-today > td {
    background-image: linear-gradient(rgba(255, 63, 84, .09), rgba(255, 63, 84, .09));
}

html[data-theme="dark"] .back-to-calendar-button,
html[data-theme="dark"] .secondary-action-button,
html[data-theme="dark"] .delete-day-button,
html[data-theme="dark"] .danger-button,
html[data-theme="dark"] .add-entry-button,
html[data-theme="dark"] .time-entry-remove {
    color: #ff8290;
}

html[data-theme="dark"] .back-to-calendar-button:hover,
html[data-theme="dark"] .secondary-action-button:hover {
    color: #fff;
    background: #3a151c;
    border-color: #8e3440;
}

html[data-theme="dark"] .danger-button,
html[data-theme="dark"] .flash-message.blad,
html[data-theme="dark"] .pending-registration-main .pending-registration-notification-error {
    color: #ff9aa5;
    background: #321218;
    border-color: #6e2b35;
}

html[data-theme="dark"] .flash-message {
    color: var(--dark-text);
    background: #29292d;
    border-color: var(--dark-border);
}

html[data-theme="dark"] .flash-message.sukces,
html[data-theme="dark"] .auth-success-panel,
html[data-theme="dark"] .email-verification-badge.verified,
html[data-theme="dark"] .user-status.presence-online {
    color: #8fdda1;
    background: #183522;
    border-color: #326d41;
}

html[data-theme="dark"] .user-status.presence-offline {
    color: #c2c7cd;
    background: #282d32;
    border-color: #505860;
}

html[data-theme="dark"] .user-status.presence-disabled {
    color: #ff9aa6;
    background: #35191e;
    border-color: #71323c;
}

html[data-theme="dark"] .initial-password-info,
html[data-theme="dark"] .email-verification-badge.unverified,
html[data-theme="dark"] .pending-registration-section {
    color: #f0cf76;
    background: #332b14;
    border-color: #6d5b25;
}

html[data-theme="dark"] .email-verification-actions small {
    color: #e5c86f;
}

html[data-theme="dark"] .calendar-client-links a,
html[data-theme="dark"] .calendar-client-links span,
html[data-theme="dark"] .calendar-client-link,
html[data-theme="dark"] .about-app-meta span,
html[data-theme="dark"] .release-history-count,
html[data-theme="dark"] .release-history-legend .new,
html[data-theme="dark"] .release-kind-badge.new {
    color: #ff9ba6;
    background: #321218;
    border-color: #693039;
}

html[data-theme="dark"] .release-history-legend .improvement,
html[data-theme="dark"] .release-kind-badge.improvement,
html[data-theme="dark"] .free-chip {
    color: #a8d6ff;
    background: #172b3d;
    border-color: #315573;
}

html[data-theme="dark"] .release-history-legend .fix,
html[data-theme="dark"] .release-kind-badge.fix,
html[data-theme="dark"] .leave-chip {
    color: #f0d37f;
    background: #332b14;
    border-color: #6d5b25;
}

html[data-theme="dark"] .stats-chart-grid-line {
    stroke: #34343a;
}

html[data-theme="dark"] .stats-chart-axis {
    stroke: #777780;
}

html[data-theme="dark"] .stats-chart-axis-label {
    fill: #b8b8bf;
}

html[data-theme="dark"] .stats-tabs a {
    color: #c8c8ce;
}

html[data-theme="dark"] .generated-login-preview span,
html[data-theme="dark"] .helper-admin-info p,
html[data-theme="dark"] .registration-request-form .generated-login-preview small,
html[data-theme="dark"] .auth-app-version {
    color: var(--dark-muted);
}

html[data-theme="dark"] .theme-settings-card {
    border-color: #3c2529;
}

html[data-theme="dark"] .theme-settings-heading > svg {
    stroke: var(--dark-accent);
}

html[data-theme="dark"] .theme-choice {
    color: var(--dark-text);
    background: #202023;
    border-color: #3b3b40;
}

html[data-theme="dark"] .theme-choice:hover {
    border-color: #7a424a;
}

html[data-theme="dark"] .theme-choice.is-selected {
    background: #2b151a;
    border-color: #e31a32;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] .theme-choice-mark {
    background: #3a3a3f;
}

html[data-theme="dark"] .theme-choice-copy small {
    color: var(--dark-muted);
}

html[data-theme="dark"] .mobile-nav-toggle {
    color: #fff;
    background: #1b1b1e;
    border: 1px solid rgba(255, 255, 255, .28);
}

html[data-theme="dark"] header nav .nav-tile.active {
    color: #fff;
    background: rgba(20, 20, 22, .82);
    border-color: rgba(255, 255, 255, .5);
}

html[data-theme="dark"] .header-close-button {
    color: #ff7d8b;
    background: #19191b;
    border-color: #592b32;
}

html[data-theme="dark"] .about-app-card {
    background: linear-gradient(145deg, #19191b 0%, #211316 100%);
    border-color: #4b292f;
}

html[data-theme="dark"] .about-app-meta span,
html[data-theme="dark"] .about-app-author,
html[data-theme="dark"] .about-app-tech-grid > div,
html[data-theme="dark"] .release-history-details > summary,
html[data-theme="dark"] .release-history-body,
html[data-theme="dark"] .release-history-item article {
    background: #202023;
    border-color: #3c3c42;
}

html[data-theme="dark"] .about-app-details,
html[data-theme="dark"] .release-history-details {
    border-color: #403338;
}

html[data-theme="dark"] .about-app-details summary,
html[data-theme="dark"] .about-app-tech-grid dd,
html[data-theme="dark"] .release-history-details > summary,
html[data-theme="dark"] .release-history-summary-title strong {
    color: #f1d6d9;
}

html[data-theme="dark"] .release-history-details > summary:hover,
html[data-theme="dark"] .release-history-details > summary:focus-visible,
html[data-theme="dark"] .release-history-details[open] > summary {
    background: #29292d;
    border-color: #6d4850;
}

html[data-theme="dark"] .release-history-item.current article {
    background: linear-gradient(135deg, #25171a, #2f151b);
    border-color: #8b3b46;
}

html[data-theme="dark"] .release-history-item::before {
    background: #202023;
    box-shadow: 0 0 0 3px #202023;
}

html[data-theme="dark"] .release-history-item.current::before {
    background: #e21a32;
    border-color: #f3f3f3;
    box-shadow: 0 0 0 3px rgba(226, 26, 50, .22);
}

html[data-theme="dark"].mobile-app-launch .app-splash {
    background:
        radial-gradient(circle at 50% 38%, rgba(214, 0, 28, .16), transparent 35%),
        #09090a;
}

html[data-theme="dark"] .app-splash-name {
    color: #f4f4f5;
}

html[data-theme="dark"] .app-splash-version {
    color: #aaaab1;
}

html[data-theme="dark"] .app-splash-loader {
    background: #343439;
}

/* V2.48–V2.53 — stały nagłówek i menu po prawej stronie akcji konta */
@media (max-width: 760px) {
    header#app-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto 45px;
        align-items: center;
        column-gap: 6px;
        row-gap: 5px;
        box-sizing: border-box;
        padding: 7px 10px 8px;
        box-shadow: 0 3px 13px rgba(86, 0, 10, .24);
    }

    header#app-header > h1 {
        grid-row: 1;
        grid-column: 1 / -1;
        line-height: 1;
    }

    header#app-header .header-home-link {
        gap: 7px;
        min-width: 0;
    }

    header#app-header .header-canon-logo {
        width: 82px;
        height: 19px;
    }

    header#app-header .header-home-link > span {
        overflow: hidden;
        font-size: 13px;
        line-height: 19px;
        text-overflow: ellipsis;
    }

    header#app-header .header-account {
        display: contents;
    }

    header#app-header .header-user-name {
        grid-row: 2;
        grid-column: 1;
        min-width: 0;
        max-width: none;
        padding-left: 1px;
        overflow: hidden;
        font-size: 11px;
        line-height: 1.15;
        text-overflow: ellipsis;
    }

    header#app-header .mobile-nav-toggle {
        grid-row: 2;
        grid-column: 4;
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        width: 36px;
        min-height: 32px;
        box-sizing: border-box;
        margin: 0 0 0 9px;
        padding: 3px 7px;
        border: 1px solid rgba(255, 255, 255, .42);
        border-radius: 8px;
        font-size: 18px;
        line-height: 1;
    }

    header#app-header .mobile-nav-toggle::before {
        position: absolute;
        top: 5px;
        bottom: 5px;
        left: -9px;
        width: 1px;
        background: rgba(255, 255, 255, .52);
        border-radius: 1px;
        content: "";
        pointer-events: none;
    }

    header#app-header .header-logout-button,
    header#app-header .header-close-button {
        align-self: stretch;
        min-height: 32px;
        box-sizing: border-box;
        padding: 5px 8px;
        font-size: 11px;
        line-height: 1;
    }

    header#app-header .header-logout-button {
        grid-row: 2;
        grid-column: 2;
    }

    header#app-header .header-close-button {
        grid-row: 2;
        grid-column: 3;
    }

    header#app-header .header-action-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }

    header#app-header nav {
        position: absolute;
        top: calc(100% + 5px);
        right: 8px;
        left: 8px;
        z-index: 2;
        width: auto;
        max-height: calc(100dvh - 96px);
        box-sizing: border-box;
        margin: 0;
        padding: 7px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: linear-gradient(145deg, #bc0015, #970011);
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 12px;
        box-shadow: 0 10px 27px rgba(73, 0, 9, .35);
    }

    header#app-header nav.mobile-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 5px;
    }

    header#app-header nav .nav-tile {
        gap: 6px;
        min-height: 37px;
        padding: 4px 7px;
    }

    header#app-header .nav-tile-icon {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
        font-size: 15px;
    }

    header#app-header .nav-tile-label {
        font-size: 11.5px;
        line-height: 1.15;
    }

    header#app-header nav .nav-notification-badge {
        top: -6px;
        right: -5px;
        min-width: 20px;
        height: 20px;
        padding: 0 4px;
        border-width: 1.5px;
        font-size: 9.5px;
    }

    .container {
        padding-top: 10px;
    }
}

@media (max-width: 360px) {
    header#app-header {
        grid-template-columns: minmax(0, 1fr) auto auto 43px;
        column-gap: 4px;
        padding-right: 7px;
        padding-left: 7px;
    }

    header#app-header .mobile-nav-toggle {
        width: 34px;
    }

    header#app-header .header-logout-button,
    header#app-header .header-close-button {
        gap: 4px;
        padding-right: 6px;
        padding-left: 6px;
        font-size: 10.5px;
    }
}

/* V2.59 — historia zmian i bezpieczne punkty odzyskiwania */
.flash-message-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.flash-message-action span {
    min-width: 0;
}

.flash-message-action button {
    flex: 0 0 auto;
    padding: 6px 11px;
    color: inherit;
    background: rgba(255, 255, 255, .72);
    border: 1px solid currentColor;
}

#confirm-message {
    white-space: pre-line;
}

.day-history-panel,
.restore-points-panel {
    margin-top: 14px;
    border: 1px solid #dedee2;
    border-radius: 11px;
    background: #fafafa;
    overflow: hidden;
}

.day-history-panel > summary,
.restore-points-panel > summary {
    display: flex;
    min-height: 54px;
    padding: 11px 13px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    cursor: pointer;
    list-style: none;
}

.day-history-panel > summary::-webkit-details-marker,
.restore-points-panel > summary::-webkit-details-marker {
    display: none;
}

.day-history-panel > summary > span:first-child,
.restore-points-panel > summary > span:first-child {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.day-history-panel summary strong,
.restore-points-panel summary strong {
    color: #3c3c42;
    font-size: 14px;
}

.day-history-panel summary small,
.restore-points-panel summary small {
    color: #73737b;
    font-size: 11px;
    line-height: 1.3;
}

.day-history-count,
.restore-points-count {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    color: #8d0010;
    background: #fff0f2;
    border: 1px solid #efc1c7;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.day-history-panel > ol,
.restore-points-panel > ol {
    display: grid;
    max-height: 360px;
    margin: 0;
    padding: 0;
    border-top: 1px solid #dedee2;
    list-style: none;
    overflow: auto;
}

.day-history-item,
.restore-point-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid #e6e6e9;
}

.day-history-item:last-child,
.restore-point-item:last-child {
    border-bottom: 0;
}

.day-history-copy,
.restore-point-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.day-history-copy strong,
.restore-point-copy strong {
    font-size: 12.5px;
}

.day-history-copy small,
.restore-point-copy small {
    color: #777780;
    font-size: 10.5px;
}

.day-history-copy span,
.restore-point-copy span {
    overflow: hidden;
    color: #55555d;
    font-size: 11.5px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restore-point-actions {
    display: flex;
    gap: 6px;
}

.restore-points-empty {
    margin: 0;
    padding: 12px 13px;
    color: #777780;
    border-top: 1px solid #dedee2;
    font-size: 12px;
}

html[data-theme="dark"] .day-history-panel,
html[data-theme="dark"] .restore-points-panel {
    background: #202024;
    border-color: #46464d;
}

html[data-theme="dark"] .day-history-panel summary strong,
html[data-theme="dark"] .restore-points-panel summary strong,
html[data-theme="dark"] .day-history-copy strong,
html[data-theme="dark"] .restore-point-copy strong {
    color: #f1f1f3;
}

html[data-theme="dark"] .day-history-panel summary small,
html[data-theme="dark"] .restore-points-panel summary small,
html[data-theme="dark"] .day-history-copy small,
html[data-theme="dark"] .restore-point-copy small,
html[data-theme="dark"] .day-history-copy span,
html[data-theme="dark"] .restore-point-copy span,
html[data-theme="dark"] .restore-points-empty {
    color: #b9b9c0;
}

html[data-theme="dark"] .day-history-count,
html[data-theme="dark"] .restore-points-count {
    color: #ff9aa5;
    background: #321218;
    border-color: #6e2b35;
}

html[data-theme="dark"] .day-history-panel > ol,
html[data-theme="dark"] .restore-points-panel > ol,
html[data-theme="dark"] .day-history-item,
html[data-theme="dark"] .restore-point-item,
html[data-theme="dark"] .restore-points-empty {
    border-color: #3e3e44;
}

html[data-theme="dark"] .flash-message-action button {
    background: rgba(0, 0, 0, .22);
}

@media (max-width: 700px) {
    .flash-message-action {
        padding: 9px 10px;
        font-size: 12px;
    }

    .flash-message-action button {
        min-height: 34px;
        padding: 5px 9px;
        font-size: 11px;
    }

    .day-history-panel,
    .restore-points-panel {
        margin-top: 9px;
        border-radius: 9px;
    }

    .day-history-panel > summary,
    .restore-points-panel > summary {
        min-height: 48px;
        padding: 8px 9px;
    }

    .day-history-panel summary strong,
    .restore-points-panel summary strong {
        font-size: 12px;
    }

    .day-history-panel summary small,
    .restore-points-panel summary small {
        font-size: 9.5px;
    }

    .day-history-panel > ol,
    .restore-points-panel > ol {
        max-height: 300px;
    }

    .day-history-item,
    .restore-point-item {
        gap: 7px;
        padding: 8px 9px;
    }

    .day-history-item > button {
        width: auto !important;
        min-height: 34px !important;
        padding: 5px 8px !important;
        font-size: 10.5px !important;
    }

    .restore-point-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .restore-point-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .restore-point-actions button {
        width: 100%;
        min-height: 34px;
        padding: 5px 7px;
        font-size: 10.5px;
    }

    .day-history-copy strong,
    .restore-point-copy strong {
        font-size: 11.5px;
    }

    .day-history-copy span,
    .restore-point-copy span {
        font-size: 10.5px;
    }

    .app-dialog #confirm-message {
        max-height: 50vh;
        overflow: auto;
    }
}

/* V2.58 — kopiowanie dnia, saldo czasu i bezpieczna aktualizacja PWA */
.day-copy-panel {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f5f9ff;
    border: 1px solid #cfdff2;
    border-radius: 11px;
}

.day-copy-panel-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #175b9f;
    background: #e5f0fc;
    border-radius: 9px;
    font-size: 20px;
    font-weight: 900;
}

.day-copy-panel-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.day-copy-panel-copy strong {
    font-size: 13px;
}

.day-copy-panel-copy small {
    overflow: hidden;
    color: #66717d;
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-copy-clients {
    min-height: 36px;
    margin: 0;
    padding: 6px 9px;
    background: #ffffff;
    border: 1px solid #d7e1ec;
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
}

.day-copy-panel > .secondary-action-button {
    min-height: 36px;
    margin: 0;
    padding: 7px 12px;
}

.day-editor-summary .balance.positive strong,
.stats-balance-value.positive,
.stats-balance-result.positive strong {
    color: #168347;
}

.day-editor-summary .balance.negative strong,
.stats-balance-value.negative,
.stats-balance-result.negative strong {
    color: #c90016;
}

.day-editor-summary .balance.neutral strong,
.stats-balance-value.neutral,
.stats-balance-result.neutral strong {
    color: #4f5f6d;
}

.stats-balance-panel {
    margin: 0 0 8px;
    padding: 8px;
    background: #f6f8fa;
    border: 1px solid #dfe4e8;
    border-radius: 10px;
}

.stats-balance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.stats-balance-grid article {
    min-width: 0;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #e0e4e7;
    border-radius: 8px;
    text-align: center;
}

.stats-balance-grid span {
    display: block;
    margin-bottom: 3px;
    color: #6a737b;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: .2px;
}

.stats-balance-grid strong {
    font-size: 20px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stats-balance-panel > p {
    margin: 6px 2px 0;
    color: #68727b;
    font-size: 9px;
    line-height: 1.25;
    text-align: center;
}

.stats-balance-value {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.app-update-notice {
    position: fixed;
    z-index: 5000;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto 30px;
    width: min(560px, calc(100vw - 28px));
    box-sizing: border-box;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: #ffffff;
    background: #20262c;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
}

.app-update-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    background: #c90016;
    border-radius: 9px;
    font-size: 22px;
    font-weight: 900;
}

.app-update-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.app-update-copy strong {
    font-size: 13px;
}

.app-update-copy small {
    color: #d3d8dc;
    font-size: 9px;
    line-height: 1.25;
}

.app-update-button,
.app-update-dismiss {
    min-height: 34px;
    color: #ffffff;
    background: #c90016;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.app-update-button {
    padding: 7px 11px;
}

.app-update-dismiss {
    width: 30px;
    padding: 0;
    color: #dce1e5;
    background: rgba(255, 255, 255, .1);
    font-size: 20px;
}

html[data-theme="dark"] .day-copy-panel {
    background: #152433;
    border-color: #35536e;
}

html[data-theme="dark"] .day-copy-panel-icon {
    color: #acd9ff;
    background: #213e58;
}

html[data-theme="dark"] .day-copy-panel-copy small {
    color: var(--dark-muted);
}

html[data-theme="dark"] .day-copy-clients,
html[data-theme="dark"] .stats-balance-grid article {
    color: var(--dark-text);
    background: var(--dark-surface-raised);
    border-color: var(--dark-border);
}

html[data-theme="dark"] .stats-balance-panel {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

html[data-theme="dark"] .stats-balance-grid span,
html[data-theme="dark"] .stats-balance-panel > p {
    color: var(--dark-muted);
}

html[data-theme="dark"] .day-editor-summary .balance.neutral strong,
html[data-theme="dark"] .stats-balance-value.neutral,
html[data-theme="dark"] .stats-balance-result.neutral strong {
    color: #c6d0d8;
}

html[data-theme="dark"] .day-editor-summary .balance.positive strong,
html[data-theme="dark"] .stats-balance-value.positive,
html[data-theme="dark"] .stats-balance-result.positive strong {
    color: #6bd49a;
}

html[data-theme="dark"] .day-editor-summary .balance.negative strong,
html[data-theme="dark"] .stats-balance-value.negative,
html[data-theme="dark"] .stats-balance-result.negative strong {
    color: #ff7584;
}

@media (max-width: 700px) {
    .day-editor-page .day-copy-panel {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        gap: 4px 7px;
        padding: 6px 7px;
        border-radius: 8px;
    }

    .day-editor-page .day-copy-panel-icon {
        grid-row: 1 / 3;
        width: 28px;
        height: 28px;
        border-radius: 7px;
        font-size: 17px;
    }

    .day-editor-page .day-copy-panel-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .day-editor-page .day-copy-panel-copy strong {
        font-size: 11.5px;
    }

    .day-editor-page .day-copy-panel-copy small {
        display: none;
    }

    .day-editor-page .day-copy-clients {
        grid-column: 2;
        grid-row: 2;
        min-height: 21px;
        padding: 1px 4px;
        border: 0;
        background: transparent;
        font-size: 9.5px;
    }

    .day-editor-page .day-copy-clients input {
        width: 13px;
        height: 13px;
        margin: 0;
    }

    .day-editor-page .day-copy-panel > .secondary-action-button {
        grid-column: 3;
        grid-row: 1 / 3;
        min-height: 34px;
        padding: 6px 9px;
        font-size: 10.5px;
    }

    .day-editor-page .day-editor-summary.day-editor-bottom-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-balance-panel {
        margin-bottom: 7px;
        padding: 5px;
        border-radius: 8px;
    }

    .stats-balance-grid {
        gap: 4px;
    }

    .stats-balance-grid article {
        padding: 6px 3px;
        border-radius: 6px;
    }

    .stats-balance-grid span {
        margin-bottom: 2px;
        font-size: 7.5px;
    }

    .stats-balance-grid strong {
        font-size: 16px;
    }

    .stats-balance-panel > p {
        margin-top: 4px;
        font-size: 8px;
    }

    .stats-mobile-data-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 6px;
    }

    .app-update-notice {
        right: 7px;
        bottom: max(7px, env(safe-area-inset-bottom));
        grid-template-columns: 30px minmax(0, 1fr) auto 26px;
        width: calc(100vw - 14px);
        gap: 7px;
        padding: 7px;
        border-radius: 10px;
    }

    .app-update-icon {
        width: 30px;
        height: 30px;
        border-radius: 7px;
        font-size: 19px;
    }

    .app-update-copy strong {
        font-size: 11.5px;
    }

    .app-update-copy small {
        font-size: 8px;
    }

    .app-update-button {
        min-height: 32px;
        padding: 5px 8px;
        font-size: 9.5px;
    }

    .app-update-dismiss {
        width: 26px;
        min-height: 32px;
    }
}

@media (max-width: 360px) {
    .day-editor-page .day-editor-summary span {
        font-size: 7.5px;
    }

    .day-editor-page .day-editor-bottom-summary strong,
    .stats-balance-grid strong {
        font-size: 14px;
    }

    .app-update-copy small {
        display: none;
    }
}

/* V2.57 — kompletność miesiąca, szkice formularza i walidacja */
.app-dialog {
    max-height: calc(100dvh - 30px);
    box-sizing: border-box;
    overflow: auto;
}

#confirm-message {
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.calendar-completeness-alert {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 12px 0;
    padding: 11px 13px;
    color: #6d3900;
    background: #fff3d6;
    border: 1px solid #edb85f;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 7px rgba(154, 87, 0, 0.08);
}

.calendar-completeness-alert:hover,
.calendar-completeness-alert:focus-visible {
    color: #4f2900;
    background: #ffebbd;
    border-color: #db931c;
    outline: none;
}

.calendar-completeness-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #fff;
    background: #db7c00;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 900;
}

.calendar-completeness-alert > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.calendar-completeness-alert strong {
    font-size: 14px;
}

.calendar-completeness-alert small {
    font-size: 11px;
    line-height: 1.3;
}

.calendar-completeness-arrow {
    font-size: 26px;
    line-height: 1;
}

.calendar-summary-table .summary-day-row.missing-entry > td {
    background: #fff7e8;
    border-bottom-color: #f0d8ad;
}

.calendar-summary-table .summary-day-row.missing-entry:hover > td,
.calendar-summary-table .summary-day-row.missing-entry:focus-visible > td {
    background: #ffedcc;
}

.calendar-missing-label {
    color: #a65300;
    font-size: 11px;
    font-weight: 900;
}

.mobile-month-day.missing-entry,
.mobile-week-day.missing-entry {
    color: #6f3700;
    background: #fff1d2;
    border-color: #e9a83f;
    box-shadow: inset 0 0 0 1px rgba(219, 124, 0, 0.13);
}

.mobile-month-day.missing-entry .mobile-month-day-value,
.mobile-week-day.missing-entry .mobile-week-day-content > span {
    color: #a65300;
    font-weight: 900;
}

.day-draft-notice {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0 0 13px;
    padding: 10px 12px;
    color: #205830;
    background: #edf8ef;
    border: 1px solid #a8d7b2;
    border-radius: 9px;
}

.day-draft-notice-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #fff;
    background: #2f8a48;
    border-radius: 50%;
    font-weight: 900;
}

.day-draft-notice > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.day-draft-notice strong {
    font-size: 13px;
}

.day-draft-notice small {
    font-size: 10px;
    line-height: 1.25;
}

.day-draft-notice .secondary-action-button {
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    font-size: 11px;
}

.day-draft-status {
    margin: -2px 0 0;
    color: #697079;
    font-size: 10px;
    line-height: 1.25;
    text-align: center;
}

.day-draft-status[data-state="saved"] {
    color: #2e7441;
}

.day-draft-status[data-state="error"] {
    color: #a00012;
    font-weight: 700;
}

html[data-theme="dark"] .calendar-completeness-alert {
    color: #ffdca8;
    background: #362713;
    border-color: #76501e;
    box-shadow: none;
}

html[data-theme="dark"] .calendar-completeness-alert:hover,
html[data-theme="dark"] .calendar-completeness-alert:focus-visible {
    color: #ffe7c2;
    background: #443018;
    border-color: #9a6725;
}

html[data-theme="dark"] .calendar-summary-table .summary-day-row.missing-entry > td {
    background: #302718;
    border-color: #56452a;
}

html[data-theme="dark"] .calendar-summary-table .summary-day-row.missing-entry:hover > td,
html[data-theme="dark"] .calendar-summary-table .summary-day-row.missing-entry:focus-visible > td {
    background: #3b2f1d;
}

html[data-theme="dark"] .calendar-missing-label {
    color: #ffbd63;
}

html[data-theme="dark"] .mobile-month-day.missing-entry,
html[data-theme="dark"] .mobile-week-day.missing-entry {
    color: #ffd9a0;
    background: #382815;
    border-color: #805923;
}

html[data-theme="dark"] .mobile-month-day.missing-entry .mobile-month-day-value,
html[data-theme="dark"] .mobile-week-day.missing-entry .mobile-week-day-content > span {
    color: #ffc46f;
}

html[data-theme="dark"] .day-draft-notice {
    color: #bfe6c7;
    background: #172d1d;
    border-color: #356441;
}

html[data-theme="dark"] .day-draft-status {
    color: var(--dark-muted);
}

html[data-theme="dark"] .day-draft-status[data-state="saved"] {
    color: #8fd2a0;
}

html[data-theme="dark"] .day-draft-status[data-state="error"] {
    color: #ff8a98;
}

@media (max-width: 720px) {
    .calendar-completeness-alert {
        grid-template-columns: 27px minmax(0, 1fr) auto;
        gap: 7px;
        margin: 7px 0;
        padding: 7px 8px;
        border-radius: 8px;
    }

    .calendar-completeness-icon {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }

    .calendar-completeness-alert strong {
        font-size: 11.5px;
    }

    .calendar-completeness-alert small {
        font-size: 8.5px;
        line-height: 1.2;
    }

    .calendar-completeness-arrow {
        font-size: 20px;
    }

    .day-editor-page .day-draft-notice {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 6px;
        margin: 0 0 6px;
        padding: 6px 7px;
        border-radius: 7px;
    }

    .day-editor-page .day-draft-notice-icon {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .day-editor-page .day-draft-notice strong {
        font-size: 10.5px;
    }

    .day-editor-page .day-draft-notice small {
        font-size: 8px;
    }

    .day-editor-page .day-draft-notice .secondary-action-button {
        width: auto;
        min-height: 30px;
        padding: 5px 7px;
        font-size: 9px;
    }

    .day-editor-page .day-draft-status {
        margin-top: -1px;
        font-size: 8.5px;
    }
}

@media (max-width: 760px) {
    html[data-theme="dark"] header#app-header nav {
        background: linear-gradient(145deg, #38383e 0%, #29292e 100%);
        border-color: #696972;
        box-shadow: 0 14px 34px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .08);
    }

    html[data-theme="dark"] header#app-header nav .nav-tile {
        background: #202024;
        border-color: #505058;
    }

    html[data-theme="dark"] header#app-header nav .nav-tile:hover {
        background: #48484f;
        border-color: #777780;
    }

html[data-theme="dark"] header#app-header nav .nav-tile.active {
        background: #4a1c23;
        border-color: #d05a68;
    }
}

/* V2.52 — zwarty ekran Ustawień na telefonie */
.settings-page {
    display: contents;
}

@media (max-width: 700px) {
    .settings-page {
        display: block;
    }

    .settings-page > .card {
        margin-bottom: 10px;
        padding: 13px;
        border-radius: 9px;
    }

    .settings-page > .card:last-child {
        margin-bottom: 0;
    }

    .settings-page h2 {
        margin: 0 0 9px;
        font-size: 17px;
        line-height: 1.18;
    }

    .settings-page h3 {
        margin: 12px 0 7px;
        font-size: 14px;
        line-height: 1.2;
    }

    .settings-page p {
        margin: 5px 0 9px;
        font-size: 11.5px;
        line-height: 1.35;
    }

    .settings-page .page-eyebrow {
        margin-bottom: 2px;
        font-size: 9px;
        letter-spacing: .65px;
    }

    .settings-page :where(.settings-profile-form, .settings-password-form, .settings-leave-form) {
        gap: 8px;
    }

    .settings-page :where(.settings-profile-form, .settings-password-form, .settings-leave-form) label {
        min-width: 0;
        gap: 4px;
        font-size: 12px;
        line-height: 1.18;
    }

    .settings-page :where(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        box-sizing: border-box;
        padding: 6px 8px;
        font-size: 13.5px;
    }

    .settings-page :where(button, .secondary-action-button, .btn-excel) {
        min-height: 38px;
        box-sizing: border-box;
        padding: 7px 10px;
        font-size: 12px;
        line-height: 1.15;
    }

    .settings-profile-card .settings-profile-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recovery-email-heading {
        gap: 6px;
        margin-bottom: 9px;
    }

    .recovery-email-heading h2 {
        margin-bottom: 3px;
    }

    .email-verification-badge {
        min-height: 22px;
        padding: 3px 8px;
        font-size: 9.5px;
    }

    .email-verification-actions {
        gap: 6px;
        margin-top: 8px;
    }

    .theme-settings-heading {
        align-items: center;
        gap: 9px;
    }

    .theme-settings-heading h2 {
        margin: 1px 0 3px;
    }

    .theme-settings-heading > svg {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    .theme-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 10px;
    }

    .theme-choice {
        grid-template-columns: 39px minmax(0, 1fr) 18px;
        gap: 6px;
        min-height: 57px;
        padding: 6px;
        border-width: 1px;
        border-radius: 9px;
    }

    .theme-choice-preview {
        width: 39px;
        height: 32px;
        padding: 11px 4px 4px;
        gap: 3px;
        border-radius: 6px;
    }

    .theme-choice-preview i {
        height: 7px;
    }

    .theme-choice-copy {
        gap: 1px;
    }

    .theme-choice-copy strong {
        font-size: 12.5px;
    }

    .theme-choice-copy small {
        font-size: 9px;
        line-height: 1.1;
    }

    .theme-choice-mark {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .theme-selection-status {
        margin: 7px 0 0 !important;
    }

    .norms-table {
        margin-bottom: 11px;
        font-size: 12px;
    }

    .norms-table th,
    .norms-table td {
        padding: 5px 4px;
    }

    .norms-table input {
        width: 58px;
        min-height: 32px !important;
        padding: 3px 5px !important;
        font-size: 14px !important;
    }

    .settings-counting-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin: 8px 0 10px;
    }

    .settings-large-check {
        align-items: flex-start;
        gap: 6px;
        font-size: 12px;
        line-height: 1.25;
    }

    .settings-large-check input {
        width: 17px;
        height: 17px;
        flex: 0 0 17px;
        margin: 0;
    }

    .settings-save-button {
        width: 100%;
    }

    .leave-correction-card .page-heading-row {
        gap: 6px;
        margin-bottom: 9px;
    }

    .settings-year-form {
        gap: 6px;
    }

    .settings-year-form input {
        width: 0;
        min-width: 0;
        flex: 1 1 0;
    }

    .settings-year-form .secondary-action-button {
        width: auto;
        min-width: 100px;
        flex: 0 0 auto;
    }

    .settings-leave-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-leave-form button {
        grid-column: 1 / -1;
    }

    .settings-password-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-password-form label:first-child,
    .settings-password-form button {
        grid-column: 1 / -1;
    }

    .settings-help {
        margin: 7px 0 0 !important;
        font-size: 10.5px !important;
        line-height: 1.32 !important;
    }

    .backup-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .settings-page .backup-actions > * {
        display: inline-flex;
        width: 100%;
        margin: 0;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .excel-import-card .backup-actions,
    .app-install-card .backup-actions {
        grid-template-columns: 1fr;
    }

    .backup-card .backup-actions > :last-child:nth-child(3) {
        grid-column: 1 / -1;
    }

    .excel-import-button,
    .install-app-button {
        margin-bottom: 0;
    }

    .about-app-heading {
        gap: 9px;
    }

    .about-app-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 11px;
    }

    .about-app-title h2 {
        margin-bottom: 2px;
    }

    .about-app-title p {
        margin: 0;
    }

    .about-app-meta {
        align-items: center;
        flex-direction: row;
        gap: 4px;
        margin-top: 6px;
    }

    .about-app-meta span {
        min-height: 21px;
        padding: 2px 6px;
        font-size: 9px;
    }

    .about-app-author {
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin-top: 9px;
        padding: 7px 9px;
    }

    .about-app-author span,
    .about-app-author strong {
        font-size: 11px;
    }

    .release-history-details {
        margin-top: 9px;
        padding-top: 9px;
    }

    .release-history-details > summary {
        gap: 6px;
        padding: 8px;
        border-radius: 9px;
    }

    .release-history-summary-title {
        gap: 6px;
    }

    .release-history-summary-title svg {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }

    .release-history-summary-title strong {
        font-size: 12px;
    }

    .release-history-summary-title small {
        font-size: 9px;
    }

    .release-history-count {
        min-height: 20px;
        padding: 2px 6px;
        font-size: 8.5px;
    }

    .release-history-body {
        margin-top: 7px;
        padding: 8px 7px 1px;
        border-radius: 9px;
    }

    .release-history-legend {
        gap: 4px;
        margin: 0 0 7px 25px;
    }

    .release-history-item {
        padding: 0 0 7px 27px;
    }

    .release-history-item article {
        padding: 8px;
        border-radius: 8px;
    }

    .release-change-list {
        margin-top: 5px;
        font-size: 10px;
        line-height: 1.35;
    }

    .about-app-details {
        margin-top: 8px;
        padding-top: 8px;
    }

    .about-app-tech-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
        margin-top: 7px;
    }

    .about-app-tech-grid > div {
        padding: 6px;
        border-radius: 6px;
    }

    .about-app-tech-grid dt {
        font-size: 7.5px;
        letter-spacing: .25px;
    }

    .about-app-tech-grid dd {
        font-size: 10.5px;
    }

    .about-app-copyright {
        margin-top: 8px !important;
    }
}

@media (max-width: 350px) {
    .settings-profile-card .settings-profile-form,
    .settings-password-form {
        grid-template-columns: 1fr;
    }

    .settings-password-form label:first-child,
    .settings-password-form button {
        grid-column: auto;
    }
}

/* V2.53 — zwarte ekrany Użytkowników i Urlopu na telefonie */
.leave-mobile-summary {
    display: none;
}

@media (max-width: 700px) {
    .admin-users-page {
        padding: 12px;
        border-radius: 10px;
    }

    .admin-users-page > .page-heading-row {
        gap: 0;
        margin-bottom: 8px;
    }

    .admin-users-page > .page-heading-row h2 {
        margin: 0;
        font-size: 18px;
        line-height: 1.15;
    }

    .admin-users-page .page-eyebrow {
        margin-bottom: 2px;
        font-size: 9px;
        letter-spacing: .65px;
    }

    .pending-registration-section {
        margin-bottom: 10px;
        padding: 9px;
        border-radius: 9px;
    }

    .pending-registration-heading {
        gap: 8px;
        margin-bottom: 8px;
    }

    .pending-registration-heading h3 {
        margin: 1px 0 0;
        font-size: 14px;
        line-height: 1.18;
    }

    .pending-registration-count {
        min-width: 27px;
        height: 27px;
        padding: 0 7px;
        font-size: 12px;
    }

    .pending-registration-list {
        gap: 7px;
    }

    .pending-registration-card {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 9px;
        border-radius: 8px;
    }

    .pending-registration-main {
        gap: 8px;
    }

    .pending-registration-main .client-avatar {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 16px;
    }

    .pending-registration-main h4 {
        margin-bottom: 3px;
        font-size: 14px;
        line-height: 1.18;
    }

    .pending-registration-main p {
        margin: 1px 0;
        font-size: 11px;
        line-height: 1.28;
    }

    .pending-registration-main small {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.3;
    }

    .pending-registration-main .pending-registration-notification-error {
        padding: 5px 7px;
    }

    .pending-registration-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .pending-registration-actions [data-registration-notify] {
        grid-column: 1 / -1;
    }

    .pending-registration-actions button {
        width: 100%;
        min-height: 38px;
        box-sizing: border-box;
        padding: 6px 8px;
        font-size: 11.5px;
        line-height: 1.15;
    }

    .pending-registration-empty {
        padding: 8px;
        border-radius: 7px;
        font-size: 11px;
    }

    .admin-user-layout {
        gap: 10px;
    }

    .admin-add-user-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 10px;
        border-radius: 9px;
    }

    .admin-add-user-form h3,
    .admin-add-user-form .generated-login-preview,
    .admin-add-user-form .initial-password-info,
    .admin-add-user-form > button {
        grid-column: 1 / -1;
    }

    .admin-add-user-form h3 {
        margin: 0 0 2px;
        font-size: 14px;
        line-height: 1.18;
    }

    .admin-add-user-form label {
        min-width: 0;
        gap: 3px;
        font-size: 11.5px;
        line-height: 1.18;
    }

    .admin-add-user-form input {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        box-sizing: border-box;
        padding: 6px 8px;
        font-size: 13.5px;
    }

    .admin-add-user-form .generated-login-preview {
        gap: 2px;
        padding: 7px 9px;
        border-radius: 7px;
    }

    .admin-add-user-form .generated-login-preview span {
        font-size: 10px;
        line-height: 1.2;
    }

    .admin-add-user-form .generated-login-preview strong {
        font-size: 14.5px;
        line-height: 1.15;
    }

    .admin-add-user-form .initial-password-info {
        gap: 2px;
        padding: 7px 9px;
        border-radius: 7px;
    }

    .admin-add-user-form .initial-password-info span,
    .admin-add-user-form .initial-password-info small {
        font-size: 10px;
        line-height: 1.25;
    }

    .admin-add-user-form .initial-password-info strong {
        font-size: 17px;
        line-height: 1.1;
    }

    .admin-add-user-form > button {
        min-height: 38px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .admin-add-user-form.helper-admin-info {
        grid-template-columns: 1fr;
    }

    .admin-add-user-form.helper-admin-info > * {
        grid-column: 1;
    }

    .admin-add-user-form.helper-admin-info p {
        margin: 0;
        font-size: 11px;
        line-height: 1.35;
    }

    .admin-user-list {
        gap: 7px;
    }

    .admin-user-card {
        padding: 9px;
        border-radius: 9px;
    }

    .admin-user-main {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .admin-user-main .client-avatar {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 16px;
    }

    .admin-user-main h3 {
        font-size: 14px;
        line-height: 1.18;
    }

    .admin-user-main p {
        margin-top: 2px;
        font-size: 10.5px;
        line-height: 1.25;
    }

    .admin-user-details small {
        margin-top: 2px;
        font-size: 9.5px;
        line-height: 1.25;
    }

    .admin-user-main .user-status {
        grid-column: 2;
        justify-self: start;
        max-width: 100%;
        gap: 5px;
        margin: 5px 0 0;
        padding: 4px 7px;
        font-size: 10px;
        line-height: 1.15;
        white-space: normal;
        text-align: left;
    }

    .admin-user-main .user-status::before {
        width: 6px;
        height: 6px;
        flex-basis: 6px;
    }

    .admin-user-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 8px;
        padding-top: 8px;
    }

    .admin-user-actions:empty {
        display: none;
    }

    .admin-user-actions button {
        width: 100%;
        min-height: 38px;
        box-sizing: border-box;
        padding: 6px 7px;
        font-size: 11px;
        line-height: 1.15;
    }

    .admin-user-actions button:only-child {
        grid-column: 1 / -1;
    }

    .leave-page {
        padding: 13px;
        border-radius: 10px;
    }

    .leave-page > .page-heading-row {
        gap: 0;
        margin-bottom: 8px;
    }

    .leave-page > .page-heading-row h2 {
        margin: 0;
        font-size: 18px;
        line-height: 1.15;
    }

    .leave-page .page-eyebrow {
        margin-bottom: 2px;
        font-size: 9px;
        letter-spacing: .65px;
    }

    .leave-year-picker-wrap {
        margin: 0 0 12px;
    }

    .leave-desktop-summary {
        display: none;
    }

    .leave-mobile-summary {
        display: grid;
        gap: 8px;
    }

    .leave-mobile-balance {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 62px;
        padding: 10px 13px;
        box-sizing: border-box;
        color: #285a35;
        background: linear-gradient(135deg, #eff8e5, #e0f0c2);
        border: 1px solid #b9d68f;
        border-radius: 10px;
    }

    .leave-mobile-balance > span,
    .leave-mobile-metrics span {
        font-size: 10px;
        font-weight: 800;
        line-height: 1.15;
        text-transform: uppercase;
        letter-spacing: .45px;
    }

    .leave-mobile-balance strong {
        font-size: 29px;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    .leave-mobile-balance small,
    .leave-mobile-metrics small {
        font-size: .52em;
        font-weight: 800;
    }

    .leave-mobile-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .leave-mobile-metrics article {
        display: grid;
        gap: 5px;
        min-height: 58px;
        padding: 8px 10px;
        box-sizing: border-box;
        background: #f7f7f7;
        border: 1px solid #dedede;
        border-radius: 9px;
    }

    .leave-mobile-metrics span {
        color: #666;
        font-size: 9px;
    }

    .leave-mobile-metrics strong {
        align-self: end;
        font-size: 20px;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    .leave-auto-note {
        margin: 9px 1px 0 !important;
        font-size: 10.5px !important;
        line-height: 1.35 !important;
    }

    html[data-theme="dark"] .leave-mobile-balance {
        color: #a9e9b8;
        background: linear-gradient(135deg, #1c3a24, #243f1d);
        border-color: #44764f;
    }

    html[data-theme="dark"] .leave-mobile-metrics article {
        color: var(--dark-text);
        background: var(--dark-surface-raised);
        border-color: var(--dark-border);
    }

html[data-theme="dark"] .leave-mobile-metrics span {
        color: var(--dark-muted);
    }
}

/* V2.54 — zwarty kalendarz i statystyki na telefonie */
.calendar-mobile-view,
.stats-mobile-data-list {
    display: none;
}

.stats-expandable-section {
    display: block;
}

.stats-expandable-section > summary {
    display: none;
}

.stats-expandable-body {
    display: contents;
}

@media (max-width: 700px) {
    .calendar-overview-card {
        padding: 9px;
        border-radius: 10px;
    }

    .calendar-overview-card .month-picker-wrap,
    .calendar-overview-card .week-navigation,
    .stats-period-picker-wrap {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 5px;
        width: 100%;
        max-width: 100%;
        margin: 0 0 7px;
    }

    .calendar-overview-card .month-picker,
    .calendar-overview-card .week-range,
    .stats-period-picker-wrap .month-picker {
        grid-row: 1;
        grid-column: 2;
    }

    .calendar-overview-card .month-side-button,
    .calendar-overview-card .week-button,
    .stats-period-picker-wrap .month-side-button {
        grid-row: 1;
        min-height: 36px;
        padding: 4px;
        border-radius: 8px;
    }

    .calendar-overview-card .month-side-button:first-child,
    .calendar-overview-card .week-button:first-child,
    .stats-period-picker-wrap .month-side-button:first-child {
        grid-column: 1;
    }

    .calendar-overview-card .month-side-button-next,
    .calendar-overview-card .week-button-next,
    .stats-period-picker-wrap .month-side-button-next {
        grid-column: 3;
    }

    .calendar-overview-card .month-side-button-text,
    .calendar-overview-card .week-button-label,
    .stats-period-picker-wrap .month-side-button-text {
        display: none;
    }

    .calendar-overview-card .month-side-button-icon,
    .calendar-overview-card .week-button-icon,
    .stats-period-picker-wrap .month-side-button-icon {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
        font-size: 21px;
    }

    .calendar-overview-card .month-picker-main-button,
    .calendar-overview-card .week-range,
    .stats-period-picker-wrap .month-picker-main-button {
        min-height: 36px;
        padding: 5px 8px;
        border-radius: 8px;
    }

    .calendar-overview-card .month-picker-main-text,
    .stats-period-main-button .month-picker-main-text {
        font-size: 14px;
    }

    .calendar-overview-card .month-picker-main-icon,
    .stats-period-main-button .month-picker-main-icon {
        font-size: 15px;
    }

    .calendar-overview-card .week-range {
        font-size: 10.5px;
    }

    .calendar-overview-card .week-range span {
        margin: 0 3px;
    }

    .calendar-view-switch-wrapper,
    .calendar-view-switch-wrapper.month-mode {
        grid-template-columns: minmax(0, 1fr) 74px;
        gap: 5px;
        margin: 0 0 7px;
    }

    .calendar-view-switch-wrapper.week-mode {
        display: flex;
        margin-bottom: 7px;
    }

    .calendar-view-switch-wrapper .calendar-view-switch {
        display: flex;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        gap: 3px;
        padding: 3px;
        border-radius: 9px;
    }

    .calendar-view-button {
        min-width: 0;
        min-height: 34px;
        flex: 1 1 0;
        justify-content: center;
        padding: 5px 4px;
        border-radius: 7px;
    }

    .calendar-view-text small,
    .calendar-view-icon {
        display: none;
    }

    .calendar-view-text strong {
        font-size: 10.5px;
        line-height: 1.08;
        text-align: center;
    }

    .calendar-export-button {
        display: inline-flex;
        width: 74px;
        min-height: 40px;
        box-sizing: border-box;
        justify-self: stretch;
        justify-content: center;
        gap: 4px;
        padding: 4px 5px;
        border-radius: 8px;
    }

    .calendar-export-button::after {
        font-size: 9.5px;
        font-weight: 800;
        content: "Excel";
    }

    .calendar-export-icon {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
        border-radius: 6px;
        font-size: 13px;
    }

    .calendar-export-text {
        display: none;
    }

    .period-summary {
        margin: 0 auto 7px;
    }

    .period-summary-heading {
        display: none;
    }

    .period-summary-grid,
    .period-summary-grid.week-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px;
        max-width: none;
    }

    .period-summary-grid .summary-tile,
    .period-summary-grid .summary-tile:last-child {
        min-height: 45px;
        box-sizing: border-box;
        padding: 5px 3px;
        gap: 2px;
        border-top-width: 2px;
        border-radius: 7px;
        text-align: center;
    }

    .period-summary-grid .summary-tile span {
        font-size: 7.5px;
        line-height: 1.05;
        letter-spacing: .05px;
    }

    .period-summary-grid .summary-tile strong {
        font-size: 16px;
        line-height: 1;
    }

    .calendar-desktop-summary {
        display: none;
    }

    .calendar-mobile-view {
        display: grid;
    }

    .mobile-month-calendar {
        gap: 4px;
        padding: 6px;
        background: #f7f7f7;
        border: 1px solid #dedede;
        border-radius: 9px;
    }

    .mobile-calendar-weekdays,
    .mobile-calendar-days {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 3px;
    }

    .mobile-calendar-weekdays span {
        padding: 1px 0 2px;
        color: #777;
        font-size: 8px;
        font-weight: 900;
        line-height: 1;
        text-align: center;
        text-transform: uppercase;
    }

    .mobile-month-day-placeholder {
        min-height: 49px;
    }

    .mobile-month-day {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 49px;
        box-sizing: border-box;
        flex-direction: column;
        justify-content: space-between;
        padding: 4px;
        overflow: hidden;
        color: #333;
        background: #fff;
        border: 1px solid #dedede;
        border-radius: 7px;
        text-decoration: none;
    }

    .mobile-month-day-top {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
        gap: 2px;
        line-height: 1;
    }

    .mobile-month-day-top strong {
        font-size: 12px;
        font-variant-numeric: tabular-nums;
    }

    .mobile-month-day-top i {
        color: #b00014;
        font-size: 6.5px;
        font-style: normal;
        font-weight: 900;
        letter-spacing: -.1px;
        text-transform: uppercase;
    }

    .mobile-month-day-value {
        overflow: hidden;
        font-size: 8px;
        font-weight: 800;
        line-height: 1;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-month-day > small {
        overflow: hidden;
        color: #b94700;
        font-size: 6.5px;
        font-weight: 900;
        line-height: 1;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-month-day.weekend,
    .mobile-week-day.weekend {
        background: #fff3bd;
        border-color: #ead47d;
    }

    .mobile-month-day.swieto,
    .mobile-week-day.swieto {
        background: #ffe1e1;
        border-color: #e9aaaa;
    }

    .mobile-month-day.urlop,
    .mobile-week-day.urlop {
        background: #e1f0c2;
        border-color: #b9d68f;
    }

    .mobile-month-day.wolne,
    .mobile-week-day.wolne {
        background: #dceeff;
        border-color: #a9cee9;
    }

    .mobile-month-day.delegacja,
    .mobile-week-day.delegacja {
        background: #f1eaff;
        border-color: #d3c2ef;
    }

    .mobile-month-day.is-today,
    .mobile-week-day.is-today {
        border-color: #c90016;
        box-shadow: inset 0 0 0 1.5px #c90016;
    }

    .mobile-calendar-hint {
        margin: 2px 0 0;
        color: #777;
        font-size: 8.5px;
        line-height: 1.2;
        text-align: center;
    }

    .mobile-week-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .mobile-week-day {
        position: relative;
        display: grid;
        min-width: 0;
        min-height: 61px;
        box-sizing: border-box;
        gap: 5px;
        padding: 7px;
        overflow: hidden;
        color: #333;
        background: #fff;
        border: 1px solid #dedede;
        border-radius: 8px;
        text-decoration: none;
    }

    .mobile-week-day-heading,
    .mobile-week-day-content {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 5px;
    }

    .mobile-week-day-heading strong {
        font-size: 12px;
        font-variant-numeric: tabular-nums;
    }

    .mobile-week-day-heading > span {
        overflow: hidden;
        color: #666;
        font-size: 9px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-week-day-heading i {
        margin-left: auto;
        color: #b00014;
        font-size: 7px;
        font-style: normal;
        font-weight: 900;
        text-transform: uppercase;
    }

    .mobile-week-day-content > span {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        font-size: 9px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-week-day-content > strong {
        flex: 0 0 auto;
        color: #8f0010;
        font-size: 15px;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    .mobile-week-day > small {
        margin-top: -3px;
        color: #b94700;
        font-size: 8px;
        font-weight: 800;
        line-height: 1;
        text-align: right;
    }

    .stats-page {
        padding: 10px;
        overflow: hidden;
        border-radius: 10px;
    }

    .stats-page-heading {
        margin-bottom: 6px;
    }

    .stats-page-heading h2 {
        margin: 0;
        font-size: 18px;
        line-height: 1.1;
    }

    .stats-page-heading .page-eyebrow {
        margin-bottom: 1px;
        font-size: 8px;
        letter-spacing: .55px;
    }

    .stats-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        box-sizing: border-box;
        gap: 3px;
        margin-bottom: 7px;
        padding: 3px;
        border-radius: 9px;
    }

    .stats-tabs a {
        padding: 6px 8px;
        border-radius: 7px;
        font-size: 11px;
        line-height: 1.1;
        text-align: center;
    }

    .stats-primary-grid-six {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px;
        margin-bottom: 7px;
    }

    .stats-primary-grid .stats-color-card {
        min-height: 47px;
        box-sizing: border-box;
        justify-content: center;
        padding: 6px 7px;
        border-radius: 8px;
    }

    .stats-primary-grid .stats-color-card span {
        margin-bottom: 3px;
        font-size: 7.5px;
        line-height: 1.08;
        letter-spacing: .05px;
    }

    .stats-primary-grid .stats-color-card strong {
        font-size: 18px;
        line-height: 1;
    }

    .stats-expandable-section {
        display: block;
        margin-top: 6px;
        background: #f7f7f7;
        border: 1px solid #dedede;
        border-radius: 9px;
    }

    .stats-expandable-section > summary {
        display: flex;
        min-height: 39px;
        box-sizing: border-box;
        align-items: center;
        gap: 8px;
        padding: 6px 9px;
        cursor: pointer;
        list-style: none;
        user-select: none;
    }

    .stats-expandable-section > summary::-webkit-details-marker {
        display: none;
    }

    .stats-expandable-icon {
        display: grid;
        width: 25px;
        height: 25px;
        flex: 0 0 25px;
        place-items: center;
        color: #a90012;
        background: #fff;
        border: 1px solid #e7c5c9;
        border-radius: 7px;
        font-size: 13px;
        font-weight: 900;
    }

    .stats-expandable-copy {
        display: grid;
        min-width: 0;
        flex: 1;
        gap: 1px;
    }

    .stats-expandable-copy strong {
        font-size: 11.5px;
        line-height: 1.1;
    }

    .stats-expandable-copy small {
        overflow: hidden;
        color: #777;
        font-size: 8.5px;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stats-expandable-action {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
        margin: 0 3px 4px 5px;
        border-right: 2px solid #9a2835;
        border-bottom: 2px solid #9a2835;
        transform: rotate(45deg);
        transition: transform .16s ease;
    }

    .stats-expandable-section[open] .stats-expandable-action {
        margin-bottom: -3px;
        transform: rotate(225deg);
    }

    .stats-expandable-body {
        display: block;
        padding: 7px;
        border-top: 1px solid #e2e2e2;
    }

    .ranking-card-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        margin: 0;
    }

    .ranking-card-grid-compact .ranking-card {
        min-height: 48px;
        box-sizing: border-box;
        padding: 7px;
        border-radius: 7px;
    }

    .ranking-card-grid-compact .ranking-card > span {
        font-size: 7.5px;
    }

    .ranking-card-grid-compact .ranking-card strong {
        font-size: 16px;
    }

    .ranking-card-grid-compact .ranking-card small {
        font-size: 8.5px;
    }

    .stats-expandable-body .stats-chart-card {
        margin: 0;
        padding: 6px;
        border: 0;
        border-radius: 7px;
        box-shadow: none;
    }

    .stats-chart-heading {
        gap: 5px;
        margin-bottom: 4px;
    }

    .stats-chart-heading h3 {
        margin: 0;
        font-size: 11px;
        line-height: 1.2;
    }

    .stats-chart-heading p {
        display: none;
    }

    .stats-chart-legend {
        gap: 7px;
        font-size: 8px;
    }

    .stats-chart-legend span {
        gap: 3px;
    }

    .stats-chart-legend i {
        width: 7px;
        height: 7px;
    }

    .stats-chart-scroll {
        width: 100%;
        overflow: hidden;
        padding: 0;
    }

    .stats-chart {
        width: 100%;
        min-width: 0;
        height: 185px;
    }

    .stats-chart-axis-label {
        font-size: 9px;
    }

    .stats-table-desktop {
        display: none;
    }

    .stats-mobile-data-list {
        display: grid;
        gap: 5px;
    }

    .stats-mobile-data-card {
        min-width: 0;
        padding: 7px 8px;
        background: #fff;
        border: 1px solid #dedede;
        border-radius: 8px;
    }

    .stats-mobile-data-heading {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-bottom: 5px;
        border-bottom: 1px solid #ededed;
    }

    .stats-mobile-data-heading > strong {
        font-size: 12px;
    }

    .stats-mobile-data-heading > span {
        color: #8f0010;
        font-size: 15px;
        font-weight: 900;
        font-variant-numeric: tabular-nums;
    }

    .stats-mobile-data-metrics {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 3px;
        padding-top: 5px;
    }

    .stats-mobile-data-metrics > span {
        display: grid;
        min-width: 0;
        gap: 2px;
        text-align: center;
    }

    .stats-mobile-data-metrics small {
        overflow: hidden;
        color: #777;
        font-size: 6.5px;
        font-weight: 800;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stats-mobile-data-metrics strong {
        font-size: 10px;
        font-variant-numeric: tabular-nums;
    }

    .stats-mobile-day-card .stats-mobile-data-heading > span:first-child {
        display: flex;
        min-width: 0;
        align-items: baseline;
        gap: 6px;
        color: inherit;
        font-weight: inherit;
    }

    .stats-mobile-day-card .stats-mobile-data-heading > span:first-child strong {
        font-size: 11px;
    }

    .stats-mobile-day-card .stats-mobile-data-heading > span:first-child small {
        color: #777;
        font-size: 8.5px;
        font-weight: 700;
    }

    .stats-mobile-day-hours {
        flex: 0 0 auto;
        color: #8f0010 !important;
        font-size: 15px !important;
    }

    .stats-mobile-day-meta {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
        gap: 7px;
        padding-top: 5px;
        color: #666;
        font-size: 8px;
    }

    .stats-mobile-day-meta > span strong {
        margin-left: 3px;
        color: #b94700;
        font-size: 9px;
    }

    .stats-mobile-statuses {
        display: flex;
        min-width: 0;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 3px;
    }

    .stats-mobile-statuses span {
        padding: 2px 5px;
        border: 1px solid #ddd;
        border-radius: 999px;
        font-size: 6.5px;
        font-weight: 900;
        line-height: 1;
        text-transform: uppercase;
    }

    .stats-mobile-statuses .leave {
        color: #355f22;
        background: #e1f0c2;
        border-color: #b9d68f;
    }

    .stats-mobile-statuses .free {
        color: #075384;
        background: #dceeff;
        border-color: #a9cee9;
    }

    .stats-mobile-statuses .delegation {
        color: #4c2d91;
        background: #f1eaff;
        border-color: #d3c2ef;
    }

    .stats-mobile-empty {
        margin: 0;
        padding: 10px;
        color: #777;
        background: #fff;
        border: 1px solid #dedede;
        border-radius: 8px;
        font-size: 10px;
        text-align: center;
    }

    html[data-theme="dark"] .mobile-month-calendar,
    html[data-theme="dark"] .stats-expandable-section {
        color: var(--dark-text);
        background: var(--dark-surface-raised);
        border-color: var(--dark-border);
    }

    html[data-theme="dark"] .mobile-calendar-weekdays span,
    html[data-theme="dark"] .mobile-calendar-hint,
    html[data-theme="dark"] .mobile-week-day-heading > span,
    html[data-theme="dark"] .stats-expandable-copy small,
    html[data-theme="dark"] .stats-mobile-data-metrics small,
    html[data-theme="dark"] .stats-mobile-day-card .stats-mobile-data-heading > span:first-child small,
    html[data-theme="dark"] .stats-mobile-day-meta,
    html[data-theme="dark"] .stats-mobile-empty {
        color: var(--dark-muted);
    }

    html[data-theme="dark"] .mobile-month-day,
    html[data-theme="dark"] .mobile-week-day,
    html[data-theme="dark"] .stats-mobile-data-card,
    html[data-theme="dark"] .stats-mobile-empty,
    html[data-theme="dark"] .stats-expandable-icon {
        color: var(--dark-text);
        background: var(--dark-surface);
        border-color: var(--dark-border-soft);
    }

    html[data-theme="dark"] .mobile-month-day.weekend,
    html[data-theme="dark"] .mobile-week-day.weekend,
    html[data-theme="dark"] .stats-mobile-day-card.weekend {
        background: #332c16;
        border-color: #665824;
    }

    html[data-theme="dark"] .mobile-month-day.swieto,
    html[data-theme="dark"] .mobile-week-day.swieto {
        background: #3b181d;
        border-color: #71323c;
    }

    html[data-theme="dark"] .mobile-month-day.urlop,
    html[data-theme="dark"] .mobile-week-day.urlop,
    html[data-theme="dark"] .stats-mobile-day-card.urlop {
        background: #183522;
        border-color: #39734a;
    }

    html[data-theme="dark"] .mobile-month-day.wolne,
    html[data-theme="dark"] .mobile-week-day.wolne,
    html[data-theme="dark"] .stats-mobile-day-card.wolne {
        background: #172e43;
        border-color: #376384;
    }

    html[data-theme="dark"] .mobile-month-day.delegacja,
    html[data-theme="dark"] .mobile-week-day.delegacja,
    html[data-theme="dark"] .stats-mobile-day-card.delegacja {
        background: #2b2143;
        border-color: #5d4b87;
    }

    html[data-theme="dark"] .mobile-month-day.is-today,
    html[data-theme="dark"] .mobile-week-day.is-today {
        border-color: #ff596b;
        box-shadow: inset 0 0 0 1.5px #ff596b;
    }

    html[data-theme="dark"] .mobile-month-day-top i,
    html[data-theme="dark"] .mobile-week-day-heading i,
    html[data-theme="dark"] .mobile-week-day-content > strong,
    html[data-theme="dark"] .stats-mobile-data-heading > span,
    html[data-theme="dark"] .stats-mobile-day-hours,
    html[data-theme="dark"] .stats-expandable-icon {
        color: var(--dark-accent) !important;
    }

    html[data-theme="dark"] .stats-expandable-body,
    html[data-theme="dark"] .stats-mobile-data-heading {
        border-color: var(--dark-table-border);
    }

    html[data-theme="dark"] .stats-mobile-statuses .plain {
        color: #d2d2d7;
        background: #29292d;
        border-color: #48484e;
    }

    html[data-theme="dark"] .stats-mobile-statuses .leave {
        color: #a7e3b5;
        background: #183522;
        border-color: #39734a;
    }

    html[data-theme="dark"] .stats-mobile-statuses .free {
        color: #acd9ff;
        background: #172e43;
        border-color: #376384;
    }

    html[data-theme="dark"] .stats-mobile-statuses .delegation {
        color: #d8c8ff;
        background: #2b2143;
        border-color: #5d4b87;
    }
}

@media (max-width: 360px) {
    .period-summary-grid .summary-tile span,
    .stats-primary-grid .stats-color-card span {
        font-size: 7px;
    }

    .period-summary-grid .summary-tile strong,
    .stats-primary-grid .stats-color-card strong {
        font-size: 15px;
    }

    .mobile-month-day,
    .mobile-month-day-placeholder {
        min-height: 47px;
    }
}

/* V2.55 — większa typografia kalendarza i statystyk oraz klienci w miesiącu */
@media (max-width: 700px) {
    .calendar-overview-card .month-picker-main-text,
    .stats-period-main-button .month-picker-main-text {
        font-size: 15px;
    }

    .calendar-overview-card .week-range {
        font-size: 11.5px;
    }

    .calendar-view-text strong {
        font-size: 11.5px;
    }

    .period-summary-grid .summary-tile {
        min-height: 49px;
        padding: 6px 3px;
    }

    .period-summary-grid .summary-tile span {
        font-size: 8.5px;
        line-height: 1.08;
    }

    .period-summary-grid .summary-tile strong {
        font-size: 17px;
    }

    .mobile-calendar-weekdays span {
        font-size: 9.5px;
    }

    .mobile-month-day,
    .mobile-month-day-placeholder {
        min-height: 68px;
    }

    .mobile-month-day {
        gap: 2px;
        padding: 5px 4px;
    }

    .mobile-month-day-top strong {
        font-size: 13.5px;
    }

    .mobile-month-day-top i {
        font-size: 7.5px;
    }

    .mobile-month-day-client {
        display: -webkit-box;
        min-width: 0;
        overflow: hidden;
        color: #555;
        font-size: 7.8px;
        font-weight: 750;
        line-height: 1.08;
        overflow-wrap: anywhere;
        text-align: center;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .mobile-month-day-value {
        font-size: 9.5px;
    }

    .mobile-month-day > small {
        font-size: 7.5px;
    }

    .mobile-calendar-hint {
        font-size: 9.5px;
    }

    .mobile-week-calendar {
        gap: 6px;
    }

    .mobile-week-day {
        min-height: 70px;
        gap: 6px;
        padding: 8px;
    }

    .mobile-week-day-heading strong {
        font-size: 13px;
    }

    .mobile-week-day-heading > span {
        font-size: 10px;
    }

    .mobile-week-day-heading i {
        font-size: 8px;
    }

    .mobile-week-day-content > span {
        font-size: 10.5px;
    }

    .mobile-week-day-content > strong {
        font-size: 16px;
    }

    .mobile-week-day > small {
        font-size: 9px;
    }

    .stats-tabs a {
        font-size: 12px;
    }

    .stats-primary-grid .stats-color-card {
        min-height: 54px;
        padding: 7px;
    }

    .stats-primary-grid .stats-color-card span {
        margin-bottom: 4px;
        font-size: 9px;
        line-height: 1.1;
    }

    .stats-primary-grid .stats-color-card strong {
        font-size: 19px;
    }

    .stats-expandable-section > summary {
        min-height: 43px;
        padding: 7px 9px;
    }

    .stats-expandable-copy strong {
        font-size: 12.5px;
    }

    .stats-expandable-copy small {
        font-size: 9.5px;
    }

    .ranking-card-grid-compact .ranking-card > span {
        font-size: 8.5px;
    }

    .ranking-card-grid-compact .ranking-card strong {
        font-size: 17px;
    }

    .ranking-card-grid-compact .ranking-card small,
    .stats-chart-legend {
        font-size: 9.5px;
    }

    .stats-chart-heading h3 {
        font-size: 12px;
    }

    .stats-mobile-data-heading > strong {
        font-size: 13px;
    }

    .stats-mobile-data-heading > span,
    .stats-mobile-day-hours {
        font-size: 16px !important;
    }

    .stats-mobile-data-metrics small {
        font-size: 7.5px;
    }

    .stats-mobile-data-metrics strong {
        font-size: 11px;
    }

    .stats-mobile-day-card .stats-mobile-data-heading > span:first-child strong {
        font-size: 12px;
    }

    .stats-mobile-day-card .stats-mobile-data-heading > span:first-child small {
        font-size: 9.5px;
    }

    .stats-mobile-day-meta {
        font-size: 9px;
    }

    .stats-mobile-day-meta > span strong {
        font-size: 10px;
    }

    .stats-mobile-statuses span {
        font-size: 7.5px;
    }

    html[data-theme="dark"] .mobile-month-day-client {
        color: var(--dark-muted);
    }
}

@media (max-width: 360px) {
    .period-summary-grid .summary-tile span {
        font-size: 8px;
    }

    .stats-primary-grid .stats-color-card span {
        font-size: 8.5px;
    }

    .period-summary-grid .summary-tile strong {
        font-size: 16px;
    }

    .stats-primary-grid .stats-color-card strong {
        font-size: 18px;
    }

    .mobile-month-day,
    .mobile-month-day-placeholder {
        min-height: 66px;
    }

    .mobile-month-day-client {
        font-size: 7.4px;
    }
}


/* V2.56 — zwarty i czytelny mobilny formularz dnia */
.mobile-helper-copy {
    display: none;
}

@media (max-width: 700px) {
    .day-editor-page .day-editor-topbar {
        margin-bottom: 4px;
    }

    .day-editor-page .back-to-calendar-button {
        min-height: 34px;
        gap: 4px;
        padding: 5px 9px;
        border-radius: 7px;
        font-size: 12px;
    }

    .day-editor-page .back-to-calendar-button span {
        font-size: 20px;
    }

    .day-editor-page .day-editor-card {
        padding: 8px;
        border-radius: 9px;
    }

    .day-editor-page .day-editor-header {
        margin-bottom: 7px;
        padding-bottom: 7px;
    }

    .day-editor-page .day-editor-eyebrow {
        display: none;
    }

    .day-editor-page .day-editor-header h2 {
        font-size: 18px;
        line-height: 1.12;
    }

    .day-editor-page .day-editor-holiday {
        margin-top: 3px;
        font-size: 11px;
    }

    .day-editor-page :where(.single-day-form, .day-editor-form) {
        gap: 7px;
    }

    .day-editor-page .day-editor-section {
        padding: 8px;
        border-radius: 9px;
    }

    .day-editor-page :where(.section-heading, .section-heading-with-action) {
        gap: 3px;
        margin-bottom: 7px;
    }

    .day-editor-page .section-heading > div {
        gap: 6px;
    }

    .day-editor-page .section-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .day-editor-page .section-heading h3 {
        font-size: 15px;
        line-height: 1.15;
    }

    .day-editor-page .section-heading p {
        padding-left: 26px;
        font-size: 10.5px;
        line-height: 1.2;
    }

    .day-editor-page :where(.day-status-section, .day-details-section) .day-section-long-help {
        display: none;
    }

    .day-editor-page .desktop-helper-copy {
        display: none;
    }

    .day-editor-page .mobile-helper-copy {
        display: inline;
    }

    .day-editor-page .day-status-grid {
        gap: 5px;
    }

    .day-editor-page .day-status-grid .status-option-large {
        min-height: 34px;
        gap: 5px;
        margin: 0;
        padding: 5px 7px;
        border-radius: 7px;
        font-size: 12px;
        line-height: 1.1;
    }

    .day-editor-page .day-status-grid input {
        width: 14px;
        height: 14px;
        margin: 0;
    }

    .day-editor-page .single-time-grid {
        gap: 5px;
    }

    .day-editor-page .single-time-group {
        gap: 4px;
        padding: 6px 7px 7px;
        border-radius: 8px;
    }

    .day-editor-page .single-time-group legend {
        padding: 0 4px;
        font-size: 11.5px;
        line-height: 1.1;
    }

    .day-editor-page .single-time-pair {
        gap: 5px;
    }

    .day-editor-page .single-time-group label:not(.compact-check) {
        gap: 2px;
        font-size: 10.5px;
        line-height: 1.15;
    }

    .day-editor-page .single-time-pair input[type="time"] {
        height: 36px;
        min-height: 36px;
        padding: 3px 2px;
        font-size: 14px;
    }

    .day-editor-page .time-field-with-unlock {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 32px;
        align-items: end;
        gap: 3px;
    }

    .day-editor-page .time-field-with-unlock > label {
        grid-column: 1;
        grid-row: 1;
    }

    .day-editor-page .time-field-with-unlock .time-unlock-button {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        width: 32px;
        min-width: 32px;
        min-height: 36px;
        padding: 0;
        border-radius: 7px;
        font-size: 0;
        line-height: 1;
    }

    .day-editor-page .time-field-with-unlock .time-unlock-button::before {
        content: "✎";
        font-size: 15px;
    }

    .day-editor-page .time-field-with-unlock .time-unlock-button[data-manual="1"]::before {
        content: "↺";
        font-size: 17px;
    }

    .day-editor-page .next-day-option {
        min-height: 24px;
        gap: 5px;
        margin: 0;
        font-size: 11.5px;
        line-height: 1.15;
    }

    .day-editor-page .next-day-option input {
        width: 14px;
        height: 14px;
        margin: 0;
    }

    .day-editor-page .remote-under-hours {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        align-items: center;
        gap: 5px 7px;
        max-width: none;
        margin-top: 6px;
        padding: 6px 7px;
        border-radius: 8px;
    }

    .day-editor-page .remote-under-hours > .field-label {
        display: none;
    }

    .day-editor-page .remote-under-hours > .status-option {
        min-height: 34px;
        gap: 5px;
        margin: 0;
        padding: 5px 7px;
        border-radius: 7px;
        font-size: 11.5px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .day-editor-page .remote-under-hours > .status-option input {
        width: 14px;
        height: 14px;
        margin: 0;
    }

    .day-editor-page .remote-time-editor {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 5px;
        margin: 0;
    }

    .day-editor-page .remote-time-editor .remote-duration-field {
        gap: 3px;
        font-size: 11px;
    }

    .day-editor-page .remote-time-editor .remote-duration-field input {
        width: 46px;
        height: 34px;
        min-height: 34px;
        padding: 3px;
        font-size: 14px;
    }

    .day-editor-page .day-basic-grid {
        gap: 7px;
    }

    .day-editor-page :where(.editor-field > label:first-child, .field-label) {
        margin-bottom: 3px;
        font-size: 11.5px;
        line-height: 1.15;
    }

    .day-editor-page :where(
        .editor-field input[type="text"],
        .editor-field input:not([type]),
        .editor-field textarea,
        .multi-client-input
    ) {
        min-height: 36px;
        padding: 6px 7px;
        font-size: 14px;
    }

    .day-editor-page .editor-field textarea {
        height: 58px;
        min-height: 58px;
        line-height: 1.25;
        resize: vertical;
    }

    .day-editor-page .client-memory-help {
        display: none;
    }

    .day-editor-page .day-editor-summary.day-editor-bottom-summary {
        gap: 5px;
    }

    .day-editor-page .day-editor-bottom-summary > div {
        padding: 6px 5px;
        border-radius: 7px;
    }

    .day-editor-page .day-editor-summary span {
        margin-bottom: 2px;
        font-size: 8.5px;
    }

    .day-editor-page .day-editor-bottom-summary strong {
        font-size: 17px;
    }

    .day-editor-page :where(.day-editor-actions, .day-editor-actions-complete) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 5px;
    }

    .day-editor-page :where(
        .save-day-button,
        .secondary-action-button,
        .day-editor-actions-complete .delete-day-button
    ) {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        margin: 0;
        padding: 7px 6px;
        border-radius: 7px;
        box-sizing: border-box;
        font-size: 11.5px;
        line-height: 1.15;
        text-align: center;
    }

    .day-editor-page .day-editor-actions-complete .delete-day-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 360px) {
    .day-editor-page .day-editor-card {
        padding: 6px;
    }

    .day-editor-page .day-editor-section {
        padding: 7px;
    }

    .day-editor-page .single-time-group {
        padding-right: 6px;
        padding-left: 6px;
    }

    .day-editor-page .single-time-pair input[type="time"] {
        font-size: 13px;
    }

    .day-editor-page .time-field-with-unlock {
        grid-template-columns: minmax(0, 1fr) 30px;
    }

    .day-editor-page .time-field-with-unlock .time-unlock-button {
        width: 30px;
        min-width: 30px;
    }

    .day-editor-page .remote-time-editor .remote-duration-field input {
        width: 42px;
    }

    .day-editor-page :where(
        .save-day-button,
        .secondary-action-button,
        .day-editor-actions-complete .delete-day-button
    ) {
        font-size: 11px;
    }
}

/* V2.58 — końcowe priorytety po stylach mobilnego formularza V2.56 */
@media (max-width: 700px) {
    .day-editor-page .day-editor-summary.day-editor-bottom-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-mobile-data-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 6px;
    }
}

@media (max-width: 360px) {
    .day-editor-page .day-editor-summary span {
        font-size: 7.5px;
    }

    .day-editor-page .day-editor-bottom-summary strong,
    .stats-balance-grid strong {
        font-size: 14px;
    }
}

/* V2.60 — pełny tryb offline oraz nadrzędne weekendy i święta */
.offline-status {
    position: relative;
    z-index: 950;
    display: flex;
    min-height: 46px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
    color: #493600;
    background: #fff3bd;
    border-bottom: 1px solid #ddc867;
    box-shadow: 0 3px 10px rgba(87, 63, 0, .12);
}

.offline-status.syncing {
    color: #07516b;
    background: #dff5ff;
    border-bottom-color: #9ecfe1;
}

.offline-status.waiting {
    color: #174f2a;
    background: #e5f7e8;
    border-bottom-color: #a9d8b2;
}

.offline-status.warning {
    color: #7a1c16;
    background: #ffe4df;
    border-bottom-color: #e8aba0;
}

.offline-status-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.offline-status.syncing .offline-status-icon {
    animation: offline-sync-spin 1.1s linear infinite;
}

@keyframes offline-sync-spin {
    to { transform: rotate(360deg); }
}

.offline-status-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.offline-status-copy strong {
    font-size: 13px;
    line-height: 1.15;
}

.offline-status-copy small {
    font-size: 11px;
    line-height: 1.25;
}

.offline-sync-button {
    min-height: 30px;
    margin-left: 6px;
    padding: 5px 10px;
    color: inherit;
    background: rgba(255, 255, 255, .58);
    border: 1px solid currentColor;
    border-radius: 8px;
    font-size: 11px;
}

.summary-day-row.swieto > td,
.summary-day-row.swieto:hover > td,
.summary-day-row.swieto:focus-visible > td {
    background: #ffe1e1 !important;
}

.summary-day-row.weekend > td,
.summary-day-row.weekend:hover > td,
.summary-day-row.weekend:focus-visible > td {
    background: #fff3bd !important;
}

.calendar-auto-free-label,
.calendar-worked-special-label {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.calendar-auto-free-label {
    color: #5b4700;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(108, 82, 0, .25);
}

.calendar-worked-special-label {
    color: #fff;
    background: #126a92;
    border: 1px solid #075375;
    letter-spacing: .25px;
    text-transform: uppercase;
}

.summary-day-row.worked-special-day > td:first-child {
    box-shadow: inset 4px 0 0 #126a92;
}

.summary-day-row.worked-special-day .summary-hours-cell strong,
.summary-weekday-cell.worked-special-day {
    color: #075c84;
    font-weight: 900;
}

.automatic-free-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 15px;
    padding: 10px 12px;
    color: #594500;
    background: #fff3bd;
    border: 1px solid #dfca6f;
    border-radius: 11px;
}

.automatic-free-notice.holiday {
    color: #781923;
    background: #ffe1e1;
    border-color: #e6aab0;
}

.automatic-free-notice > span:first-child {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    color: currentColor;
    background: rgba(255, 255, 255, .6);
    border-radius: 50%;
    font-size: 14px;
}

.automatic-free-notice > span:last-child {
    display: grid;
    gap: 2px;
}

.automatic-free-notice strong {
    font-size: 12px;
}

.automatic-free-notice small {
    font-size: 10.5px;
    line-height: 1.3;
}

.day-status-grid .automatic-free-option {
    color: #594500;
    background: #fff8d8;
    border-color: #dbc96e;
}

.day-status-grid .automatic-free-option.holiday {
    color: #781923;
    background: #fff0f0;
    border-color: #e5b0b5;
}

.day-status-grid .automatic-free-option input {
    accent-color: #b88c00;
}

.day-status-grid .automatic-free-option.holiday input {
    accent-color: #c90016;
}

.day-status-grid .automatic-free-option:has(input:checked) {
    box-shadow: inset 0 0 0 2px currentColor;
}

html[data-theme="dark"] .offline-status.offline {
    color: #ffe995;
    background: #332c16;
    border-bottom-color: #665824;
}

html[data-theme="dark"] .offline-status.syncing {
    color: #9be3ff;
    background: #15303c;
    border-bottom-color: #31667b;
}

html[data-theme="dark"] .offline-status.waiting {
    color: #a6e8b2;
    background: #173422;
    border-bottom-color: #39734a;
}

html[data-theme="dark"] .offline-status.warning {
    color: #ffb3aa;
    background: #3d1a18;
    border-bottom-color: #7b3a34;
}

html[data-theme="dark"] .summary-day-row.swieto > td,
html[data-theme="dark"] .summary-day-row.swieto:hover > td,
html[data-theme="dark"] .summary-day-row.swieto:focus-visible > td {
    color: var(--dark-text);
    background: #3b181d !important;
    border-color: #71323c !important;
}

html[data-theme="dark"] .summary-day-row.weekend > td,
html[data-theme="dark"] .summary-day-row.weekend:hover > td,
html[data-theme="dark"] .summary-day-row.weekend:focus-visible > td {
    color: var(--dark-text);
    background: #332c16 !important;
    border-color: #665824 !important;
}

html[data-theme="dark"] .calendar-auto-free-label {
    color: #ffe995;
    background: rgba(0, 0, 0, .22);
    border-color: rgba(255, 233, 149, .28);
}

html[data-theme="dark"] .calendar-worked-special-label {
    color: #dff7ff;
    background: #0f5879;
    border-color: #45a7d0;
}

html[data-theme="dark"] .summary-day-row.worked-special-day .summary-hours-cell strong,
html[data-theme="dark"] .summary-weekday-cell.worked-special-day {
    color: #8edcff;
}

html[data-theme="dark"] .automatic-free-notice,
html[data-theme="dark"] .day-status-grid .automatic-free-option {
    color: #ffe995;
    background: #332c16;
    border-color: #665824;
}

html[data-theme="dark"] .automatic-free-notice.holiday,
html[data-theme="dark"] .day-status-grid .automatic-free-option.holiday {
    color: #ffb8c0;
    background: #3b181d;
    border-color: #71323c;
}

@media (max-width: 760px) {
    .offline-status {
        position: sticky;
        top: 70px;
        justify-content: flex-start;
        gap: 7px;
        min-height: 42px;
        padding: 6px 8px;
    }

    .offline-status-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        font-size: 15px;
    }

    .offline-status-copy {
        flex: 1;
    }

    .offline-status-copy strong {
        font-size: 11px;
    }

    .offline-status-copy small {
        display: -webkit-box;
        overflow: hidden;
        font-size: 9px;
        line-height: 1.2;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .offline-sync-button {
        min-height: 27px;
        margin-left: auto;
        padding: 4px 7px;
        font-size: 9px;
    }

    .mobile-month-day.weekend,
    .mobile-week-day.weekend {
        background: #fff3bd !important;
        border-color: #d7bd4f !important;
    }

    .mobile-month-day.swieto,
    .mobile-week-day.swieto {
        background: #ffe1e1 !important;
        border-color: #dc929b !important;
    }

    .mobile-month-day.worked-special-day,
    .mobile-week-day.worked-special-day {
        box-shadow: inset 0 -3px 0 #126a92;
    }

    .mobile-month-day.worked-special-day.is-today,
    .mobile-week-day.worked-special-day.is-today {
        box-shadow: inset 0 -3px 0 #126a92, inset 0 0 0 1.5px #c90016;
    }

    .mobile-month-day.worked-special-day .mobile-month-day-value,
    .mobile-week-day.worked-special-day .mobile-week-day-content > strong {
        color: #075c84;
        font-weight: 950;
    }

    .mobile-special-state-mark {
        display: inline-flex;
        width: 12px;
        height: 12px;
        flex: 0 0 12px;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        color: #5a4300;
        background: rgba(255, 255, 255, .72);
        border: 1px solid rgba(90, 67, 0, .28);
        border-radius: 50%;
        font-size: 7px;
        font-weight: 950;
        line-height: 1;
    }

    .mobile-special-state-mark.worked {
        color: #fff;
        background: #126a92;
        border-color: #075375;
    }

    .mobile-month-day-top .mobile-special-state-mark + i {
        margin-left: 0;
    }

    .mobile-week-special-badges {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 4px;
        margin-top: -2px;
        overflow: hidden;
    }

    .mobile-week-special-badges b,
    .mobile-week-special-badges em {
        overflow: hidden;
        padding: 2px 5px;
        border-radius: 999px;
        font-size: 7.5px;
        font-style: normal;
        font-weight: 900;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-week-special-badges b {
        color: #5a4300;
        background: rgba(255, 255, 255, .62);
        border: 1px solid rgba(90, 67, 0, .2);
    }

    .mobile-week-special-badges em {
        color: #5b3d72;
        background: rgba(255, 255, 255, .72);
        border: 1px solid rgba(91, 61, 114, .25);
    }

    .mobile-week-special-badges em.worked {
        color: #fff;
        background: #126a92;
        border-color: #075375;
        text-transform: uppercase;
    }

    .automatic-free-notice {
        gap: 7px;
        margin: -4px 0 8px;
        padding: 7px 8px;
    }

    .automatic-free-notice > span:first-child {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        font-size: 12px;
    }

    .automatic-free-notice strong {
        font-size: 10px;
    }

    .automatic-free-notice small {
        font-size: 8.5px;
        line-height: 1.2;
    }

    .day-editor-page .day-status-grid:has(.automatic-free-option) {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .day-editor-page .day-status-grid .automatic-free-option {
        font-size: 8px;
        line-height: 1.05;
    }

    html[data-theme="dark"] .mobile-month-day.weekend,
    html[data-theme="dark"] .mobile-week-day.weekend {
        color: var(--dark-text);
        background: #332c16 !important;
        border-color: #665824 !important;
    }

    html[data-theme="dark"] .mobile-month-day.swieto,
    html[data-theme="dark"] .mobile-week-day.swieto {
        color: var(--dark-text);
        background: #3b181d !important;
        border-color: #71323c !important;
    }

    html[data-theme="dark"] .mobile-month-day.worked-special-day .mobile-month-day-value,
    html[data-theme="dark"] .mobile-week-day.worked-special-day .mobile-week-day-content > strong {
        color: #8edcff;
    }

    html[data-theme="dark"] .mobile-week-special-badges b {
        color: #ffe995;
        background: rgba(0, 0, 0, .22);
        border-color: rgba(255, 233, 149, .25);
    }
}

@media (max-width: 380px) {
    .day-editor-page .day-status-grid:has(.automatic-free-option) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .day-editor-page .day-status-grid .automatic-free-option {
        grid-column: 1 / -1;
    }
}


/* V2.62 — poprawiony mobilny wybór „Rodzaj dnia” */
@media (max-width: 700px) {
    /*
       Weekend/święto zajmuje pełną szerokość, a cztery właściwe opcje
       układają się w czytelną siatkę 2 × 2. Selektor z :has() ma taką
       samą lub większą specyficzność niż wcześniejsze reguły 5-kolumnowe.
    */
    .day-editor-page .day-status-grid,
    .day-editor-page .day-status-grid:has(.automatic-free-option) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .day-editor-page .day-status-grid .status-option-large {
        min-width: 0;
        min-height: 44px;
        padding: 8px 10px;
        gap: 7px;
        font-size: 13px;
        line-height: 1.15;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
        text-align: left;
    }

    .day-editor-page .day-status-grid .status-option-large input {
        flex: 0 0 auto;
    }

    .day-editor-page .day-status-grid .automatic-free-option,
    .day-editor-page .day-status-grid:has(.automatic-free-option) .automatic-free-option {
        grid-column: 1 / -1;
        min-height: 44px;
        font-size: 13px;
        line-height: 1.15;
    }
}

@media (max-width: 360px) {
    .day-editor-page .day-status-grid .status-option-large,
    .day-editor-page .day-status-grid .automatic-free-option,
    .day-editor-page .day-status-grid:has(.automatic-free-option) .automatic-free-option {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12.5px;
    }
}

/* V2.62 — aktualizacje, synchronizacja, szybkie akcje i formularz dnia */
body.app-update-locked,
body.calendar-quick-menu-open {
    overflow: hidden;
}

.app-update-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 15, 18, .72);
    backdrop-filter: blur(8px);
}

.app-update-modal {
    width: min(100%, 440px);
    padding: 28px;
    text-align: center;
    background: #fff;
    border: 1px solid #dedee3;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.app-update-modal-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    background: #c90016;
    border-radius: 50%;
    animation: app-update-spin 1.1s linear infinite;
}

.app-update-overlay[data-state="error"] .app-update-modal-icon {
    animation: none;
    background: #9a1e2d;
}

.app-update-modal h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.app-update-modal p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.app-update-modal .btn-canon {
    margin-top: 18px;
}

@keyframes app-update-spin {
    to { transform: rotate(360deg); }
}

.app-diagnostics-card,
.offline-settings-card {
    display: grid;
    gap: 18px;
}

.app-diagnostics-heading,
.offline-settings-heading,
.restore-version-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.app-diagnostics-heading h2,
.offline-settings-heading h2 {
    margin: 2px 0 6px;
}

.app-diagnostics-heading p,
.offline-settings-heading p {
    margin: 0;
    color: #6d6d74;
}

.app-diagnostics-grid,
.offline-settings-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.app-diagnostics-grid > div,
.offline-settings-metrics > div {
    min-width: 0;
    padding: 13px 14px;
    background: #f6f6f8;
    border: 1px solid #e4e4e8;
    border-radius: 10px;
}

.app-diagnostics-grid dt,
.offline-settings-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #777780;
    font-size: 12px;
    font-weight: 700;
}

.app-diagnostics-grid dd,
.offline-settings-metrics strong {
    display: block;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
}

.offline-settings-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
}

.offline-settings-badge.online {
    color: #176433;
    background: #dff6e7;
}

.offline-settings-badge.offline {
    color: #8a3d00;
    background: #fff0d8;
}

.offline-queue-details {
    border-top: 1px solid #e5e5e9;
    padding-top: 12px;
}

.offline-queue-details summary {
    cursor: pointer;
    font-weight: 800;
}

.offline-queue-details ol {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.offline-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #f7f7f8;
    border: 1px solid #e4e4e8;
    border-radius: 9px;
}

.offline-queue-item span {
    min-width: 0;
}

.offline-queue-item strong,
.offline-queue-item small {
    display: block;
}

.offline-queue-item small {
    margin-top: 3px;
    color: #74747c;
}

.offline-queue-item b {
    flex: 0 0 auto;
    color: #835200;
    font-size: 11px;
}

.offline-queue-item.blocked {
    background: #fff1f2;
    border-color: #e8b9bf;
}

.offline-queue-item.blocked b {
    color: #9d1829;
}

.restore-version-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: #f7f7f9;
    border: 1px solid #e2e2e7;
    border-radius: 12px;
}

.restore-version-panel > div > strong,
.restore-version-panel > div > small,
.restore-version-heading strong,
.restore-version-heading small {
    display: block;
}

.restore-version-heading small,
.restore-version-panel > div > small {
    margin-top: 4px;
    color: #717179;
}

.restore-version-heading > span {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    color: #fff;
    font-weight: 800;
    background: #c90016;
    border-radius: 999px;
}

.restore-version-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: end;
}

.restore-version-controls label {
    grid-column: 1 / -1;
    font-weight: 700;
}

.restore-version-controls select {
    min-width: 0;
}

.diagnostic-update-error {
    color: #a01325 !important;
    font-weight: 700;
}

.calendar-quick-menu {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.calendar-quick-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 18, .58);
    backdrop-filter: blur(3px);
}

.calendar-quick-sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, .2);
    animation: calendar-quick-in .2s ease-out;
}

@keyframes calendar-quick-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.calendar-quick-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 12px;
    background: #c5c5ca;
    border-radius: 99px;
}

.calendar-quick-heading {
    margin-bottom: 12px;
}

.calendar-quick-heading > span {
    color: #7b7b83;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.calendar-quick-heading h2 {
    margin: 3px 0 0;
    font-size: 19px;
}

.calendar-quick-action {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 8px;
    padding: 13px 14px;
    text-align: left;
    border: 1px solid #e1e1e5;
    border-radius: 11px;
    background: #f7f7f8;
}

.calendar-quick-action > span:first-child {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 9px;
    background: #fff;
}

.calendar-quick-action strong,
.calendar-quick-action small {
    display: block;
}

.calendar-quick-action small {
    margin-top: 3px;
    color: #73737b;
    font-weight: 400;
}

.calendar-quick-action.leave {
    border-color: #c9d8ee;
    background: #eef5ff;
}

.calendar-quick-action.free {
    border-color: #d7d7dc;
    background: #f5f5f6;
}

.calendar-quick-cancel {
    width: 100%;
    margin-top: 12px;
}

.day-validation-summary {
    margin-top: 14px;
    padding: 13px 15px;
    color: #7e1020;
    background: #fff0f2;
    border: 1px solid #e5aab3;
    border-left: 4px solid #c90016;
    border-radius: 9px;
}

.day-validation-summary strong {
    display: block;
}

.day-validation-summary ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.day-validation-summary li + li {
    margin-top: 4px;
}

.day-editor-form .field-invalid:not([type="radio"]):not([type="checkbox"]),
.day-editor-form .field-invalid[type="radio"] + *,
.day-editor-form .field-invalid[type="checkbox"] + * {
    outline: 2px solid #c90016;
    outline-offset: 2px;
}

.day-editor-form input.field-invalid,
.day-editor-form textarea.field-invalid,
.day-editor-form select.field-invalid {
    border-color: #c90016 !important;
    background: #fff7f8;
}

.day-save-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f8f8f9;
    border: 1px solid #e2e2e6;
    border-radius: 12px;
}

.day-draft-status {
    margin: 0;
    color: #686870;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.day-draft-status[data-state="saving"],
.day-draft-status[data-state="submitting"] {
    color: #805900;
}

.day-draft-status[data-state="saved"],
.day-draft-status[data-state="offline"] {
    color: #7a5200;
}

.day-draft-status[data-state="synced"] {
    color: #176433;
}

.day-draft-status[data-state="error"] {
    color: #a01325;
}

.day-save-dock-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.day-save-dock-actions .secondary-action-button,
.day-save-dock-actions .btn-canon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    text-decoration: none;
}

.day-danger-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

@media (max-width: 760px) {
    .app-diagnostics-heading,
    .offline-settings-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .app-diagnostics-heading .btn-canon,
    .offline-settings-card > .secondary-action-button {
        width: 100%;
    }

    .app-diagnostics-grid,
    .offline-settings-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .offline-settings-metrics > div:last-child {
        grid-column: 1 / -1;
    }

    .restore-version-controls {
        grid-template-columns: 1fr;
    }

    .restore-version-controls label {
        grid-column: auto;
    }

    .restore-version-controls .btn-canon {
        width: 100%;
    }

    .day-editor-form {
        padding-bottom: 82px;
    }

    .day-save-dock {
        position: sticky;
        bottom: 0;
        z-index: 35;
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
        margin: 14px -10px calc(-82px + env(safe-area-inset-bottom));
        padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
        backdrop-filter: blur(12px);
    }

    .day-draft-status {
        min-height: 16px;
        text-align: center;
        font-size: 10.5px;
    }

    .day-save-dock-actions {
        display: grid;
        grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
        width: 100%;
    }

    .day-save-dock-actions .secondary-action-button,
    .day-save-dock-actions .btn-canon {
        width: 100%;
        min-height: 42px;
        box-sizing: border-box;
    }

    .day-danger-actions {
        margin-top: 94px;
    }
}

@media (max-width: 390px) {
    .app-diagnostics-grid,
    .offline-settings-metrics {
        grid-template-columns: 1fr;
    }

    .offline-settings-metrics > div:last-child {
        grid-column: auto;
    }

    .app-update-modal {
        padding: 22px 18px;
    }
}

html[data-theme="dark"] .app-update-modal,
html[data-theme="dark"] .calendar-quick-sheet {
    color: var(--dark-text);
    background: var(--dark-surface-raised);
    border-color: var(--dark-border);
}

html[data-theme="dark"] .app-update-modal p,
html[data-theme="dark"] .app-diagnostics-heading p,
html[data-theme="dark"] .offline-settings-heading p,
html[data-theme="dark"] .restore-version-heading small,
html[data-theme="dark"] .restore-version-panel > div > small,
html[data-theme="dark"] .offline-queue-item small,
html[data-theme="dark"] .calendar-quick-action small,
html[data-theme="dark"] .day-draft-status {
    color: var(--dark-muted);
}

html[data-theme="dark"] .app-diagnostics-grid > div,
html[data-theme="dark"] .offline-settings-metrics > div,
html[data-theme="dark"] .offline-queue-item,
html[data-theme="dark"] .restore-version-panel,
html[data-theme="dark"] .calendar-quick-action,
html[data-theme="dark"] .day-save-dock {
    color: var(--dark-text);
    background: var(--dark-surface-soft);
    border-color: var(--dark-border);
}

html[data-theme="dark"] .calendar-quick-action > span:first-child {
    background: var(--dark-surface);
}

html[data-theme="dark"] .day-validation-summary {
    color: #ffb7c0;
    background: #351419;
    border-color: #74333d;
    border-left-color: var(--dark-accent);
}

html[data-theme="dark"] .day-editor-form input.field-invalid,
html[data-theme="dark"] .day-editor-form textarea.field-invalid,
html[data-theme="dark"] .day-editor-form select.field-invalid {
    background: #351419;
    border-color: var(--dark-accent) !important;
}

html[data-theme="dark"] .day-draft-status[data-state="saving"],
html[data-theme="dark"] .day-draft-status[data-state="submitting"],
html[data-theme="dark"] .day-draft-status[data-state="saved"],
html[data-theme="dark"] .day-draft-status[data-state="offline"] {
    color: #ffd47b;
}

html[data-theme="dark"] .day-draft-status[data-state="synced"] {
    color: #8ee3a8;
}

html[data-theme="dark"] .day-draft-status[data-state="error"] {
    color: #ff9ba8;
}

@media (max-width: 760px) {
    html[data-theme="dark"] .day-save-dock {
        background: rgba(23, 23, 25, .96);
    }
}


/* ==========================================
   V2.68 — MENU POMOC I OBSŁUGA ZGŁOSZEŃ
   ========================================== */
.help-page {
  display: grid;
  gap: 20px;
}
.help-page > .card { margin-bottom: 0; }
.help-intro-card,
.help-section-heading,
.help-request-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.help-intro-card h2,
.help-section-heading h2 { margin: 3px 0 7px; }
.help-intro-card p,
.help-section-heading p { margin: 0; color: #68707b; }
.help-version-chip,
.help-count-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  background: #f6f7f8;
  color: #4e5661;
  font-weight: 800;
}
.help-count-chip.admin { color: #9b0011; background: #fff1f3; border-color: #f2c4ca; }
.help-request-form { display: grid; gap: 16px; margin-top: 18px; }
.help-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.help-type-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon title" "icon copy";
  gap: 2px 12px;
  padding: 16px;
  border: 2px solid #e0e3e7;
  border-radius: 14px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.help-type-choice:hover { transform: translateY(-1px); border-color: #c9cdd3; }
.help-type-choice.is-selected { border-color: #c90016; background: #fff5f6; box-shadow: 0 0 0 3px rgba(201,0,22,.08); }
.help-type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.help-type-icon { grid-area: icon; font-size: 28px; line-height: 1; }
.help-type-choice strong { grid-area: title; font-size: 17px; }
.help-type-choice small { grid-area: copy; color: #68707b; line-height: 1.35; }
.help-form-grid { display: grid; grid-template-columns: minmax(190px, .72fr) minmax(260px, 1.28fr); gap: 14px; }
.help-request-form > label,
.help-form-grid label,
.help-admin-form label { display: grid; gap: 7px; font-weight: 800; }
.help-request-form input,
.help-request-form select,
.help-request-form textarea,
.help-admin-form select,
.help-admin-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #c8cdd3;
  border-radius: 9px;
  background: #fff;
  color: #222;
  font: inherit;
  font-weight: 400;
}
.help-diagnostics-consent {
  grid-template-columns: auto 1fr !important;
  align-items: flex-start;
  gap: 11px !important;
  padding: 13px 14px;
  border: 1px solid #d8dde2;
  border-radius: 11px;
  background: #f7f8f9;
}
.help-diagnostics-consent input { width: 20px; height: 20px; margin-top: 1px; }
.help-diagnostics-consent span { display: grid; gap: 3px; }
.help-diagnostics-consent small { color: #68707b; font-weight: 400; line-height: 1.4; }
.help-diagnostics-details,
.help-faq-item {
  border: 1px solid #dfe3e7;
  border-radius: 10px;
  background: #fafbfc;
}
.help-diagnostics-details > summary,
.help-faq-item > summary { padding: 12px 14px; cursor: pointer; font-weight: 800; }
.help-diagnostics-details[open] > summary,
.help-faq-item[open] > summary { border-bottom: 1px solid #e3e6e9; }
.help-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 13px;
}
.help-diagnostics-grid > div { padding: 9px 10px; border-radius: 8px; background: #fff; border: 1px solid #e7eaed; }
.help-diagnostics-grid dt { color: #68707b; font-size: 12px; font-weight: 700; }
.help-diagnostics-grid dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.help-user-agent { margin: 0; padding: 12px 14px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.help-submit-actions { display: flex; align-items: center; gap: 14px; }
.help-submit-actions p { margin: 0; color: #68707b; }
.help-request-list,
.help-admin-request-list { display: grid; gap: 13px; margin-top: 16px; }
.help-request-card,
.help-admin-request-card { padding: 16px; border: 1px solid #dfe3e7; border-left: 5px solid #7b8490; border-radius: 12px; background: #fbfbfc; }
.help-request-card.bug { border-left-color: #c90016; }
.help-request-card.improvement { border-left-color: #b47a00; }
.help-request-card-header h3 { margin: 4px 0 0; font-size: 18px; }
.help-request-code { color: #68707b; font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.help-status-badge { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #e9ecef; color: #4c545e; }
.help-status-badge.status-new { background: #ffe8eb; color: #a60012; }
.help-status-badge.status-analysis { background: #fff2ce; color: #795300; }
.help-status-badge.status-planned { background: #e8e4ff; color: #4a3993; }
.help-status-badge.status-in_progress { background: #dcecff; color: #145287; }
.help-status-badge.status-resolved,
.help-status-badge.status-implemented { background: #dcf4e3; color: #17662d; }
.help-status-badge.status-rejected { background: #eceff2; color: #555d66; }
.help-request-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.help-request-meta span { padding: 4px 8px; border-radius: 7px; background: #eef1f4; color: #59616b; font-size: 12px; font-weight: 700; }
.help-request-description,
.help-admin-request-copy p,
.help-request-benefit p,
.help-admin-response p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.48; }
.help-request-benefit,
.help-admin-response,
.help-admin-request-copy { margin-top: 12px; padding: 12px 13px; border-radius: 9px; background: #fff; border: 1px solid #e3e6e9; }
.help-admin-response { background: #f0f7ff; border-color: #cbdff5; }
.help-admin-response small,
.help-waiting-response,
.help-no-diagnostics { color: #68707b; }
.help-waiting-response { margin: 12px 0 0; font-style: italic; }
.help-faq-list { display: grid; gap: 9px; margin-top: 16px; }
.help-faq-item p { margin: 0; padding: 12px 14px; line-height: 1.5; color: #4f5862; }
.help-empty-state { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 18px; border: 1px dashed #cfd4da; border-radius: 11px; color: #68707b; }
.help-empty-state span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e1f4e6; color: #17662d; font-weight: 900; }
.help-empty-state p { margin: 0; }
.help-load-error { margin-top: 15px; padding: 12px; border-radius: 9px; background: #fff0f1; color: #9b0011; font-weight: 700; }
.help-admin-card { border-top: 4px solid #c90016; }
.help-admin-request-card { border-left-color: #c90016; }
.help-admin-request-card > p { margin: 12px 0 0; }
.help-admin-form { display: grid; grid-template-columns: minmax(170px, .45fr) minmax(280px, 1.55fr) auto; align-items: end; gap: 12px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #e0e4e8; }
.help-admin-form button { min-height: 42px; }

html[data-theme="dark"] .help-intro-card p,
html[data-theme="dark"] .help-section-heading p,
html[data-theme="dark"] .help-type-choice small,
html[data-theme="dark"] .help-diagnostics-consent small,
html[data-theme="dark"] .help-submit-actions p,
html[data-theme="dark"] .help-admin-response small,
html[data-theme="dark"] .help-waiting-response,
html[data-theme="dark"] .help-no-diagnostics,
html[data-theme="dark"] .help-faq-item p { color: #b9c0c8; }
html[data-theme="dark"] .help-version-chip,
html[data-theme="dark"] .help-count-chip,
html[data-theme="dark"] .help-type-choice,
html[data-theme="dark"] .help-diagnostics-consent,
html[data-theme="dark"] .help-diagnostics-details,
html[data-theme="dark"] .help-faq-item,
html[data-theme="dark"] .help-request-card,
html[data-theme="dark"] .help-admin-request-card,
html[data-theme="dark"] .help-request-benefit,
html[data-theme="dark"] .help-admin-request-copy { background: #202124; border-color: #3a3d42; color: #f0f1f2; }
html[data-theme="dark"] .help-type-choice.is-selected { background: #321b20; border-color: #ef6373; }
html[data-theme="dark"] .help-request-form input,
html[data-theme="dark"] .help-request-form select,
html[data-theme="dark"] .help-request-form textarea,
html[data-theme="dark"] .help-admin-form select,
html[data-theme="dark"] .help-admin-form textarea,
html[data-theme="dark"] .help-diagnostics-grid > div { background: #17181a; border-color: #3a3d42; color: #f0f1f2; }
html[data-theme="dark"] .help-request-meta span { background: #303338; color: #d2d6da; }
html[data-theme="dark"] .help-admin-response { background: #172536; border-color: #2d4d70; }

@media (max-width: 760px) {
  .help-page { gap: 12px; }
  .help-page > .card { padding: 14px; border-radius: 12px; }
  .help-intro-card,
  .help-section-heading { gap: 10px; }
  .help-intro-card h2,
  .help-section-heading h2 { font-size: 22px; }
  .help-type-grid,
  .help-form-grid,
  .help-diagnostics-grid { grid-template-columns: 1fr; }
  .help-type-choice { padding: 13px; }
  .help-submit-actions { align-items: stretch; flex-direction: column; }
  .help-submit-actions button { width: 100%; min-height: 46px; }
  .help-request-card,
  .help-admin-request-card { padding: 13px; }
  .help-request-card-header { gap: 8px; }
  .help-request-card-header h3 { font-size: 16px; }
  .help-status-badge { padding: 5px 8px; }
  .help-admin-form { grid-template-columns: 1fr; align-items: stretch; }
  .help-admin-form button { width: 100%; }
}


/* ==========================================
   V2.68 — INTERAKTYWNY SAMOUCZEK
   ========================================== */
.help-tutorial-card { border-top: 4px solid #c90016; }
.tutorial-launch-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; margin-top: 16px; }
.tutorial-launch-grid.has-admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tutorial-launch-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon content" "button button";
  gap: 12px 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid #dfe3e7;
  border-radius: 13px;
  background: #fafbfc;
}
.tutorial-launch-card.admin { background: #fff7f8; border-color: #edc8ce; }
.tutorial-launch-icon { grid-area: icon; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #ffe8eb; font-size: 24px; }
.tutorial-launch-card > div { grid-area: content; }
.tutorial-launch-card h3 { margin: 0 0 5px; }
.tutorial-launch-card p { margin: 0; color: #68707b; line-height: 1.42; }
.tutorial-launch-card > button { grid-area: button; width: 100%; min-height: 42px; }
.tutorial-completion-state { display: inline-block; margin-top: 9px; color: #7b838d; font-weight: 800; }
.tutorial-completion-state.completed { color: #17662d; }

body.tutorial-active { overflow: hidden; }
.tutorial-overlay { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; }
.tutorial-backdrop { position: absolute; inset: 0; background: rgba(12, 16, 22, .64); backdrop-filter: blur(1px); }
.tutorial-popover {
  position: absolute;
  z-index: 3;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  width: min(540px, calc(100vw - 32px));
  margin-left: auto;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  background: #fff;
  color: #252a30;
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  pointer-events: auto;
}
.tutorial-popover-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #68707b; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.tutorial-skip, .tutorial-later-button { border: 0; background: transparent; color: #59616b; font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tutorial-progress { height: 5px; margin: 13px 0 10px; overflow: hidden; border-radius: 999px; background: #e9ecef; }
.tutorial-progress i { display: block; height: 100%; border-radius: inherit; background: #c90016; transition: width .2s ease; }
.tutorial-step-count { color: #7a828b; font-size: 12px; font-weight: 800; }
.tutorial-popover h2 { margin: 5px 0 7px; font-size: 22px; }
.tutorial-popover p { margin: 0; color: #4f5862; line-height: 1.48; }
.tutorial-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tutorial-actions button { min-width: 112px; }
.tutorial-highlighted {
  position: relative !important;
  z-index: 2147483002 !important;
  border-radius: 12px;
  outline: 4px solid #ffdd00 !important;
  outline-offset: 5px;
  box-shadow: 0 0 0 10px rgba(255, 221, 0, .20), 0 14px 38px rgba(0,0,0,.28) !important;
  background-clip: padding-box;
}
.tutorial-welcome-dialog { width: min(510px, calc(100vw - 28px)); }
.tutorial-welcome-dialog form { text-align: center; }
.tutorial-welcome-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 13px; border-radius: 18px; background: #ffe8eb; font-size: 33px; }
.tutorial-welcome-dialog h2 { margin: 5px 0 9px; }
.tutorial-welcome-dialog p { margin: 0 auto; max-width: 430px; color: #59616b; line-height: 1.48; }
.tutorial-welcome-actions { display: grid; gap: 9px; margin-top: 18px; }
.tutorial-welcome-actions button { min-height: 43px; }
.tutorial-welcome-dialog small { display: block; margin-top: 12px; color: #7a828b; }

html[data-theme="dark"] .tutorial-launch-card { background: #181b20; border-color: #363b43; }

html[data-theme="dark"] .tutorial-launch-card p,
html[data-theme="dark"] .tutorial-popover p,
html[data-theme="dark"] .tutorial-welcome-dialog p { color: #b8bec7; }
html[data-theme="dark"] .tutorial-popover { background: #191c21; color: #f4f5f7; border-color: #414751; }
html[data-theme="dark"] .tutorial-progress { background: #343941; }
html[data-theme="dark"] .tutorial-skip,
html[data-theme="dark"] .tutorial-later-button { color: #c5cbd3; }
html[data-theme="dark"] .tutorial-welcome-icon,
html[data-theme="dark"] .tutorial-launch-icon { background: #401b20; }

@media (min-width: 900px) {
  .tutorial-popover { left: auto; right: 28px; bottom: 28px; }
}

@media (max-width: 760px) {
  .tutorial-launch-grid.has-admin { grid-template-columns: 1fr; }
  .tutorial-popover { padding: 15px; border-radius: 14px; }
  .tutorial-popover h2 { font-size: 19px; }
  .tutorial-popover p { font-size: 14px; }
  .tutorial-actions button { flex: 1 1 0; min-width: 0; }
  .tutorial-highlighted { outline-width: 3px !important; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255, 221, 0, .18) !important; }
}

@media (max-height: 650px) {
  .tutorial-popover { max-height: calc(100vh - 20px); overflow: auto; bottom: 10px; }
  .tutorial-popover p { font-size: 13px; }
}


/* ==========================================
   V2.68 FINAL — Pomoc, formularz dnia i minikalendarz tygodniowy
   ========================================== */
[hidden] { display: none !important; }

.week-picker { position: relative; width: 100%; min-width: 0; }
.week-range-button { border: 1px solid #ecc3c8; cursor: pointer; font: inherit; }
.week-range-button b { margin: 0 5px; color: #c90016; }
.week-picker-panel { width: 350px; }
.week-picker-header .week-picker-label {
  flex: 1 1 auto;
  padding: 6px 8px;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}
.week-picker-header .week-picker-label:hover { background: rgba(255,255,255,.12); border-radius: 7px; }
.week-picker-weeks { display: grid; gap: 7px; margin-top: 12px; }
.week-picker-weeks button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 11px;
  color: #2e3339;
  background: #f5f6f7;
  border: 1px solid #e0e3e6;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
}
.week-picker-weeks button:hover,
.week-picker-weeks button.active { color: #9e0012; background: #fff0f2; border-color: #d98d97; }
.week-picker-weeks small { color: #6a727b; font-size: 10px; font-weight: 700; }
.week-picker-panel .miesiace button {
  padding: 11px 5px;
  color: #333;
  background: #f3f3f3;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.week-picker-panel .miesiace button.active,
.week-picker-panel .miesiace button:hover { color: #fff; background: #c8102e; }

.help-form-fields { display: grid; gap: 16px; }
.help-faq-link-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.help-faq-link-card:hover { transform: translateY(-1px); border-color: #c90016; }
.help-faq-link-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: #c90016; font-size: 24px; font-weight: 900; }
.help-faq-link-card span:nth-child(2) { display: grid; gap: 2px; }
.help-faq-link-card small { color: #8a0010; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.help-faq-link-card strong { font-size: 19px; }
.help-faq-link-card em { color: #68707b; font-size: 13px; font-style: normal; line-height: 1.35; }
.help-faq-link-card > b { color: #c90016; font-size: 28px; }
.help-faq-page .help-faq-list { margin-top: 0; }

.day-status-grid.special-day-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.day-editor-section[hidden], .day-editor-summary[hidden] { display: none !important; }

html[data-theme="dark"] .week-picker-weeks button,
html[data-theme="dark"] .week-picker-panel .miesiace button { color: #eef0f3; background: #25282d; border-color: #3b4047; }
html[data-theme="dark"] .week-picker-weeks button.active,
html[data-theme="dark"] .week-picker-weeks button:hover,
html[data-theme="dark"] .week-picker-panel .miesiace button.active,
html[data-theme="dark"] .week-picker-panel .miesiace button:hover { color: #fff; background: #6f1621; border-color: #a64b57; }
html[data-theme="dark"] .help-faq-link-card em { color: #b9c0c8; }

@media (max-width: 760px) {
  .help-page { gap: 8px; }
  .help-page > .card { padding: 10px; border-radius: 10px; }
  .help-intro-card { align-items: center; }
  .help-intro-card h2, .help-section-heading h2 { margin: 1px 0 3px; font-size: 18px; line-height: 1.15; }
  .help-intro-card p, .help-section-heading p { font-size: 10.5px; line-height: 1.3; }
  .help-version-chip, .help-count-chip { min-height: 26px; padding: 0 8px; font-size: 10px; }
  .help-section-heading { gap: 7px; }
  .page-eyebrow { font-size: 9px; }
  .help-request-form { gap: 9px; margin-top: 9px; }
  .help-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .help-type-choice {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 1px 6px;
    padding: 9px 7px;
    border-width: 1px;
    border-radius: 9px;
  }
  .help-type-icon { font-size: 20px; }
  .help-type-choice strong { font-size: 12px; line-height: 1.15; }
  .help-type-choice small { font-size: 9px; line-height: 1.2; }
  .help-form-fields { gap: 9px; }
  .help-form-grid { gap: 8px; }
  .help-request-form > label, .help-form-grid label, .help-admin-form label { gap: 4px; font-size: 11px; }
  .help-request-form input, .help-request-form select, .help-request-form textarea,
  .help-admin-form select, .help-admin-form textarea { padding: 8px 9px; border-radius: 8px; font-size: 12px; }
  .help-request-form textarea { min-height: 76px; }
  .help-diagnostics-consent { gap: 7px !important; padding: 8px; border-radius: 8px; }
  .help-diagnostics-consent input { width: 17px; height: 17px; }
  .help-diagnostics-consent strong { font-size: 11px; }
  .help-diagnostics-consent small { font-size: 9px; line-height: 1.25; }
  .help-diagnostics-details > summary, .help-faq-item > summary { padding: 9px 10px; font-size: 11px; }
  .help-diagnostics-grid { gap: 5px; padding: 7px; }
  .help-diagnostics-grid > div { padding: 6px 7px; }
  .help-diagnostics-grid dt { font-size: 9px; }
  .help-diagnostics-grid dd { font-size: 10px; }
  .help-submit-actions { gap: 5px; }
  .help-submit-actions button { min-height: 38px; font-size: 12px; }
  .help-request-list, .help-admin-request-list { gap: 8px; margin-top: 9px; }
  .help-request-card, .help-admin-request-card { padding: 9px; border-left-width: 3px; border-radius: 9px; }
  .help-request-card-header h3 { margin-top: 2px; font-size: 13px; }
  .help-request-code, .help-status-badge, .help-request-meta span { font-size: 9px; }
  .help-request-meta { gap: 4px; margin-top: 6px; }
  .help-request-meta span { padding: 3px 5px; }
  .help-request-description, .help-admin-request-copy p, .help-request-benefit p, .help-admin-response p { font-size: 10.5px; line-height: 1.35; }
  .help-request-benefit, .help-admin-response, .help-admin-request-copy { margin-top: 7px; padding: 8px; }
  .help-empty-state { margin-top: 8px; padding: 10px; font-size: 11px; }
  .help-empty-state span { width: 24px; height: 24px; }
  .help-faq-link-card { grid-template-columns: 32px minmax(0,1fr) auto; gap: 8px; }
  .help-faq-link-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
  .help-faq-link-card small { font-size: 8px; }
  .help-faq-link-card strong { font-size: 14px; }
  .help-faq-link-card em { font-size: 9px; line-height: 1.25; }
  .help-faq-link-card > b { font-size: 21px; }
  .tutorial-launch-grid { gap: 7px; margin-top: 8px; }
  .tutorial-launch-card { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "icon content button"; gap: 8px; align-items: center; padding: 8px; border-radius: 9px; }
  .tutorial-launch-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
  .tutorial-launch-card h3 { margin: 0 0 2px; font-size: 12px; }
  .tutorial-launch-card p { display: none; }
  .tutorial-completion-state { margin-top: 2px; font-size: 8px; }
  .tutorial-launch-card > button { width: auto; min-height: 30px; padding: 5px 7px; font-size: 9px; }
  .about-app-heading { gap: 8px; }
  .about-app-logo { width: 42px; height: 42px; }
  .about-app-title h2 { font-size: 17px; }
  .about-app-title p { font-size: 10px; }
  .about-app-meta { gap: 4px; }
  .about-app-meta span { padding: 4px 6px; font-size: 9px; }
  .about-app-author { margin-top: 8px; padding: 7px 8px; }
  .about-app-author span, .about-app-author strong { font-size: 10px; }
  .about-app-details { margin-top: 8px; }
  .about-app-details summary { padding: 8px; font-size: 10px; }
  .week-picker-panel { width: min(330px, calc(100vw - 28px)); padding: 10px; }
  .week-picker-header { padding: 5px; font-size: 15px; }
  .week-picker-header button { padding: 4px 6px; font-size: 15px; }
  .week-picker-header .week-picker-label { font-size: 14px; }
  .week-picker-weeks { gap: 5px; margin-top: 8px; }
  .week-picker-weeks button { padding: 8px; border-radius: 8px; font-size: 11px; }
  .week-picker-weeks small { font-size: 8px; }
  .week-picker-panel .miesiace { gap: 6px; margin-top: 8px; }
  .week-picker-panel .miesiace button { padding: 8px 3px; font-size: 10px; }
}


/* =========================================================
   V2.69 — czytelność, delegacja, gesty i ekran logowania
   ========================================================= */
.calendar-holiday-label {
    color: #a00012;
    font-weight: 900;
}

/* Dzienna wartość nadgodzin ma w ciemnym motywie dokładnie ten sam kolor
   co kafelek sumy nadgodzin. */
html[data-theme="dark"] .summary-overtime-cell.positive,
html[data-theme="dark"] .mobile-month-day > small,
html[data-theme="dark"] .mobile-week-day > small,
html[data-theme="dark"] .stats-mobile-day-meta > span strong:first-child {
    color: #ff9a54 !important;
}

/* Delegacja w weekend/święto zachowuje tło dnia specjalnego, ale jej
   oznaczenie używa konsekwentnie fioletowej palety delegacji. */
.mobile-special-state-mark.delegacja,
.mobile-week-special-badges em.delegacja {
    color: #4c2d91 !important;
    background: #f1eaff !important;
    border-color: #d3c2ef !important;
}

html[data-theme="dark"] .mobile-special-state-mark.delegacja,
html[data-theme="dark"] .mobile-week-special-badges em.delegacja {
    color: #d8c8ff !important;
    background: #2b2143 !important;
    border-color: #5d4b87 !important;
}

.period-swipe-surface {
    touch-action: pan-y pinch-zoom;
}

/* Oba odnośniki pod formularzem logowania mają identyczną geometrię.
   Rejestracja nie jest już czerwonym blokiem konkurującym z przyciskiem logowania. */
.auth-secondary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.auth-secondary-actions .auth-secondary-link {
    display: flex;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    margin: 0;
    padding: 9px 11px;
    color: #424247;
    background: #f7f7f8;
    border: 1px solid #dedee2;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.18;
    text-align: left;
    text-decoration: none;
}

.auth-secondary-actions .auth-secondary-link:hover,
.auth-secondary-actions .auth-secondary-link:focus-visible {
    color: #8d0010;
    background: #fff5f6;
    border-color: #dfaab0;
    text-decoration: none;
}

.auth-secondary-actions .auth-register-link,
.auth-secondary-actions .auth-register-link:hover,
.auth-secondary-actions .auth-register-link:focus-visible {
    color: #8d0010;
    background: #fff5f6;
    border-color: #e5bdc2;
}

.auth-secondary-icon {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    color: #a90012;
    background: #fff;
    border: 1px solid #e3b7bc;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

html[data-theme="dark"] .calendar-holiday-label {
    color: #ff9ba6;
}

html[data-theme="dark"] .auth-secondary-actions .auth-secondary-link,
html[data-theme="dark"] .auth-secondary-actions .auth-register-link {
    color: var(--dark-text);
    background: #242428;
    border-color: #44444a;
}

html[data-theme="dark"] .auth-secondary-actions .auth-secondary-link:hover,
html[data-theme="dark"] .auth-secondary-actions .auth-secondary-link:focus-visible,
html[data-theme="dark"] .auth-secondary-actions .auth-register-link:hover,
html[data-theme="dark"] .auth-secondary-actions .auth-register-link:focus-visible {
    color: #ff9ba6;
    background: #321218;
    border-color: #693039;
}

html[data-theme="dark"] .auth-secondary-icon {
    color: #ff9ba6;
    background: #1f1f22;
    border-color: #603039;
}

@media (max-width: 430px) {
    .auth-secondary-actions {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .auth-secondary-actions .auth-secondary-link {
        min-height: 42px;
        padding: 8px 10px;
        font-size: 11.5px;
    }

    .auth-secondary-icon {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
        font-size: 14px;
    }
}


/* V2.69 — anulowanie pracy/delegacji w weekend lub święto */
.special-day-cancel-wrap {
    margin-top: 10px;
}

.special-day-cancel-wrap[hidden] {
    display: none !important;
}

.special-day-cancel-button {
    display: flex;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #5d4700;
    background: #fff9df;
    border: 1px solid #e8d37b;
    border-radius: 10px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.special-day-cancel-button > span:first-child {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    color: #725700;
    background: #fff;
    border: 1px solid #dfc65e;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 900;
}

.special-day-cancel-button > span:last-child {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.special-day-cancel-button strong {
    font-size: 13px;
    line-height: 1.2;
}

.special-day-cancel-button small {
    color: #776522;
    font-size: 11px;
    line-height: 1.25;
}

.special-day-cancel-button:hover,
.special-day-cancel-button:focus-visible {
    background: #fff4bd;
    border-color: #caa72a;
    outline: none;
}

.special-day-cancel-button:disabled {
    opacity: .6;
    cursor: wait;
}

html[data-theme="dark"] .special-day-cancel-button {
    color: #ffe58c;
    background: #332c16;
    border-color: #655523;
}

html[data-theme="dark"] .special-day-cancel-button > span:first-child {
    color: #ffe58c;
    background: #242014;
    border-color: #6d5a22;
}

html[data-theme="dark"] .special-day-cancel-button small {
    color: #d6c47f;
}

html[data-theme="dark"] .special-day-cancel-button:hover,
html[data-theme="dark"] .special-day-cancel-button:focus-visible {
    background: #403619;
    border-color: #92782b;
}

@media (max-width: 600px) {
    .special-day-cancel-wrap {
        margin-top: 7px;
    }

    .special-day-cancel-button {
        min-height: 43px;
        gap: 8px;
        padding: 7px 9px;
        border-radius: 8px;
    }

    .special-day-cancel-button > span:first-child {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        border-radius: 7px;
        font-size: 16px;
    }

    .special-day-cancel-button strong {
        font-size: 12px;
    }

    .special-day-cancel-button small {
        font-size: 10px;
    }
}


/* =========================================================
   V2.76 — delegacja specjalna, gesty całego ekranu i odświeżanie w tle
   ========================================================= */
@media (max-width: 800px) {
    .mobile-month-day.worked-special-day.special-delegation,
    .mobile-week-day.worked-special-day.special-delegation {
        box-shadow: inset 0 -3px 0 #7650bd !important;
    }

    .mobile-month-day.worked-special-day.special-delegation.is-today,
    .mobile-week-day.worked-special-day.special-delegation.is-today {
        box-shadow: inset 0 -3px 0 #7650bd, inset 0 0 0 1.5px #c90016 !important;
    }

    .mobile-month-day.worked-special-day.special-delegation .mobile-month-day-value,
    .mobile-week-day.worked-special-day.special-delegation .mobile-week-day-content > strong {
        color: #6940ae !important;
    }

    html[data-theme="dark"] .mobile-month-day.worked-special-day.special-delegation,
    html[data-theme="dark"] .mobile-week-day.worked-special-day.special-delegation {
        box-shadow: inset 0 -3px 0 #a98ae7 !important;
    }

    html[data-theme="dark"] .mobile-month-day.worked-special-day.special-delegation.is-today,
    html[data-theme="dark"] .mobile-week-day.worked-special-day.special-delegation.is-today {
        box-shadow: inset 0 -3px 0 #a98ae7, inset 0 0 0 1.5px #c90016 !important;
    }

    html[data-theme="dark"] .mobile-month-day.worked-special-day.special-delegation .mobile-month-day-value,
    html[data-theme="dark"] .mobile-week-day.worked-special-day.special-delegation .mobile-week-day-content > strong {
        color: #d8c8ff !important;
    }
}

#app.period-swipe-surface {
    min-height: calc(100dvh - 150px);
    touch-action: pan-y pinch-zoom;
}

.calendar-period-content {
    transition: opacity .14s ease;
}

.calendar-period-content.is-refreshing {
    opacity: .58;
    pointer-events: none;
}

#picker[aria-busy="true"] .picker-header button {
    opacity: .72;
}


/* V2.76 — aktualizacja z twardym limitem i bez blokowania na Service Workerze */
.app-update-modal .app-update-detail { margin-top: 8px; font-size: .82rem; opacity: .76; }


/* ==========================================
   V2.76 — Pomoc na podstronach, stabilny samouczek i mobilne okna
   ========================================== */
#app:focus,
#app:focus-visible {
  outline: none !important;
}

.help-type-links .help-type-link {
  position: relative;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas: "icon title arrow" "icon copy arrow";
  color: inherit;
  text-decoration: none;
}
.help-type-link .help-type-icon { grid-area: icon; }
.help-type-link strong { grid-area: title; }
.help-type-link small { grid-area: copy; }
.help-type-link > b {
  grid-area: arrow;
  align-self: center;
  color: #c90016;
  font-size: 27px;
  line-height: 1;
}
.help-type-link:hover,
.help-type-link:focus-visible {
  transform: translateY(-1px);
  border-color: #c90016;
  box-shadow: 0 0 0 3px rgba(201, 0, 22, .08);
  outline: none;
}
.help-request-page .help-submit-card { margin-bottom: 0; }
.help-request-page .help-request-form { margin-top: 0; }

/* Popover jest zawsze nad podświetlanym elementem. Duże kontenery nie mogą zasłonić przycisków. */
.tutorial-overlay { z-index: 2147483646; }
.tutorial-highlighted { z-index: 2147483644 !important; }
.tutorial-popover {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}
.tutorial-actions {
  position: sticky;
  z-index: 2;
  bottom: -18px;
  padding: 11px 0 4px;
  background: inherit;
}

html[data-theme="dark"] .help-type-link > b { color: #ff8492; }

@media (max-width: 760px) {
  .help-type-links .help-type-link {
    grid-template-columns: 27px minmax(0, 1fr) auto;
    grid-template-areas: "icon title arrow" "icon copy arrow";
  }
  .help-type-link > b { font-size: 19px; }
  .help-request-page .day-editor-topbar { margin-bottom: 7px; }
  .help-request-page .help-request-intro { padding: 10px; }
  .tutorial-popover {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(48dvh, 390px);
    padding: 13px;
  }
  .tutorial-popover-top { font-size: 10px; }
  .tutorial-progress { margin: 9px 0 7px; }
  .tutorial-step-count { font-size: 10px; }
  .tutorial-popover h2 { margin: 3px 0 5px; font-size: 17px; line-height: 1.18; }
  .tutorial-popover p { font-size: 12px; line-height: 1.35; }
  .tutorial-actions { margin-top: 9px; bottom: -13px; padding-top: 8px; }
  .tutorial-actions button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
}

@media (max-height: 600px) {
  .tutorial-popover { max-height: calc(100dvh - 16px); }
}


/* =========================================================
   V2.76 — LOGO, SZYBKA ZMIANA, REFLEKTOR SAMOUCZKA I POMOC
   ========================================================= */
.help-tutorial-card,
.help-admin-card {
  border-top: 0;
}

/* Samouczek: tylko otoczenie wskazanego elementu jest rozmyte. */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}
.tutorial-backdrop { display: none !important; }
.tutorial-shade {
  position: absolute;
  z-index: 1;
  background: rgba(12, 16, 22, .68);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}
.tutorial-focus-shield {
  position: absolute;
  z-index: 1;
  background: transparent;
  pointer-events: auto;
}
.tutorial-focus-ring {
  position: absolute;
  z-index: 2;
  border: 3px solid #ffdd00;
  border-radius: 13px;
  box-shadow: 0 0 0 5px rgba(255, 221, 0, .18), 0 12px 34px rgba(0,0,0,.3);
  pointer-events: none;
}
.tutorial-popover { z-index: 3; }
.tutorial-highlighted {
  position: relative !important;
  z-index: auto !important;
  outline: none !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .tutorial-focus-ring {
    border-width: 2px;
    border-radius: 10px;
    box-shadow: 0 0 0 4px rgba(255, 221, 0, .18), 0 10px 28px rgba(0,0,0,.28);
  }
}


/* =========================================================
   V2.79 — DOKŁADNY SAMOUCZEK, PIERWSZE URUCHOMIENIE I CO NOWEGO
   ========================================================= */
.tutorial-launch-card,
html[data-theme="dark"] .tutorial-launch-card {
  border-color: var(--card-border, #dfe2e6);
}
.tutorial-launch-card.admin { background: inherit; border-color: inherit; }
.tutorial-update-notes { margin-top: 12px; border: 1px solid #e1e4e8; border-radius: 12px; padding: 0 12px; }
.tutorial-update-notes summary { cursor: pointer; padding: 11px 0; font-weight: 850; }
.tutorial-update-notes ul, .whats-new-dialog ul { margin: 0 0 12px; padding-left: 20px; }
.tutorial-update-notes li, .whats-new-dialog li { margin: 5px 0; line-height: 1.42; }
.tutorial-shade {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(9, 12, 17, .69);
}
.tutorial-focus-ring { box-sizing: border-box; }
.tutorial-popover { transition: top .12s ease, bottom .12s ease; }
.whats-new-dialog { width: min(520px, calc(100vw - 28px)); }
.whats-new-dialog h2 { margin: 5px 0 10px; }
html[data-theme="dark"] .tutorial-update-notes { border-color: #3a3f47; }
@media (max-width: 760px) {
  .tutorial-popover {
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: auto !important;
    max-height: min(46dvh, 360px);
  }
}


/* =========================================================
   V2.79 — pobyt w delegacji bez pracy
   ========================================================= */
.day-status-grid .delegation-stay-option {
  grid-column: 1 / -1;
  color: #4c2d91;
  background: #f6f1ff;
  border-color: #c8b7ee;
  justify-content: center;
}
.day-status-grid .delegation-stay-option input { accent-color: #7650c8; }
.day-status-grid .delegation-stay-option:has(input:checked) {
  color: #3f207f;
  background: #e7dafd;
  border-color: #7650c8;
}
#day-client-field[hidden] { display: none !important; }
html[data-theme="dark"] .day-status-grid .delegation-stay-option {
  color: #e4d7ff;
  background: #302543;
  border-color: #735ca0;
}
html[data-theme="dark"] .day-status-grid .delegation-stay-option:has(input:checked) {
  color: #fff;
  background: #4a3768;
  border-color: #b99ae9;
}
@media (max-width: 800px) {
  .mobile-month-day.special-delegation,
  .mobile-week-day.special-delegation {
    box-shadow: inset 0 -3px 0 #7650bd !important;
  }
  .mobile-month-day.special-delegation.is-today,
  .mobile-week-day.special-delegation.is-today {
    box-shadow: inset 0 -3px 0 #7650bd, inset 0 0 0 1.5px #c90016 !important;
  }
  html[data-theme="dark"] .mobile-month-day.special-delegation,
  html[data-theme="dark"] .mobile-week-day.special-delegation {
    box-shadow: inset 0 -3px 0 #a98ae7 !important;
  }
  html[data-theme="dark"] .mobile-month-day.special-delegation.is-today,
  html[data-theme="dark"] .mobile-week-day.special-delegation.is-today {
    box-shadow: inset 0 -3px 0 #a98ae7, inset 0 0 0 1.5px #c90016 !important;
  }
}


/* =========================================================
   V2.80 — jednakowa paleta zwykłej delegacji i delegacji bez pracy
   ========================================================= */
.day-status-grid .delegation-stay-option,
.day-status-grid .delegation-stay-option:has(input:checked) {
  color: #4c2d91;
  background: #f1eaff;
  border-color: #c8b7ee;
}
.day-status-grid .delegation-stay-option input {
  accent-color: #7650c8;
}
html[data-theme="dark"] .day-status-grid .delegation-stay-option,
html[data-theme="dark"] .day-status-grid .delegation-stay-option:has(input:checked) {
  color: #d8c8ff;
  background: #2b2143;
  border-color: #5d4b87;
}


/* =========================================================
   V2.81 — czytelne oznaczenie delegacji bez pracy w tabeli
   ========================================================= */
.calendar-summary-table .summary-day-row.has-delegation-stay > td:first-child {
  box-shadow: inset 5px 0 0 #7650c8;
}
.calendar-summary-table .summary-day-row.has-delegation-stay .summary-day-link,
.calendar-summary-table .summary-day-row.has-delegation-stay .summary-weekday-cell {
  color: #5a37a5;
}
.calendar-delegation-stay-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  color: #542f9b;
  background: #f1eaff;
  border: 1px solid #bda7e8;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-delegation-stay > td:first-child {
  box-shadow: inset 5px 0 0 #a98ae7;
}
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-delegation-stay .summary-day-link,
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-delegation-stay .summary-weekday-cell {
  color: #cbb9ff;
}
html[data-theme="dark"] .calendar-delegation-stay-label {
  color: #dccfff;
  background: #2b2143;
  border-color: #725ba5;
}


/* =========================================================
   V2.83 — delegacja zachowuje tło weekendu lub święta
   ========================================================= */
.calendar-summary-table .summary-day-row.has-worked-delegation > td:first-child {
  box-shadow: inset 5px 0 0 #7650c8;
}
.calendar-summary-table .summary-day-row.has-worked-delegation .summary-day-link,
.calendar-summary-table .summary-day-row.has-worked-delegation .summary-weekday-cell,
.calendar-summary-table .summary-day-row.has-worked-delegation .summary-hours-cell strong,
.calendar-summary-table .summary-day-row.has-worked-delegation .summary-overtime-cell {
  color: #5a37a5 !important;
  font-weight: 900;
}
.calendar-special-delegation-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.calendar-special-prefix-label {
  font-weight: 900;
}
.calendar-delegation-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  color: #542f9b;
  background: #f1eaff;
  border: 1px solid #bda7e8;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.calendar-note-separator {
  padding: 0 2px;
}
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-worked-delegation > td:first-child {
  box-shadow: inset 5px 0 0 #a98ae7;
}
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-worked-delegation .summary-day-link,
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-worked-delegation .summary-weekday-cell,
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-worked-delegation .summary-hours-cell strong,
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-worked-delegation .summary-overtime-cell {
  color: #d8c8ff !important;
}
html[data-theme="dark"] .calendar-delegation-label {
  color: #dccfff;
  background: #2b2143;
  border-color: #725ba5;
}


/* =========================================================
   V2.85 — standardowy kolor nadgodzin w delegacji specjalnej
   ========================================================= */
.calendar-summary-table .summary-day-row.has-worked-delegation .summary-overtime-cell.positive {
  color: #c90016 !important;
  font-weight: 700;
}
html[data-theme="dark"] .calendar-summary-table .summary-day-row.has-worked-delegation .summary-overtime-cell.positive {
  color: #ff9a54 !important;
}

/* =========================================================
   V2.85 — narzędzia kalendarza, filtry, powiadomienia i diagnostyka
   ========================================================= */
.header-notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  color: inherit;
  text-decoration: none;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 10px;
  font-size: 20px;
}
.header-notification-button b,
.nav-tile-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #20242b;
  border: 2px solid #c90016;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}
.notifications-nav-tile { position: relative; }
.notifications-page { max-width: 980px; margin-inline: auto; }
.notifications-list { display: grid; gap: 10px; margin-top: 16px; }
.notification-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
}
.notification-card.is-unread { border-left: 5px solid #c90016; background: #fff8f9; }
.notification-card.is-read { opacity: .78; }
.notification-card.local { border-left-color: #7650c8; }
.notification-card-icon { display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:10px; background:#f0f1f3; font-size:20px; }
.notification-card-copy > div { display:flex; gap:10px; justify-content:space-between; align-items:flex-start; }
.notification-card-copy strong { font-size:15px; }
.notification-card-copy time { color:#777; font-size:11px; white-space:nowrap; }
.notification-card-copy p { margin:6px 0 8px; line-height:1.45; }
.notification-card-copy a { color:#a80012; font-weight:800; text-decoration:none; }
.notification-read-button { align-self:center; color:#555; background:#f0f1f3; border:1px solid #d5d7db; }
.notifications-empty { padding:28px; text-align:center; color:#777; }

.calendar-tools { margin: 12px 0; }
.calendar-tools-primary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.calendar-tool-button {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:58px;
  padding:10px 12px;
  text-align:left;
  color:#333;
  background:#f7f7f8;
  border:1px solid #dadce0;
  border-radius:11px;
}
.calendar-tool-button > span:first-child { flex:0 0 30px; font-size:22px; text-align:center; }
.calendar-tool-button > span:last-child { min-width:0; display:grid; gap:2px; }
.calendar-tool-button strong { font-size:13px; }
.calendar-tool-button small { overflow:hidden; color:#6b6e75; font-size:10px; white-space:nowrap; text-overflow:ellipsis; }
.calendar-tool-button:hover, .calendar-tool-button.is-active { border-color:#c90016; background:#fff3f5; }
.calendar-tool-button.delegation { color:#4f3094; }
.calendar-bulk-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  padding:10px 12px;
  color:#fff;
  background:#252933;
  border-radius:11px;
}
.calendar-bulk-bar > div { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.calendar-tools-dialog { width:min(600px,calc(100vw - 24px)); max-height:min(88vh,760px); }
.calendar-tools-dialog form { max-height:inherit; overflow:auto; }
.calendar-tools-dialog label { display:grid; gap:5px; margin:10px 0; font-weight:700; }
.calendar-tools-dialog input:not([type="checkbox"]), .calendar-tools-dialog select, .calendar-tools-dialog textarea { width:100%; box-sizing:border-box; }
.calendar-filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.calendar-filter-grid label { display:flex; align-items:center; gap:8px; margin:0; padding:10px; background:#f6f6f7; border:1px solid #dedfe2; border-radius:9px; }
.calendar-range-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.dialog-note { padding:9px 11px; color:#555; background:#f5f5f6; border-radius:8px; font-size:12px; line-height:1.4; }
.calendar-legend-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.calendar-legend-list > div { display:flex; align-items:center; gap:10px; padding:9px; border:1px solid #e0e0e0; border-radius:9px; }
.calendar-legend-list span { display:grid; gap:2px; }
.calendar-legend-list small { color:#777; }
.legend-swatch { width:28px; height:28px; flex:0 0 28px; border-radius:8px; border:1px solid rgba(0,0,0,.18); }
.legend-swatch.work { background:#f4f4f5; }
.legend-swatch.delegation { background:#7650c8; }
.legend-swatch.delegation-stay { background:linear-gradient(90deg,#7650c8 0 5px,#f1eaff 5px); }
.legend-swatch.leave { background:#daf3df; }
.legend-swatch.free { background:#eee4ad; }
.legend-swatch.weekend { background:#eee4ad; }
.legend-swatch.holiday { background:#ffd0d0; }
.legend-swatch.overtime { background:#ff9a54; }
.legend-swatch.missing { background:repeating-linear-gradient(135deg,#fff 0 5px,#f1b8bf 5px 10px); }
.legend-swatch.pending { background:linear-gradient(135deg,#2e89c7 0 50%,#fff 50%); }

.calendar-bulk-select-head,
.calendar-bulk-select-cell { display:none; width:38px; min-width:38px; padding:4px !important; }
.calendar-bulk-mode .calendar-bulk-select-head,
.calendar-bulk-mode .calendar-bulk-select-cell { display:table-cell; }
.calendar-bulk-select-cell button,
.mobile-bulk-select {
  width:27px;
  height:27px;
  min-width:27px;
  padding:0;
  color:#fff;
  background:transparent;
  border:2px solid #92959d;
  border-radius:8px;
}
.calendar-bulk-select-cell button[aria-pressed="true"],
.mobile-bulk-select[aria-pressed="true"] { background:#c90016; border-color:#c90016; }
.mobile-bulk-select { display:none; position:absolute; z-index:4; top:5px; right:5px; }
.calendar-bulk-mode .mobile-bulk-select { display:flex; align-items:center; justify-content:center; }
.calendar-bulk-mode [data-calendar-date] { cursor:pointer; }
[data-calendar-date].is-bulk-selected { outline:3px solid #c90016; outline-offset:-3px; }
.calendar-desktop-summary .calendar-filtered-out,
.mobile-week-calendar .calendar-filtered-out { display:none !important; }
.mobile-month-calendar .calendar-filtered-out { opacity:.22; filter:grayscale(1); }
.mobile-month-calendar .calendar-filtered-out .mobile-month-day-client,
.mobile-month-calendar .calendar-filtered-out .mobile-month-day-value,
.mobile-month-calendar .calendar-filtered-out small,
.mobile-month-calendar .calendar-filtered-out .mobile-special-state-mark { visibility:hidden; }
.has-pending-sync { position:relative; }
.has-pending-sync::after { content:""; position:absolute; right:4px; bottom:4px; width:8px; height:8px; background:#2e89c7; border:2px solid #fff; border-radius:50%; }
.calendar-summary-table .summary-day-row.has-delegation-stay > .summary-date-cell,
.calendar-summary-table .summary-day-row.has-worked-delegation > .summary-date-cell { box-shadow:inset 5px 0 0 #7650c8; }

.stats-filter-bar { display:flex; gap:9px; align-items:stretch; justify-content:flex-end; margin:10px 0; }
.stats-filter-bar .calendar-tool-button { width:min(330px,100%); }

.app-diagnostics-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.deployment-test-results { margin-top:12px; padding:12px; background:#f5f6f7; border:1px solid #ddd; border-radius:10px; }
.deployment-test-results ul { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.deployment-test-results li { display:flex; justify-content:space-between; gap:10px; padding:8px; background:#fff; border-radius:7px; }
.deployment-test-results li.ok strong { color:#17723b; }
.deployment-test-results li.error strong { color:#b00016; }
.deployment-test-results span { color:#666; font-size:11px; text-align:right; }
.boot-rollback-error { color:#b00016; font-weight:700; }

html[data-theme="dark"] .notification-card { color:#eee; background:#1d1e21; border-color:#3b3d43; }
html[data-theme="dark"] .notification-card.is-unread { background:#281c20; }
html[data-theme="dark"] .notification-card-icon,
html[data-theme="dark"] .notification-read-button { color:#ddd; background:#303238; border-color:#4a4d55; }
html[data-theme="dark"] .notification-card-copy time,
html[data-theme="dark"] .notification-card-copy p,
html[data-theme="dark"] .notifications-empty { color:#b9bbc1; }
html[data-theme="dark"] .notification-card-copy a { color:#ff8fa0; }
html[data-theme="dark"] .calendar-tool-button { color:#eee; background:#202125; border-color:#3c3e45; }
html[data-theme="dark"] .calendar-tool-button small { color:#aeb0b7; }
html[data-theme="dark"] .calendar-tool-button:hover,
html[data-theme="dark"] .calendar-tool-button.is-active { background:#351d23; border-color:#e03249; }
html[data-theme="dark"] .calendar-filter-grid label,
html[data-theme="dark"] .dialog-note,
html[data-theme="dark"] .deployment-test-results { color:#ddd; background:#25262a; border-color:#3e4047; }
html[data-theme="dark"] .calendar-legend-list > div { border-color:#3e4047; }
html[data-theme="dark"] .calendar-legend-list small { color:#aaaeb6; }
html[data-theme="dark"] .deployment-test-results li { background:#1b1c20; }
html[data-theme="dark"] .legend-swatch.work { background:#222328; }

@media (max-width: 700px) {
  .header-notification-button { width:38px; min-width:38px; height:38px; }
  .calendar-tools-primary { grid-template-columns:1fr 1fr; gap:6px; }
  .calendar-tool-button { min-height:50px; padding:7px 8px; gap:6px; }
  .calendar-tool-button > span:first-child { flex-basis:25px; font-size:18px; }
  .calendar-tool-button strong { font-size:12px; }
  .calendar-tool-button small { font-size:9px; }
  .calendar-bulk-bar { align-items:flex-start; flex-direction:column; }
  .calendar-bulk-bar > div { width:100%; justify-content:stretch; }
  .calendar-bulk-bar button { flex:1 1 auto; padding:7px 8px; font-size:11px; }
  .calendar-filter-grid,
  .calendar-legend-list { grid-template-columns:1fr; }
  .calendar-range-grid { grid-template-columns:1fr 1fr; }
  .notification-card { grid-template-columns:36px minmax(0,1fr); padding:10px; gap:8px; }
  .notification-card-icon { width:34px; height:34px; }
  .notification-read-button { grid-column:2; justify-self:start; padding:6px 9px; font-size:10px; }
  .notification-card-copy > div { display:grid; gap:2px; }
  .notification-card-copy time { white-space:normal; }
  .app-diagnostics-actions > button { flex:1 1 calc(50% - 8px); }
  .deployment-test-results li { display:grid; }
  .deployment-test-results span { text-align:left; }
  .stats-filter-bar { justify-content:stretch; }
  .stats-filter-bar .calendar-tool-button { width:100%; }
}


/* =========================================================
   V2.86 — kompaktowy dzwonek obok nazwy użytkownika
   ========================================================= */
.header-user-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.header-user-summary .header-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  header#app-header .header-user-summary {
    grid-row: 2;
    grid-column: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 5px;
    padding-left: 1px;
  }
  header#app-header .header-user-summary .header-user-name {
    grid-row: auto;
    grid-column: auto;
    flex: 1 1 auto;
    max-width: none;
    padding-left: 0;
  }
  header#app-header .header-user-summary .header-notification-button {
    flex: 0 0 29px;
    width: 29px;
    min-width: 29px;
    height: 29px;
    border-radius: 8px;
    font-size: 15px;
  }
  header#app-header .header-user-summary .header-notification-button b {
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding-inline: 3px;
    font-size: 9px;
  }
}
