body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
    text-align: center;
}

/* Logo */
.logo {
    display: block;
    margin: 20px auto;
    max-width: 150px;
}


.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container img {
    max-width: 150px;
}

.calendar-controls {
    margin-bottom: 20px;
}

select {
    padding: 5px;
    font-size: 16px;
}

.table-responsive {
    overflow-x: auto;
    margin: auto;
    width: 95%;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* ✅ Permite coloanelor să se redimensioneze */
    min-width: 1200px; /* ✅ Evită micșorarea excesivă a tabelului */
}

th, td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
    vertical-align: middle;
    white-space: normal; /* ✅ Permite textului să treacă la rând nou */
    word-wrap: break-word; /* ✅ Rupe cuvintele lungi */
    overflow: visible; /* ✅ Permite expansiunea conținutului */
    min-height: 40px;
}

/* Stilizare header tabel */
th {
    background-color: #142765;
    color: white;
    font-weight: bold;
    padding: 10px;
}

td {
    background-color: #ffffff;
    position: relative;
    height: auto; /* ✅ Se ajustează în funcție de conținut */
}

/* Programările (se ajustează dinamic în celule) */
.appointment {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 4px 4px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    min-height: 35px;
    width: 93%; /* ✅ Se extinde automat pentru a ocupa spațiul celulei */
    border: 1px solid black;
    margin: 2px 0; /* ✅ Adaugă spațiere verticală */
}

/* Container pentru programări (flex pentru adaptare automată) */
.programari-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

/* Slot gol în tabel */
.empty-slot {
    color: #d1d1d1;
    font-size: 18px;
    display: inline-block;
}

/* Buton de revenire */
.btn-back {
    display: inline-block;
    padding: 8px 16px;
    background-color: #142765;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

/* Tooltip optimizat */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
    max-width: 220px;
    white-space: normal;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    text-align: left;
    font-weight: bold;
    line-height: 1.1;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.tooltip p {
    margin: 3px 0;
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 15px;
    border-width: 2px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}
