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


/* =========================================================
   PLAN LEKCJI
   ========================================================= */

.schedule-page {
    width: 100%;
    min-height: 100vh;
    padding: 25px 20px 40px;
    background: white;
}

.schedule-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}


/* NAGŁÓWEK */

.schedule-title {
    text-align: center;
    margin-bottom: 25px;
}

    .schedule-title h1 {
        margin: 0;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 72px;
        font-weight: 700;
        line-height: 1;
        color: #4b4b4b;
    }


/* GRID */

.schedule-grid {
    display: grid;
    grid-template-columns: 125px repeat(5, 1fr);
    gap: 10px 12px;
}


/* DNI */

.day-header {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c7d9ca;
    border: 2px solid #777;
    color: #555;
    font-size: 15px;
    font-weight: 700;
    box-sizing: border-box;
}

.empty-header {
    background: transparent;
    border: none;
}


/* GODZINY */

.time-cell {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7bd87;
    border: 2px solid #777;
    color: #555;
    font-size: 14px;
    font-weight: 700;
    box-sizing: border-box;
}


/* KOMÓRKA LEKCJI */

.lesson-cell {
    min-height: 50px;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-sizing: border-box;
    overflow: hidden;
}

    .lesson-cell:empty {
        min-height: 40px;
    }


/* LEKCJA */

.lesson {
    position: relative;
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    box-sizing: border-box;
    background: var(--lesson-color);
    border: 2px solid #777;
    color: #333;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .lesson:hover {
        transform: scale(1.02);
        box-shadow: 0 3px 8px rgba(0, 0, 0, .20);
        cursor: pointer;
    }


/* =========================================================
   SEPARATOR
   ========================================================= */

.section-divider {
    border: 0;
    height: 4px;
    margin: 30px 0;
    background: #333;
    border-radius: 4px;
}


/* =========================================================
   PODSUMOWANIE PRZEDMIOTÓW
   ========================================================= */

.subject-summary {
    margin-top: 25px;
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.summary-title {
    margin-bottom: 20px;
}

    .summary-title h2 {
        margin: 0;
        color: #333;
        font-size: 24px;
        font-weight: 700;
    }

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

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .summary-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.10);
    }

.subject-name {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.subject-hours {
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
}

    .subject-hours span {
        font-size: 13px;
        font-weight: 500;
        color: #777;
    }


/* =========================================================
   KROPKA PRZEDMIOTU
   ========================================================= */

.subject-dot {
    display: inline-block;
    width: 12px;
    min-width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--subject-color) !important;
}


/* =========================================================
   USUWANIE LEKCJI
   ========================================================= */

.delete-lesson-form {
    position: absolute;
    top: 3px;
    right: 3px;
    margin: 0;
    padding: 0;
    z-index: 10;
}

.delete-lesson-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    color: #555;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: all .15s ease;
}

.lesson:hover .delete-lesson-btn {
    opacity: 1;
}

.delete-lesson-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}


/* =========================================================
   MODAL POTWIERDZENIA
   ========================================================= */

.confirm-modal {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.18);
}

    .confirm-modal .btn-close {
        margin-top: 5px;
        margin-right: 5px;
        margin-left: auto;
        opacity: .5;
    }

        .confirm-modal .btn-close:hover {
            opacity: 1;
        }

    .confirm-modal .modal-body {
        padding: 5px 30px 20px;
    }

.confirm-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}

.confirm-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff3cd;
    color: #e0a800;
    font-size: 17px;
}

.confirm-title {
    margin: 0;
    color: #333;
    font-size: 19px;
    font-weight: 600;
}

.confirm-message {
    min-height: 22px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.confirm-modal .modal-footer {
    padding: 5px 25px 25px;
    gap: 8px;
}

.confirm-cancel-btn,
.confirm-delete-btn {
    min-width: 90px;
    border-radius: 9px;
    font-weight: 500;
}

.confirm-cancel-btn {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #555;
}

    .confirm-cancel-btn:hover {
        background: #e9ecef;
        border-color: #ced4da;
    }

.confirm-delete-btn {
    border: none;
    background: #dc3545;
    color: white;
    transition: all .15s ease;
}

    .confirm-delete-btn:hover {
        background: #c82333;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
    }


/* =========================================================
   PICKER KOLORÓW
   ========================================================= */

.color-buttons {
    display: grid;
    grid-template-columns: repeat(8, 42px);
    gap: 10px;
    margin-top: 10px;
}

.color-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease;
}

    .color-button:hover {
        transform: scale(1.1);
    }

    .color-button.selected {
        border-color: #222;
        box-shadow: 0 0 0 3px white, 0 0 0 5px #222;
    }


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

@media (max-width: 900px) {

    .schedule-page {
        padding: 15px 10px;
    }

    .schedule-title h1 {
        font-size: 55px;
    }

    .schedule-grid {
        grid-template-columns: 100px repeat(5, minmax(130px, 1fr));
        overflow-x: auto;
    }

    .day-header {
        font-size: 13px;
    }

    .lesson {
        font-size: 13px;
    }

    .time-cell {
        font-size: 12px;
    }
}

.ktora {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: #eef2f7;
    color: red;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    margin:4px;
}
/* ====== buttony */

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

    /* WSPÓLNY STYL */

    .form-actions button {
        min-width: 110px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 0 18px;
        border-radius: 9px;
        border: 1px solid;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all .15s ease;
    }

        /* CANCEL */

        .form-actions button[type="button"] {
            background: #f5f5f5;
            border-color: #ddd;
            color: #555;
        }

            .form-actions button[type="button"]:hover {
                background: #e9e9e9;
                border-color: #ccc;
                color: #333;
                transform: translateY(-1px);
            }

        /* OK / SUBMIT */

        .form-actions button[type="submit"] {
            background: #4f8f68;
            border-color: #4f8f68;
            color: white;
        }

            .form-actions button[type="submit"]:hover {
                background: #427a58;
                border-color: #427a58;
                transform: translateY(-1px);
                box-shadow: 0 4px 10px rgba(79, 143, 104, .25);
            }

        /* KLIKNIĘCIE */

        .form-actions button:active {
            transform: translateY(0);
        }