* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    padding: 2rem;
    background-color: #f5f7fb;
    color: #1a1a1a;
}

main {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

h1, h2 {
    color: #0f1d3d;
}

h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.create-lesson, .lessons-list {
    margin-bottom: 2.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
}

.checkbox-row label {
    margin-left: 0.5rem;
}

label {
    font-weight: 600;
}

input[type="text"],
input[type="datetime-local"],
input[type="number"],
select {
    padding: 0.75rem;
    border: 1px solid #ccd4e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #2f4fa2;
    box-shadow: 0 0 0 3px rgba(47, 79, 162, 0.2);
}

button {
    align-self: flex-start;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

button:hover {
    background-color: #243d82;
}

button:disabled {
    background-color: #a3b8f5;
    cursor: not-allowed;
}

.button-danger {
    background-color: #e5534b;
}

.button-danger:hover {
    background-color: #c0392b;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

th, td {
    padding: 0.55rem 0.65rem;
    text-align: left;
    white-space: nowrap;
}

thead {
    background-color: #f0f4ff;
}

tbody tr:nth-child(odd) {
    background-color: #fafbff;
}

.lessons-table {
    min-width: 1040px;
}

.lessons-table-past tbody tr.row-past {
    background-color: #eef1f9;
}

.row-upcoming td,
.row-past td {
    border-bottom: 1px solid #e2e7f6;
}

.teacher-table {
    min-width: 1040px;
}

.info {
    background-color: rgba(47, 79, 162, 0.12);
    color: #0f1d3d;
    padding: 0.75rem 1rem;
    border-left: 4px solid #2f4fa2;
    border-radius: 6px;
}

.success {
    background-color: rgba(72, 199, 116, 0.2);
    color: #1a7c3a;
    padding: 0.75rem 1rem;
    border-left: 4px solid #39b163;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.reference-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.reference-card {
    flex: 1 1 260px;
    background: #f8faff;
    border: 1px solid #e0e6f3;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(15, 29, 61, 0.08);
}

.reference-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.reference-card form {
    gap: 0.75rem;
}

.collapsible-section {
    position: relative;
}

.toggle-form-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    background-color: #1f2f5c;
    color: #ffffff;
    border-radius: 6px;
    padding: 0.6rem 1.1rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.toggle-form-button:hover {
    background-color: #162244;
}

.collapsible-content {
    display: none;
}

.collapsible-content.is-open {
    display: block;
    animation: fadeDown 0.25s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lesson-group {
    margin-top: 2rem;
}

.lesson-group:first-of-type {
    margin-top: 1.5rem;
}

.lesson-group-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.lesson-group-header h3,
.lesson-group-header h2 {
    margin: 0;
    color: #0f1d3d;
}

.lesson-subgroup {
    margin-top: 1.5rem;
    background: #fff;
    border: 1px solid #e1e6f5;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 16px rgba(15, 29, 61, 0.05);
}

.subgroup-header {
    margin-bottom: 0.75rem;
}

.subgroup-header h3,
.subgroup-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #102348;
}

.summary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(15, 29, 61, 0.1);
    color: #0f1d3d;
}

.summary-badge-paid {
    background: rgba(72, 199, 116, 0.2);
    color: #1a7c3a;
}

.summary-badge-pending {
    background: rgba(255, 99, 71, 0.2);
    color: #a5361f;
}

.summary-badge-validated {
    background: rgba(53, 113, 242, 0.2);
    color: #1f3e91;
}

.summary-badge-awaiting {
    background: rgba(255, 193, 7, 0.25);
    color: #845400;
}

.teacher-links {
    margin-top: 2rem;
    background: #ffffff;
    border: 1px solid #dde3f5;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 6px 18px rgba(15, 29, 61, 0.06);
}

.teacher-links ul {
    margin: 0.75rem 0;
    padding-left: 1.2rem;
}

.teacher-links li {
    margin-bottom: 0.5rem;
}

.teacher-links a {
    color: #2854b5;
    text-decoration: none;
    word-break: break-all;
}

.teacher-links a:hover {
    text-decoration: underline;
}

.teacher-links .teacher-name {
    font-weight: 600;
    margin-right: 0.5rem;
}

.status {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-paid {
    background-color: rgba(72, 199, 116, 0.2);
    color: #1a7c3a;
}

.status-unpaid {
    background-color: rgba(255, 99, 71, 0.2);
    color: #a5361f;
}

.status-validated {
    background-color: rgba(53, 113, 242, 0.2);
    color: #1f3e91;
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.25);
    color: #845400;
}

.status-cancelled {
    background-color: rgba(229, 83, 75, 0.18);
    color: #8c2c24;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.actions form {
    flex-shrink: 0;
}

.actions-column {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
}

.actions-column form {
    width: 100%;
}

.actions-column button {
    width: 100%;
}

.form-row-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row-group > div {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-help {
    margin: 0;
    font-size: 0.9rem;
    color: #455067;
}

.inline-form {
    display: inline-block;
}

.errors {
    background-color: rgba(255, 87, 51, 0.1);
    border: 1px solid rgba(255, 87, 51, 0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.errors ul {
    margin: 0;
    padding-left: 1.5rem;
}

.financial-summary {
    margin-top: 2rem;
    background: #ffffff;
    border: 1px solid #dde4f6;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 6px 18px rgba(15, 29, 61, 0.05);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.summary-table th,
.summary-table td {
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.summary-table thead th {
    background-color: #eef2ff;
    color: #0f1d3d;
}

.summary-table tbody tr:nth-child(odd) {
    background-color: #f8f9ff;
}

.summary-highlight {
    margin-top: 1.2rem;
    font-size: 1rem;
    color: #0f1d3d;
}

.summary-highlight strong {
    color: #d94841;
}

.reported-issues {
    margin-top: 2rem;
    background: #ffffff;
    border: 1px solid #dde4f6;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 6px 18px rgba(15, 29, 61, 0.05);
}

.report-missing {
    margin-top: 2rem;
    background: #ffffff;
    border: 1px solid #dde4f6;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 6px 18px rgba(15, 29, 61, 0.05);
}

.report-form textarea {
    min-height: 110px;
    resize: vertical;
    padding: 0.75rem;
    border: 1px solid #ccd4e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.report-form textarea:focus {
    outline: none;
    border-color: #2f4fa2;
    box-shadow: 0 0 0 3px rgba(47, 79, 162, 0.2);
}

.report-action-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-action-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f1d3d;
}

.report-action-form button {
    align-self: flex-start;
}

.report-action-form textarea {
    min-height: 80px;
    resize: vertical;
    padding: 0.6rem;
    border: 1px solid #ccd4e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.report-action-form textarea:focus {
    outline: none;
    border-color: #2f4fa2;
    box-shadow: 0 0 0 3px rgba(47, 79, 162, 0.2);
}

