/* Gestão de Cacifos - Custom Styles */

.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.locker-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px;
    cursor: default;
    transition: transform 0.15s;
    min-height: 110px;
}

.locker-slot:hover {
    transform: scale(1.08);
    z-index: 1;
}

.locker-slot.destaque {
    outline: 3px solid #0d6efd;
    outline-offset: 1px;
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    animation: locker-destaque 1.2s ease-out 3;
    z-index: 2;
}

@keyframes locker-destaque {
    0%   { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

.locker-slot.free {
    background: #d1e7dd;
    border: 2px dashed #0f5132;
    color: #0f5132;
}

.locker-slot.occupied {
    background: #f8d7da;
    border: 2px solid #842029;
    color: #842029;
}

.locker-slot.key-type {
    border-style: solid;
}

.locker-slot.padlock-type {
    border-style: dashed;
}

.locker-slot.damaged {
    background: #dc3545;
    border: 2px solid #842029;
    color: #fff;
}

.locker-slot.damaged .locker-code {
    color: #fff;
}

.locker-slot.damaged .locker-damaged-reason {
    font-size: 0.55rem;
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
    padding: 1px 3px;
    margin-top: 1px;
}

.locker-slot .locker-code {
    font-weight: bold;
    font-size: 0.8rem;
}

.locker-slot .locker-students {
    font-size: 0.65rem;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.locker-slot .locker-student {
    font-size: 0.72rem;
    line-height: 1.35;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    margin-top: 2px;
}

.locker-slot .locker-student:first-child {
    margin-top: 4px;
}

.locker-slot .locker-key-info {
    font-size: 0.55rem;
    line-height: 1.2;
    margin-top: 3px;
    color: inherit;
    opacity: 0.85;
}

.locker-slot .locker-key-warning {
    color: #dc3545;
    font-weight: bold;
    font-size: 0.5rem;
    line-height: 1.1;
    margin-top: 1px;
}

.locker-slot .locker-type-icon {
    font-size: 0.8rem;
    margin-bottom: 1px;
}

.cabinet-header {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #dee2e6;
    border-bottom: none;
    font-weight: bold;
}

.cabinet-wrapper {
    margin-bottom: 1.5rem;
}

.stats-card {
    transition: transform 0.15s;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.table-hover tbody tr {
    cursor: pointer;
}

@media (max-width: 768px) {
    .cabinet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 10px;
    }

    .locker-slot {
        min-height: 90px;
        font-size: 0.65rem;
        padding: 6px;
    }

    .locker-slot .locker-student {
        font-size: 0.62rem;
        line-height: 1.25;
    }
}
