[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: 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;
}
@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;
    }
}

/* 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-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%;
    }
}
