/* /public/assets/styles.css */
:root{
  --bg:#0f172a;        /* Slate-900 */
  --card:#111827;      /* Gray-900 */
  --text:#e5e7eb;      /* Gray-200 */
  --muted:#9ca3af;     /* Gray-400 */
  --focus:#4f46e5;     /* Indigo-600 */
  --danger:#ef4444;    /* Red-500 */
}
*{box-sizing:border-box}
body{
  margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial;
  background:linear-gradient(135deg,#0b1225,#111827);
  color:var(--text);
  min-height:100vh;
}
/* Centrowanie tylko na stronie logowania */
.auth-body{
  display:flex;
  align-items:center;
  justify-content:center;
}
.auth-container{width:100%; padding:24px}
.auth-card{
  max-width:420px; margin:0 auto; background:rgba(17,24,39,.85);
  border:1px solid rgba(255,255,255,.06); border-radius:16px; padding:28px;
  box-shadow:0 10px 30px rgba(0,0,0,.45); backdrop-filter: blur(6px);
}
h1{margin:0 0 16px; font-size:26px}
label{display:block; margin:14px 0 6px; color:var(--muted); font-size:14px}
input[type="text"],input[type="password"]{
  width:100%; padding:12px 14px; border-radius:10px; border:1px solid rgba(255,255,255,.08);
  background:#0b1020; color:var(--text); outline:none;
}
input:focus{border-color:var(--focus); box-shadow:0 0 0 3px rgba(79,70,229,.25)}
button{
  width:100%; margin-top:18px; padding:12px 14px; border:none; border-radius:12px; cursor:pointer;
  background:linear-gradient(135deg,#6366f1,#4f46e5); color:white; font-weight:600; letter-spacing:.2px;
}
button:hover{filter:brightness(1.05)}
.alert{
  background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.4); color:#fecaca;
  padding:10px 12px; border-radius:10px; margin-bottom:10px; font-size:14px;
}
.auth-meta{margin-top:12px; text-align:center}
.auth-meta a{color:#a5b4fc; text-decoration:none}
.auth-meta a:hover{text-decoration:underline}
/* lekki odstęp kontenera od sticky headera */
.container{max-width:1600px; margin:40px auto; padding:0 20px; padding-top:20px}

.topbar{position:sticky;top:0;z-index: 1000;background:rgba(17,24,39,.9);border-bottom:1px solid rgba(255,255,255,.08);backdrop-filter:blur(6px)}
.topbar-inner {
  max-width:1400px;
  margin:0 auto;
  padding:16px 24px; /* było 14px 20px → lekko zwiększamy */
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.brand{color:#e5e7eb;text-decoration:none;font-weight:700}
.nav a{margin-left:14px;color:#a5b4fc;text-decoration:none}
.nav a:hover{text-decoration:underline}
.nav-user{margin-left:14px;color:#9ca3af}
.flash-wrap{max-width:1100px;margin:10px auto;padding:0 16px}
.flash{padding:10px;border-radius:10px;margin-bottom:8px;font-size:14px}
.flash.success{background:rgba(34,197,94,.15);border:1px solid rgba(34,197,94,.4);color:#bbf7d0}
.flash.error{background:rgba(239,68,68,.15);border:1px solid rgba(239,68,68,.4);color:#fecaca}
.table{width:100%;border-collapse:collapse;margin-top:12px}
.table th,.table td{padding:10px;border-bottom:1px solid rgba(255,255,255,.08);text-align:left}
.table th{color:#9ca3af;font-weight:600}
.actions a{margin-right:3px}
.form-row{margin:10px 0}
.form-row label{display:block;margin-bottom:6px;color:#9ca3af}
.form-row input,.form-row select{width:100%;max-width:420px;padding:10px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:#0b1020;color:#e5e7eb}
/* textarea – tak samo jak input */
.form-row textarea{
  width:100%;
  max-width:420px;
  padding:10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:#0b1020;
  color:#e5e7eb;
  min-height:120px;
  resize:vertical;
}

/* focus – spójny z resztą systemu */
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus{
  border-color:var(--focus);
  box-shadow:0 0 0 3px rgba(79,70,229,.25);
  outline:none;
}

/* placeholder */
.form-row input::placeholder,
.form-row textarea::placeholder{
  color:#6b7280;
}


/* === DASHBOARD === */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.dashboard-card {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  text-align: center;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease-in-out;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.dashboard-card h2 {
  color: #a5b4fc;
  font-size: 20px;
  margin-bottom: 8px;
}

.dashboard-card p {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 16px;
}

.dashboard-card a.button {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  transition: filter 0.2s;
}

.dashboard-card a.button:hover {
  filter: brightness(1.1);
}

/* ====== KALENDARZ – layout ====== */
.page-calendar{
  display:flex;
  gap:24px;
}

.cal-sidebar{
  width: 360px; /* możesz zmienić na 380-400 px wg uznania */
  flex: 0 0 auto;
  background: rgba(17,24,39,.85);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  height: fit-content;
}

.cal-sidebar-header{
  display:flex;
  gap:8px;
  margin-bottom:12px;
}

.cal-select{
  flex:1;
  padding:10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:#0b1020;
  color:var(--text);
}

.cal-select-placowka {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #4b5563; 
  background: #374151;        
  color: #ffffff;
  font-weight: 200;
  cursor: pointer;
  outline: none;
}

.legend{
  margin-top:12px;
  color:#9ca3af;
  font-size:13px;
  display:grid;
  gap:6px;
}
.dot{display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle}
.dot-available{background:#6366f1}
.dot-booked{background:#ef4444}

.cal-main{
  flex:1;
  min-width: 0; /* ważne przy gridzie/tabeli */
}

.cal-main-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.cal-main-toolbar .title{
  font-weight:600;
  color:#e5e7eb;
}

.cal-main-toolbar .spacer{flex:1}

.btn-ghost{
  background: transparent;
  color:#a5b4fc;
  border:1px solid rgba(255,255,255,.08);
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
}
.btn-ghost:hover{background:#0b1020}

/* ====== FullCalendar – dark theme tune ====== */
.fc-theme-standard .fc-scrollgrid { border-color: rgba(255,255,255,.08); }
.fc .fc-col-header-cell-cushion, .fc .fc-daygrid-day-number { color:#e5e7eb; }
.fc .fc-daygrid-day, .fc .fc-timegrid-slot, .fc .fc-timegrid-axis { border-color: rgba(255,255,255,.06); }
.fc .fc-toolbar-title { color:#e5e7eb; }
.fc .fc-event { border-radius:8px; }
.fc .fc-timegrid-now-indicator-line { border-color:#ef4444; }
.fc .fc-timegrid-slot-label-cushion { color:#9ca3af; }
.fc .fc-day-today { background: rgba(99,102,241,.08) !important; }
.cal-main-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.cal-filters{
  display:flex;
  align-items:center;
  gap:8px;
  margin-right:12px;
}

.cal-label{
  color:#9ca3af;
  font-size:13px;
}

.btn {
  width: auto;
  height: auto;
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size:13px;
  transition: filter 0.2s;
}
.btn:hover {
  filter: brightness(1.1);
}

.form-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-small {
  width: auto;
  height: auto;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size:11px;
  transition: filter 0.2s;
  
}
.btn-small:hover {
  filter: brightness(1.1);
}

.actions .btn-small:nth-child(n+2) {
  margin-top: 7px;
}

.btn-small-delete {
  width: auto;
  height: auto;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size:11px;
  transition: filter 0.2s;
}
.btn-small-delete:hover {
  filter: brightness(1.1);
}
.actions .btn-small-delete:nth-child(n+2) {
  margin-top: 7px;
}

.fc-bg-event {
    pointer-events: none;
}

.fc-event-main-frame {
    position: relative; /* Pozwala na pozycjonowanie przycisków wewnątrz */
}
.delete-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #ef4444; 
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer; /* Zmieniłem na cursor: pointer, by był widoczny jako klikalny */
	pointer-events: all !important; /* Upewnia się, że element jest klikalny */
    border-radius: 0 6px 0 5px; 
    z-index: 101;
    opacity: 0.8;
}
.delete-btn:hover {
    opacity: 1;
}

.edit-btn {
    position: absolute;
    top: 0px;
    right: 20px; /* Przesunięty o szerokość delete-btn */
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #3b82f6; 
    color: white;
    font-weight: bold;
    font-size: 14px;
	cursor: pointer;
    cursor: default; 
    border-radius: 0; 
    z-index: 101;
    opacity: 0.8;
    pointer-events: all !important; /* Blokuje kliknięcie */
}
.edit-btn:hover {
    opacity: 1;
}

/* Kropeczki w małym kalendarzu */

.fc-daygrid-day-events {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.fc-daygrid-event.fc-event-list-item {
    padding: 0;
    margin: 1px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.fc-daygrid-event.fc-event-list-item .fc-event-title {
    /* Ukrywamy tekst tytułu wydarzenia, pozostawiając tylko kropkę */
    display: none;
}

/* Kropka dla wydarzeń 'available' (dostępne) - Fioletowy */
.ev-available .fc-event-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #4f46e5;
    margin: 0;
}

/* Kropka dla wydarzeń 'booked' (zarezerwowane) - Czerwony */
.ev-booked .fc-event-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ef4444;
    margin: 0;
}

/* modal (wyskakujące okienko) do testowych maili */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
}

.modal-card{
  background: rgba(17,24,39,.95);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  margin: 10% auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  color: var(--text);
}

/* ===== Page header z przyciskiem powrotu ===== */

.page-header-vertical{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:30px;
  margin-bottom:14px;
}

.back-circle{
  width:36px;
  height:36px;
  border-radius:50%;
  background:linear-gradient(135deg,#6366f1,#4f46e5);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:20px;
  font-weight:bold;
  box-shadow:0 4px 12px rgba(79,70,229,.4);
  transition:transform .15s ease, filter .15s ease;
}

.back-circle:hover{
  filter:brightness(1.1);
  transform:translateX(-2px);
}

.page-header-horizontal {
  display: flex;
  flex-direction: row; /* Elementy obok siebie */
  align-items: center; /* Wyśrodkowanie w pionie */
  gap: 20px;           /* Odstęp między strzałką a tekstem */
  margin-bottom: 24px;
}

/* Reset marginesu H1, żeby nie psuł wyrównania ze strzałką */
.page-header-horizontal h1 {
  margin: 0;
}

/* Nowa klasa dla układu poziomego */
.page-header-row {
  display: flex;
  flex-direction: row; /* Elementy obok siebie */
  align-items: center; /* Wyrównanie strzałki i napisu w jednej linii */
  gap: 15px;           /* Odstęp między kółkiem a tekstem */
  margin-bottom: 20px;
}

/* Usuwamy domyślne marginesy z H1, żeby nie przesuwały napisu w dół */
.page-header-row h1 {
  margin: 0;
  line-height: 1;
}

/*logo na stronie logowania */
.auth-logo{
  display:flex;
  justify-content:center;
  align-items:center;
  background:#ffffff;
  border-radius:14px;
  padding:18px 20px;
  margin-bottom:20px;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
}

.auth-logo img{
  max-width:200px;
  width:100%;
  height:auto;
  display:block;
}

/*logo w menu */
.brand-logo{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}

.brand-logo img{
  height:38px;
  width:auto;
  display:block;
  /* background:#fff; */
  padding:4px;
  border-radius:6px;
}

.brand-logo span{
  font-weight:700;
  color:#e5e7eb;
  white-space:nowrap;
}

/* =====================================
   MINI KALENDARZ — TYLKO KROPKI
   ===================================== */

/* Ukrywamy czas i tytuł tylko w mini kalendarzu */
#miniCalendar .fc-event-time, 
#miniCalendar .fc-event-title {
    display: none !important;
}

/* Opcjonalnie: upewnij się, że kropka jest wycentrowana w komórce dnia */
#miniCalendar .fc-daygrid-event-harness {
    display: flex;
    justify-content: center;
}

#miniCalendar .fc-event {
    border: none !important;
    background: transparent !important;
}
#miniCalendar .fc-list-event-dot {
    border-width: 5px !important; /* Większa kropka */
    border-color: #007bff !important; /* Twój kolor */
}

.custom-tooltip {
    position: absolute;
    z-index: 99999;
    font-size: 16px;
    line-height: 1.4;
    background: #222;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    max-width: 320px;
    pointer-events: none;
    white-space: normal;

    overflow-wrap: anywhere;
    word-break: break-word;
}
.custom-tooltip .study {
    font-weight: bold;
    margin-bottom: 6px;
}

/* Zmiana wielkości czcionki w wydarzeniach kalendarza */
.fc-event .fc-event-main {
    font-size: 10px; /* Tutaj wpisz pożądaną wielkość, np. 12px lub 14px */
    line-height: 1.2;
}

/* Jeśli chcesz zmienić też czcionkę czasu (godziny) wewnątrz wydarzenia */
.fc-event .fc-event-time {
    font-size: 10px;
    font-weight: bold;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
    color: var(--text, #e5e7eb);
}

.checkbox-inline input[type="checkbox"] {
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Poprawka wymiarowania i stylu dla usuniętych rekordów */
.fc-v-event.status-deleted, 
.fc-timegrid-event.status-deleted,
.status-deleted {
    /* Wymuszamy, aby okienko zajmowało tyle miejsca, ile wynika z czasu start-end */
    min-height: 100% !important; 
    display: flex !important;
    flex-direction: column !important;
    /* Resetujemy ewentualne marginesy, które mogłyby skracać okienko */
    margin-bottom: 0 !important; 
}

/* Upewnij się, że kontener wewnętrzny FullCalendar też wypełnia wysokość */
.status-deleted .fc-event-main {
    flex-grow: 1 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.status-deleted::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 45deg rysuje idealną przekątną od LG do PD. 
       Zmieniamy currentColor na konkretny kolor (np. czerwony), 
       żeby linia była wyraźnie widoczna na żółtym tle.
    */
    background: linear-gradient(12deg, 
		transparent 49%, 
        #dc2626 49%, 
        #dc2626 51%, 
        transparent 51%
    ) !important;
    pointer-events: none;
    z-index: 10; /* Upewnia się, że linia jest nad tłem */
    opacity: 0.7;
}

/* Styl dla rezerwacji z innych placówek */
.event-external-reserved {
    background-color: #d1d1d1 !important; /* Szary */
    border-color: #a0a0a0 !important;
    color: #444 !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.event-external-reserved .fc-event-title::before {
    content: "🚫 "; /* Dodaje ikonkę zakazu przed tytułem */
}

.form-label {
    display: flex;
    align-items: center;
}

.req {
    color: var(--danger);
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
}

/* --- TRYB WYCINANIA PRZERW --- */

/* 1. Gdy kalendarz ma tę klasę, eventy stają się "przezroczyste" dla myszki */
.splitting-active .fc-event {
    pointer-events: none !important;
}

/* 2. Ale musimy przywrócić pointer-events dla paska bocznego i przycisków, 
   żeby dało się wyłączyć tryb */
.splitting-active .cal-sidebar, 
.splitting-active .topbar {
    pointer-events: auto !important;
}

/* 3. Zmiana kursora na precyzyjny krzyżyk wewnątrz kalendarza */
.splitting-active .fc-timegrid-col {
    cursor: crosshair !important;
}

/* 4. Wizualne wyróżnienie, że jesteśmy w trybie edycji (opcjonalne) */
.splitting-active .fc-timegrid {
    outline: 2px dashed #6366f1;
    outline-offset: -2px;
}


/* === KARTA TRYBU WYCINANIA === */
.split-card {
    border-left: 4px solid #f59e0b;
    transition: border-color .3s, box-shadow .3s;
}

/* Aktywny tryb */
#splitMode:checked ~ .slider,
#splitMode:checked {
    /* tylko dla pewności */
}

.split-card:has(#splitMode:checked) {
    border-left-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}

/* === TEKST === */
.split-label {
    font-weight: 700;
    color: #b45309;
}

.split-card:has(#splitMode:checked) .split-label {
    color: #166534;
}

/* === MAŁY SWITCH (−40%) === */
.split-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.split-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.split-switch .slider {
    position: absolute;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .25s;
}

.split-switch .slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform .25s;
}

.split-switch input:checked + .slider {
    background-color: #22c55e;
}

.split-switch input:checked + .slider::before {
    transform: translateX(16px);
}

