/* Custom Fonts & Base Setup */
body {
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 0;
}

/* Watermark Background */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background-image: url('logo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 65vh; /* Larger watermark */
    opacity: 0.06; /* More visible watermark */
    z-index: -1;
    pointer-events: none; /* Prevents it from blocking clicks */
    filter: brightness(0); /* Make the watermark logo black */
}

/* Custom Scrollbar for better UX */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* slate-300 */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* slate-400 */
}

/* Esconder barra de rolagem nas abas */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Responsividade de Tabelas (Cards no Mobile) */
@media (max-width: 640px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    /* Esconde os cabeçalhos padrão */
    thead tr {
        display: none; 
    }
    
    /* Cada linha vira um Card */
    tr {
        margin-bottom: 1rem;
        border: 1px solid #f3f4f6; /* Tailwind gray-100 */
        border-radius: 0.75rem;
        padding: 0.75rem;
        background: #ffffff;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }
    
    /* Ajuste nas células para organizar em linha */
    td {
        border: none !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 0.25rem !important;
        text-align: right !important;
    }
    
    /* O texto antes do valor, retirado do atributo data-label */
    td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #9ca3af; /* Tailwind gray-400 */
        text-transform: uppercase;
        font-size: 0.65rem;
        letter-spacing: 0.05em;
        text-align: left;
        margin-right: 1rem;
    }
    
    /* Ajustes específicos para inputs dentro dos cards */
    td > input[type="date"], td > select {
        width: 130px;
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Reservas Calendar Grid */
.reservas-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb; /* Tailwind gray-200 */
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}
.reservas-grid-header {
    background-color: white;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    color: #4b5563;
    font-size: 0.875rem;
}
.reservas-grid-header-today {
    color: #1e3a8a; /* Primary color */
    background-color: #eff6ff; /* Blue 50 */
}
.reservas-grid-time {
    background-color: white;
    text-align: right;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.reservas-grid-cell {
    background-color: white;
    min-height: 48px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}
.reservas-grid-cell:hover {
    background-color: #f9fafb;
}
.reserva-block {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    overflow: hidden;
    color: white;
    z-index: 10;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    flex-direction: column;
}
.reserva-block:hover {
    transform: scale(1.02);
    z-index: 20;
}
.reserva-block-title {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reserva-block-time {
    font-size: 0.65rem;
    opacity: 0.9;
}
.reserva-alunos-row {
    display: flex;
    margin-top: auto;
    padding-top: 4px;
}
.reserva-aluno-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    margin-right: -6px;
    object-fit: cover;
    background-color: #fff;
}
