.availability-modal-content .modal-actions {
    margin-top: 14px;
}
.modal-content.availability-modal-content {
    padding: 16px 24px 20px;
    max-height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Zakładki w modalu dyspozycyjności */
.availability-modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.availability-tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    top: 2px;
}

.availability-tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.availability-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.availability-tab-content {
    display: none;
}

.availability-tab-content.active {
    display: block;
}

/* Kalendarz grafiku w modalu */
.schedule-calendar-container {
    margin-bottom: 20px;
}

.schedule-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

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

.schedule-calendar-grid .calendar-header {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background: #f5f5f5;
    border-radius: 4px;
}

.schedule-calendar-grid .calendar-day {
    padding: 10px;
    text-align: center;
    cursor: pointer;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    transition: all 0.2s;
}

.schedule-calendar-grid .calendar-day:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.schedule-calendar-grid .calendar-day.unavailable {
    background: #ffe0e0;
    border-color: #ff6b6b;
}

.schedule-calendar-grid .calendar-day.other-month {
    color: #ccc;
    cursor: default;
}

.schedule-calendar-grid .calendar-day.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Strona logowania */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 48px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .login-box {
        padding: 24px;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .login-box h1 {
        font-size: 24px;
    }
    
    .login-box h2 {
        font-size: 16px;
        margin-bottom: 24px;
    }
}

.login-box h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.login-box h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 36px;
    font-size: 18px;
    font-weight: 600;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    background: #f0f0f0;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.urgent-lessons-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
    z-index: 10;
    min-width: 24px;
    padding: 0;
    border: 2px solid white;
}

.form-group {
    margin-bottom: 0;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    position: relative;
    padding-left: 24px;
}

.form-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    opacity: 0.6;
}

.instructor-form .form-group input,
.instructor-form .form-group select,
.instructor-form .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.instructor-form .form-group input:hover,
.instructor-form .form-group select:hover,
.instructor-form .form-group textarea:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.instructor-form .form-group input:focus,
.instructor-form .form-group select:focus,
.instructor-form .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 16px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.instructor-form .form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.instructor-form .form-group input[type="password"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 2px;
}

/* Ogólne style dla innych formularzy (zachowaj kompatybilność) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Form group row - for fields in one row */
.form-group-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.form-group-row > .form-group {
    margin-bottom: 0;
}

.form-group-flex {
    flex: 1 1 auto;
    min-width: 0;
}

.form-group-half {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.form-group-participants {
    flex: 0 0 auto;
    width: 72px;
    min-width: 72px;
}

/* Number input styling for participants */
.form-group-participants input[type="number"] {
    text-align: center;
    font-weight: 600;
}

.unavailable-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.35);
    color: #c0392b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.unavailable-alert .alert-icon {
    font-size: 16px;
}

.unavailable-alert .alert-message {
    flex: 1;
    line-height: 1.4;
}

.pricing-management {
    padding: 28px 32px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-description {
    color: #636e72;
    margin-bottom: 20px;
    line-height: 1.5;
}

.pricing-table-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(46, 91, 255, 0.08), 0 4px 12px rgba(46, 91, 255, 0.06);
    padding: 28px 32px;
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.pricing-table-card.compact {
    padding: 24px 28px;
}

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

.pricing-table-card-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 700;
}

.pricing-hint {
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pricing-table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.pricing-table thead th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(102, 126, 234, 0.08));
    color: #2c3e50;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid rgba(102, 126, 234, 0.18);
}

.pricing-table tbody th {
    background: rgba(102, 126, 234, 0.08);
    color: #2c3e50;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 14px;
    text-align: left;
    min-width: 115px;
}

.pricing-table td {
    background: #ffffff;
    border: 1px solid rgba(102, 126, 234, 0.12);
    padding: 10px 12px;
}

.pricing-corner-cell {
    min-width: 150px;
    text-align: left;
}

.pricing-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pricing-input-wrapper input {
    width: 100%;
    max-width: 110px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.28);
    text-align: right;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pricing-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.pricing-input-wrapper input::-webkit-outer-spin-button,
.pricing-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pricing-input-wrapper input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.pricing-input-suffix {
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
}

.pricing-actions {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.pricing-status {
    font-size: 13px;
    font-weight: 600;
    min-height: 18px;
}

.pricing-status.status-success {
    color: #27ae60;
}

.pricing-status.status-error {
    color: #c0392b;
}

.pricing-status.status-pending {
    color: #f39c12;
}

.pricing-loader {
    padding: 32px 0;
    text-align: center;
    color: #7f8c8d;
    font-weight: 600;
}

.pricing-error {
    padding: 20px;
    text-align: center;
    color: #c0392b;
    font-weight: 600;
}

.pricing-table-card.compact .pricing-table {
    min-width: 540px;
}

.pricing-table-card.compact .pricing-table-responsive {
    border-radius: 10px;
}

.settlements-container {
    padding: 28px 40px 48px;
    max-width: 1260px;
    margin: 0 auto;
}

.settlements-header h2 {
    margin-bottom: 8px;
    font-size: 26px;
    color: #2c3e50;
}

.settlements-description {
    margin: 0 0 24px;
    color: #636e72;
    line-height: 1.5;
}

.settlements-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 24px;
}

.settlements-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settlements-filters label {
    font-weight: 600;
    font-size: 13px;
    color: #34495e;
}

.settlement-date-input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.28);
    font-size: 14px;
    min-width: 180px;
}

.settlement-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.settlement-filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.settlements-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 28px;
}

.settlement-summary-card {
    flex: 1 1 240px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.settlement-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.settlement-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2), 0 4px 8px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.settlement-summary-card.highlight-profit {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.settlement-summary-card.highlight-profit::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 5px;
}

.settlement-summary-card.highlight-profit:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3), 0 4px 8px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.4);
}

.summary-card-icon {
    font-size: 40px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.settlement-summary-card:hover .summary-card-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.settlement-summary-card.highlight-profit .summary-card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.summary-card-content {
    flex: 1;
    min-width: 0;
}

.summary-card-label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.summary-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.settlement-summary-card.highlight-profit .summary-card-value {
    color: #667eea;
    font-size: 32px;
}

.settlements-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.stats-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 24px;
}

.stats-filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.settlement-card {
    background: white;
    border-radius: 18px;
    padding: 22px 26px;
    border: 1px solid rgba(102, 126, 234, 0.12);
    box-shadow: 0 12px 28px rgba(46, 91, 255, 0.08), 0 4px 12px rgba(46, 91, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.settlement-card-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.settlement-admin-badge {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.settlement-admin-details h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.settlement-admin-details span {
    font-size: 13px;
    color: #7f8c8d;
}

.settlement-card-metrics {
    display: flex;
    gap: 26px;
    align-items: center;
    flex-wrap: wrap;
}

.settlement-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 110px;
}

.settlement-metric-label {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #95a5a6;
    font-weight: 600;
}

.settlement-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #34495e;
}

.settlement-metric.highlight .settlement-metric-value {
    color: #27ae60;
}

.modal-content.settle-modal {
    max-width: 420px;
}

.settle-notice {
    padding: 16px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.08);
    color: #4c5c96;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

/* Modal rozliczania - nagłówek z kwotą */
.settle-amount-header {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.settle-amount-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.settle-amount-value {
    font-size: 32px;
    font-weight: 700;
}

/* Kafelki metod płatności */
.settle-payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.payment-method-card {
    position: relative;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.payment-method-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.payment-method-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.payment-method-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.payment-method-label {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.payment-method-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.payment-method-card.selected .payment-method-check {
    display: flex;
}

.settle-breakdown-details {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 16px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
}

.breakdown-row span {
    color: #555;
}

.breakdown-row strong {
    font-size: 16px;
    color: #2c3e50;
}

#settleLessonBreakdown p {
    margin-bottom: 12px;
    font-size: 15px;
    color: #2c3e50;
}

#settleLessonBreakdown strong {
    font-size: 18px;
    font-weight: 700;
    color: #34495e;
}

.settlements-empty {
    padding: 40px;
    text-align: center;
    color: #95a5a6;
    font-weight: 600;
    border: 1px dashed rgba(149, 165, 166, 0.4);
    border-radius: 16px;
    background: rgba(246, 247, 251, 0.8);
}

/* Widok rozliczeń dziennych */
.settlement-day-group {
    margin-bottom: 32px;
}

.settlement-day-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.settlement-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.settlement-status-badge.settled {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.settlement-status-badge.unsettled {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.instructor-settlement-day-card.settled {
    border-left: 4px solid #27ae60;
    background: linear-gradient(to right, rgba(46, 204, 113, 0.05) 0%, rgba(255, 255, 255, 1) 4px);
}

.instructor-settlement-day-card.unsettled {
    border-left: 4px solid #f39c12;
    background: linear-gradient(to right, rgba(243, 156, 18, 0.05) 0%, rgba(255, 255, 255, 1) 4px);
}

/* Date Range Picker Styles */
.date-range-picker-container {
    position: relative;
    display: inline-block;
}

.date-range-input {
    padding: 12px 50px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 280px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 2V6M14 2V6M3 10H17M5 4H15C16.1046 4 17 4.89543 17 6V17C17 18.1046 16.1046 19 15 19H5C3.89543 19 3 18.1046 3 17V6C3 4.89543 3.89543 4 5 4Z' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px 20px;
}

.date-range-input:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.date-range-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 6px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.date-range-picker {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 320px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.date-range-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.date-range-picker-month {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.date-range-picker-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.date-range-picker-nav:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.date-range-picker-nav:active {
    transform: scale(0.95);
}

.date-range-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.date-range-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #667eea;
    padding: 8px 0;
    text-transform: uppercase;
}

.date-range-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.date-range-day.empty {
    cursor: default;
    background: transparent;
}

.date-range-day:hover:not(.empty) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.date-range-day.today {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.date-range-day.today:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
}

.date-range-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.date-range-day.in-range {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #667eea;
    font-weight: 600;
}

.date-range-day.start {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.date-range-day.end {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.date-range-picker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
}

.settlement-day-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.settlement-day-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Kafelki z gotówką i terminalem biura */
.office-summary-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.office-tile {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.office-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.4);
}

.office-tile.cash-tile {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    border-color: rgba(231, 76, 60, 0.3);
}

.office-tile.cash-tile:hover {
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.25);
}

.office-tile.terminal-tile {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(34, 153, 84, 0.1) 100%);
    border-color: rgba(39, 174, 96, 0.3);
}

.office-tile.terminal-tile:hover {
    border-color: rgba(39, 174, 96, 0.5);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.25);
}

.office-tile .tile-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.office-tile.cash-tile .tile-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
}

.office-tile.terminal-tile .tile-icon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.4);
}

.office-tile .tile-content {
    flex: 1;
}

.office-tile .tile-label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.office-tile .tile-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.office-tile.cash-tile .tile-value {
    color: #e74c3c;
}

.office-tile.terminal-tile .tile-value {
    color: #27ae60;
}

.settlement-instructor-card {
    background: rgba(231, 76, 60, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(231, 76, 60, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.settlement-instructor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    transition: all 0.3s ease;
}

.settlement-instructor-card:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.25), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    border-color: rgba(231, 76, 60, 0.4);
}

.settlement-instructor-card.settled {
    background: rgba(39, 174, 96, 0.08);
    border-color: rgba(39, 174, 96, 0.25);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settlement-instructor-card.settled::before {
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%);
}

.settlement-instructor-card.settled:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.25), 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(39, 174, 96, 0.4);
}

.settlement-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.instructor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.avatar-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.instructor-main-info {
    flex: 1;
}

.instructor-main-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.instructor-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f4ff;
    color: #667eea;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.settlement-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.settlement-tile {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.settlement-tile:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.settlement-tile.highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.settlement-tile.highlight:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
}

.tile-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.settlement-tile.highlight .tile-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tile-content {
    flex: 1;
    min-width: 0;
}

.tile-label {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.tile-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.settlement-tile.highlight .tile-value {
    color: #667eea;
}

/* Klikalny kafelek "Lekcje" */
.settlement-tile.clickable-lessons-settlement {
    cursor: pointer;
    position: relative;
}

.settlement-tile.clickable-lessons-settlement:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.settlement-tile.clickable-lessons-settlement:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.settlement-tile.clickable-lessons-settlement::after {
    content: '👆';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.settlement-tile.clickable-lessons-settlement:hover::after {
    opacity: 0.6;
}

.obligations-value {
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.obligation-item {
    margin-bottom: 6px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.obligation-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.obligation-item strong {
    color: #667eea;
    font-size: 15px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-methods-section,
.instructor-amount-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.instructor-amount-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-top: 8px;
}

.payment-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.payment-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.payment-badge.instructor-cash {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.payment-badge.office-cash {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.payment-badge.office-card {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.owed-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owed-item {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-left: 4px solid;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.owed-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.owed-item.owed-by {
    color: #c0392b;
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.owed-item.owed-to {
    color: #27ae60;
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.owed-item strong {
    font-weight: 700;
}

.settlement-checkbox-container-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.settlement-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.settlement-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #27ae60;
    color: #27ae60;
    transform: scale(1.05);
}

.settlement-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #27ae60;
    border-radius: 4px;
    flex-shrink: 0;
}

.settlement-checkbox:checked + span {
    color: #27ae60;
}

.settlement-checkbox-label:has(.settlement-checkbox:checked) {
    background: rgba(39, 174, 96, 0.15);
    border-color: #27ae60;
    color: #27ae60;
}

@media (max-width: 768px) {
    .settle-payment-methods {
        grid-template-columns: 1fr;
    }
    
    .settlement-instructor-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .instructor-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .settlements-container {
        padding: 24px 18px 32px;
    }
    
    .settlements-filters {
        gap: 12px;
    }
    
    .settlement-filter-buttons {
        width: 100%;
        justify-content: stretch;
    }
    
    .settlement-filter-buttons .btn-primary,
    .settlement-filter-buttons .btn-secondary {
        flex: 1;
    }
    
    .settlement-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 20px 22px;
    }
    
    .settlement-card-metrics {
        width: 100%;
        justify-content: space-between;
    }
    
    .settlement-metric {
        min-width: 140px;
    }
    
    .stats-filters {
        gap: 12px;
    }
    
    .stats-filter-buttons {
        width: 100%;
        justify-content: stretch;
    }
    
    .stats-filter-buttons .btn-primary,
    .stats-filter-buttons .btn-secondary {
        flex: 1;
    }
}

.modal .pricing-table-card {
    padding: 20px 24px;
    box-shadow: none;
}

.modal .pricing-table-card.compact {
    padding: 20px 24px;
}

.modal .pricing-table {
    min-width: 520px;
}

@media (max-width: 768px) {
    .pricing-management {
        padding: 24px 18px 32px;
    }
    
    .pricing-table-card {
        padding: 24px 22px;
    }
    
    .pricing-table {
        min-width: 520px;
    }
    
    .pricing-table-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pricing-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pricing-status {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .pricing-table {
        min-width: 460px;
    }
    
    .pricing-table-card {
        padding: 20px 18px;
    }
}

@media (max-width: 640px) {
    /* Responsywne przyciski w modalu szczegółów lekcji u instruktora */
    #lessonDetailsModal .modal-actions {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
    }
    
    #lessonDetailsModal .modal-actions button {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        flex: none;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    #lessonDetailsModal .modal-content {
        padding: 20px;
        max-height: 95vh;
        max-width: 95% !important;
    }
    
    .lesson-details-wrapper {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .lesson-detail-row {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    
    .lesson-detail-label {
        min-width: auto;
        max-width: none;
        margin-bottom: 4px;
    }
    
    .lesson-detail-value {
        min-width: auto;
    }
    
    .lesson-details-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .action-tile {
        flex: 1 1 calc(50% - 6px);
        min-height: 90px;
        padding: 16px;
    }
    
    .action-tile-icon {
        font-size: 28px;
    }
    
    .action-tile-label {
        font-size: 12px;
    }
    
    .form-group-row {
        flex-wrap: wrap;
    }

    .form-group-half {
        flex: 1 1 100%;
    }

    .form-group-participants {
        width: 100%;
        min-width: 0;
    }
}

/* Time picker custom styles */
.time-picker {
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.time-picker:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.time-picker option {
    padding: 12px;
    font-weight: 600;
    color: #2c3e50;
}

.time-picker option[disabled] {
    color: #ccc;
    background: #f5f5f5;
    font-style: italic;
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.settlement-filter-buttons .btn-primary {
    width: auto;
    padding: 12px 24px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    padding: 12px 24px;
    background: #f5f7fa;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-info:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-danger {
    padding: 12px 24px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #ffe0e0;
    color: #c0392b;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Panel administracyjny i instruktora */
.admin-container,
.instructor-container {
    background: white;
    min-height: 100vh;
    position: relative;
    padding-bottom: 90px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 40px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 30px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 50;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.header h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.header-main-logo {
    display: flex;
    align-items: center;
    height: 120px;
    position: relative;
}

.admin-header-logo {
    height: 100px;
    max-width: 500px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    border-radius: 12px;
}

.header-vistula-logo-overlay {
    position: absolute;
    bottom: -20px;
    left: 100%;
    transform: translate(calc(-20% - 70px), -20%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.powered-by-text {
    font-size: 11px;
    color: #000000;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
    top: -5px;
}

.header-custom-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80px;
    min-width: 0;
}

.header-custom-logo img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

.header-logo {
    display: flex;
    align-items: center;
}

.logo-box {
    background: white;
    padding: 10px 16px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-container {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.logo {
    height: 42px;
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.vistula-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    border-radius: 8px;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-content {
    padding: 30px 40px;
}

.instructor-container .main-content {
    padding: 0 16px 140px;
}

.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tabs-container::-webkit-scrollbar {
    height: 6px;
}

.tabs-container::-webkit-scrollbar-track {
    background: transparent;
}

.tabs-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.tabs-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.tabs-container .tab-btn {
    flex: 1 1 0;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 0;
}

.tabs-container .tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tabs-container .tab-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 700;
}

/* Powiadomienia (badge) w menu */
.notification-badge,
.messenger-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
    line-height: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Powiadomienia na kafelkach turnusów */
.course-notification-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    min-width: 18px;
    text-align: center;
    line-height: 16px;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

.tab-icon {
    font-size: 18px;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.tab-btn.active .tab-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.tab-btn:hover .tab-icon {
    transform: scale(1.05);
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* Kalendarz */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.date-picker-container {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.calendar-controls h2 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

.floating-user-panel {
    position: relative;
    top: 0;
    right: 0;
    left: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 244, 255, 0.98) 100%);
    border-radius: 0;
    padding: 14px 24px 0;
    box-shadow: none;
    border: none;
    backdrop-filter: blur(12px);
    z-index: 20;
}

.floating-user-panel .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.floating-user-panel .btn-secondary {
    white-space: nowrap;
}

.calendar-date-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 0;
    margin: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 244, 255, 0.98) 100%);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.18);
    border-top: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.12);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.calendar-date-bar .date-nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(230, 236, 255, 0.95) 100%);
    color: #5360d9;
    font-size: 24px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.calendar-date-bar .date-nav-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(210, 220, 255, 1) 100%);
    box-shadow: 0 14px 28px rgba(102, 126, 234, 0.35);
}

.calendar-date-bar .date-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.calendar-date-bar .btn-secondary {
    min-width: 160px;
}

.calendar-date-bar .date-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calendar-date-bar h2 {
    font-size: clamp(12px, 4vw, 16px);
    color: #2c3e50;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}

.calendar-date-bar .btn-secondary {
    min-width: 160px;
}

.calendar-date-bar h2 {
    font-size: clamp(12px, 4vw, 16px);
    color: #2c3e50;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}

.calendar-date-bar .date-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calendar-date-bar .date-picker-input {
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 8px 12px;
    font-weight: 600;
    color: #2c3e50;
}

.single-calendar {
    display: block;
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.16);
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.time-column {
    display: none;
}

.time-column-header {
    display: none;
}

.lesson-column {
    position: relative;
}

.lesson-track {
    position: relative;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(248, 249, 255, 0.94) 0%, rgba(240, 244, 255, 0.94) 100%);
    border: 1px solid rgba(102, 126, 234, 0.12);
    padding: 12px 16px 12px 80px;
    overflow: visible;
}

.lesson-hour-row {
    height: var(--hour-row-height, 80px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.18);
    position: relative;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.35);
}

.lesson-hour-row:last-child {
    border-bottom: none;
}

.lesson-hour-row .hour-label {
    position: absolute;
    left: 0;
    top: 6px;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: rgba(47, 53, 66, 0.7);
    letter-spacing: 0.3px;
    pointer-events: none;
    text-align: left;
}

.single-calendar .lesson-block {
    bottom: auto;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.25);
    border-left: 4px solid rgba(255, 255, 255, 0.4);
    min-height: 56px;
    left: 12px;
    right: 12px;
    z-index: 2;
}

/* W widoku mobilnym bloki lekcji i niedostępności muszą mieć niższy z-index niż linia czasu */
.admin-container.mobile-view .single-calendar .lesson-block {
    z-index: 1;
}

.admin-container.mobile-view .calendar-unavailable-block,
.admin-container.mobile-view .calendar-day-unavailable-block {
    z-index: 1;
}
    margin: 0;
}

.single-calendar .lesson-block strong {
    font-size: 15px;
    margin-bottom: 6px;
}

.single-calendar .lesson-block .lesson-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* W widoku mobilnym powiększ czcionki w kafelkach lekcji 2 razy */
.admin-container.mobile-view .single-calendar .lesson-block strong {
    font-size: 30px !important;
    margin-bottom: 12px;
}

.admin-container.mobile-view .single-calendar .lesson-block .lesson-info {
    font-size: 26px !important;
    gap: 16px;
}

.admin-container.mobile-view .single-calendar .lesson-block .lesson-info span {
    font-size: 26px !important;
}

/* Powiększ czcionki w etykietach godzin (z nazwą instruktora) w widoku mobilnym */
.admin-container.mobile-view .hour-label {
    font-size: 28px !important;
    font-weight: 700 !important;
}

.single-calendar .calendar-unavailable-block {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.18) 0%, rgba(231, 76, 60, 0.1) 100%);
    border: 1px dashed rgba(192, 57, 43, 0.5);
    border-radius: 10px;
    color: #a93226;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 6px;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.single-calendar .calendar-day-unavailable-block {
    background: rgba(231, 76, 60, 0.18);
    border: 2px solid rgba(231, 76, 60, 0.35);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #a93226;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    z-index: 4;
}

.admin-container.mobile-view .single-calendar .calendar-unavailable-block,
.admin-container.mobile-view .single-calendar .calendar-day-unavailable-block {
    left: 12px;
    right: 12px;
    margin: 0;
}

.calendar-empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 20px 28px;
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
    text-align: center;
}

.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 75, 75, 0.8);
    box-shadow: 0 0 12px rgba(255, 75, 75, 0.4);
    pointer-events: none;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 14px 20px;
    box-shadow: 0 -10px 30px rgba(102, 126, 234, 0.18);
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(12px);
    z-index: 90;
}

.bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.bottom-nav-btn .nav-icon {
    font-size: 20px;
}

.bottom-nav-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.bottom-nav-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

@media (min-width: 600px) {
    .instructor-container .main-content {
        padding: 0 28px 150px;
    }
    .single-calendar {
        padding: 22px;
    }
    .floating-user-panel {
        left: 24px;
        right: 24px;
        justify-content: space-between;
    }
    .instructor-container .calendar-date-bar {
        flex-direction: row;
        align-items: center;
    }
    .instructor-container .calendar-date-bar .btn-secondary {
        width: auto;
        min-width: 150px;
    }
    .calendar-date-bar {
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .floating-user-panel {
        position: relative;
        margin: 0;
        padding: 10px 14px;
        gap: 8px;
    }
    .floating-user-panel .user-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }
    .floating-user-panel .user-name {
        font-size: 14px;
        padding: 6px 10px;
        flex: 1;
        text-align: left;
    }
    .floating-user-panel .btn-secondary {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 13px;
    }
    .calendar-date-bar {
        padding: 16px;
    }
    .single-calendar {
        padding: 18px 16px;
    }
    .lesson-track {
        padding: 10px 12px 10px 70px;
    }
    .lesson-hour-row .hour-label {
        left: 10px;
        font-size: 11px;
    }
    .single-calendar .lesson-block {
        left: 8px;
        right: 8px;
        padding: 12px;
    }
    .single-calendar .lesson-block strong {
        font-size: 14px;
    }
    .bottom-nav {
        padding: 12px 12px;
    }
    .bottom-nav-btn .nav-icon {
        font-size: 22px;
    }
    .bottom-nav-btn span {
        font-size: 12px;
        font-weight: 600;
    }
    .instructor-container .main-content {
        padding: 16px 16px 160px;
    }
}

@media (min-width: 900px) {
    .instructor-container .main-content {
        padding: 0 40px 140px;
    }
    .single-calendar {
        display: grid;
        grid-template-columns: 130px 1fr;
        gap: 24px;
        padding: 26px;
    }
    .instructor-container .single-calendar .time-column {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
    }
    .instructor-container .single-calendar .time-column-header {
        display: block !important;
        font-size: 14px;
        font-weight: 700;
        color: #667eea;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 8px;
    }
    .lesson-track {
        padding: 12px 20px 12px 18px;
        overflow: hidden;
    }
    .lesson-hour-row .hour-label {
        display: none;
    }
    .single-calendar .lesson-block {
        left: 12px;
        right: 12px;
    }
    .calendar-date-bar {
        margin-bottom: 18px;
    }
}

/* Custom Date Picker */
.custom-date-picker {
    position: relative;
    display: inline-block;
}

.date-picker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: white;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.date-picker-btn:hover {
    border-color: #5568d3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.date-picker-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.calendar-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    pointer-events: none;
}

.custom-calendar {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.custom-calendar.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f8f9fa;
    padding: 12px 16px 8px;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f8f9fa;
    padding: 0 16px 16px;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.calendar-day:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.calendar-day.other-month {
    color: #adb5bd;
    background: #f8f9fa;
}

.calendar-day.other-month:hover {
    background: #e9ecef;
    color: #6c757d;
    transform: none;
}

.calendar-day.today {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.calendar-day.today:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.calendar-day.selected:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
}

.calendar-day.calendar-warning {
    background: #fff8e8;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.35), 0 10px 20px rgba(243, 156, 18, 0.2);
}

.calendar-day.unavailable.calendar-warning {
    background: #ffe8d6;
    border-color: rgba(243, 156, 18, 0.55);
    color: #8c4a13;
}

.calendar-day.shake {
    animation: calendarDayShake 0.55s ease;
}

@keyframes calendarDayShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-4px); }
    30% { transform: translateX(4px); }
    45% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(2px); }
}

.date-picker-input {
    position: relative;
    padding: 10px 16px;
    border: 2px solid #667eea;
    border-radius: 10px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    display: none; /* Ukryj oryginalne pole */
}

/* Custom date picker dla cloud lessons */
.date-picker-wrapper {
    position: relative;
}

.date-picker-input-cloud {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.date-picker-input-cloud::after {
    content: '📅';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

.date-picker-input-cloud:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.date-picker-input-cloud:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.2);
}

.custom-calendar-cloud {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-width: 360px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.custom-calendar-cloud.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-calendar-cloud .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.custom-calendar-cloud .calendar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.custom-calendar-cloud .calendar-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.custom-calendar-cloud .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-calendar-cloud .calendar-nav-btn:active {
    transform: scale(0.95);
}

.custom-calendar-cloud .calendar-month-year {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.custom-calendar-cloud .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #f8f9fa;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e9ecef;
}

.custom-calendar-cloud .weekday {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    padding: 10px 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.custom-calendar-cloud .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #f8f9fa;
    padding: 12px 20px 20px;
}

.custom-calendar-cloud .calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white;
    border: 2px solid transparent;
}

.custom-calendar-cloud .calendar-day:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-calendar-cloud .calendar-day.other-month {
    color: #adb5bd;
    background: #f8f9fa;
    opacity: 0.5;
}

.custom-calendar-cloud .calendar-day.other-month:hover {
    background: #e9ecef;
    color: #6c757d;
    transform: scale(1);
    opacity: 0.7;
}

.custom-calendar-cloud .calendar-day.today {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-calendar-cloud .calendar-day.today:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
}

.custom-calendar-cloud .calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-calendar-cloud .calendar-day.selected:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
    transform: scale(1.08);
}

/* Custom Picker dla godziny i czasu trwania */
.custom-picker-wrapper {
    position: relative;
}

.custom-picker-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.custom-picker-input::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #667eea;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-picker-wrapper.active .custom-picker-input::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-picker-input:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.custom-picker-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.2);
}

.custom-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.custom-picker-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.picker-tiles-container {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.picker-tile {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.picker-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.picker-tile:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.picker-tile:hover::before {
    opacity: 0.1;
}

.picker-tile.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-weight: 700;
}

.picker-tile.selected::before {
    opacity: 0;
}

.picker-tile.selected:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
    transform: translateY(-2px) scale(1.02);
}

/* Custom scrollbar dla picker dropdown */
.custom-picker-dropdown::-webkit-scrollbar {
    width: 8px;
}

.custom-picker-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-picker-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.custom-picker-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
}

.picker-tiles-container::-webkit-scrollbar {
    width: 6px;
}

.picker-tiles-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.picker-tiles-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.picker-tiles-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.date-picker-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(223deg) brightness(97%) contrast(96%);
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.date-picker-input::-webkit-calendar-picker-indicator:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.date-picker-input:hover {
    border-color: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.date-picker-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Stylizacja natywnego kalendarza (popup) */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* Reset Stats Modal */
.reset-stats-warning {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.warning-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.warning-text {
    flex: 1;
}

.warning-text p {
    margin: 8px 0;
    color: #856404;
    font-size: 14px;
}

.warning-text p strong {
    color: #721c24;
    font-weight: 700;
}

.warning-text ul {
    margin: 12px 0;
    padding-left: 20px;
}

.warning-text li {
    color: #856404;
    font-size: 14px;
    margin: 6px 0;
}

.warning-text li strong {
    color: #721c24;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Przyciski Zapisz i Anuluj po 50% szerokości w modalach: Dodaj lekcję, Edytuj lekcję, Cena lekcji */
#lessonModal .modal-actions button.btn-primary,
#lessonModal .modal-actions button.btn-secondary,
#editLessonModal .modal-actions button.btn-primary,
#editLessonModal .modal-actions button.btn-secondary,
#lessonPriceModal .modal-actions button.btn-primary,
#lessonPriceModal .modal-actions button.btn-secondary {
    flex: 1 1 0;
    min-width: 0;
    width: calc(50% - 6px);
}

/* Przyciski w modalu dodawania lekcji do chmury - w jednym wierszu */
#addCloudLessonModal .modal-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
}

#addCloudLessonModal .modal-actions button.btn-primary,
#addCloudLessonModal .modal-actions button.btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
}

/* Przyciski w modalu edycji lekcji w chmurze - w jednym wierszu */
#editCloudLessonModal .modal-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
}

#editCloudLessonModal .modal-actions button.btn-primary,
#editCloudLessonModal .modal-actions button.btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
}

/* Przyciski w modalu ustawień chmury lekcji - w jednym wierszu */
#cloudSettingsModal .modal-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
}

#cloudSettingsModal .modal-actions button.btn-primary,
#cloudSettingsModal .modal-actions button.btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
}

/* W admin.php modal "Dodaj lekcję" ma 3 przyciski - przycisk "Cyklicznie" ma auto szerokość */
#lessonModal .modal-actions button.btn-info {
    flex: 0 0 auto;
    width: auto;
    order: -1; /* Umieść przycisk "Cyklicznie" na początku */
}

/* W admin.php modal "Dodaj lekcję" - upewnij się, że Zapisz i Anuluj są obok siebie */
#lessonModal .modal-actions {
    justify-content: flex-end;
}

#lessonModal .modal-actions button.btn-primary,
#lessonModal .modal-actions button.btn-secondary {
    order: 0; /* Zapisz i Anuluj są na końcu */
}

/* Responsywne style dla przycisków w modalu szczegółów lekcji u instruktora */
#lessonDetailsModal .modal-actions {
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#lessonDetailsModal .modal-actions button {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 200px;
    font-size: 13px;
    padding: 10px 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border: 2px solid #ffc107;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    border-color: #d39e00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 2px solid #dc3545;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: 2px solid #27ae60;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-success::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-success:hover::before {
    width: 300px;
    height: 300px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    border-color: #1e8449;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

/* Przycisk rozliczania - specjalny styl */
#toggleLessonSettled {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: 2px solid #27ae60;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

#toggleLessonSettled::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

#toggleLessonSettled:hover::before {
    width: 300px;
    height: 300px;
}

#toggleLessonSettled:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    border-color: #1e8449;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
}

#toggleLessonSettled:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

#toggleLessonSettled.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-color: #f39c12;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.25);
}

#toggleLessonSettled.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-color: #d35400;
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4);
}

#toggleLessonSettled.btn-warning::before {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Stylizacja dla Chrome/Edge - popup kalendarza */
::-webkit-datetime-edit { 
    padding: 0;
}

::-webkit-datetime-edit-fields-wrapper {
    background: transparent;
}

::-webkit-datetime-edit-text {
    color: #7f8c8d;
    padding: 0 0.3em;
}

::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-year-field {
    background: transparent;
    color: #2c3e50;
    padding: 0 0.2em;
    font-weight: 600;
}

::-webkit-datetime-edit-month-field:focus,
::-webkit-datetime-edit-day-field:focus,
::-webkit-datetime-edit-year-field:focus {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    outline: none;
    border-radius: 3px;
}

/* Nowy horyzontalny kalendarz */
.horizontal-calendar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.calendar-header {
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.instructor-column-header {
    width: 140px;
    min-width: 140px;
    padding: 12px 10px;
    font-weight: 700;
    font-size: 14px;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.3px;
    box-sizing: border-box;
}

.timeline-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
}

.timeline-header {
    display: flex;
    min-width: 100%;
    width: 100%;
}

.time-header-cell {
    flex: 1 1 0;
    min-width: 55px;
    padding: 18px 0px;
    text-align: center;
    border-right: none; /* Domyślnie bez linii */
    font-size: 10px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.time-header-cell.hour-separator {
    border-right: 1px solid rgba(255, 255, 255, 0.15); /* Linia tylko między pełnymi godzinami */
}

.calendar-categories {
    display: flex;
    flex-direction: column;
}

.category-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.category-title {
    padding: 14px 24px;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8eaf6 100%);
    font-weight: 700;
    font-size: 14px;
    color: #667eea;
    border-bottom: 3px solid #667eea;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: inset 0 -2px 0 rgba(102, 126, 234, 0.1);
}

.instructor-row {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 80px;
    transition: all 0.3s ease;
    background: white;
    align-items: stretch;
}

.instructor-row:hover {
    background: linear-gradient(90deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.1);
}

.instructor-name-cell {
    width: 140px;
    min-width: 140px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 2px solid rgba(0, 0, 0, 0.06);
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.instructor-name-cell h4 {
    font-size: 13px;
    color: #2c3e50;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.instructor-name-cell p {
    font-size: 10px;
    color: #7f8c8d;
    font-weight: 500;
}

.timeline-row {
    flex: 1;
    --slot-vertical-padding: 12px;
    --slot-horizontal-gap: 12px;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    padding-left: 10px; /* Przesunięcie slotów w prawo względem belki */
    padding-right: 10px;
}

.timeline-grid {
    display: flex;
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative; /* Ważne dla absolute positioning overlay */
    align-items: stretch;
}

/* Zmniejszenie odstępu od prawej krawędzi kalendarza dla ostatnich komórek */
.timeline-header {
    padding-right: 0;
}

.timeline-grid {
    padding-right: 0;
}

/* Usunięcie border-right z ostatnich komórek */
.time-header-cell:last-child {
    border-right: none;
}

.timeline-grid .time-slot:last-child {
    border-right: none;
}

/* Linia aktualnego czasu */
.current-time-line {
    position: fixed;
    width: 3px;
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.6), 0 0 4px rgba(231, 76, 60, 0.4);
    animation: pulse-line 2s ease-in-out infinite;
}

.current-time-line::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
    animation: pulse-circle 2s ease-in-out infinite;
    z-index: 1001;
}

.current-time-line::after {
    content: attr(data-time);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@keyframes pulse-line {
    0%, 100% {
        opacity: 0.9;
        box-shadow: 0 0 8px rgba(231, 76, 60, 0.6), 0 0 4px rgba(231, 76, 60, 0.4);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 12px rgba(231, 76, 60, 0.8), 0 0 6px rgba(231, 76, 60, 0.6);
    }
}

@keyframes pulse-circle {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
        box-shadow: 0 2px 12px rgba(231, 76, 60, 0.7);
    }
}

.time-slot {
    flex: 1 1 0;
    min-width: 55px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--slot-vertical-padding) / 2) calc(var(--slot-horizontal-gap) / 2);
    border-right: none; /* Domyślnie bez linii */
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
    border-radius: 12px;
}

.time-slot.hour-separator {
    border-right: 1px solid rgba(0, 0, 0, 0.05); /* Linia tylko między pełnymi godzinami */
}

.time-slot.hour-separator:not(.unavailable) {
    border-right: 1px solid rgba(102, 126, 234, 0.08); /* Linia dla dostępnych slotów między pełnymi godzinami */
}

.time-slot:not(.unavailable) {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.08);
    border-bottom: 1px solid rgba(102, 126, 234, 0.08);
    border-left: 1px solid rgba(102, 126, 234, 0.08);
    border-right: none; /* Border-right będzie ustawiony tylko dla hour-separator */
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.16), 0 1px 3px rgba(102, 126, 234, 0.08);
}

.time-slot.slot-overlay-hidden {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.time-slot:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.2);
}

.time-slot.half-hour {
    /* border-right usunięty - linie tylko między pełnymi godzinami przez hour-separator */
    background: #fbfbfb;
}

.lesson-block {
    position: absolute;
    top: calc(var(--slot-vertical-padding, 12px) / 2);
    bottom: calc(var(--slot-vertical-padding, 12px) / 2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 8px;
    border-radius: 12px;
    cursor: pointer;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 3px solid rgba(255, 255, 255, 0.6);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    backdrop-filter: blur(10px);
    min-height: 0;
}

/* Dla lekcji z zieloną belką - zmniejsz bottom aby belka była widoczna */
.lesson-block.viewed-by-instructor {
    bottom: calc(var(--slot-vertical-padding, 12px) / 2 - 6px);
    padding-bottom: 8px; /* Zwiększ padding na dole aby belka była widoczna */
}

.lesson-block > * {
    position: relative;
    z-index: 1;
}

.lesson-participants-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(28px, 7vw, 88px);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: -2px;
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}

.lesson-block .lesson-resize-handle {
    position: absolute;
    top: calc(var(--slot-vertical-padding, 12px) / 2);
    bottom: calc(var(--slot-vertical-padding, 12px) / 2);
    right: -6px;
    width: 12px;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease, opacity 0.2s ease;
    background: transparent;
    z-index: 15;
}

.lesson-block .lesson-resize-handle::after {
    content: '';
    width: 3px;
    height: 60%;
    min-height: 18px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.lesson-block .lesson-resize-handle:hover,
.lesson-block.lesson-resizing .lesson-resize-handle {
    background: rgba(255, 255, 255, 0.25);
}

.lesson-block.lesson-resizing {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 6px 18px rgba(102, 126, 234, 0.5);
    transition: box-shadow 0.1s ease;
}

.lesson-block.lesson-dragging {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 10px 24px rgba(102, 126, 234, 0.55);
    cursor: grabbing;
    opacity: 0.95;
}

.lesson-block.lesson-dragging.lesson-dragging-invalid {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.6), 0 10px 24px rgba(231, 76, 60, 0.45);
}

.lesson-block.lesson-saving {
    opacity: 0.85;
    pointer-events: none;
}

body.lesson-resize-active {
    cursor: col-resize !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Dla pionowych bloków lekcji (instruktorzy) */
.page-instructor body.lesson-resize-active {
    cursor: ns-resize !important;
}

.page-instructor .lesson-block .lesson-resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    background: transparent;
    border-radius: 0 0 4px 4px;
}

.page-instructor .lesson-block .lesson-resize-handle:hover,
.page-instructor .lesson-block.lesson-resizing .lesson-resize-handle {
    background: rgba(255, 255, 255, 0.1);
}

body.lesson-drag-active {
    cursor: grabbing !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Dla pionowych bloków lekcji (instruktorzy) */
.page-instructor .lesson-block .lesson-drag-handle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: transparent;
    border-radius: 0 4px 4px 0;
    transition: background 0.2s ease;
}

.page-instructor .lesson-block .lesson-drag-handle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.page-instructor .lesson-block.lesson-dragging .lesson-drag-handle {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.1);
}

.page-instructor .lesson-block.lesson-dragging {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 10px 24px rgba(102, 126, 234, 0.55);
    cursor: grabbing;
    opacity: 0.95;
    z-index: 20;
}

.page-instructor .lesson-block.lesson-dragging.lesson-dragging-invalid {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.6), 0 10px 24px rgba(231, 76, 60, 0.45);
}

.page-instructor body.lesson-drag-active {
    cursor: grabbing !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.lesson-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.lesson-block:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
    border-left-width: 4px;
}

/* Przeszłe lekcje - domyślnie nierozliczone (czerwony) */
.lesson-block.past-lesson {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    opacity: 0.6;
    border-left-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.lesson-block.past-lesson::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

.lesson-block.past-lesson:hover {
    opacity: 0.75;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.lesson-block.past-lesson .lesson-time {
    background: rgba(255, 255, 255, 0.2);
}

/* Rozliczone lekcje - zielony kolor */
.lesson-block.past-lesson.settled {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    opacity: 0.6;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.lesson-block.past-lesson.settled::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
}

.lesson-block.past-lesson.settled:hover {
    opacity: 0.75;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* Lekcje grupowe - różowy gradient */
.lesson-block.group-course-lesson {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 50%, #ffa8c5 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-block.group-course-lesson::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
}

.lesson-block.group-course-lesson:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.lesson-block.past-lesson.group-course-lesson {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 50%, #ffa8c5 100%);
    opacity: 0.6;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.lesson-block.past-lesson.group-course-lesson:hover {
    opacity: 0.75;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.lesson-block strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.3;
    margin-bottom: 3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

.lesson-block .lesson-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.lesson-block .lesson-time {
    font-size: 10px;
    opacity: 0.98;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Zielona belka z gradientem na dole kafelka lekcji - oznacza że instruktor wyświetlił lekcję */
.lesson-viewed-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 50%, #27ae60 100%);
    border-radius: 0 0 12px 12px;
    z-index: 20;
    box-shadow: 0 -2px 8px rgba(39, 174, 96, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    pointer-events: none;
    opacity: 1;
}

/* Upewnij się że belka jest widoczna nawet na małych kafelkach */
.lesson-block.viewed-by-instructor .lesson-viewed-indicator {
    display: block !important;
    visibility: visible !important;
}


/* Scrollbar dla timeline - cieńszy */
.timeline-container::-webkit-scrollbar,
.timeline-row::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.timeline-container::-webkit-scrollbar-track,
.timeline-row::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.timeline-container::-webkit-scrollbar-thumb,
.timeline-row::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.timeline-container::-webkit-scrollbar-thumb:hover,
.timeline-row::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    height: 8px;
}

/* Recurring lessons modal */
.recurring-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.day-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 80px;
}

.day-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.day-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.day-card.active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

.day-card.unavailable {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.day-card.unavailable:hover {
    transform: none;
    border-color: #e0e0e0;
    background: #f0f0f0;
    box-shadow: none;
}

.day-card-day {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

.day-card.active .day-card-day {
    opacity: 1;
}

.day-card-date {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.day-card-month {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
}

.day-card.active .day-card-month {
    opacity: 0.9;
}

.day-card-status {
    font-size: 9px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.day-card.active .day-card-status {
    background: rgba(255, 255, 255, 0.2);
}

.recurring-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.time-slot-btn {
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
    text-align: center;
}

.time-slot-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.time-slot-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.time-slot-btn.unavailable {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.time-slot-btn.unavailable:hover {
    transform: none;
    border-color: #e0e0e0;
    background: #f0f0f0;
}

.time-slot-btn.occupied {
    background: #ffebee;
    color: #c62828;
    border-color: #ef5350;
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.time-slot-btn.occupied:hover {
    transform: none;
    border-color: #ef5350;
    background: #ffebee;
}

.time-slot-btn.occupied:disabled {
    background: #ffebee;
    color: #c62828;
    border-color: #ef5350;
    cursor: not-allowed;
}

.selected-lessons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-lesson-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.selected-lesson-info {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.selected-lesson-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.selected-lesson-remove:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    color: #2c3e50;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    min-width: 250px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

.toast.success {
    border-left: 4px solid #27ae60;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid #667eea;
}

.toast.warning {
    border-left: 4px solid #f39c12;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-message .toast-title {
    display: block;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.toast-message .toast-body {
    display: block;
    font-size: 13px;
    color: #4a5568;
}

/* Responsywność dla tabel statystyk */
@media (max-width: 1024px) {
    .stats-cards-grid .stat-table-row {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .stat-table-left {
        flex: 1;
        width: 100%;
        border-right: none;
        border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    }
    
    .stat-table-right {
        flex: 1;
    }
    
    .stat-metrics {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .stat-metric {
        min-width: 80px;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Menu kontekstowe */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 4px;
    z-index: 10000;
    display: none;
    min-width: 150px;
}

.context-menu.show {
    display: block;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.2s ease;
    user-select: none;
}

.context-menu-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.context-menu-item:active {
    transform: scale(0.98);
}

.context-menu-item span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item.danger {
    color: #c0392b;
    font-weight: 600;
}

.context-menu-item.danger:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

/* Scrollbar dla modali i siatki */
.availability-grid::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.availability-grid::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.availability-grid::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.availability-grid::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

/* Zarządzanie instruktorami */
.instructors-management {
    max-width: 1200px;
}

.add-instructor-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.add-instructor-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.add-instructor-section h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
}

.add-instructor-section h2::before {
    content: '👤';
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.instructor-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.form-group-full {
    width: 100%;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    gap: 20px;
    }
    
    .add-instructor-section {
        padding: 24px;
    }
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.checkbox-hint {
    font-size: 13px;
    color: #718096;
    display: block;
    margin-left: 32px;
    line-height: 1.5;
    font-style: italic;
}

.instructor-form .form-group select[multiple] {
    min-height: 100px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.instructor-form .form-group select[multiple]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 16px rgba(102, 126, 234, 0.2);
}

.instructor-form .form-group select[multiple] option {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 2px 0;
}

.instructor-form .form-group select[multiple] option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.instructor-form .form-group small {
    display: block;
    margin-top: 8px;
    color: #718096;
    font-size: 12px;
    font-style: italic;
    padding-left: 24px;
}

.instructor-form .btn-primary {
    margin-top: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.instructor-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.instructor-form .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.instructor-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.instructor-form .btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.instructors-list-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.instructors-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.instructor-category-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 36px;
}

.instructors-list-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.instructor-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.instructor-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

.instructor-card.instructor-hidden {
    border-style: dashed;
    border-color: rgba(102, 126, 234, 0.45);
    opacity: 0.85;
    background: linear-gradient(135deg, rgba(248, 250, 255, 0.9) 0%, rgba(236, 240, 255, 0.92) 100%);
}

.instructor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.instructor-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.instructor-icon.snowboard {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.instructor-icon.narty {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.instructor-card-info h3 {
    color: #2c3e50;
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
}

.instructor-card-info p {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0;
    font-weight: 500;
}

.instructor-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.instructor-card-visibility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin: 0 -4px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #edf2ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.18);
}

.instructor-card-visibility .checkbox-label {
    font-size: 13px;
    color: #4a5568;
}

.instructor-hidden-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(229, 62, 62, 0.12);
    border: 1px solid rgba(229, 62, 62, 0.25);
    color: #c53030;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructor-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.instructor-detail-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 600;
}

.instructor-detail-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

.instructor-rate-value {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3);
}

.instructor-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructor-category.snowboard {
    background: #3498db;
    color: white;
}

.instructor-category.narty {
    background: #e74c3c;
    color: white;
}

.instructor-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 2px solid #f0f0f0;
}

.instructor-card-footer button {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.instructor-card-footer .btn-secondary {
    background: #f0f4ff;
    border: 2px solid #667eea;
    color: #667eea;
}

.instructor-card-footer .btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.instructor-card-footer .btn-danger:hover {
    transform: translateY(-2px);
}

.instructor-actions button {
    padding: 8px 16px;
    font-size: 13px;
}

/* Flagi języków - style dla obrazków SVG */
.flag-icon {
    width: 16px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.instructor-flags .flag-icon {
    width: 14px;
    height: 10px;
    margin: 0 1px;
}

.instructor-name-cell .instructor-flags .flag-icon {
    width: 12px;
    height: 9px;
    margin: 0 1px;
}

.language-flags {
    display: inline-block;
    vertical-align: middle;
}

.language-flags::before {
    content: '🌐 ';
    font-size: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.instructor-flags,
.instructor-name-cell .instructor-flags {
    display: inline-block;
    vertical-align: middle;
}

/* Responsywność dla kart instruktorów */
@media (max-width: 1024px) {
    .instructors-table {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .instructors-table {
        grid-template-columns: 1fr;
    }
    
    .instructor-card {
        padding: 20px;
    }
    
    .instructor-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}

/* Statystyki */
.statistics-container {
    max-width: 100%;
    width: 100%;
}

.statistics-container h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 800;
    display: block;
}

.stats-filters {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.stats-date-input {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.stats-date-input:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.stats-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.stats-filters .btn-primary,
.stats-filters .btn-secondary {
    width: auto;
    margin-top: 20px;
}

.statistics-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 200px;
    width: 100%;
}

/* Sekcje kategorii statystyk */
.stats-category-section {
    margin-bottom: 30px;
    width: 100%;
}

.stats-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.stats-category-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.stats-category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.stats-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-table-row {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-table-row:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-table-left {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-right: 2px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Wyrównanie szerokości lewych kolumn w obrębie kategorii */
.stats-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.stats-cards-grid .stat-table-row {
    display: grid;
    grid-template-columns: 320px 1fr;
    align-items: stretch;
}

.stat-table-right {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-instructor-info {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.stat-ranking-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.stat-instructor-details {
    flex: 1;
    min-width: 0;
}

.stat-instructor-name {
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-instructor-rate {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.rate-label {
    color: #7f8c8d;
    font-weight: 600;
}

.rate-value {
    color: #667eea;
    font-weight: 800;
}

.stat-metrics {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: space-around;
}

.stat-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    min-width: 100px;
    transition: all 0.2s ease;
}

.stat-metric:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.stat-metric.highlight {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    border: 2px solid #f39c12;
}

.stat-metric.highlight .metric-value {
    color: #f39c12;
}

.metric-icon {
    font-size: 28px;
}

.metric-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.metric-label {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 20px;
    color: #2c3e50;
    font-weight: 800;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.stat-header h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin: 0;
}

.stat-rate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.stat-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.stat-item-modern:hover {
    background: #f0f4ff;
    border-color: rgba(102, 126, 234, 0.2);
}

.stat-item-modern.highlight {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.stat-item-modern.highlight:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.stat-icon-modern {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label-modern {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 600;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value-modern {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.3px;
}

.stat-footer {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.stat-avg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.stat-avg-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

.stat-avg-value {
    font-size: 16px;
    font-weight: 800;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
    }
    to { 
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.group-course-modal-content {
    max-width: 1100px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.group-course-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-content.instructor-pricing-modal {
    max-width: 960px;
    width: 92%;
}

.modal-content.instructor-pricing-modal .pricing-table-card {
    padding: 26px 32px;
}

.modal-content.instructor-pricing-modal .pricing-table-responsive {
    max-height: none;
}

/* Przełącznik typu wynagrodzenia */
.pricing-type-switch {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    flex: 1;
}

.switch-label:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.switch-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.switch-label input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.switch-label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.switch-label span {
    font-size: 15px;
    color: #333;
    transition: all 0.2s ease;
}

.pricing-mode-container {
    margin-top: 16px;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #bbb;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 28px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
}

/* Modal szczegółów lekcji - nowy layout z kolumną po prawej */
.lesson-details-modal-content {
    max-width: 900px !important;
    display: flex;
    flex-direction: column;
}

/* Modal szczegółów lekcji u instruktora - zwiększona szerokość */
#lessonDetailsModal .modal-content {
    max-width: 800px;
    width: 90%;
}

.lesson-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    margin-top: 20px;
    align-items: stretch;
}

.lesson-details-main {
    flex: 1;
}

.lesson-details-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 100%;
}

#lessonDetails {
    padding: 22px 18px 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 12px;
    line-height: 1.9;
    border: 1px solid rgba(102, 126, 234, 0.1);
    min-width: 0; /* Pozwala na prawidłowe zawijanie */
}

/* Grid layout dla szczegółów lekcji */
.lesson-details-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lesson-detail-row {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(200px, 1fr);
    gap: 24px;
    align-items: start;
    padding: 2px 0;
    min-height: auto;
}

.lesson-detail-row-full {
    grid-template-columns: 1fr;
}

.lesson-detail-label {
    color: #2c3e50;
    font-weight: 700;
    font-size: 15px;
    text-align: left;
    min-width: 200px;
    max-width: 240px;
    flex-shrink: 0;
    padding-right: 8px;
}

.lesson-detail-value {
    color: #4a5568;
    font-size: 15px;
    text-align: left;
    word-break: break-word;
    min-width: 200px;
    overflow-wrap: break-word;
    line-height: 1.6;
}

.lesson-detail-value a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lesson-detail-value a:hover {
    color: #5568d3;
    text-decoration: underline;
}

#lessonDetails strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 120px;
    font-weight: 700;
}

#lessonDetails p {
    margin-bottom: 14px;
    color: #4a5568;
    font-size: 15px;
}

/* Kafelki akcji w szczegółach lekcji */
.lesson-details-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.action-tile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.action-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.action-tile:hover::before {
    opacity: 1;
}

.action-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.action-tile:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-tile-icon {
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.action-tile-label {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Różne gradienty dla różnych akcji */
#editLesson {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#editLesson:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

#toggleLessonSettled {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

#toggleLessonSettled:hover {
    background: linear-gradient(135deg, #0d7a70 0%, #2dd469 100%);
}

#toggleLessonSettled.settled {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

#toggleLessonSettled.settled:hover {
    background: linear-gradient(135deg, #d97ae8 0%, #e0455a 100%);
}

#lessonPriceBtn {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

#lessonPriceBtn:hover {
    background: linear-gradient(135deg, #e4c055 0%, #eb8f6d 100%);
}

#closeLessonDetails {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

#closeLessonDetails:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
}

/* Responsywność */
@media (max-width: 768px) {
    .lesson-details-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lesson-details-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .action-tile {
        flex: 1 1 calc(50% - 6px);
        min-height: 90px;
        padding: 16px;
    }
    
    .action-tile-icon {
        font-size: 28px;
    }
    
    .action-tile-label {
        font-size: 12px;
    }
}

#lessonDetails a[href^="tel:"] {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 4px;
}

#lessonDetails a[href^="tel:"]:hover {
    color: #5568d3;
    background: rgba(102, 126, 234, 0.1);
    text-decoration: underline;
}

/* Panel instruktora - kalendarz */
.instructor-calendar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    gap: 20px;
}

.time-column {
    width: 100px;
    display: flex;
    flex-direction: column;
}

.time-slot {
    height: 60px;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
    background: #f8f9fa;
}

.lessons-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.lesson-item {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.lesson-item:hover {
    transform: translateX(5px);
}

.lesson-item h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.lesson-item p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.no-lessons {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Siatka dyspozycyjności */
.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.availability-content {
    padding-top: 8px;
}

.availability-slot {
    padding: 16px 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
    -ms-touch-action: none;
    -webkit-touch-callout: none;
}

.availability-slot.has-reason {
    padding: 18px 10px;
}

.availability-slot.drag-preview {
    outline: 3px solid rgba(229, 62, 62, 0.85);
    outline-offset: -3px;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.18), 0 4px 14px rgba(229, 62, 62, 0.25);
    transform: translateY(-2px) scale(1.04);
}

.availability-slot:hover {
    border-color: #667eea;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.availability-slot.available {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #48bb78;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.availability-slot.available:hover {
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.availability-slot.unavailable {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.availability-slot.unavailable::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.availability-slot.unavailable:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.availability-slot.unavailable:hover::before {
    left: 100%;
}

.availability-slot.unavailable::after {
    content: '🚫';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    opacity: 0.7;
    z-index: 1;
    transition: all 0.2s ease;
}

.availability-slot.unavailable:hover::after {
    opacity: 1;
    transform: scale(1.1);
}

/* Powód niedostępności */
.availability-slot .slot-time {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 4px;
}

.availability-slot .slot-reason {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #cbd5e0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.availability-slot.unavailable .slot-time {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.availability-slot.unavailable .slot-reason {
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* Tooltip z powodem w kalendarzu */
.time-slot[data-reason]:not([data-reason=""]):hover::after {
    content: "📝 " attr(data-reason);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Niedostępne sloty w kalendarzu */
.time-slot.unavailable {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 50%, #ee5a52 100%);
    color: white;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    z-index: 10;
}

.time-slot.unavailable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.time-slot.unavailable .slot-reason-text {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    line-height: 1.2;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: inline-block;
    width: fit-content;
    position: relative;
}

/* Rozciągnięte napisy powodów przez wiele slotów */
.reason-overlay {
    position: absolute;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 50%, #ee5a52 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35), 0 4px 12px rgba(0, 0, 0, 0.18);
    border-left: 3px solid rgba(255, 255, 255, 0.6);
    border-right: 1px solid rgba(255, 107, 107, 0.25);
    border-top: 1px solid rgba(255, 107, 107, 0.2);
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    backdrop-filter: blur(10px);
    z-index: 100;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.3px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 14px;
    padding-left: 12px;
}

.reason-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.reason-overlay-empty {
    background: linear-gradient(135deg, #ff7a7a 0%, #ff5c5c 50%, #f86a63 100%);
}

.reason-overlay:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 24px rgba(255, 107, 107, 0.45), 0 4px 14px rgba(0, 0, 0, 0.2);
}

.time-slot.unavailable:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3742 50%, #e53935 100%);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px) scale(1.02);
    border-left-width: 4px;
}

/* Dni nieobecności instruktora */
.instructor-row.unavailable-day {
    border: 2px solid rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(238, 90, 82, 0.1) 100%);
}

.instructor-row.unavailable-day .instructor-name-cell {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.instructor-row.unavailable-day .timeline-row {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(238, 90, 82, 0.05) 100%);
}

.instructor-row.unavailable-day .time-slot {
    background: transparent;
    cursor: not-allowed;
    /* border-right usunięty - linie tylko między pełnymi godzinami przez hour-separator */
}

.instructor-row.unavailable-day .time-slot.hour-separator {
    border-right: 1px solid rgba(0, 0, 0, 0.2); /* Linia tylko między pełnymi godzinami */
}

.instructor-row.unavailable-day .time-slot:hover {
    background: transparent;
}

.instructor-row.unavailable-day .timeline-grid {
    border: 1px solid #363d40;
}

/* Kliknięcie w nazwę instruktora */
.instructor-name-cell {
    cursor: pointer;
    position: relative;
}

.instructor-name-cell::after {
    content: '⚙️';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.instructor-name-cell:hover::after {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
}

.instructor-name-cell:hover {
    background: linear-gradient(90deg, #f0f4ff 0%, #e8f0fe 100%) !important;
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* Responsywność */
/* Duże tablety i małe desktopy */
@media (max-width: 1400px) {
    .tabs-container {
        gap: 6px;
    }
    
    .tabs-container .tab-btn {
        padding: 11px 8px;
        font-size: 13px;
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .time-header-cell {
        flex: 0 0 auto;
        min-width: 45px;
        width: 45px;
        font-size: 10px;
        padding: 10px 0px;
        box-sizing: border-box;
    }

    .time-slot {
        flex: 0 0 auto;
        min-width: 45px;
        width: 45px;
        font-size: 11px;
        box-sizing: border-box;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header h1 {
        text-align: center;
        font-size: 22px;
    }
    
    .header-custom-logo {
        order: 1;
    }
    
    .header-logo {
        order: 2;
        justify-content: center;
    }
    
    .header-actions {
        order: 3;
        justify-content: center;
    }

    .logo-box {
        padding: 8px 14px;
        border-radius: 12px;
    }

    .logo {
        height: 31px;
    }

    .main-content {
        padding: 16px;
    }

    .instructor-column-header {
        width: 120px;
        min-width: 120px;
        font-size: 12px;
        padding: 10px 8px;
        box-sizing: border-box;
    }

    .instructor-name-cell {
        width: 120px;
        min-width: 120px;
        padding: 10px 8px;
        box-sizing: border-box;
    }

    .instructor-name-cell h4 {
        font-size: 13px;
    }

    .instructor-name-cell p {
        font-size: 10px;
    }

    .time-header-cell {
        flex: 0 0 auto;
        min-width: 40px;
        width: 40px;
        font-size: 9px;
        padding: 5px 0px;
        box-sizing: border-box;
    }

    .time-slot {
        flex: 0 0 auto;
        min-width: 40px;
        width: 40px;
        font-size: 10px;
        box-sizing: border-box;
    }

    .lesson-block {
        font-size: 9px;
        padding: 1px 3px;
        top: 4px;
        bottom: 4px;
        min-height: 50px;
    }
    
    .calendar-header {
        font-size: 10px;
    }

    .lesson-block strong {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .lesson-block .lesson-time {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .date-picker-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .calendar-controls h2 {
        font-size: 16px;
    }
    
    .date-picker-input {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .date-picker-input::-webkit-calendar-picker-indicator {
        font-size: 14px;
        padding: 3px;
    }

    /* Custom Date Picker Mobile */
    .date-picker-btn {
        width: 40px;
        height: 40px;
    }

    .calendar-icon {
        width: 20px;
        height: 20px;
    }

    .custom-calendar {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }

    .calendar-header {
        padding: 16px;
    }

    .calendar-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .calendar-month-year {
        font-size: 16px;
    }

    .calendar-days {
        padding: 0 12px 12px;
    }

    .calendar-day {
        height: 36px;
        font-size: 13px;
    }

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

    .instructor-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .calendar-controls {
        flex-direction: column;
        gap: 15px;
        padding: 16px 20px;
    }

    .calendar-controls h2 {
        font-size: 18px;
    }

    .tabs-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }
    
    .tabs-container .tab-btn {
        padding: 10px 6px;
        font-size: 12px;
        flex: 1 1 0;
        gap: 4px;
        white-space: nowrap;
        min-width: 0;
    }
    
    .tabs-container .tab-btn span:not(.tab-icon):not(.urgent-lessons-badge):not(.notification-badge) {
        font-size: 11px;
    }
    
    .tab-icon {
        font-size: 16px;
        flex-shrink: 0;
    }
    
    /* Na bardzo małych ekranach pokaż tylko ikony */
    @media (max-width: 480px) {
        .tabs-container .tab-btn span:not(.tab-icon):not(.urgent-lessons-badge):not(.notification-badge) {
            display: none;
        }
        
        .tabs-container .tab-btn {
            padding: 10px 4px;
            flex: 1 1 0;
            min-width: 0;
            justify-content: center;
            position: relative;
        }
        
        .tabs-container .tab-btn[data-view="lessonCloud"] span.urgent-lessons-badge,
        .tabs-container .tab-btn[data-view="groupTraining"] span.notification-badge {
            display: inline-block;
            position: absolute;
            top: 4px;
            right: 4px;
            font-size: 9px;
            padding: 1px 4px;
            min-width: 16px;
            line-height: 14px;
        }
    }

    .modal-content {
        padding: 24px;
        border-radius: 16px;
    }
    
    .modal-content.instructor-pricing-modal {
        width: 96%;
        max-width: none;
    }

    .availability-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
        padding: 16px;
    }

    .availability-slot {
        padding: 12px 8px;
        font-size: 11px;
    }
    
    .stats-filters {
        flex-wrap: wrap;
        padding: 16px;
    }
    
    .filter-group {
        flex: 1;
        min-width: 140px;
    }
    
    .statistics-cards {
        grid-template-columns: 1fr;
    }
    
    .stat-body {
        grid-template-columns: 1fr;
    }
    }
    
    .stat-header h3 {
        font-size: 17px;
    }
    
    .stat-value {
        font-size: 18px;
    }
}

/* ============================================
   CHMURA LEKCJI - STYLE GŁÓWNE
   ============================================ */
.lesson-cloud-container {
    padding: 20px;
    width: 100%;
    max-width: 100%;
}

.lesson-cloud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.lesson-cloud-header h2 {
    margin: 0;
    color: #667eea;
    font-size: 24px;
}

.lesson-cloud-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lesson-cloud-columns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 25px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.lesson-cloud-column {
    min-width: 0;
    box-sizing: border-box;
}

.lesson-cloud-column {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.lesson-cloud-column:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.cloud-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e0e0e0;
}

.cloud-column-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cloud-lessons-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    min-width: 40px;
    text-align: center;
}

.cloud-lessons-list {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    padding-right: 5px;
}

.cloud-lessons-list::-webkit-scrollbar {
    width: 8px;
}

.cloud-lessons-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cloud-lessons-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.cloud-lessons-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

.cloud-lesson-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.cloud-lesson-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

@media (max-width: 768px) {
    .lesson-cloud-columns {
        grid-template-columns: 1fr;
    }
    
    .lesson-cloud-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lesson-cloud-actions {
        flex-direction: column;
    }
    
    .lesson-cloud-actions button {
        width: 100%;
    }
}

/* Zarządzanie administratorami */
.admins-management {
    padding: 20px;
}

.admin-logo-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-upload-container {
    margin-top: 20px;
}

.current-logo-preview {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-logo-preview img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
}

.no-logo-text {
    color: #6c757d;
    font-style: italic;
}

.logo-upload-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.logo-hint {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* Ustawienia SMS */
.sms-settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sms-settings-container {
    margin-top: 20px;
}

.sms-toggle-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sms-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.sms-toggle-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.sms-toggle-text {
    color: #2c3e50;
}

.sms-description {
    margin: 10px 0 0 32px;
    color: #6c757d;
    font-size: 14px;
}

.sms-config-section {
    padding: 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

.sms-config-section .form-group {
    margin-bottom: 20px;
}

.sms-config-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.sms-config-section .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
}

.sms-config-section textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.sms-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.sms-info-box {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.sms-info-box h4 {
    margin: 0 0 15px 0;
    color: #1976D2;
    font-size: 16px;
}

.sms-info-box ol {
    margin: 0;
    padding-left: 20px;
}

.sms-info-box li {
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.6;
}

.sms-info-box a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
}

.sms-info-box a:hover {
    text-decoration: underline;
}

.sms-info-box p {
    margin: 15px 0 0 0;
    padding: 10px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ff9800;
    border-radius: 4px;
    font-size: 14px;
}

/* Widok Ustawień */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-container h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
}

.settings-container h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 20px;
}

.settings-container .section-description {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

/* Sekcja uprawnień instruktorów */
.instructor-permissions-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.instructor-permissions-container {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.instructor-permissions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.instructor-permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
}

.instructor-permission-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.permission-instructor-name {
    flex: 1;
    font-size: 16px;
    color: #34495e;
    min-width: 200px;
}

.permission-checkboxes {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.permission-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #555;
    transition: color 0.2s ease;
}

.permission-checkbox-label:hover {
    color: #667eea;
}

.permission-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 4px;
}

.permission-checkbox-label input[type="checkbox"]:checked {
    background-color: #667eea;
}

.permissions-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.admin-list-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-list-section h3 {
    margin-top: 0;
}

.admins-list {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 1024px) {
    .admins-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admins-list {
        grid-template-columns: 1fr;
    }
}

.add-admin-section {
    border-top: 2px solid #ecf0f1;
    padding-top: 20px;
    margin-top: 20px;
}

.add-admin-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.admin-list-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.admin-list-card .admin-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.admin-list-card .admin-details {
    flex: 1;
}

.admin-list-card .admin-details h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
}

.admin-list-card .admin-details p {
    margin: 4px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.admin-color-picker {
    width: 50px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-color-picker:hover {
    border-color: #2196F3;
    transform: scale(1.05);
}

.admin-color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.admin-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.admin-colors-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-colors-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.admin-color-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.admin-color-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.admin-details h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.admin-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.admin-role {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.admin-role.super-admin {
    background: #f39c12;
}

.change-color-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.change-color-btn:hover {
    background: #5a6fd8;
}

/* Color picker */
.color-picker-section {
    margin: 20px 0;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-option.selected {
    border-color: #333;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option.selected::after {
    opacity: 1;
}

/* Zarządzanie zakładkami administratora */
.tab-permission-item {
    transition: all 0.2s ease;
}

.tab-permission-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: #667eea !important;
}

.tab-permission-item input[type="checkbox"]:checked {
    accent-color: #667eea;
}

/* Kropka administratora w lekcji */
.lesson-admin-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.lesson-price-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Grafik instruktora */
.schedule-management {
    padding: 20px;
}

.schedule-controls {
    margin-bottom: 20px;
}

.year-month-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.year-month-selector h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.calendar-header {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.calendar-day {
    background: white;
    padding: 15px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.calendar-day:hover {
    background: #f0f4ff;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #999;
    cursor: default;
}

.calendar-day.other-month:hover {
    background: #f8f9fa;
}

.calendar-day.unavailable {
    background: #ffebee;
    color: #d32f2f;
    border: 2px solid #f44336;
}

.calendar-day.unavailable:hover {
    background: #ffcdd2;
}

.calendar-day.today {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.calendar-day.today.unavailable {
    background: #ffebee;
    color: #d32f2f;
    border: 2px solid #f44336;
}

.day-number {
    font-size: 16px;
    font-weight: 500;
}

.day-status {
    font-size: 10px;
    margin-top: 2px;
    opacity: 0.8;
}

.schedule-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.info-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.info-color.available {
    background: white;
}

.info-color.unavailable {
    background: #ffebee;
    border-color: #f44336;
}

/* Responsywność dla kalendarza grafik */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 50px;
        padding: 10px 4px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .year-month-selector h3 {
        font-size: 20px;
    }
    
    .schedule-info {
        flex-direction: column;
        gap: 10px;
    }
}

.instructor-container .single-calendar .time-column {
    display: none !important;
}

.instructor-container .single-calendar .time-column-header {
    display: none !important;
}

.instructor-container .calendar-date-bar {
    position: sticky;
    top: 90px;
}

.instructor-card-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 16px;
 }

 .instructor-order-control {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-left: auto;
 }
 
 .instructor-order-control label {
     font-size: 12px;
     text-transform: uppercase;
     font-weight: 600;
     color: #4a5568;
 }
 
 .instructor-order-control input {
     width: 80px;
     padding: 6px 8px;
     border: 2px solid #e2e8f0;
     border-radius: 8px;
     font-weight: 600;
     transition: all 0.2s ease;
 }
 
 .instructor-order-control input:focus {
     outline: none;
     border-color: #667eea;
     box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
 }

.instructor-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    margin-bottom: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
}

.instructor-category-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
}

.instructor-category-header .category-count {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: #2c3e50;
}

.instructor-category-header.snowboard-category {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
}

.instructor-category-header.ski-category {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.1));
}

.instructors-list-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: 20px;
 }

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

.instructors-order-actions .btn-secondary {
    width: auto;
    white-space: nowrap;
}

.order-modal-content {
    max-width: 720px;
}

.order-modal-hint {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 20px;
}

.order-modal-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.order-column h3 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.order-list {
    min-height: 200px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-list.drag-over-empty {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    background: white;
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none;
    -webkit-touch-callout: none;
}

.order-item:active {
    cursor: grabbing;
}

.order-item[draggable="true"] {
    cursor: grab;
}

.order-item[draggable="true"]:active {
    cursor: grabbing;
}

.order-item.dragging {
    opacity: 0.7;
    transform: scale(0.98);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.2);
}

.order-item.drag-over {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.order-item span {
    font-weight: 600;
    color: #2c3e50;
}

.order-item-handle {
    font-size: 18px;
    color: #4c51bf;
    margin-left: 12px;
    user-select: none;
    flex-shrink: 0;
}

.order-item .order-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.order-item .order-item-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #718096;
}

.order-item-hidden-tag {
    margin-top: 6px;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(229, 62, 62, 0.12);
    border: 1px solid rgba(229, 62, 62, 0.25);
    color: #c53030;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.order-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.order-modal-actions .btn-secondary {
    background: #edf2f7;
}

.category-order-modal .order-list {
    min-height: auto;
}

.category-order-list .order-item {
    justify-content: space-between;
}

.category-order-list .order-item .order-item-info {
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.category-order-list .order-item .order-item-category {
    font-size: 13px;
    text-transform: none;
    color: #4a5568;
}

@media (max-width: 480px) {
    .order-modal-actions {
        flex-direction: column;
    }

    .order-modal-actions .btn-primary,
    .order-modal-actions .btn-secondary {
        width: 100%;
    }
}

/* ============================================
   SZKOLENIA GRUPOWE
   ============================================ */

.group-training-container {
    padding: 20px;
}

.group-training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.group-training-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.group-training-header h2 {
    margin: 0;
    color: #34495e;
}

.group-courses-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.group-course-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.group-course-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.group-course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.group-course-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.course-category {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.course-type {
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
}

.group-course-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.group-course-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.info-value {
    color: #34495e;
}

.course-instructors-list,
.course-clients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
}

.course-instructor-item,
.course-client-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.group-course-client-item {
    transition: all 0.2s ease;
}

.group-course-client-item:hover {
    background: #fff5f8;
    border-left-color: #ff6b9d;
    transform: translateX(4px);
}

.course-action-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.course-action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
}

.course-action-tile:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.course-action-tile:hover .tile-icon {
    transform: scale(1.2);
    color: white;
}

.course-action-tile:hover .tile-label {
    color: white;
}

.course-action-tile .tile-icon {
    font-size: 32px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.course-action-tile .tile-label {
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.clickable-clients:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

.clients-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.client-detail-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.client-detail-card:hover {
    background: linear-gradient(135deg, #fff5f8 0%, #ffffff 100%);
    border-color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.client-detail-card.confirmed {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.3) 0%, rgba(34, 153, 84, 0.3) 50%, rgba(30, 132, 73, 0.3) 100%);
    border-color: rgba(39, 174, 96, 0.5);
    color: #34495e;
    position: relative;
}

.client-detail-card.confirmed .client-checkbox-container {
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.client-detail-card.confirmed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.4) 0%, rgba(34, 153, 84, 0.4) 50%, rgba(30, 132, 73, 0.4) 100%);
    z-index: 0;
    border-radius: 12px;
    pointer-events: none;
}

.client-detail-card.confirmed > * {
    position: relative;
    z-index: 1;
}

.client-detail-card.confirmed:hover {
    background: linear-gradient(135deg, rgba(34, 153, 84, 0.35) 0%, rgba(30, 132, 73, 0.35) 50%, rgba(25, 111, 61, 0.35) 100%);
    border-color: rgba(30, 132, 73, 0.6);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
}

.client-detail-card.confirmed:hover::before {
    background: linear-gradient(135deg, rgba(34, 153, 84, 0.45) 0%, rgba(30, 132, 73, 0.45) 50%, rgba(25, 111, 61, 0.45) 100%);
}

.client-detail-card.confirmed .client-name {
    color: #34495e;
    font-weight: 700;
}

.client-detail-card.confirmed .detail-label,
.client-detail-card.confirmed .detail-value {
    color: #2c3e50;
}

.client-detail-card.confirmed .detail-value a {
    color: #667eea;
    text-decoration: underline;
}

.client-checkbox-container {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 10;
    pointer-events: auto;
}

.client-confirm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.client-confirm-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #27ae60;
}

.client-confirm-checkbox input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.client-confirm-checkbox .checkbox-label {
    font-weight: 600;
    font-size: 13px;
    color: #34495e;
}

.client-detail-card.confirmed .checkbox-label {
    color: #2c3e50;
    font-weight: 600;
}

.confirmed-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(4px);
}

.participants-counter {
    border-left: 4px solid #27ae60;
}

.client-number {
    position: absolute;
    left: 60px;
    top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    z-index: 5;
    flex-shrink: 0;
}

.client-info {
    flex: 1;
    min-width: 0;
    margin-left: 100px;
    margin-right: 60px;
}

.client-name {
    font-size: 18px;
    font-weight: 700;
    color: #34495e;
    margin-bottom: 12px;
}

.client-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.detail-value {
    color: #34495e;
}

.detail-value a {
    color: #667eea;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.client-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    z-index: 15;
}

.btn-payment {
    padding: 8px 12px;
    background: #f5f5f5;
    color: #34495e;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
}

.btn-payment:hover {
    background: #e8f5e9;
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.btn-payment.paid {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-color: #27ae60;
    color: white;
}

.btn-payment.paid:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    border-color: #1e8449;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-payment.paid::after {
    content: '';
}

.course-clients-list-content {
    margin: 20px 0;
}

/* Style dla przycisków wyboru instruktorów */
.instructors-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.instructor-select-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 600;
    color: #34495e;
    text-align: left;
    width: 100%;
}

.instructor-select-btn:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.instructor-select-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.instructor-select-btn.selected:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.instructor-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.instructor-name {
    flex: 1;
}

/* Kalendarz zakresu dat dla turnusów */
.date-range-picker-container {
    position: relative;
    width: 100%;
}

.date-range-display {
    width: 100%;
    padding: 14px 18px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.date-range-display:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.date-range-display.placeholder {
    color: #999;
}

.date-range-text {
    color: #34495e;
    font-weight: 500;
}

.date-range-text strong {
    color: #667eea;
    font-weight: 600;
}

.date-range-calendar {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 2001;
    min-width: 320px;
    animation: fadeInDown 0.3s ease;
    max-height: 500px;
    overflow: visible;
}

.date-range-picker-container {
    position: relative;
    width: 100%;
    z-index: 1;
}

.group-course-modal-content .date-range-picker-container {
    z-index: 10;
}

.date-range-calendar.show {
    display: block;
}

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

.calendar-header-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 16px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 12px;
}

.calendar-nav-btn-range {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    color: #34495e;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.calendar-nav-btn-range:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.calendar-month-year-range {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.calendar-weekdays-range {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.weekday-range {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #667eea;
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days-range {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-range {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.calendar-day-range:not(.other-month):hover {
    background: #f0f4ff;
    transform: scale(1.1);
    z-index: 10;
}

.calendar-day-range.other-month {
    color: #ccc;
    cursor: default;
}

.calendar-day-range.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.calendar-day-range.range-start {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    border-radius: 8px 0 0 8px;
}

.calendar-day-range.range-end {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    border-radius: 0 8px 8px 0;
}

.calendar-day-range.in-range {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #667eea;
    font-weight: 600;
    border-radius: 0;
}

.calendar-day-range.range-start.in-range {
    border-radius: 8px 0 0 8px;
}

.calendar-day-range.range-end.in-range {
    border-radius: 0 8px 8px 0;
}

.calendar-day-range.range-start.range-end {
    border-radius: 8px;
}

/* ============================================
   TYPY GRUP - ZARZĄDZANIE
   ============================================ */

.group-types-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px;
}

.group-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.group-type-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.group-type-name {
    flex: 1;
    font-size: 15px;
    color: #34495e;
    font-weight: 500;
}

.group-type-name.editing {
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 6px 10px;
    background: white;
}

.group-type-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-icon-small.edit:hover {
    background: #667eea;
    color: white;
}

.btn-icon-small.delete:hover {
    background: #e74c3c;
    color: white;
}

.btn-icon-small.save:hover {
    background: #27ae60;
    color: white;
}

.btn-icon-small.cancel:hover {
    background: #95a5a6;
    color: white;
}

.group-types-add-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border: 2px dashed #d0d0d0;
}

.group-types-empty {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.group-types-empty i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

/* ============================================
   BELKA NAWIGACYJNA ADMINA (MOBILNA)
   ============================================ */

.admin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(102, 126, 234, 0.18);
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(12px);
    z-index: 9999;
    width: 100%;
    min-height: 90px;
}

.admin-bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 16px;
}

.admin-bottom-nav-btn .nav-icon {
    font-size: 32px;
}

.admin-bottom-nav-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.admin-bottom-nav-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.admin-bottom-nav-btn .messenger-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 4px;
}

/* ============================================
   MOBILNY WIDOK KALENDARZA ADMINA
   ============================================ */

.admin-calendar-mobile {
    display: none !important;
}

/* Widok mobilny pokazuje się tylko gdy klasa mobile-view jest aktywna */
.admin-container.mobile-view .admin-calendar-mobile {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 0;
    height: 100%;
    padding: 0 16px;
    position: relative;
    overflow: visible;
}

.mobile-instructors-slider-wrapper {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    min-height: 0;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.mobile-instructors-track {
    display: flex;
    height: 100%;
}

.mobile-instructor-calendar-wrapper {
    min-width: calc(50% - 8px);
    width: calc(50% - 8px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    margin-right: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-instructor-calendar-wrapper:last-child {
    margin-right: 0;
}

.mobile-instructor-header {
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-instructor-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d92 100%);
}

/* Użyj stylów single-calendar jak w widoku instruktora */
.admin-container.mobile-view .single-calendar {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-container.mobile-view .time-column {
    display: none;
}

.admin-container.mobile-view .lesson-column {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admin-container.mobile-view .lesson-track {
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
}

.admin-container.mobile-view .lesson-hour-row {
    flex: 1;
    min-height: 0;
    height: var(--hour-row-height, calc(100% / 14));
}

/* Etykiety godzin w widoku mobilnym */
.admin-container.mobile-view .lesson-hour-row .hour-label {
    position: absolute;
    left: 0;
    top: 6px;
    padding: 2px 8px;
    display: inline-block;
    width: auto;
    min-width: 72px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(224, 229, 255, 0.9) 0%, rgba(198, 207, 255, 0.9) 100%);
    color: #2f3640;
    font-size: 22px !important; /* 2x większa czcionka (11px * 2 = 22px) */
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    z-index: 5;
}

/* Linia aktualnej godziny w widoku mobilnym */
.admin-container.mobile-view .current-time-line {
    height: 3px !important;
    background: #e74c3c !important;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.8), 0 0 4px rgba(231, 76, 60, 0.6) !important;
    position: absolute !important;
    pointer-events: none !important;
    z-index: 99999 !important;
    transform: translateY(-1.5px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Linia czasu w kontenerze mobile-calendar - przebiega przez wszystkich instruktorów */
.admin-calendar-mobile {
    position: relative;
}

.admin-calendar-mobile .current-time-line {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
}

.admin-container.mobile-view .current-time-line::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #e74c3c !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.8) !important;
    z-index: 100000 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.admin-container.mobile-view .current-time-line::after {
    content: attr(data-time) !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #e74c3c !important;
    color: white !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    z-index: 100000 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-calendar-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0 20px;
    flex-shrink: 0;
}

.mobile-calendar-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-calendar-indicator.active {
    background: #667eea;
    width: 24px;
    border-radius: 4px;
}

/* Ukryj widok desktopowy w trybie mobilnym */
.admin-container.mobile-view .admin-calendar-desktop,
.admin-container.mobile-view .horizontal-calendar.admin-calendar-desktop {
    display: none !important;
}

.admin-container.mobile-view .admin-calendar-mobile {
    display: block !important;
}

/* Belka nawigacyjna - zawsze widoczna gdy widok mobilny jest włączony */
.admin-container.mobile-view .admin-bottom-nav {
    display: flex !important;
}

.admin-container.mobile-view .tabs-container {
    display: none !important;
}

/* Ukryj header w wersji mobilnej */
.admin-container.mobile-view .header {
    display: none !important;
}

.admin-container.mobile-view .main-content {
    padding-bottom: 110px; /* Zwiększone dla większej belki */
    display: flex;
    flex-direction: column;
    height: 100vh; /* Cała wysokość ekranu bez header */
    overflow: hidden;
    max-height: 100vh;
    padding-top: 0;
}

.admin-container.mobile-view #calendarView {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.admin-container.mobile-view .calendar-controls {
    flex-shrink: 0;
    margin-bottom: 12px;
    padding: 12px 16px 0;
}


/* Domyślnie belka jest ukryta gdy widok mobilny nie jest włączony */
.admin-container:not(.mobile-view) .admin-bottom-nav {
    display: none !important;
}

/* ============================================
   PRZEŁĄCZNIK WIDOKU W USTAWIENIACH
   ============================================ */

.view-mode-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
}

.view-mode-toggle-container {
    margin-top: 15px;
}

.view-mode-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.mobile-logout-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    white-space: nowrap;
}

.mobile-logout-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.mobile-logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.view-mode-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.view-mode-toggle-checkbox {
    display: none;
}

.view-mode-toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.3s ease;
}

.view-mode-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-mode-toggle-checkbox:checked + .view-mode-toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.view-mode-toggle-checkbox:checked + .view-mode-toggle-slider::before {
    transform: translateX(24px);
}

.view-mode-toggle-text {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.view-mode-hint {
    margin-top: 10px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsywność dla belki nawigacyjnej */
/* Domyślnie belka jest ukryta, ale pokazuje się gdy widok mobilny jest włączony */
@media (min-width: 769px) {
    /* Na desktopie domyślnie ukryj belkę, chyba że widok mobilny jest włączony */
    .admin-container:not(.mobile-view) .admin-bottom-nav {
        display: none !important;
    }
    
    /* Gdy widok mobilny jest włączony, pokaż belkę nawet na desktopie */
    .admin-container.mobile-view .admin-bottom-nav {
        display: flex !important;
    }
    
    /* Gdy widok mobilny jest włączony, ukryj zakładki desktopowe */
    .admin-container.mobile-view .tabs-container {
        display: none !important;
    }
    
    /* Gdy widok mobilny jest włączony, ukryj kalendarz desktopowy */
    .admin-container.mobile-view .admin-calendar-desktop {
        display: none !important;
    }
    
    /* Gdy widok mobilny jest włączony, pokaż kalendarz mobilny */
    .admin-container.mobile-view .admin-calendar-mobile {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    /* Na urządzeniach mobilnych zawsze pokazuj belkę gdy widok mobilny jest włączony */
    .admin-container.mobile-view .admin-bottom-nav {
        display: flex !important;
    }
    
    .admin-container.mobile-view .tabs-container {
        display: none !important;
    }
    
    .admin-container.mobile-view .admin-calendar-desktop {
        display: none !important;
    }
    
    .admin-container.mobile-view .admin-calendar-mobile {
        display: flex !important;
    }
    
    .admin-bottom-nav-btn span:not(.nav-icon):not(.messenger-badge) {
        font-size: 16px;
    }
    
    .admin-bottom-nav-btn .nav-icon {
        font-size: 32px;
    }
}

/* ============================================
   SZCZEGÓŁOWE STATYSTYKI
   ============================================ */

.detailed-stats-container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.detailed-stats-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
}

.detailed-stats-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.detailed-stats-filters .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.detailed-stats-filters .filter-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detailed-stats-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detailed-stats-filters label {
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.stats-select-input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.stats-select-input:focus {
    outline: none;
    border-color: #667eea;
}

.stats-overview-section {
    margin-bottom: 40px;
}

.stats-overview-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

.stats-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-overview-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stats-overview-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.stats-overview-card .card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stats-overview-card .card-label {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.stats-overview-card .card-value {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
}

.stats-charts-section {
    margin-bottom: 40px;
}

.stats-charts-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-container h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.chart-container canvas {
    max-height: 400px;
}

.instructors-stats-section {
    margin-bottom: 40px;
}

.instructors-stats-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

.instructors-stats-list {
    display: grid;
    gap: 20px;
}

.instructor-stats-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.instructor-stats-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.instructor-stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.instructor-stats-card-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.instructor-stats-card-header .instructor-category {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #f8f9fa;
    color: #667eea;
}

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

.instructor-stat-item {
    text-align: center;
}

.instructor-stat-item .stat-label {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 5px;
}

.instructor-stat-item .stat-value {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .detailed-stats-filters .filter-row {
        grid-template-columns: 1fr;
    }
    
    .stats-overview-cards {
        grid-template-columns: 1fr;
    }
}

