/* ===== WWS-System Main CSS ===== */

:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1a1a2e;
    --primary: #0d6efd;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg) !important;
    transition: width 0.2s ease;
    flex-shrink: 0;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

#sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

#page-content-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Nav */
#sidebar .nav-link {
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    transition: background 0.15s;
}
#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
}

.nav-section-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    padding: 0.75rem 0.75rem 0.25rem;
    list-style: none;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Tables */
.table-hover tbody tr:hover {
    background: rgba(13,110,253,0.04);
}

/* Status Badges */
.badge-in_stock    { background: #198754 !important; }
.badge-in_vehicle  { background: #0d6efd !important; }
.badge-on_project  { background: #fd7e14 !important; }
.badge-installed   { background: #6c757d !important; }
.badge-defective   { background: #dc3545 !important; }
.badge-blocked     { background: #dc3545 !important; }
.badge-returned    { background: #6f42c1 !important; }
.badge-disposed    { background: #343a40 !important; }
.badge-reserved    { background: #ffc107 !important; color: #000 !important; }

/* Scan Button (Techniker-Ansicht) */
.scan-btn {
    width: 100%;
    height: 80px;
    font-size: 1.2rem;
    border-radius: 16px;
    font-weight: 600;
}

/* Mobile Techniker-Shop */
.tech-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.tech-action-btn {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.15s;
}
.tech-action-btn i {
    font-size: 2rem;
}

/* Drag & Drop Upload */
.drop-zone {
    border: 2px dashed #adb5bd;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(13,110,253,0.05);
}
.drop-zone input[type="file"] {
    display: none;
}

/* Scanner Container */
#scanner-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Article Images */
.article-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.article-image-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* Low Stock Warning */
.low-stock-badge {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Print styles */
@media print {
    #sidebar, .navbar, .btn, .no-print { display: none !important; }
    #page-content-wrapper { margin: 0 !important; }
    .card { border: 1px solid #ddd !important; box-shadow: none !important; }
}

/* Mobile */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        z-index: 1050;
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    #sidebar.mobile-open {
        transform: translateX(0);
    }
    .tech-action-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* PWA Install Banner */
#pwa-install-banner {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
}
