/* styles.css - Nowa, odświeżona wersja (z poprawką widoczności przycisków tutora) */

/* ------------------------- */
/* ZMIENNE I STYLE PODSTAWOWE */
/* ------------------------- */
:root {
  --primary-color: #0077b6; /* Główny niebieski */
  --primary-dark: #023e8a; /* Ciemniejszy niebieski */
  --primary-light: #ade8f4; /* Jasny niebieski/turkus */
  --accent-color: #fb8500; /* Ciepły pomarańczowy akcent */
  --accent-dark: #e85d04; /* Ciemniejszy pomarańczowy */
  --success-color: #52b788; /* Zielony dla sukcesu */
  --error-color: #d00000; /* Czerwony dla błędów */
  --warning-color: #ffc300; /* Żółty dla ostrzeżeń */
  --background-light: #f8f9fa; /* Bardzo jasny szary tła */
  --background-white: #ffffff;
  --text-dark: #212529; /* Główny kolor tekstu */
  --text-medium: #6c757d; /* Średni szary dla tekstu */
  --text-light: #ffffff;
  --border-color: #dee2e6; /* Kolor obramowań */
  --border-radius-sm: 0.25rem; /* 4px */
  --border-radius-md: 0.5rem; /* 8px */
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --box-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease-in-out;
  --font-family-base: 'Poppins', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--background-light);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 3rem; position: relative;}
h3 { font-size: 1.5rem; }

/* Podkreślenie dla H2 */
h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ------------------------- */
/* UKŁAD STRONY (Layout)     */
/* ------------------------- */
.container {
  width: 90%;
  max-width: 1140px; /* Standardowy kontener bootstrap */
  margin: 30px auto;
  flex: 1; /* Aby wypchnąć stopkę na dół */
}

header {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer {
  background: var(--primary-dark);
  color: var(--text-light);
  padding: 50px 0 20px;
  text-align: center;
  margin-top: auto; /* Kluczowe dla przyklejenia do dołu */
}
.footer-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

/* ------------------------- */
/* KOMPONENTY OGÓLNE         */
/* ------------------------- */

/* Przyciski */
.btn {
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  line-height: 1.5;
  text-decoration: none !important; /* Nadpisanie domyślnego podkreślenia linku */
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
  text-decoration: none !important;
}
.btn:focus, button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.3); /* Custom focus */
}
.btn i { /* Ikony w przyciskach */
    font-size: 1.1em;
}

.btn-login { /* Header */
  background-color: transparent;
  color: var(--text-light);
  border-color: var(--text-light);
}
.btn-login:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-light);
}

.btn-register { /* Header */
  background-color: var(--text-light);
  color: var(--primary-color);
  border-color: var(--text-light);
}
.btn-register:hover {
  background-color: #e9ecef; /* Lekko szary */
  border-color: #e9ecef;
}

.btn-logout { /* Header */
  background-color: transparent;
  color: var(--text-light);
  border-color: var(--warning-color); /* Użycie warning jako odróżnienie */
}
.btn-logout:hover {
  background-color: rgba(255, 195, 0, 0.1);
  color: var(--warning-color);
}

.btn-primary { /* Główny przycisk akcji */
  background-color: var(--accent-color);
  color: var(--text-light);
  border-color: var(--accent-color);
  padding: 12px 25px; /* Większy padding */
  font-size: 1rem;
}
.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
}
.btn-primary:disabled,
button:disabled { /* Ogólny styl dla nieaktywnych przycisków */
    background-color: #adb5bd;
    border-color: #adb5bd;
    color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.btn-secondary { /* Drugorzędny przycisk */
  background-color: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
}
.btn-secondary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  /* Dodane style, aby tekst był zawsze widoczny */
  color: var(--text-light);
}

.btn-tutor { /* Panel korepetytora link */
  background-color: var(--success-color);
  color: var(--text-light);
  padding: 8px 15px;
  font-size: 0.9rem;
  border: none;
}
.btn-tutor:hover {
  background-color: #40916c; /* Ciemniejszy zielony */
}

/* Formularze */
.form-container {
  max-width: 500px;
  margin: 30px auto;
  padding: 35px; /* Więcej paddingu */
  background-color: var(--background-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow);
}
.form-container h1,
.form-container h2 {
  text-align: center;
  margin-bottom: 2.5rem; /* Większy odstęp */
  color: var(--primary-dark);
}
.form-container h2 { /* Upewnienie się, że h2 w formularzu też jest na środku */
  text-align: center;
}
.form-container h2::after { /* Usunięcie kreski pod h2 w kontenerach formularzy */
    display: none;
}

.form-group {
  margin-bottom: 1.5rem; /* Większy odstęp */
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px; /* Zwiększony padding */
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  font-family: var(--font-family-base); /* Dziedziczenie czcionki */
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2); /* Lepszy focus outline */
}

button[type="submit"] { /* Główny przycisk submit w formularzach */
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  border: none;
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}
button[type="submit"]:hover {
  opacity: 0.9;
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
}

.form-footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-medium);
  font-size: 0.9rem;
}
.form-footer a {
  font-weight: 500;
}

/* Alerty / Komunikaty */
.alert {
  padding: 15px 20px; /* Większy padding */
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-sm);
  text-align: center;
  border: 1px solid transparent;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.alert i { font-size: 1.2em; } /* Większe ikony */

.alert.success {
  background-color: #d1e7dd; /* Jaśniejszy zielony */
  color: #0f5132;
  border-color: #badbcc;
}
.alert.error {
  background-color: #f8d7da; /* Jaśniejszy czerwony */
  color: #842029;
  border-color: #f5c2c7;
}
.alert.info { /* Dodano styl dla info */
    background-color: #cff4fc; /* Jaśniejszy niebieski */
    color: #055160;
    border-color: #b6effb;
}
/* Styl do zanikania */
.alert.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* Komunikaty dynamiczne (np. pod kalendarzem, w panelu tutora) */
.success-message, .error-message, .loading, .temp-message {
  padding: 12px 15px;
  border-radius: var(--border-radius-sm);
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.success-message, .temp-message.success { background-color: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.error-message, .temp-message.error { background-color: #f8d7da; color: #842029; border-color: #f5c2c7; }
.loading { background-color: #cfe2ff; color: #0a367e; border-color: #b6d4fe; }
.temp-message.info { background-color: #cff4fc; color: #055160; border-color: #b6effb; }

/* Zanikanie komunikatów dynamicznych */
.temp-message { opacity: 1; transition: opacity 0.5s ease-out; }
.temp-message-fade-out { opacity: 0; }
.booking-info .success-message { opacity: 1; transition: opacity 0.5s ease-out; }
.booking-info .success-message.booking-message-fade-out { opacity: 0; }

/* Karty (Cennik, O mnie, Opinie) */
.about-grid, .pricing-grid, .testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Lepsze dopasowanie */
  gap: 30px;
  margin-top: 3rem;
}

.about-card, .pricing-card, .testimonial-card {
  background: var(--background-white);
  padding: 30px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  display: flex; /* Dla lepszego wyrównania */
  flex-direction: column;
}
.about-card:hover, .pricing-card:hover, .testimonial-card:hover {
  transform: translateY(-8px); /* Subtelniejszy efekt hover */
  box-shadow: var(--box-shadow-hover);
}

/* Sekcja "O mnie" */
.about-card .icon {
  font-size: 2.5rem; /* Mniejsza ikona */
  margin-bottom: 1rem;
  color: var(--primary-color);
  height: 50px; /* Stała wysokość dla ikon */
  line-height: 50px;
}
.about-card h3 { margin-bottom: 0.8rem; }
.about-card p { font-size: 0.95rem; color: var(--text-medium); flex-grow: 1;} /* Aby karty miały równą wysokość */

/* Cennik */
.pricing-card { position: relative; overflow: hidden; }
.pricing-card.featured { border: 2px solid var(--accent-color); }
.recommended {
  position: absolute;
  top: 15px;
  right: -40px; /* Początkowa pozycja poza kartą */
  background: var(--accent-color);
  color: white;
  padding: 5px 40px; /* Dłuższy padding dla efektu wstążki */
  font-size: 0.85rem;
  font-weight: 600;
  transform: rotate(45deg); /* Obrót wstążki */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.price {
  font-size: 2.8rem; /* Nieco większa cena */
  font-weight: 700; /* Grubsza czcionka */
  color: var(--primary-dark);
  margin: 15px 0 5px;
}
.price span { font-size: 1rem; color: var(--text-medium); font-weight: 400;}
.pack-info { color: var(--text-medium); font-size: 0.9rem; margin-bottom: 1.5rem; min-height: 2.7rem; /* Ustawienie min-height */}
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  text-align: left;
  flex-grow: 1; /* Aby lista wypełniała przestrzeń */
}
.pricing-card ul li {
  padding: 8px 0 8px 30px; /* Dodany padding lewy */
  position: relative;
  font-size: 0.95rem;
}
.pricing-card ul li::before {
  content: "✔"; /* Użycie unicode checkmark */
  color: var(--success-color);
  position: absolute;
  left: 5px;
  font-weight: bold;
  font-size: 1.1rem;
}
.pricing-card .btn { margin-top: auto; } /* Przycisk na dole karty */

/* Opinie */
.testimonials { background: linear-gradient(180deg, #e9f7fc 0%, var(--background-light) 100%); } /* Delikatny gradient tła */
.testimonial-card { position: relative; padding-top: 40px; /* Miejsce na cytat */}
.quote {
  font-size: 4rem; /* Większy cytat */
  color: var(--primary-color);
  opacity: 0.15;
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
}
.testimonial-card p {
  font-style: italic;
  margin: 0 0 1.5rem; /* Usunięty margines górny */
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  color: var(--text-medium);
  flex-grow: 1; /* Równa wysokość */
}
.author {
  font-weight: 600;
  color: var(--primary-dark);
  margin-top: auto; /* Autor na dole */
  font-size: 0.9rem;
}

/* ------------------------- */
/* STYLE STRONY GŁÓWNEJ      */
/* ------------------------- */
.logo {
  color: var(--text-light);
  font-size: 1.8rem; /* Większe logo */
  font-weight: 700; /* Grubsze logo */
  letter-spacing: 1px; /* Lekki odstęp liter */
}
.auth-buttons { display: flex; gap: 15px; align-items: center; }
.welcome-text { color: var(--primary-light); margin-right: 15px; font-size: 0.95rem; }

/* Sekcja Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 120px 0; /* Więcej przestrzeni */
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--accent-color); /* Akcent na dole */
}
/* Opcjonalny wzór tła */
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path d="M10 10 H 90 V 90 H 10 Z" stroke="%23FFFFFF" stroke-width="0.5" fill="none" transform="rotate(45 50 50)"/></svg>');
  background-repeat: repeat;
  z-index: 0;
}
.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 3.2rem; /* Większy nagłówek */
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--text-light); /* Jawne ustawienie koloru */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2); /* Delikatny cień tekstu */
}
.subtitle {
  font-size: 1.4rem; /* Większy podtytuł */
  margin-bottom: 2.5rem;
  opacity: 0.9;
  font-weight: 300; /* Lżejsza czcionka */
}
.hero .btn-primary { /* Większy przycisk w hero */
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* Sekcja kontaktowa */
.contact-section { background-color: #e9f7fc; } /* Jasnoniebieskie tło */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsywność */
  gap: 40px;
  margin-top: 3rem;
  align-items: flex-start; /* Wyrównanie do góry */
}
.contact-info { display: flex; flex-direction: column; gap: 25px; }
.contact-item { display: flex; align-items: center; gap: 15px; }
.contact-item .icon {
  font-size: 1.8rem; /* Większa ikona kontaktu */
  color: var(--primary-color);
  width: 30px; /* Stała szerokość dla wyrównania */
  text-align: center;
}
.contact-item p { margin-bottom: 0; font-size: 1rem;}
.contact-form textarea { height: 120px; resize: vertical; }
.contact-form .btn-primary { /* Styl przycisku w formularzu kontaktowym */
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    width: 100%;
}
.contact-form .btn-primary:hover {
    opacity: 0.9;
}

/* Stopka */
.footer-logo { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: 1px;}
.footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--primary-light); transition: opacity 0.3s; font-size: 0.9rem; }
.footer-links a:hover { opacity: 0.8; color: var(--text-light); text-decoration: underline; }
.footer-copy { opacity: 0.7; font-size: 0.85rem; margin-top: 1rem;}

/* ------------------------- */
/* STYLE DASHBOARD           */
/* ------------------------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* Trochę szersza prawa kolumna */
  gap: 30px;
  align-items: start;
}

/* Ogólny styl dla kontenerów w dashboard */
.user-info .form-container,
.calendar-container .form-container,
.user-bookings .form-container,
.tutor-panel-content /* dla tutor_panel.php */ {
  background-color: var(--background-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow);
  padding: 30px;
  height: 100%; /* Aby kolumny miały równą wysokość jeśli to możliwe */
}
/* Usunięcie auto marginesu dla form-container w dashboard */
.dashboard-grid .form-container, .tutor-panel-content {
  margin: 0;
  max-width: none; /* Reset max-width */
}

.user-column { display: flex; flex-direction: column; gap: 30px; } /* Lewa kolumna */
.user-bookings { margin-top: 0; } /* Usunięcie marginesu, gap z grid wystarczy */

.user-info h2, .user-bookings h2, .calendar-container h2 {
  text-align: left; /* Nagłówki w dashboard po lewej */
  margin-bottom: 1.5rem;
  font-size: 1.3rem; /* Mniejsze nagłówki w dashboard */
  color: var(--primary-dark);
}
.user-info h2::after, .user-bookings h2::after, .calendar-container h2::after {
  display: none; /* Usunięcie podkreślenia dla H2 w dashboard */
}
.user-info h2 i, .user-bookings h2 i, .calendar-container h2 i {
  margin-right: 8px;
  color: var(--primary-color);
}

.info-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}
.info-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.info-item i { color: var(--primary-color); width: 20px; text-align: center; font-size: 1.1em; }
.info-item strong { font-weight: 500; color: var(--text-dark); }

/* Lista rezerwacji (Dashboard) */
.bookings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px; /* Ograniczenie wysokości i scroll */
  overflow-y: auto;
  padding-right: 10px; /* Miejsce na scrollbar */
}
/* Stylizacja scrollbara */
.bookings-list::-webkit-scrollbar { width: 6px; }
.bookings-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px;}
.bookings-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px;}
.bookings-list::-webkit-scrollbar-thumb:hover { background: #aaa; }

.bookings-list li {
  padding: 12px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap; /* Lepsze zawijanie na mniejszych ekranach */
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-medium);
  transition: background-color 0.2s ease;
}
.bookings-list li:last-child { margin-bottom: 0; border-bottom: none; }
.bookings-list li:hover { background-color: #f8f9fa; } /* Lekkie podświetlenie */

.booking-details {
  flex-grow: 1;
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: 15px; /* Zwiększony odstęp */
  flex-basis: 60%; /* Początkowa szerokość */
  min-width: 200px; /* Minimalna szerokość przed zawinięciem */
}
.booking-details i.fa-calendar-alt { color: var(--primary-color); font-size: 1.1em; white-space: nowrap; }
.booking-details .booking-time { font-size: 0.9em; color: var(--text-medium); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.booking-details .booking-time i { color: var(--primary-light); white-space: nowrap;}

.booking-status {
  padding: 4px 10px; /* Dopasowany padding */
  border-radius: 50px; /* Zaokrąglone rogi */
  font-size: 0.75rem; /* Mniejsza czcionka statusu */
  font-weight: 600; /* Grubszy status */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto; /* Domyślnie po prawej w details */
  white-space: nowrap;
}
.booking-status i { font-size: 0.9em; }
.booking-status.status-pending { background-color: #fff3cd; color: #664d03; }
.booking-status.status-confirmed { background-color: #d1e7dd; color: #0f5132; }
.booking-status.status-rejected { background-color: #f8d7da; color: #842029; }
.booking-status.status-cancelled { background-color: #e9ecef; color: #495057; text-decoration: line-through; }

.bookings-list li.status-rejected,
.bookings-list li.status-cancelled {
  opacity: 0.8;
}
.rejection-reason {
  width: 100%; /* Cała szerokość pod szczegółami */
  background-color: #fff9db; /* Jaśniejszy żółty */
  border: 1px solid #ffecb5;
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #664d03; /* Ciemniejszy żółty tekst */
  font-style: italic;
}
.rejection-reason strong { color: #523e02; font-weight: 600; }

.no-bookings {
    color: var(--text-medium); text-align: center; padding: 20px; background-color: #f8f9fa; border-radius: var(--border-radius-md); margin-top: 15px; font-size: 0.9rem;
}

/* Przyciski akcji odwołania (Dashboard) */
.booking-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-basis: 35%; /* Początkowa szerokość */
  justify-content: flex-end; /* Przyciski do prawej */
}
.cancel-confirmation { display: flex; gap: 8px; }

.btn-cancel, .btn-confirm-cancel, .btn-abort-cancel {
  padding: 6px 12px; /* Mniejsze przyciski */
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid transparent;
  font-weight: 500;
}
.btn-cancel { background-color: #dc3545; color: white; border-color: #dc3545;}
.btn-cancel:hover { background-color: #c82333; border-color: #c82333; }
.btn-cancel i { font-size: 0.9em; }

.btn-confirm-cancel { background-color: #198754; color: white; border-color: #198754;}
.btn-confirm-cancel:hover { background-color: #157347; border-color: #157347; }
.btn-confirm-cancel:disabled { background-color: #a5d6a7; border-color: #a5d6a7; cursor: wait; opacity: 0.7; }

.btn-abort-cancel { background-color: #6c757d; color: white; border-color: #6c757d;}
.btn-abort-cancel:hover { background-color: #5c636a; border-color: #5c636a;}
.btn-abort-cancel:disabled { background-color: #e0e0e0; border-color: #e0e0e0; cursor: wait; opacity: 0.7; }

/* Kalendarz (Dashboard) */
.calendar {
  width: 100%;
  margin: 20px 0;
  background: var(--background-white); /* Kalendarz na białym tle */
  border-radius: var(--border-radius-sm); /* Mniejszy radius */
  padding: 20px;
  border: 1px solid var(--border-color); /* Delikatne obramowanie */
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem; /* Większy odstęp */
}
.calendar-header h3 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: 600;
}
.calendar-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem; /* Większe strzałki */
  color: var(--primary-color);
  padding: 5px;
  border-radius: 50%; /* Okrągłe tło hover */
  transition: var(--transition);
  width: 35px; height: 35px; line-height: 35px; text-align: center;
}
.calendar-header button:hover {
  background-color: #e9ecef; /* Lekko szare tło hover */
  color: var(--primary-dark);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600; /* Grubsze dni tygodnia */
  margin-bottom: 10px;
  color: var(--text-medium);
  font-size: 0.8rem; /* Mniejsza czcionka dni tyg */
}
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px; /* Odstęp między dniami */
}
.day {
  aspect-ratio: 1 / 1; /* Kwadratowe komórki dni */
  text-align: center;
  border-radius: 50%; /* Okrągłe dni */
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: 1px solid transparent; /* Niewidoczny border dla zachowania rozmiaru */
}
.day:not(.disabled):not(.empty).available:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}
.day.selected {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  border-color: var(--primary-color);
}
.day.disabled {
  color: #ced4da; /* Jaśniejszy szary dla nieaktywnych */
  cursor: not-allowed;
  background-color: transparent;
}
.day.empty {
  visibility: hidden;
}
.day.booked {
  background-color: #f8d7da; /* Czerwone tło dla zajętych */
  color: #842029;
  cursor: not-allowed;
  border-color: #f8d7da;
  font-weight: 500;
}
/* Opcjonalna kropka dla zajętych */
.day.booked::after {
  content: "";
  position: absolute;
  bottom: 5px; /* Kropka na dole */
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background-color: #842029;
  border-radius: 50%;
}

/* Info i przycisk pod kalendarzem (Dashboard) */
.booking-info {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa; /* Jaśniejsze tło */
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}
.booking-info p:first-child { /* Instrukcja */
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 1rem;
}
.booking-info p:first-child i { margin-right: 5px; color: var(--primary-color);}

#selected-date-info {
  margin: 15px 0;
  padding: 12px 15px;
  background-color: var(--background-white);
  border-radius: var(--border-radius-sm);
  border-left: 4px solid var(--primary-color); /* Akcent po lewej */
  min-height: 50px; /* Minimalna wysokość */
  font-size: 0.9rem;
}
#selected-date-info p { margin-bottom: 5px; }
#selected-date-info p:last-child { margin-bottom: 0; }
#selected-date-info i { margin-right: 8px; color: var(--text-medium); width: 16px; text-align: center;}
#selected-date-info strong { font-weight: 600; color: var(--text-dark); }

#book-btn { /* Przycisk rezerwacji */
  margin-top: 15px;
  width: 100%;
  border-radius: var(--border-radius-sm);
}

/* ------------------------- */
/* STYLE PANELU KOREPETYTORA */
/* ------------------------- */

.tutor-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem; /* Większy odstęp */
}
.tutor-tab-button {
  padding: 12px 20px; /* Większy padding */
  cursor: pointer;
  border: none;
  background-color: transparent;
  border-bottom: 3px solid transparent;
  font-size: 1rem; /* Większa czcionka */
  margin-bottom: -1px; /* Aby zakryć dolną linię kontenera */
  transition: border-color 0.3s ease, color 0.3s ease;
  color: var(--text-medium);
  font-weight: 500;
}
.tutor-tab-button:hover { color: var(--primary-color); }
.tutor-tab-button.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
}

.tutor-tab-content { display: none; }
.tutor-tab-content.active { display: block; animation: fadeIn 0.5s ease; }

.tutor-bookings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem; /* Mniejszy margines górny */
  background-color: var(--background-white);
  box-shadow: none; /* Usunięcie cienia, bo jest na kontenerze */
  border: 1px solid var(--border-color); /* Dodanie obramowania tabeli */
  border-radius: var(--border-radius-sm);
  overflow: hidden; /* Dla zaokrąglonych rogów */
  font-size: 0.9rem; /* Mniejsza czcionka w tabeli */
}
.tutor-bookings-table th,
.tutor-bookings-table td {
  border: 1px solid var(--border-color);
  padding: 12px 15px; /* Dopasowany padding */
  text-align: left;
  vertical-align: middle;
}
.tutor-bookings-table th {
  background-color: #f8f9fa; /* Jasne tło nagłówków */
  color: var(--primary-dark);
  font-weight: 600;
  white-space: nowrap; /* Zapobieganie łamaniu nagłówków */
}
.tutor-bookings-table tr:nth-child(even) {
  background-color: #f8f9fa; /* Zebra dla wierszy */
}
.tutor-bookings-table tr:hover {
    background-color: #e9ecef; /* Podświetlenie wiersza */
}
.tutor-bookings-table .action-cell {
  text-align: center;
  white-space: nowrap; /* Przyciski w jednej linii */
}
.tutor-bookings-table .reason-cell {
  font-style: italic;
  color: var(--text-medium);
  font-size: 0.85em;
  max-width: 200px; /* Ograniczenie szerokości komórki powodu */
  white-space: normal; /* Pozwolenie na zawijanie tekstu */
}

/* Przyciski w tabeli tutora */
.btn-confirm-tutor, .btn-reject-tutor, .btn-submit-reason, .btn-cancel-reason {
  padding: 6px 10px; /* Mniejsze przyciski */
  font-size: 0.8rem;
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  /* --- POPRAWKA Z !important --- */
  display: inline-flex !important; /* Upewnienie się, że są widoczne */
  align-items: center;
  gap: 5px;
  margin: 2px 3px; /* Mały margines */
  font-weight: 500;
}
.btn-confirm-tutor { background-color: var(--success-color); }
.btn-confirm-tutor:hover { background-color: #40916c; }
.btn-confirm-tutor:disabled { background-color: #a5d6a7; cursor: not-allowed; opacity: 0.7; }

.btn-reject-tutor { background-color: var(--error-color); }
.btn-reject-tutor:hover { background-color: #b71c1c; }
.btn-reject-tutor:disabled { background-color: #ef9a9a; cursor: not-allowed; opacity: 0.7;}

/* Formularz powodu odrzucenia */
.reject-reason-form {
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa; /* Tło formularza */
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  text-align: left;
  /* display: none; jest ustawiane inline w PHP/JS */
}
.reject-reason-form textarea {
  width: 100%;
  min-height: 50px; /* Mniejsza wysokość */
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius-sm);
  margin-bottom: 10px;
  font-size: 0.85rem;
  resize: vertical;
  font-family: var(--font-family-base);
}
.reject-reason-form .reason-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.btn-submit-reason { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-submit-reason:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.btn-submit-reason:disabled { background-color: #90caf9; border-color: #90caf9; cursor: wait; opacity: 0.7; }

.btn-cancel-reason { background-color: #6c757d; border-color: #6c757d; color: white; }
.btn-cancel-reason:hover { background-color: #5c636a; border-color: #5c636a;}

/* Komunikaty "Brak rezerwacji" w panelu tutora */
.no-pending-bookings, .no-confirmed-bookings, .no-rejected-bookings {
  text-align: center;
  padding: 25px;
  background-color: #f8f9fa;
  border: 1px dashed var(--border-color); /* Kreskowana ramka */
  border-radius: var(--border-radius-sm);
  color: var(--text-medium);
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Miejsce na komunikaty w panelu tutora */
#tutor-message-area { min-height: 40px; margin-bottom: 1.5rem; }
#tutor-message-area .alert { margin-top: 0; }

/* ------------------------- */
/* ANIMACJE                  */
/* ------------------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fadeOutRow { from { opacity: 1; } to { opacity: 0; } }
@keyframes fa-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.hero h1 { animation: fadeInDown 1s ease-out; }
.hero .subtitle { animation: fadeIn 1.5s 0.3s ease-out backwards; }
.hero .btn { animation: fadeInUp 1s 0.6s ease-out backwards; }

/* Animacje dla listy rezerwacji */
.new-booking-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.booking-fade-out { animation: fadeOut 0.5s ease-out forwards; }
tr.fading-out { animation: fadeOutRow 0.5s ease-out forwards; }

/* Ikona ładowania */
.fa-spinner { animation: fa-spin 1s infinite linear; }

/* ------------------------- */
/* RESPONSIVE DESIGN         */
/* ------------------------- */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.8rem; }
  .subtitle { font-size: 1.3rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .user-column { flex-direction: row; flex-wrap: wrap; } /* Lepsze ułożenie w poziomie */
  .user-info, .user-bookings { flex: 1 1 400px; } /* Pozwala na zawijanie */
  .tutor-bookings-table th, .tutor-bookings-table td { padding: 10px 12px; font-size: 0.85rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  section { padding: 40px 0; }
  .nav-container { flex-direction: column; gap: 15px; }
  .auth-buttons { width: 100%; justify-content: center; }
  .hero { padding: 80px 0; } .hero h1 { font-size: 2.5rem; } .subtitle { font-size: 1.2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-container, .dashboard-grid .form-container, .tutor-panel-content { padding: 25px 20px; }
  .user-column { flex-direction: column; } /* Powrót do kolumny na mniejszych */
  .tutor-tabs { flex-wrap: wrap; }
  .tutor-tab-button { padding: 10px 15px; font-size: 0.9rem;}
  /* Lepsza responsywność tabeli tutora */
  .tutor-bookings-table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-color); }
  .tutor-bookings-table thead { display: none; } /* Ukrywamy nagłówki */
  .tutor-bookings-table tr { display: block; margin-bottom: 1rem; border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 10px; background-color: var(--background-white); }
  .tutor-bookings-table tr:nth-child(even) { background-color: var(--background-white); } /* Reset zebry */
  .tutor-bookings-table td { display: block; text-align: right !important; padding: 8px 10px 8px 45%; /* Padding dla etykiety */ position: relative; border: none; border-bottom: 1px solid #eee; min-height: 30px; }
  .tutor-bookings-table td:last-child { border-bottom: none; }
  .tutor-bookings-table td::before { content: attr(data-label); /* Pobranie etykiety z PHP (należy dodać atrybut data-label w tutor_panel.php) */ position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 40%; text-align: left !important; font-weight: 600; color: var(--primary-dark); font-size: 0.8rem; }
  .tutor-bookings-table .action-cell { padding-left: 10px; text-align: right !important; } /* Reset paddingu dla akcji */
  .tutor-bookings-table .action-cell::before { display: none; } /* Ukrycie etykiety dla akcji */
  .tutor-bookings-table .reason-cell { max-width: none; padding-left: 45%; white-space: normal; }
  .reject-reason-form { padding: 8px; }
  .reject-reason-form textarea { font-size: 0.8rem; }
}

@media (max-width: 576px) {
  body { font-size: 15px; } /* Domyślna mniejsza czcionka */
  .hero { padding: 60px 0; } .hero h1 { font-size: 2rem; } .subtitle { font-size: 1.1rem;}
  h2 { font-size: 1.6rem; margin-bottom: 2rem; }
  .btn { padding: 8px 15px; font-size: 0.9rem; }
  .btn-primary { padding: 10px 20px; }
  .welcome-text { display: none; }
  .auth-buttons .btn { padding: 8px 10px; font-size: 0.85rem; } /* Mniejsze przyciski w headerze */
  .bookings-list li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .booking-details { flex-basis: 100%; min-width: unset; }
  .booking-status { margin-left: 0; margin-top: 5px; }
  .booking-actions { flex-basis: 100%; margin-top: 10px; justify-content: flex-start; } /* Przyciski od lewej na mobilnych */
  /* Usunięto zmiany w .tutor-bookings-table td i ::before, bo są już w @media (max-width: 768px) */
  .footer-logo { font-size: 1.5rem;}
  .footer-links { gap: 15px; }
}
/* === STYLE DLA KALENDARZA UCZNIA - WSKAŹNIK DOSTĘPNOŚCI === */

.calendar .day {
  position: relative; /* Potrzebne do pozycjonowania wskaźnika */
  /* Upewnij się, że dni mają jakiś padding lub rozmiar, aby wskaźnik był widoczny */
}

/* Styl wskaźnika (zielony pasek pod numerem dnia) */
.calendar .day .availability-indicator {
  display: block;
  position: absolute;
  bottom: 4px; /* Odstęp od dolnej krawędzi dnia */
  left: 50%;
  transform: translateX(-50%);
  width: 60%; /* Szerokość paska */
  height: 4px; /* Wysokość paska */
  background-color: var(--success-color, #28a745); /* Użyj zmiennej lub domyślnego zielonego */
  border-radius: 2px; /* Lekko zaokrąglone rogi */
  opacity: 0.8; /* Lekka przezroczystość */
}

/* Opcjonalnie: Ukryj wskaźnik dla dni, które są całkowicie zajęte (czerwone) */
.calendar .day.booked .availability-indicator {
  display: none;
}

/* Opcjonalnie: Ukryj wskaźnik dla dni nieaktywnych */
.calendar .day.disabled .availability-indicator {
    display: none;
}

/* === STYLE GWIAZDEK W OPINIACH === */
.testimonial-card .stars {
  color: rgb(255, 196, 0); /* ZMIANA KOLORU NA ŻÓŁTY */
  margin-bottom: 1rem; /* Odstęp pod gwiazdkami */
  font-size: 1.1rem; /* Rozmiar gwiazdek */
}

.testimonial-card .stars .fa-star { /* Styl dla pełnej gwiazdki */
  margin: 0 2px;
}
.testimonial-card .stars .far.fa-star { /* Styl dla pustej gwiazdki (jeśli użyjesz) */
   color: #ccc; /* Szary kolor dla pustych */
}
/* === STYLI DLA COOKIE BANNER === */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f0f0f0;
  color: #333;
  padding: 15px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
}
.cookie-banner.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.cookie-banner button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.cookie-banner button:hover {
  background-color: var(--primary-dark);
}

.fixed-schedule-container {
  border: 1px solid var(--border-color);
  padding: 15px;
  margin-top: 15px;
  border-radius: var(--border-radius-sm);
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-medium);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
}

.form-buttons {
  margin-top: 10px;
  text-align: right;
}

.form-buttons .btn {
  margin-left: 5px;
}

#day-selector-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  z-index: 1000;
}
#time-selector-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  z-index: 1001; /* Wyższy niż day-selector-modal */
}

#time-selector-modal .time-slots-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* lub flex-start */
  gap: 5px;
  margin-bottom: 10px;
}

#time-selector-modal .time-slot-button {
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

#time-selector-modal .time-slot-button:hover {
  background-color: #e9ecef;
}


         /* Dodatkowe style dla statusu anulowanego i przycisku ukrywania */
         .status-cancelled {
          color: #888;
          /* Szary kolor dla anulowanych */
          font-style: italic;
      }

      .bookings-list li.status-cancelled {
          border-left-color: #aaa;
          /* Szara ramka dla anulowanych */
          background-color: #f9f9f9;
          /* Lekko szare tło */
      }

      .booking-actions .btn-hide-booking {
          background: none;
          border: none;
          color: #dc3545;
          /* Czerwony kolor */
          cursor: pointer;
          padding: 5px;
          margin-left: 10px;
          /* Odstęp od innych przycisków */
          font-size: 1.1em;
          line-height: 1;
          opacity: 0.7;
          transition: opacity 0.2s ease;
      }

      .booking-actions .btn-hide-booking:hover {
          opacity: 1;
          color: #a0202d;
      }

      .cancelled-info,
      .rejection-reason {
          font-size: 0.9em;
          color: #666;
          margin-top: 5px;
          padding-left: 20px;
          /* Wcięcie jak ikona kalendarza */
          clear: both;
          /* Zapobiega nachodzeniu na przyciski */
      }

      /* Animacja dla zmiany statusu */
      @keyframes status-change-highlight {
          0% {
              background-color: #fff3cd;
          }

          /* Lekko żółte tło na początku */
          100% {
              background-color: #f9f9f9;
          }

          /* Kolor tła anulowanego */
      }

      .status-change-animation {
          animation: status-change-highlight 0.8s ease-out;
      }


      .lesson-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #ddd;
        margin-bottom: 5px;
       }
      
       .lesson-item:last-child {
        border-bottom: none;
       }
      
       .lesson-date {
        flex: 1;
       }
      
       .lesson-date .date {
        font-weight: bold;
        color: #333;
       }
      
       .lesson-details {
        flex: 2;
        display: flex;
        flex-direction: column;
       }
      
       .lesson-details .time {
        font-size: 1.1em;
        color: #007bff;
        margin-bottom: 5px;
       }
      
       .lesson-details .type {
        font-size: 0.9em;
        color: #6c757d;
       }
      
       .lesson-actions {
        flex: 1;
        text-align: right;
       }
      
       .lesson-actions .btn {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 5px;
        cursor: pointer;
       }
      
       .lesson-actions .btn:hover {
        background-color: #0056b3;
       }
       #student-lessons-calendar {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-gap: 5px;
        margin-top: 20px;
      }
      
      .calendar-header {
        grid-column: 1 / 8;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
      }
      
      .calendar-day {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        border: 1px solid #ccc;
        text-align: center;
        position: relative;
      }
      
      .calendar-day.empty {
        border: none;
      }
      
      .student-details-grid {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        grid-template-rows: auto;
        grid-gap: 20px;
        align-items: stretch; /* Domyślne rozciąganie */
        align-items: start; /* Wyrównanie do góry */
       }
       
      
       .student-info {
        grid-column: 1;
        grid-row: 1;
       }

       
       
      
       .student-calendar-container {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        margin-top: 0px; /* Dodajemy margines górny */
       }
       
      
       .calendar {
        font-size: 0.9em;
        width: 100%;
       }
       
      
       .calendar-header h3 {
        font-size: 1.1em;
       }
       
      
       .weekdays div {
        font-size: 0.9em;
        padding: 6px;
       }
       
      
       .days div {
        font-size: 0.9em;
        min-width: 35px;
        min-height: 35px;
       }
       
      
       .booking-info {
        font-size: 0.9em;
       }
       .day.has-lesson {
        background-color: #c8e6c9; /* Jasnozielony kolor tła */
        color: #2e7d32; /* Ciemnozielony kolor tekstu */
        font-weight: bold;
       }
       
      
       .day.has-lesson:hover {
        background-color: #81c784; /* Ciemniejszy odcień zieleni przy najechaniu myszą */
       }
       .modal {
        display: none; /* Ukryj modal na początku */
        position: fixed; /* Pozostaw na miejscu nawet podczas przewijania */
        z-index: 1; /* Umieść nad innymi elementami */
        left: 0;
        top: 0;
        width: 100%; /* Pełna szerokość */
        height: 100%; /* Pełna wysokość */
        overflow: auto; /* Włącz przewijanie, jeśli zawartość jest za długa */
        background-color: rgba(0,0,0,0.4); /* Ciemne tło */
      }
      
      .modal-content {
        background-color: #fefefe;
        margin: 15% auto; /* Umieść na środku ekranu */
        padding: 20px;
        border: 1px solid #888;
        width: 80%; /* Możesz dostosować szerokość */
      }
      
      .close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
      }
      
      .close:hover,
      .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
      }

      /* Styl dla modala */
.modal {
  display: flex; /* Pozostaje flex, aby JS działał poprawnie */
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  
  /* KLUCZOWA ZMIANA: Wyrównanie do góry zamiast do środka */
  align-items: flex-start; 
  justify-content: center;
  
  padding: 20px 15px; /* Dodaje odstęp od góry i po bokach */
  overflow-y: auto; /* Dodajemy scroll dla całego tła na wypadek bardzo małych ekranów */
}

.modal-content {
  background-color: #fefefe;
  padding: 25px;
  border: 1px solid #888;
  border-radius: var(--border-radius-md); /* Używamy zdefiniowanej zmiennej */
  box-shadow: var(--box-shadow);
  position: relative; /* Niezbędne dla pozycjonowania przycisku 'X' */
  
  /* Kluczowe zmiany dla responsywności: */
  width: 105%; /* Szerokość na urządzeniach mobilnych */
  max-width: 500px; /* Maksymalna szerokość na dużych ekranach */
  max-height: 90vh; /* Maksymalna wysokość, aby nie wychodził poza ekran */
  overflow-y: auto; /* Pasek przewijania, jeśli treść jest za długa */
  
  /* Usuwamy stary, problematyczny margines */
  margin: 0; 
}

/* ULEPSZONY PRZYCISK ZAMYKANIA - styles.css */
.close {
  color: #888;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 35px; /* Definiujemy stały rozmiar */
  height: 35px; /* Definiujemy stały rozmiar */
  font-size: 30px;
  font-weight: bold;
  line-height: 35px; /* Wyśrodkowanie 'x' w pionie */
  text-align: center; /* Wyśrodkowanie 'x' w poziomie */
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 50%; /* Robimy okrągły obszar klikalny */
  z-index: 10; /* Upewniamy się, że jest nad treścią */
}

.close:hover,
.close:focus {
  color: #000;
  background-color: #f0f0f0; /* Lekkie tło po najechaniu */
  text-decoration: none;
}

/*Wygląd przycisku szczegóły w dashboard.php*/
.btn-details {
  padding: 6px 12px; /* Zmniejszony padding */
  font-size: 0.8rem; /* Zmniejszony rozmiar czcionki */
  background-color: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--box-shadow);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-details i {
  margin-right: 3px; /* Zmniejszony odstęp ikony */
  font-size: 0.8rem; /* Zmniejszony rozmiar ikony */
}

.btn-details:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
}

.details-button-container {
  width: 100%;
  text-align: left; /* wyrównanie do prawej */
  margin-top: 10px; /* Dodaj trochę odstępu */
}

/*Wygląd modala w tutor_panel.js*/
#lesson-details-modal .modal-content {
  width: 50%; /* Zmniejszamy szerokość modala */
  max-width: 600px;
}

.lesson-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.lesson-detail:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: bold;
  color: var(--primary-dark);
}

.detail-value {
  color: var(--text-medium);
}

#student-attendance {
  width: auto; /* Dostosuj szerokość selecta */
  padding: 6px;
  font-size: 0.9rem;
}

.modal-actions {
  text-align: right;
  margin-top: 15px;
}

.modal-actions .btn {
  margin-left: 10px;
}

.has-lesson {
  background-color: green;
  color: white;
}

.canceled-lesson {
  background-color: rgba(253, 2, 2, 0.548);
  color: white;
}

/* Styl dla przycisku z czerwoną ramką */
.btn.btn-danger-outline {
    background-color: transparent;
    color: #dc3545; /* Czerwony kolor tekstu */
    border: 1px solid #dc3545; /* Czerwona ramka */
}

.btn.btn-danger-outline:hover {
    background-color: #dc3545;
    color: #fff;
}

/* --- NOWE STYLE DLA FORMULARZA REJESTRACJI --- */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
}

.checkbox-group label {
    display: inline;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px; /* Wyrównanie z tekstem */
    width: auto;
    cursor: pointer;
}

.inline-link {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.inline-link:hover {
    color: var(--primary-dark);
}

/* Style dla zakładek wewnątrz szczegółów ucznia */
        .student-calendar-tabs-container .tutor-tab-button {
            padding: 8px 15px;
            font-size: 0.9rem;
            flex-grow: 1; /* Przyciski zajmą całą dostępną szerokość */
        }

        .student-calendar-tab-content {
            display: none; /* Domyślnie ukryj zawartość zakładek */
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
        }

        .student-calendar-tab-content.active {
            display: block; /* Pokazuj tylko aktywną zakładkę */
        }

.lesson-info-item .lesson-actions {
            display: flex;
            gap: 5px;
        }
        .btn-cancel-small {
            padding: 4px 8px;
            font-size: 0.8rem;
            background-color: var(--danger-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-sm);
            cursor: pointer;
        }
        .btn-cancel-small:hover {
            background-color: #a71d2a;
        }
        .cancel-confirmation-panel {
            display: none;
            align-items: center;
            gap: 10px;
            font-size: 0.85rem;
        }
        .cancel-confirmation-panel button {
            padding: 3px 7px;
        }
        /* Nowy styl dla dni z odwołanymi lekcjami */
        .days .day.has-cancelled-lesson {
            background-color: #f8d7da; /* Jasnoczerwone tło */
            color: #58151c;
            border: 1px solid #f1aeb5;
        }

        /* Style dla ikony podglądu hasła */
.password-wrapper {
    position: relative;
    width: 100%;
}

/* Upewnij się, że pole input ma pełną szerokość i zostawia miejsce na ikonę */
.password-wrapper input {
    width: 100%;
    padding-right: 40px; /* Robi miejsce po prawej stronie na ikonę */
    box-sizing: border-box; /* Ważne, aby padding nie zwiększał szerokości */
}

/* Pozycjonowanie ikony wewnątrz pola */
.password-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 15px; /* Odległość od prawej krawędzi */
    transform: translateY(-50%);
    cursor: pointer; /* Zmienia kursor na "rączkę" po najechaniu */
    color: #555; /* Kolor ikony */
}
        
/* /tutor_panel.php (wewnątrz tagu <style>) */

/* Strefa niebezpieczna - usuwanie konta */
.danger-zone {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #dc3545; /* Czerwona ramka */
    border-radius: var(--border-radius-sm);
    background-color: #f8d7da; /* Jasnoczerwone tło */
}
.danger-zone h4 {
    color: #721c24; /* Ciemnoczerwony tekst nagłówka */
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}
.danger-zone p {
    font-size: 0.9em;
    color: #721c24;
    margin-bottom: 15px;
}
.btn-danger-outline {
    background-color: #dc3545; /* Czerwone tło */
    border: 1px solid #dc3545;
    color: white; /* Biały tekst */
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-danger-outline:hover {
    background-color: #c82333; /* Ciemniejszy czerwony po najechaniu */
    border-color: #bd2130;
}
#delete-student-confirm-panel {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #b32b39; /* Czerwona linia oddzielająca */
}
#delete-student-confirm-panel .btn-confirm-delete {
   background-color: #90ee90; /* Jasnozielony */
   color: #155724; /* Ciemnozielony tekst */
   border: 1px solid #81d781;
   font-weight: bold;
}
#delete-student-confirm-panel .btn-confirm-delete:hover {
   background-color: #7ace7a; /* Ciemniejszy zielony po najechaniu */
}

/* /styles.css (na końcu pliku) */

/* ========== Style dla Zakładki Aktualności ========== */
.add-news-form-container {
    background-color: var(--background-white);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}
.add-news-form-container h3 {
    margin-top: 0;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.news-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-post-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.news-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.news-post-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--primary-dark);
}

.news-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-medium);
    font-size: 0.85em;
}

.news-post-meta .timestamp {
    white-space: nowrap;
}
.news-post-meta .timestamp i {
    margin-right: 5px;
}

.btn-delete-news {
    background: none;
    border: none;
    color: #dc3545; /* Czerwony kolor dla przycisku usuwania */
    cursor: pointer;
    font-size: 1.1em;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 20px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}
.btn-delete-news:hover {
    background-color: #f8d7da;
    color: #721c24;
}

.news-post-content p {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap; /* Zachowuje entery z textarea */
}

.news-post-attachment {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.9em;
}

.news-post-attachment a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.news-post-attachment a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
.news-post-attachment a i {
    margin-right: 8px;
}

.no-news {
    text-align: center;
    padding: 25px;
    background-color: #f8f9fa;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-medium);
}
/* Style dla dodatkowych informacji o uczniu */
         .student-extra-details {
             margin-top: 20px;
             padding: 15px;
             background-color: #fff;
             border: 1px solid var(--border-color);
             border-radius: var(--border-radius-sm);
         }
         .student-extra-details h4 {
             margin-top: 0;
             margin-bottom: 15px;
             color: var(--primary-dark);
             display: flex;
             justify-content: space-between;
             align-items: center;
         }
         .student-extra-details .detail-item {
             display: flex;
             margin-bottom: 8px;
             font-size: 0.9rem;
         }
         .student-extra-details .detail-item strong {
             color: var(--text-dark);
             width: 180px; /* Stała szerokość dla etykiet */
             flex-shrink: 0;
         }
         .student-extra-details .detail-item span {
             color: var(--text-medium);
         }
         .student-extra-details .edit-view .form-group {
             margin-bottom: 12px;
         }
         .edit-controls {
            display: flex;
            gap: 10px;
            margin-top: 15px;
         }
         .hidden {
            display: none;
         }