/* =========================
   style.css
   ========================= */

   @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

   :root {
       --color-main-dark: #2C3E50;   /* Ciemny niebieski */
       --color-main-medium: #3498DB; /* Średni niebieski */
       --color-main-light: #ECF0F1;  /* Jasny szary */
       --color-bg-dark: #F4F6F7;     /* Jasne tło */
       --color-accent: #1ABC9C;      /* Akcent zielony */
       --slot-height: 40px;
   
       /* Dodatkowe kolory / efekty (opcjonalnie) */
       --gradient-start: #2C3E50;
       --gradient-end: #3498DB;
       --glass-bg: rgba(44, 62, 80, 0.25); /* półprzezroczyste tło */
       
       /* Nowe kolory dla landing page */
       --primary-blue: #2563eb;
       --primary-blue-dark: #1d4ed8;
       --primary-blue-light: #3b82f6;
       --dental-teal: #0891b2;
       --dental-green: #059669;
       --text-dark: #1f2937;
       --text-medium: #4b5563;
       --text-light: #6b7280;
       --bg-light: #f8fafc;
       --bg-white: #ffffff;
       --border-light: #e5e7eb;
   }
   
   /* Reset */
   * {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
   }
   
   body {
       font-family: 'Poppins', sans-serif;
       background-color: var(--color-bg-dark);
       color: var(--color-main-dark);
       -webkit-font-feature-settings: "locl";
       font-feature-settings: "locl";
   }
   
   /* Ogólna struktura */
   .container {
       display: flex;
   }
   
   /* Sidebar – nowoczesny wygląd */
   .sidebar {
       width: 240px;
       height: 100vh;
       position: fixed;
       z-index: 1000;
       overflow: hidden;
       background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
       backdrop-filter: blur(8px); /* Glassmorphism (opcjonalnie) */
       transition: none;
       box-shadow: none;
   }
   
   .sidebar:hover {
       width: 240px;
       box-shadow: none;
   }
   
   .sidebar .sidebar-toggle {
       background: var(--color-main-medium);
       color: #fff;
       padding: 12px;
       cursor: pointer;
       text-align: center;
       font-size: 1.2rem;
       border-bottom: 1px solid rgba(255, 255, 255, 0.2);
       transition: background-color 0.3s;
   }
   
   .sidebar .sidebar-toggle:hover {
       background-color: var(--color-accent);
   }
   
   .sidebar ul {
       list-style: none;
       margin-top: 10px;
       padding-left: 0;
   }
   
   .sidebar .menu-item {
       display: flex;
       align-items: center;
       color: #fff;
       text-decoration: none;
       padding: 10px 10px;
       border-radius: 8px;
       transition: background-color 0.3s, transform 0.3s;
       margin: 5px 10px;
       background-color: rgba(255, 255, 255, 0.05); /* Efekt lekkiego szklanego tła */
   }
   
   .sidebar .menu-item:hover {
       background-color: var(--color-accent);
       transform: translateX(5px);
   }
   
   .sidebar .icon {
       display: inline-flex;
       align-items: center;
       justify-content: center;
       margin-right: 10px;
       font-size: 18px;
       width: 30px;
       color: #fff;
   }
   
   .sidebar .text {
       white-space: nowrap;
       opacity: 1;
   }
   
   /* Header */
   .header {
       background-color: var(--color-main-dark);
       padding: 12px;
       display: flex;
       justify-content: space-between;
       align-items: center;
       color: #fff;
       margin-left: 0;
       transition: margin-left 0.3s;
   }
   
   .header-left h2 {
       margin-left: 20px;
   }
   
   .header-right {
       margin-right: 20px;
   }
   
   /* Main content */
   .main-content {
       margin-left: 240px;
       flex: 1;
       display: flex;
       flex-direction: column;
       background-color: var(--color-bg-dark);
       transition: margin-left 0.3s;
   }
   
   .dashboard-content {
       padding: 20px;
   }
   
   /* Kafelki informacyjne */
   .info-boxes {
       display: flex;
       gap: 20px;
       margin-bottom: 20px;
   }
   
   .info-box {
       background-color: var(--color-main-light);
       flex: 1;
       padding: 20px;
       border-radius: 5px;
       color: var(--color-main-dark);
   }
   
   .info-box h2 {
       margin-bottom: 10px;
   }
   
   /* Przydatne style dla tabel */
   table {
       width: 100%;
       border-collapse: collapse;
   }
   
   table th,
   table td {
       border: 1px solid var(--color-main-medium);
       padding: 8px;
       text-align: left;
       color: var(--color-main-dark);
   }
   
   table th {
       background-color: var(--color-main-medium);
       color: var(--color-main-dark);
   }
   
   /* Ikony */
   .sidebar .icon i {
       font-size: 18px;
       color: #fff;
   }
   
   /* Podmenu */
   .submenu {
       display: none;
       margin-left: 30px;
       transition: all 0.3s ease;
   }
   
   .submenu.open {
       display: block;
   }
   
   .submenu li {
       margin: 5px 0;
   }
   
   .submenu li a {
       color: #fff;
       text-decoration: none;
       padding: 5px 10px;
       border-radius: 5px;
       display: block;
       transition: background-color 0.3s;
       font-size: 14px;
   }
   
   .submenu li a:hover {
       background-color: var(--color-main-medium);
       color: #fff;
       background: linear-gradient(to right, rgba(52, 152, 219, 1) 0%, rgba(52, 152, 219, 0) 100%);
   }
   
   /* Strzałka rozwijanego menu */
   .arrow {
       margin-left: auto;
       transition: transform 0.3s;
   }
   
   .has-submenu.open > a .arrow {
       transform: rotate(180deg);
   }
   
   /* Kafelki wyróżnione kolorami (opcjonalnie) */
   .box-appointments {
       border-left: 5px solid #3498db; /* Niebieski */
   }
   
   .box-patients {
       border-left: 5px solid #2ecc71; /* Zielony */
   }
   
   .box-revenue {
       border-left: 5px solid #e67e22; /* Pomarańczowy */
   }
   
   .box-expenses {
       border-left: 5px solid #e74c3c; /* Czerwony */
   }
   
   /* Sekcja zadań tygodniowych */
   .weekly-tasks-section {
       margin-top: 40px;
   }
   
   .weekly-tasks-section h2 {
       margin-bottom: 20px;
       color: var(--color-main-dark);
   }
   
   .week-board {
       display: flex;
       gap: 20px;
       overflow-x: auto;
   }
   
   .day-column {
       flex: 1;
       min-width: 200px;
       background-color: var(--color-main-light);
       border-radius: 5px;
       padding: 10px;
       box-shadow: 0 2px 8px rgba(0,0,0,0.1);
   }
   
   .day-header {
       font-weight: 600;
       margin-bottom: 10px;
       background-color: var(--color-main-medium);
       color: #fff;
       padding: 8px;
       border-radius: 5px;
       text-align: center;
   }
   
   .task-card {
       background-color: #ffffff; 
       color: var(--color-main-dark);
       margin-bottom: 10px;
       padding: 10px;
       border-radius: 5px;
       box-shadow: 0 1px 5px rgba(0,0,0,0.1);
       transition: transform 0.2s;
       position: relative;
   }
   
   .task-card p {
       margin: 0 0 8px 0;
       font-size: 14px;
   }
   
   .task-card:hover {
       transform: scale(1.02);
   }
   
   /* Przycisk "Wykonaj" w kafelku */
   .task-btn {
       display: inline-block;
       padding: 5px 10px;
       background-color: var(--color-main-medium);
       color: #fff;
       border-radius: 5px;
       text-decoration: none;
       font-size: 12px;
       transition: background-color 0.3s;
   }
   
   .task-btn:hover {
       background-color: var(--color-accent);
   }
   
   /* Rodzaje zadań - kolorowe paski po lewej stronie */
   .task-surgery {
       border-left: 5px solid #3498db; /* niebieski */
   }
   
   .task-lab {
       border-left: 5px solid #9b59b6; /* fiolet */
   }
   
   .task-implant {
       border-left: 5px solid #16a085; /* morski */
   }
   
   .task-checkup {
       border-left: 5px solid #f39c12; /* pomarańczowy */
   }
   
   .task-other {
       border-left: 5px solid #7f8c8d; /* szary */
   }
   
   /* Zadanie ukończone */
   .task-card.completed {
       background-color: #ecf0f1;
       opacity: 0.7;
       text-decoration: line-through;
   }
   
   .task-card.completed .task-btn {
       display: none; 
   }
   
   /* Sekcja powiadomień */
   .notifications-section {
       background-color: var(--color-main-light);
       padding: 20px;
       border-radius: 5px;
       margin-bottom: 30px;
       color: var(--color-main-dark);
   }
   
   .notification {
       display: flex;
       align-items: flex-start;
       gap: 10px;
       margin-bottom: 15px;
   }
   
   .notification-icon {
       font-size: 24px;
       color: var(--color-accent);
   }
   
   .notification-content h3 {
       margin: 0 0 5px 0;
       font-weight: 600;
   }
   
   .notification-content p {
       margin: 0;
   }
   
   /* Logowanie */
   .login-container {
       max-width: 350px;
       margin: 100px auto;
       background-color: var(--color-main-light);
       padding: 20px;
       border-radius: 8px;
       box-shadow: 0 2px 8px rgba(0,0,0,0.1);
   }
   
   .login-container h2 {
       margin-bottom: 20px;
       text-align: center;
   }
   
   .login-container label {
       display: block;
       margin: 10px 0 5px;
       font-weight: 600;
   }
   
   .login-container input {
       width: 100%;
       padding: 8px;
       border: 1px solid var(--color-main-medium);
       border-radius: 5px;
       margin-bottom: 10px;
   }
   
   .login-button {
       width: 100%;
       background-color: var(--color-main-medium);
       color: #fff;
       border: none;
       padding: 10px;
       border-radius: 5px;
       cursor: pointer;
       font-size: 16px;
       transition: background-color 0.3s;
   }
   
   .login-button:hover {
       background-color: var(--color-accent);
   }
   
   .register-button {
       display: block;
       margin-top: 10px;
       text-align: center;
       background-color: #2ecc71;
       color: #fff;
       text-decoration: none;
       padding: 8px;
       border-radius: 5px;
       transition: background-color 0.3s;
   }
   
   .register-button:hover {
       background-color: #27ae60;
   }
   
   /* Komunikaty */
   .error {
       background: #f8d7da;
       padding: 10px;
       margin: 10px 0;
       color: #721c24;
       border-radius: 5px;
   }
   
   .success {
       background: #d4edda;
       padding: 10px;
       margin: 10px 0;
       color: #155724;
       border-radius: 5px;
   }
   
   /* Paginacja (opcjonalnie) */
   .pagination {
       margin-top: 20px;
       display: flex;
       gap: 10px;
       align-items: center;
   }
   
   .pagination a {
       color: var(--color-main-dark);
       background-color: var(--color-main-light);
       padding: 6px 12px;
       border-radius: 4px;
       text-decoration: none;
       border: 1px solid var(--color-main-medium);
       transition: background-color 0.3s;
   }
   
   .pagination a:hover {
       background-color: var(--color-accent);
       color: #fff;
   }
   
   .pagination .active {
       background-color: var(--color-main-medium);
       color: #fff;
       pointer-events: none;
       border: 1px solid transparent;
   }
   
   .submenu {
       display: none;
   }
   
   .submenu.active {
       display: block;
   }
   /* ============================
   FORMULARZ DODAWANIA WIZYTY
   ============================ */

.appointment-form {
    background-color: var(--color-main-light);
    padding: 20px;
    border-radius: 5px;
    max-width: 500px; /* szerokość formularza */
    margin-top: 20px;
}

.appointment-form .form-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.appointment-form label {
    font-size: 12px;               /* MAŁA CZCIONKA DLA ETYKIET */
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--color-main-dark); /* dopasowanie do kolorów systemu */
}

.appointment-form input[type="date"],
.appointment-form input[type="time"],
.appointment-form select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid var(--color-main-medium);
    background-color: #fff;
    font-size: 14px;
    width: 100%;
    color: var(--color-main-dark);
}

.appointment-form .btn-submit {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--color-main-medium);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.appointment-form .btn-submit:hover {
    background-color: var(--color-accent);
}

/* Klasa ogólna dla tagów */
.tag {
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
    text-transform: uppercase;
}

/* Status SCHEDULED / Oczekuje */
.tag-scheduled {
    background-color: #f39c12; /* np. pomarańczowy */
}

/* Status CONFIRMED / Potwierdzona */
.tag-confirmed {
    background-color: #27ae60; /* zielony */
}

/* Status COMPLETED / Zakończona */
.tag-completed {
    background-color: #2ecc71; /* jaśniejszy zielony */
}

/* Status CANCELED / Odwołana */
.tag-canceled {
    background-color: #e74c3c; /* czerwony */
}

/* Status RESCHEDULED / Przełożona */
.tag-rescheduled {
    background-color: #3498db; /* niebieski */
}
/* Formularz filtrowania (wyboru lekarza i tygodnia) */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background-color: var(--color-main-light);
    padding: 20px;
    border-radius: 5px;
}

.filter-form .form-row {
    display: flex;
    flex-direction: column;
}

.filter-form label {
    font-size: 13px;
    margin-bottom: 5px;
}

.filter-form select {
    padding: 5px 8px;
    border: 1px solid var(--color-main-medium);
    border-radius: 3px;
}

.btn-week-nav {
    display: inline-block;
    margin-right: 10px;
    background-color: var(--color-main-medium);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s;
}

.btn-week-nav:hover {
    background-color: var(--color-accent);
}

/* Tabela harmonogramu */
.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.schedule-table th, .schedule-table td {
    border: 1px solid var(--color-main-medium);
    padding: 8px;
    background-color: var(--color-main-light);
    color: var(--color-main-dark);
}

.schedule-table th {
    background-color: var(--color-main-medium);
    color: var(--color-main-dark);
}

/* Wyświetlane zmiany (schedules) */
.schedule-item {
    background-color: #fff;
    border: 1px solid var(--color-main-medium);
    border-radius: 4px;
    padding: 5px;
    margin-bottom: 5px;
    font-size: 13px;
    display: inline-block; /* lub block, zależnie od preferencji */
}

/* Formularz dodawania zmiany */
.schedule-form {
    background-color: var(--color-main-light);
    padding: 20px;
    border-radius: 5px;
    max-width: 400px;
}

.schedule-form .form-row {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.schedule-form label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
}

.schedule-form input[type="date"],
.schedule-form input[type="time"],
.schedule-form input[type="text"] {
    padding: 5px 8px;
    border: 1px solid var(--color-main-medium);
    border-radius: 4px;
}

.schedule-form .btn-submit {
    background-color: var(--color-main-medium);
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.schedule-form .btn-submit:hover {
    background-color: var(--color-accent);
}

/* *** Nagłówki tabeli – zmieniamy kolor czcionki *** */
table th {
    background-color: var(--color-main-medium);
    color: var(--color-main-dark);
}

/* *** Styl do animowanego rozwijania wierszy *** */

/* Główny wiersz z danymi (klikany). Nic tu nie zmieniamy. */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
    background-color: #fff;
}
.clickable-row:hover {
    background-color: #e6f0fa;
}

/* Wiersz, w którym jest schowany formularz. 
   Mamy display: table-row, ale wewnątrz .details-content animujemy max-height i opacity. */
.details-row {
    display: table-row; 
    background-color: #fff;
}

/* Kontener, który zawiera formularz:
   Domyślnie zwinięty (max-height: 0, opacity: 0).
   Nie używamy display: none, żeby animacja max-height działała płynnie. */
.details-content {
    background-color: #fff;      /* Białe tło */
    overflow: hidden;            /* ukrywa zawartość przy max-height=0 */
    max-height: 0;               /* domyślnie zwinięty */
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Po otwarciu: podnosimy max-height i opacity. 
   Uwaga: max-height można ustawić np. 1000px, by mieć pewność że wszystko się mieści. */
.details-content.open {
    max-height: 600px; /* lub 1000px, w zależności od rozmiaru formularza */
    opacity: 1;
}

/* ... [styl formularza .edit-service-form, .form-group, button, itp.] ... */

/* Kontener na sugestie */
.suggestions-list {
    position: absolute; 
    background-color: #fff;
    border: 1px solid #ccc;
    width: 300px; /* dopasuj do szerokości inputa */
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999; /* aby przykrywał inne elementy */
    display: none;
}

/* Pojedyncza sugestia */
.suggestion-item {
    padding: 8px;
    cursor: pointer;
}
.suggestion-item:hover {
    background-color: #f0f0f0;
}

.appointment-form input[type="text"] {
    height: 40px; /* Zwiększ wysokość pola tekstowego */
}
/* ======== Styl kontenera i "karty" formularza ======== */

.form-container {
    max-width: 600px;          /* szerokość maksymalna */
    margin: 30px auto;         /* wyśrodkowanie */
    background-color: #fff;    /* białe tło */
    border: 1px solid #ccc;    /* cienka ramka */
    border-radius: 8px;        /* zaokrąglone rogi */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* lekki cień */
    padding: 20px;
}

.form-container h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #2c3e50; /* np. ciemny niebieski */
}

/* ======== Grupy pól (form-row) ======== */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;       /* każda etykieta w osobnej linii */
    font-weight: 600;     /* wzmocniona czcionka */
    margin-bottom: 5px;   /* odstęp poniżej etykiety */
    color: #2c3e50;       /* ciemny odcień, spójny z heading */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;  /* niebieski obrys przy focus */
}

.form-group textarea {
    min-height: 60px;     /* np. minimalna wysokość */
    resize: vertical;     /* umożliwia pionową zmianę rozmiaru */
}

/* ======== Dodatkowe style dla "opcjonalnego" opisu ======== */
.form-group .optional {
    font-size: 12px;
    color: #7f8c8d;  /* szary tekst */
}

/* ======== Przycisk wysłania ======== */
.btn-submit {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #2980b9;
}

/* ======== Komunikaty ======== */
.success {
    background: #d4edda;   
    color: #155724;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.error {
    background: #f8d7da;   
    color: #721c24;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.logout-icon {
    color: white;
}

/* ======================
   KALENDARZ
   ====================== */
.calendar-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 25px;
}

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

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-prev-month, .btn-next-month {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--color-main-medium);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}

.btn-prev-month i, .btn-next-month i {
    font-size: 14px;
    position: relative;
    left: -1px; /* Delikatne przesunięcie dla lepszego wyśrodkowania */
}

.btn-next-month i {
    left: 1px;
}

.btn-prev-month:hover, .btn-next-month:hover {
    background: var(--color-accent);
    transform: scale(1.1);
    text-decoration: none !important;
}

.current-month {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-main-dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.weekday-header {
    background: var(--color-main-medium);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-weight: 500;
}

.calendar-day {
    min-height: 120px;
    padding: 8px;
    position: relative;
    background: white;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.day-events {
    margin-top: 25px;
}

.calendar-event {
    padding: 8px;
    margin: 2px 0;
    border-radius: 4px;
    color: var(--color-main-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--color-main-medium);
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calendar-event.confirmed {
    border-left-color: var(--color-accent);
}

.calendar-event.unconfirmed {
    border-left-color: #ffd700;
}

.calendar-event:hover {
    background-color: #f8f9fa;
}

.day-number {
    z-index: 2; /* Numer dnia na wierzchu */
    pointer-events: none; /* Klikalność tylko dla wydarzeń */
}

/* Kolory statusów */
.calendar-event.unconfirmed {
    opacity: 0.7;
    position: relative;
    overflow: hidden;
}

.calendar-event.unconfirmed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(0,0,0,0.1),
        rgba(0,0,0,0.1) 5px,
        transparent 5px,
        transparent 10px
    );
}

.calendar-event.confirmed {
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-details {
    flex: 1;
    overflow: hidden;
}

.event-time {
    font-weight: 600;
    font-size: 0.9em;
}

.event-patient {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.event-service {
    font-size: 0.8em;
    opacity: 0.9;
}

.calendar-event:hover {
    transform: translateX(3px);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

/* Przełącznik widoków */
.view-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.view-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.view-btn.active {
    background: var(--color-main-medium);
    color: white;
}

/* Widok tygodniowy */
.calendar-week-view {
    width: 100%;
    grid-template-columns: 80px calc(100% - 80px);
}

.week-header {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
}

.days-container {
    grid-column: 2;
    width: 100%;
    min-width: 0;
}

.day-column {
    min-width: 0;
    flex: 1;
}

.day-header {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 5px;
}

.time-slot {
    height: var(--slot-height);
    border-bottom: 1px solid #eee;
    position: relative;
    background: white;
}

.time-column .time-slot {
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 0.9em;
    color: #666;
}

.time-slot {
    height: 40px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 0.9em;
    color: #666;
    background: white;
}

.time-slot::before {
    content: '';
    display: none; /* Ukryj etykiety godzin w poszczególnych slotach */
}

.calendar-week-view .calendar-event {
    position: absolute;
    top: calc((var(--hour) - 7) * var(--slot-height) + 2px);
    left: 2px;
    right: 2px;
    height: calc(var(--slot-height) - 4px);
    margin: 1px 2px;
    z-index: 1;
}

/* Widok dzienny */
.calendar-day-view .time-slots {
    max-height: 70vh;
    overflow-y: auto;
}

.time-slot {
    display: flex;
    border-bottom: 1px solid #eee;
    min-height: 60px;
}

.time-label {
    width: 80px;
    padding: 5px;
    background: #f8f9fa;
    font-weight: 500;
}

.events {
    flex: 1;
    padding: 5px;
}

/* Widok listy */
.appointments-table {
    width: 100%;
    border-collapse: collapse;
}

.appointments-table th,
.appointments-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.appointments-table th {
    background: var(--color-main-medium);
    color: white;
}

/* Responsywność */
@media (max-width: 1200px) {
    .calendar-week-view .day-column {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .view-switcher {
        flex-wrap: wrap;
    }
    
    .calendar-week-view {
        flex-direction: column;
    }
    
    .time-column {
        display: none;
    }
}

/* Widok miesięczny */
.calendar-month-view .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto 1fr;
    gap: 1px;
    background: #f0f0f0;
}

.calendar-month-view .calendar-weekdays {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.calendar-month-view .calendar-day {
    min-height: 120px;
    background: white;
    padding: 8px;
    position: relative;
}

.calendar-month-view .calendar-day.today {
    background-color: #e3f2fd;
    border: 2px solid var(--color-main-medium);
}

.calendar-month-view .calendar-day.other-month {
    background-color: #f8f9fa;
    color: #999;
    opacity: 0.7;
}

.calendar-month-view .day-number {
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
    color: var(--color-main-dark);
}

/* Poprawki dla nagłówków dni tygodnia w widoku miesięcznym */
.calendar-month-view .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.calendar-month-view .weekday-header {
    background: var(--color-main-dark);
    padding: 12px 0;
    text-align: center;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-event .fa-exclamation-triangle {
    color: rgba(255,255,255,0.8);
    font-size: 0.9em;
    margin-right: 5px;
}

.calendar-event[data-status="CANCELED"] {
    opacity: 0.5;
    text-decoration: line-through;
    background-color: #95a5a6 !important;
}

/* Statusy wizyt */
.calendar-event[data-status="CANCELED"] {
    display: none; /* Ukryj anulowane wizyty */
}

.calendar-event[data-status="SCHEDULED"] {
    opacity: 0.8;
    border: 2px dashed rgba(255,255,255,0.5);
}

.calendar-day {
    min-height: 120px;
    padding: 8px;
    position: relative;
    background: white;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.day-events {
    margin-top: 25px;
}

/* Poprawki dla widoku tygodniowego */
.calendar-week-view .calendar-event {
    padding: 6px;
    margin: 2px;
    border-radius: 4px;
    color: white;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    position: absolute;
    width: 95%;
    z-index: 1;
}

.calendar-week-view .event-details {
    flex: 1;
    overflow: hidden;
}

.calendar-week-view .event-time {
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.calendar-week-view .event-patient {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.calendar-week-view .time-slot {
    position: relative;
    min-height: 40px;
    padding: 2px;
    border-bottom: 1px solid #eee;
}

.calendar-week-view .day-column {
    min-width: 160px;
    background: white;
    position: relative;
}

/* Poprawki dla kolumny z godzinami */
.time-column {
    width: 80px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    margin-top: -1px;
}

.days-container {
    margin-left: 80px; /* Odstęp dla kolumny godzin */
}

.time-slot {
    height: 40px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 0.9em;
    color: #666;
    background: white;
}

/* Reset dla pozycjonowania wydarzeń */
.calendar-week-view .calendar-event {
    top: 0;
    left: 0;
    right: 0;
    margin: 0 2px;
    height: 38px; /* Dopasuj do wysokości slotu */
}

.time-slot:nth-child(even) {
    background: #f8f8f8;
}

.calendar-event {
    border: 1px solid rgba(0,0,0,0.2);
}

/* Wspólne style dla wszystkich widoków */
.calendar-event {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calendar-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.05) 100%);
    z-index: 0;
}

.calendar-event > * {
    position: relative;
    z-index: 1;
}

/* Statusy */
.calendar-event.confirmed {
    background-color: rgba(var(--color-main-rgb), 0.1);
    border-left: 4px solid var(--color-main-medium);
    color: var(--color-main-dark);
}

.calendar-event.unconfirmed {
    background-color: rgba(var(--color-accent-rgb), 0.1);
    border-left: 4px solid var(--color-accent);
    color: var(--color-main-dark);
}

.calendar-event.canceled {
    background-color: #95a5a6;
    opacity: 0.6;
    text-decoration: line-through;
}

.calendar-event:hover {
    background-color: rgba(var(--color-main-rgb), 0.2);
    transform: translateY(-2px);
}

/* =========================
   LANDING PAGE STYLES
   ========================= */

/* Reset dla landing page */
.landing-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="7" cy="7" r="7"/></g></g></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Logo */
.logo-container {
    text-align: left;
    margin-bottom: 2rem;
    position: relative;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 0;
    position: relative;
}

.logo {
    font-size: 9rem;
    font-weight: 300;
    margin: 0;
    color: white;
    letter-spacing: -6px;
    position: relative;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 160px;
    height: 8px;
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.5);
}

.logo-bold {
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.logo-light {
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
}

.logo-icon {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.6rem;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

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

/* Hero Content */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    color: white;
}

.hero-description {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Features List */
.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item i {
    color: #64ffda;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.feature-item span {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 2rem 0;
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #fca5a5;
}

/* Login Form */
.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-form label i {
    color: #00e676;
    width: 16px;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-dark);
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: #00e676;
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.1);
}

.login-form input::placeholder {
    color: var(--text-light);
}

/* Login Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: none;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(100, 255, 218, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.forgot-password {
    color: #00e676;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #64ffda;
    text-decoration: underline;
}

/* Benefits Section */
.benefits-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.benefits-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%2300e676" fill-opacity="0.03"><circle cx="7" cy="7" r="7"/></g></g></svg>');
    animation: float 25s ease-in-out infinite;
}

.benefits-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.benefits-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    position: relative;
}

.title-highlight {
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.benefit-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.benefit-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.benefit-card:nth-child(even) {
    transform: translateY(20px);
}

.benefit-card:nth-child(even):hover {
    transform: translateY(8px) scale(1.02);
}

.card-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    border-radius: 0 20px 0 100px;
    opacity: 0.1;
}

.benefit-icon {
    margin-bottom: 2rem;
}

.icon-bg {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

.icon-bg::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #4ade80 0%, #10b981 100%);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.benefit-card:hover .icon-bg::before {
    opacity: 1;
}

.benefit-content {
    text-align: left;
}

.benefit-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.benefit-card p {
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
}

.benefit-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 2px solid #f1f5f9;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #64ffda 0%, #00e676 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Additional benefit cards styles for more visual impact */

/* Footer */
.landing-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -1px;
}

.footer-left p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 0 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .login-card {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .benefit-card:nth-child(even) {
        transform: translateY(0);
    }
    
    .benefit-card:nth-child(even):hover {
        transform: translateY(-12px) scale(1.02);
    }
    

}

@media (max-width: 768px) {
    .hero-container {
        padding: 1rem;
    }
    
    .logo {
        font-size: 6.4rem;
    }
    
    .logo-icon {
        width: 90px;
        height: 90px;
        font-size: 2.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .benefits-section {
        padding: 4rem 0;
    }
    
    .benefits-container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .benefit-card {
        padding: 2.5rem 2rem;
        text-align: center;
    }
    
    .benefit-content {
        text-align: center;
    }
    
    .benefit-stats {
        justify-content: center;
        text-align: center;
    }
    

    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 5.6rem;
    }
    
    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 2.4rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .benefits-section {
        padding: 3rem 0;
    }
    
    .benefits-header {
        margin-bottom: 3rem;
    }
    
    .benefit-card {
        padding: 2rem 1.5rem;
    }
    
    .icon-bg {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .benefit-card h3 {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    

}

/* Container dla landing page */
.landing-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}