/* Import czcionek Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

body {
    background-color: #f8f9fa;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Style dla nagłówków */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Specjalne style dla głównego nagłówka */
.page-header h1 {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.8rem;
    margin: 0;
}

.page-header {
    background-color: #000000;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 0 0 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.calendar-table {
    font-size: 0.9rem;
    table-layout: fixed;
    min-width: 800px; /* Minimalna szerokość tabeli */
}

.calendar-table .calendar-hour,
.calendar-table th:first-child,
.calendar-table td:first-child {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    box-sizing: border-box;
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: top;
    background-color: #f8f9fa;
    font-variant-numeric: tabular-nums;
}

.calendar-table th.calendar-hour,
.calendar-table thead th:first-child {
    white-space: normal;
    line-height: 1.15;
    font-size: 0.7rem;
    vertical-align: middle;
}

.calendar-table th:not(:first-child),
.calendar-table td:not(:first-child) {
    width: calc((100% - 52px) / 7);
}

.calendar-desktop .calendar-table {
    min-width: 800px;
}

.calendar-mobile {
    display: none;
}

/* Responsywność na urządzeniach mobilnych */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.2rem;
    }
    
    /* Responsywność menu w nagłówku */
    .page-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .page-header .d-flex > div:last-child {
        margin-top: 15px;
        width: 100%;
    }
    
    .page-header .d-flex > div:last-child .btn {
        margin-top: 5px;
        margin-right: 0;
        margin-bottom: 0;
        width: 100%;
        display: block;
    }
    
    .week-navigation h4 {
      padding: 15px 0;
    }

    .calendar-desktop .calendar-table th:first-child,
    .calendar-desktop .calendar-table td:first-child,
    .calendar-desktop .calendar-table .calendar-hour {
        width: 52px;
        min-width: 52px;
        max-width: 52px;
    }
    
    .calendar-desktop .calendar-table th:not(:first-child),
    .calendar-desktop .calendar-table td:not(:first-child) {
        width: calc((100% - 52px) / 7);
    }
    
    .calendar-desktop {
        display: none;
    }

    .calendar-mobile {
        display: block;
    }

    .calendar-desktop .calendar-table {
        font-size: 0.8rem;
        min-width: 600px;
    }
    
    .calendar-desktop .sala-bar {
        height: 40px !important; /* 2 linie tekstu */
        font-size: 0.6rem;
    }

    .calendar-desktop .sala-bar.reserved.shared,
    .calendar-desktop .sala-bar.reserved.exclusive,
    .calendar-desktop .sala-bar.reserved.full {
        height: auto !important;
        min-height: 40px !important;
    }
    
    /* Specjalne style dla strony dzieci.php - wyższe paski (tablet) */
    .dzieci-page .sala-bar {
        height: 100px !important; /* 5 linii tekstu */
    }
    
    .dzieci-page .sala-bar.reserved {
        min-height: 100px !important;
    }
    
    .calendar-desktop .sala-bar.reserved {
        font-size: 0.6rem;
        padding: 3px;
        min-height: 40px !important;
    }
    
    .sala-bar .btn-danger {
        padding: 0 2px;
        font-size: 0.5rem;
    }
    
    /* Responsywność dla formularza */
    .reservation-form .col-md-2 {
        margin-bottom: 10px;
    }
    
    #powtorz_tygodnie {
        min-width: 60px;
    }
    
    /* Responsywność dla przycisków w tabeli */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        margin-top: 5px;
        width: 100%;
        display: block;
    }
    
    .btn-warning {
        margin-top: 5px;
        width: 100%;
    }
    
    /* Responsywność dla przycisków akcji w tabelach */
    .table td .btn {
        margin-top: 5px;
        width: 100%;
        display: block;
    }
    
    .table td .btn:first-child {
        margin-top: 0;
    }
    
    /* Responsywność dla formularzy w tabelach */
    .table td form {
        display: block;
        width: 100%;
    }
    
    .table td form .btn {
        width: 100%;
        margin-top: 5px;
    }
}

/* Dodatkowa responsywność dla bardzo małych ekranów (telefony) */
@media (max-width: 576px) {
    .page-header {
        padding: 15px 0;
    }
    
    .page-header h1 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .page-header .d-flex > div:last-child {
        margin-top: 10px;
    }
    
    .page-header .d-flex > div:last-child .btn {
        font-size: 0.8rem;
        padding: 8px 12px;
        margin-top: 3px;
    }
    
    .week-navigation {
        padding: 10px;
    }
    
    .week-navigation h4 {
        font-size: 1rem;
        padding: 10px 0;
    }
    
    .week-navigation .btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .calendar-desktop .calendar-table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    
    .calendar-desktop .sala-bar {
        height: 35px !important; /* 2 linie tekstu */
        font-size: 0.5rem;
    }

    .calendar-desktop .sala-bar.reserved.shared,
    .calendar-desktop .sala-bar.reserved.exclusive,
    .calendar-desktop .sala-bar.reserved.full {
        height: auto !important;
        min-height: 35px !important;
    }
    
    /* Specjalne style dla strony dzieci.php - wyższe paski (telefon) */
    .dzieci-page .sala-bar {
        height: 85px !important; /* 5 linii tekstu */
    }
    
    .dzieci-page .sala-bar.reserved {
        min-height: 85px !important;
    }
    
    .calendar-desktop .sala-bar.reserved {
        font-size: 0.5rem;
        padding: 2px;
        min-height: 35px !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

.calendar-table th {
    background-color: #f8f9fa;
}

.calendar-table thead {
    background-color: #f8f9fa;
}



.calendar-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.time-slot {
    height: auto;
    min-height: 90px;
    border: 1px solid #dee2e6;
    position: relative;
    padding: 3px;
    background-color: #ffffff;
    vertical-align: top;
}

.sala-bar {
    height: 25px;
    border-radius: 3px;
    margin-bottom: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Specjalne style dla strony dzieci.php - wyższe paski (desktop) */
.dzieci-page .sala-bar {
    height: 50px;
}

.dzieci-page .sala-bar.reserved {
    min-height: 50px;
}

.dzieci-page .class-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}

.dzieci-page .class-name-text {
    min-width: 0;
}

.dzieci-page .class-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #212529 !important;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    text-shadow: none;
}

.sala-bar:hover {
    opacity: 0.8;
}

.sala-bar.aerial {
    background-color: #4BBEC6;
}

.sala-bar.pole {
    background-color: #FBC22D;
}

.sala-bar.fitness {
    background-color: #774DFB;
}

.sala-bar.zlota {
    background-color: #FFD700;
}

.sala-bar.mala {
    background-color: #D696B8;
}

.sala-bar.empty {
    width: 100%;
    opacity: 0.6;
    border: 1px dashed rgba(0,0,0,0.3);
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.1) 2px,
        rgba(0,0,0,0.1) 4px
    );
}

.sala-bar.reserved {
    width: 100%;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px;
    text-align: left;
    line-height: 1.1;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    background-image: none !important;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    position: relative;
    min-height: 25px;
    height: auto;
}

.sala-bar.reserved.shared,
.sala-bar.reserved.exclusive,
.sala-bar.reserved.full {
    cursor: default;
}

.sala-bar.reserved.shared {
    cursor: pointer;
}

.sala-bar.reserved.exclusive {
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.sala-bar-names {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.sala-bar-names span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.occupancy-badge {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    text-shadow: none;
}

.sala-bar.reserved:hover {
    opacity: 0.9;
}

.sala-bar.reserved span {
    color: white;
    font-weight: bold;
}

.sala-bar.group-class {
    width: 100%;
    color: #000000;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    font-style: normal;
    padding: 5px;
    text-align: center;
    line-height: 1.2;
    background-image: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.sala-bar.group-class i {
    margin-right: 5px;
    font-size: 0.8rem;
}

.sala-bar.group-class span {
    margin-left: 0;
}

.sala-bar .btn-danger {
    padding: 0 3px;
    font-size: 0.6rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.week-navigation {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.reservation-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

#sala-field,
#nazwa-field {
    scroll-margin-top: 16px;
}

/* Przycisk Dodaj rezerwację - czarny */
.reservation-form .btn-primary {
    background-color: #000000;
    border-color: #000000;
    color: white;
}

.reservation-form .btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
    color: white;
}

.form-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
}

.form-toggle:hover {
    opacity: 0.85;
}

.form-toggle-hint {
    display: block;
    margin-top: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #6c757d;
}

.form-toggle-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.form-toggle[aria-expanded="true"] .form-toggle-chevron {
    transform: rotate(180deg);
}

.sala-bar-room,
.sala-bar-empty-label,
.sala-bar-instr {
    display: none;
}

.calendar-day-tabs-wrap {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1030;
    margin: 0 0 14px;
    padding: 8px 0;
    background: #f8f9fa;
    box-sizing: border-box;
}

.calendar-day-tabs-wrap.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.calendar-day-tabs-placeholder {
    display: none;
}

.calendar-day-tabs-placeholder.is-active {
    display: block;
}

.calendar-day-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    box-sizing: border-box;
}

.calendar-day-tabs a {
    flex: 1 0 auto;
    min-width: 2.8em;
    padding: 8px 6px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
}

.calendar-day-tabs a:hover,
.calendar-day-tabs a:focus {
    border-color: #000;
    color: #000;
}

.calendar-day-tabs a.is-active {
    background: #212529;
    border-color: #212529;
    color: #fff;
}

.calendar-day-tabs a.is-active:hover,
.calendar-day-tabs a.is-active:focus {
    color: #fff;
    border-color: #000;
}

.calendar-mobile-days {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calendar-day-block {
    scroll-margin-top: 64px;
}

.calendar-day-title {
    margin: 0 0 10px;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.calendar-day-title small {
    display: inline-block;
    margin-left: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #6c757d;
}

.calendar-table-mobile {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed !important;
    font-size: 0.9rem;
}

.calendar-table-mobile .calendar-hour,
.calendar-table-mobile td:first-child {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    box-sizing: border-box;
    padding: 10px 2px 4px;
    text-align: center;
    font-weight: 700;
    background: #f8f9fa;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.calendar-table-mobile td:not(:first-child),
.calendar-table-mobile .time-slot {
    width: auto;
}

.calendar-table-mobile .time-slot {
    min-height: 0;
    height: auto;
}

@media (max-width: 768px) {
    .calendar-desktop {
        display: none !important;
    }

    .calendar-mobile {
        display: block !important;
        overflow: visible !important;
    }

    .calendar-day-tabs-wrap {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .calendar-mobile .sala-bar {
        height: auto !important;
        min-height: 36px;
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .calendar-mobile .sala-bar.empty {
        min-height: 32px;
        height: auto !important;
        display: flex;
        align-items: center;
        padding: 4px 8px;
        opacity: 0.85;
    }

    .calendar-mobile .sala-bar.reserved,
    .calendar-mobile .sala-bar.group-class {
        height: auto !important;
        min-height: 44px;
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 8px;
        font-size: 0.85rem;
        line-height: 1.3;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .calendar-mobile .sala-bar.group-class {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        text-align: left;
    }

    .calendar-mobile .sala-bar-room,
    .calendar-mobile .sala-bar-empty-label {
        display: block;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        opacity: 0.9;
        width: 100%;
        margin-bottom: 2px;
    }

    .calendar-mobile .sala-bar-empty-label {
        color: #212529;
        text-shadow: none;
        font-family: 'Montserrat', sans-serif;
        margin-bottom: 0;
    }

    .calendar-mobile .sala-bar-names {
        width: 100%;
    }

    .calendar-mobile .sala-bar-names span {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .calendar-mobile .occupancy-badge {
        font-size: 0.75rem;
        padding: 2px 7px;
    }

    .dzieci-page .calendar-mobile .sala-bar,
    .dzieci-page .calendar-mobile .sala-bar.reserved {
        height: auto !important;
        min-height: 44px !important;
    }

    .dzieci-page .calendar-mobile .sala-bar.empty {
        height: auto !important;
        min-height: 32px !important;
    }

    .dzieci-page .calendar-mobile .sala-bar.reserved {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-mobile .sala-bar-instr {
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        opacity: 0.95;
        margin-top: 2px;
    }

    .calendar-mobile .class-name-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .calendar-mobile .class-name-text {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-word;
        flex: 1 1 auto;
    }

    .calendar-mobile .attendance-count-view {
        width: 100%;
        margin-top: 4px;
    }
}

footer {
    border-top: 3px solid #007bff;
}

footer a {
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

footer a:hover {
    background-color: #ffffff;
    color: #000000 !important;
    transform: translateY(-2px);
}

/* Style dla legendy sal */
.legend-row {
    display: flex;
    justify-content: flex-end;
}

.legend-container {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.legend-colors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.legend-color {
    width: 20px;
    height: 16px;
    margin-right: 8px;
    border-radius: 3px;
}

/* Kolory dla legendy sal */
.legend-color.aerial {
    background-color: #4BBEC6;
}

.legend-color.pole {
    background-color: #FBC22D;
}

.legend-color.fitness {
    background-color: #774DFB;
}

.legend-color.zlota {
    background-color: #FFD700;
}

.legend-color.mala {
    background-color: #D696B8;
}

/* Responsywność dla legendy */
@media (max-width: 768px) {
    .legend-row,
    .mb-3.d-flex.justify-content-end:has(.legend-container) {
        display: block !important;
    }

    .legend-container {
        width: 100%;
        padding: 6px 8px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
    }
    
    .legend-colors {
        flex: 1 1 auto;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 4px 8px;
    }
    
    .legend-item {
        margin: 0;
        flex-shrink: 1;
        min-width: 0;
    }

    .legend-item span {
        font-size: 0.7rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    .legend-color {
        width: 10px;
        height: 10px;
        margin-right: 4px;
        flex-shrink: 0;
    }
}

/* Style dla responsywnej tabeli */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Płynny scroll na iOS */
}

/* Style dla kalendarza */
.table-responsive .calendar-table {
    margin-top: 0;
}

/* Lepszy scroll na urządzeniach mobilnych */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Ukryj scrollbar na niektórych przeglądarkach mobilnych */
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* Style dla tabeli usuniętych rezerwacji */
.table-secondary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.table-secondary thead th {
    background-color: #6c757d;
    color: white;
    border-color: #495057;
}

.table-secondary tbody tr:hover {
    background-color: #e9ecef;
}

/* Ikona usunięcia w tabeli */
.text-danger .fas.fa-calendar-times {
    color: #dc3545;
    margin-right: 5px;
}

/* Nagłówek tabeli usuniętych rezerwacji */
h4 .fas.fa-trash-alt.text-muted {
    color: #6c757d !important;
    margin-right: 8px;
}

/* Responsywność dla tabeli usuniętych rezerwacji */
@media (max-width: 768px) {
    .table-secondary {
        font-size: 0.85rem;
    }
    
    .table-secondary th,
    .table-secondary td {
        padding: 0.5rem 0.25rem;
    }
}

/* Style dla komórek sal w tabelach */
.sala-cell {
    padding: 4px !important;
    text-align: left;
    vertical-align: middle;
}

.sala-badge {
    display: inline-block;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    white-space: nowrap;
    min-width: 60px;
}

/* Responsywność dla komórek sal */
@media (max-width: 768px) {
    .sala-cell {
        padding: 2px !important;
    }
    
    .sala-badge {
        padding: 4px 8px !important;
        font-size: 0.8rem;
        min-width: 50px;
    }
}

/* Strona logowania */
.login-page {
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 400px;
    width: 100%;
}

.login-page .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-page .logo img {
    height: 80px;
    width: auto;
}

.login-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.login-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.login-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.login-input {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
}

.login-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

.login-checkbox-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.btn-login {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-top: 1rem;
}

.btn-login:hover {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-login-wp {
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    margin-top: 0.75rem;
}

.login-footer {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.login-page .alert {
    border-radius: 10px;
    border: none;
}

/* Style dla przełącznika widoku kalendarza */
.view-toggle {
    margin-bottom: 0;
}

.view-toggle .btn-group .btn {
    font-size: 0.9rem;
    padding: 8px 16px;
    font-weight: 500;
}

/* Naprawienie btn-group - Bootstrap domyślnie usuwa border-radius z środkowych przycisków */
.view-toggle .btn-group .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.view-toggle .btn-group .btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

.view-toggle .btn-check:checked + .btn {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Style dla badge-ów z liczbą obecności */
.attendance-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
}

.attendance-badges .badge {
    font-size: 0.9rem;
    padding: 6px 6px;
    border-radius: 16px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    line-height: 1.2;
}

.attendance-badges .badge.bg-success {
    background-color: #198754 !important;
    color: white;
}

.attendance-badges .badge.bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

/* Style dla widoków kalendarza */
.class-details-view {
    display: block;
}

.attendance-count-view {
    display: none;
}

/* Responsywność dla przełącznika */
@media (max-width: 768px) {
    .view-toggle .btn-group .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .attendance-badges { 
      gap: 0;
    }

    .attendance-badges .badge {
        font-size: 0.8rem;
        padding: 4px 4px;
        min-width: 28px;
    }
}

/* Publiczna umowa elektroniczna */
.umowa-page {
    background: #e9ecef;
    min-height: 100vh;
    padding: 24px 12px 48px;
}

.umowa-arkusz {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    padding: 32px 28px 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.umowa-naglowek {
    text-align: center;
    margin-bottom: 28px;
    border-bottom: 2px solid #000;
    padding-bottom: 16px;
}

.umowa-logo {
    height: 64px;
    width: auto;
    margin-bottom: 8px;
}

.umowa-naglowek h1 {
    font-size: 1.35rem;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.35;
}

.umowa-rok {
    font-weight: 600;
    margin: 8px 0 0;
}

.umowa-paragraf {
    margin-top: 1.5rem;
}

.umowa-paragraf h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.umowa-paragraf ol {
    padding-left: 1.2rem;
}

.umowa-paragraf li {
    margin-bottom: 0.4rem;
}

.umowa-pola {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.umowa-program {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px 4px;
    margin-bottom: 12px;
}

.umowa-program legend {
    font-size: 0.95rem;
    font-weight: 600;
    float: none;
    width: auto;
    padding: 0 6px;
}

.umowa-program-lista {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.umowa-program-lista li {
    margin: 0;
}

.umowa-program-lista label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 6px 4px;
    cursor: pointer;
}

.umowa-program-lista input {
    margin-top: 4px;
}

.umowa-wybor {
    display: inline-block;
    min-width: 4.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.umowa-wybor-tak {
    color: #0a6b2d;
}

.umowa-czesne-hint {
    font-weight: 600;
    margin-top: 8px;
}

.umowa-oswiadczenie,
.umowa-akceptacja {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.umowa-podpisy {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 32px;
}

.umowa-podpisy > div {
    flex: 1;
    text-align: center;
}

.umowa-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.umowa-link-box input {
    flex: 1;
    min-width: 180px;
}

@media print {
    .umowa-page {
        background: #fff;
        padding: 0;
    }

    .umowa-arkusz {
        box-shadow: none;
        max-width: none;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .umowa-arkusz {
        padding: 20px 14px 28px;
    }

    .umowa-podpisy {
        flex-direction: column;
    }
}