/* Tertip LIMS — Custom Styles */

/* Sidebar */
.sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #333;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.sidebar .nav-link.active {
    color: #0d6efd;
    font-weight: 600;
    background-color: #e7f1ff;
    border-radius: 0.25rem;
}

.sidebar .nav-link i {
    width: 1.25rem;
    text-align: center;
}

/* Hash IDs */
.hash-id {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    border: 1px solid #e9ecef;
    color: #6c757d;
}

/* Entity type badges */
.entity-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.35rem;
    border-radius: 0.2rem;
    margin-right: 0.25rem;
}

/* Status badges */
.badge-available { background-color: #198754; }
.badge-in_use { background-color: #0d6efd; }
.badge-low { background-color: #fd7e14; }
.badge-empty { background-color: #6c757d; }
.badge-expired { background-color: #dc3545; }
.badge-disposed { background-color: #343a40; }
.badge-operational { background-color: #198754; }
.badge-maintenance { background-color: #ffc107; color: #000; }
.badge-broken { background-color: #dc3545; }

/* QR code labels for printing */
@media print {
    .no-print { display: none !important; }

    .qr-label {
        page-break-inside: avoid;
        border: 1px dashed #ccc;
        padding: 8px;
        margin: 4px;
        display: inline-block;
        text-align: center;
    }

    .qr-label .hash-text {
        font-family: monospace;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .qr-label .item-name {
        font-size: 9px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* GHS hazard pictograms */
.ghs-pictogram {
    width: 32px;
    height: 32px;
    margin-right: 2px;
}

.ghs-pictogram.large {
    width: 48px;
    height: 48px;
}

/* Table improvements */
.table-hover tbody tr {
    cursor: pointer;
}

.table th {
    white-space: nowrap;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* Card dashboard widgets */
.dashboard-widget {
    transition: box-shadow 0.2s;
}

.dashboard-widget:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

/* Mobile responsive detail pages */
@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        text-align: center;
    }

    .detail-header .qr-code {
        margin-bottom: 1rem;
    }

    .sidebar {
        position: fixed;
        z-index: 100;
        top: 56px;
        left: -100%;
        width: 250px;
        transition: left 0.3s;
    }

    .sidebar.show {
        left: 0;
    }
}

/* Filter panel */
.filter-panel {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-panel .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
