﻿/* ============================================
   2doIT PWA - Global Styles
   ============================================ */

/* CSS Variables - 2doIT Branding */
:root {
    /* Primary - 2doIT Blå */
    --primary-gradient: linear-gradient(135deg, #007CBA 0%, #004B6F 100%);
    --primary-color: #007CBA;
    --primary-dark: #004B6F;
    /* Secondary - Hvid/Grå */
    --secondary-gradient: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    --secondary-color: #f3f4f6;
    /* Success - Grøn */
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    /* Info - Lys Blå */
    --info-gradient: linear-gradient(135deg, #007CBA 0%, #0096d6 100%);
    /* Warning - Orange */
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    /* Danger - Rød */
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    /* Dark - Mørkeblå */
    --dark-gradient: linear-gradient(135deg, #004B6F 0%, #003047 100%);
}

/* Reset tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #007CBA 0%, #004B6F 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ============================================
   Layout - Navbar
   ============================================ */

.app-header {
    background: linear-gradient(135deg, #007CBA 0%, #005A87 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #00A0E3;
    padding: 1rem 0;
}

    .app-header .navbar-brand {
        font-size: 1.3rem;
        font-weight: 700;
        color: white !important;
        text-decoration: none;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .app-header .navbar-brand:hover {
            color: #E0F2FF !important;
            transform: translateY(-1px);
        }

        .app-header .navbar-brand i {
            font-size: 1.5rem;
            color: #00A0E3;
        }

    .app-header .nav-link {
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        transition: all 0.3s;
    }

        .app-header .nav-link:hover {
            color: white;
        }

/* Employee Badge */
.badge-employee {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .badge-employee i {
        font-size: 1.1rem;
    }

/* Refresh Cache Button */
.btn-refresh-cache {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-refresh-cache:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.5);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .btn-refresh-cache i {
        font-size: 1.1rem;
    }

/* Logout Button */
.app-header .btn-logout {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

    .app-header .btn-logout:hover {
        background: linear-gradient(135deg, #C0392B 0%, #A93226 100%);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    }

    .app-header .btn-logout i {
        font-size: 1.1rem;
    }

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        padding: 0.75rem 0;
    }

        .app-header .navbar-brand {
            font-size: 1rem;
        }

            .app-header .navbar-brand i {
                font-size: 1.25rem;
            }

    .badge-employee {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .btn-refresh-cache,
    .app-header .btn-logout {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .btn-logout-text {
        display: none;
    }

    .header-actions {
        gap: 0.5rem;
    }
}

/* ============================================
   Index - Main Menu
   ============================================ */

.menu-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

    .card-grid.full-width {
        grid-template-columns: 1fr;
    }

.menu-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.75rem 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    position: relative;
    overflow: hidden;
    border: none;
}

    .menu-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .menu-card:active {
        transform: translateY(-2px);
    }

    .menu-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: var(--card-gradient, var(--primary-gradient));
    }

    .menu-card.primary {
        --card-gradient: var(--primary-gradient);
    }

    .menu-card.success {
        --card-gradient: var(--success-gradient);
    }

    .menu-card.info {
        --card-gradient: var(--info-gradient);
    }

    .menu-card.warning {
        --card-gradient: var(--warning-gradient);
    }

    .menu-card.danger {
        --card-gradient: var(--danger-gradient);
    }

    .menu-card .icon {
        font-size: 3rem;
        margin-bottom: 0.75rem;
        background: var(--card-gradient, var(--primary-gradient));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        transition: transform 0.3s;
    }

    .menu-card:hover .icon {
        transform: scale(1.1);
    }

    .menu-card h5 {
        font-size: 1.05rem;
        font-weight: 600;
        margin: 0;
        text-align: center;
        color: #1f2937;
        line-height: 1.3;
    }

    .menu-card p {
        font-size: 0.85rem;
        color: #6b7280;
        margin: 0.5rem 0 0 0;
        text-align: center;
        line-height: 1.3;
    }

.badge-new {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--danger-gradient);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.section-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 2rem 0 1rem 0;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .section-header i {
        font-size: 1.4rem;
    }

/* ============================================
   Login Page - Optimized for handheld scanners (480x800)
   ============================================ */

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 0.25rem;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding-top: 0.25rem;
}

.login-card {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    width: 100%;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: left;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

    .login-header .logo {
        width: 32px;
        height: 32px;
        min-width: 32px;
        background: var(--primary-gradient);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1rem;
        box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    }

    .login-header-text {
        text-align: left;
        flex: 1;
    }

    .login-header h1 {
        font-size: 1rem;
        font-weight: 700;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
        line-height: 1.1;
    }

    .login-header p {
        color: #6b7280;
        font-size: 0.7rem;
        margin: 0;
        line-height: 1.1;
    }

/* Login form controls - compact for mobile scanners */
.login-card .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.login-card .form-control {
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 2px solid #e5e7eb;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.login-card .form-control:focus {
    border-color: #007CBA;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.15);
}

.login-card .mb-3 {
    margin-bottom: 0.5rem !important;
}

.login-card .mb-4 {
    margin-bottom: 0.75rem !important;
}

.login-card .form-check {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card .form-check-input {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 2px solid #d1d5db;
    margin-top: 0.1rem;
}

.login-card .form-check-input:checked {
    background-color: #007CBA;
    border-color: #007CBA;
}

.login-card .form-check-label {
    color: #4b5563;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-login {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

.login-card .input-icon {
    position: relative;
}

.login-card .input-icon i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
}

.login-card .input-icon .form-control {
    padding-left: 2.25rem;
}

/* Compact alerts in login */
.login-card .alert {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem !important;
}

.login-card .alert i {
    font-size: 0.9rem;
}

/* Compact info boxes */
.login-card .bg-light {
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.login-card .bg-light small {
    font-size: 0.7rem;
}

.login-card .bg-light strong {
    font-size: 0.85rem;
}

/* Footer text */
.login-card .text-center.mt-4 {
    margin-top: 0.5rem !important;
}

.login-card .text-center.mt-4 small {
    font-size: 0.7rem;
}

.login-card .text-center.mt-3 {
    margin-top: 0.4rem !important;
}

.login-card .text-center.mt-3 a {
    font-size: 0.75rem;
}

/* ============================================
   Utilities
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .loading-overlay.active {
        display: flex;
    }

    .loading-overlay .spinner {
        width: 60px;
        height: 60px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#offlineBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1080;
    display: none;
    background: var(--warning-gradient);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.alert {
    border-radius: 0.75rem;
    border: none;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    font-weight: 500;
}

/* ============================================
   Inventory Count Page
   ============================================ */

.inventory-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.inventory-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.item-info-box {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.75rem;
}

    .item-info-box .info-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

        .item-info-box .info-row:last-child {
            margin-bottom: 0;
        }

    .item-info-box i {
        color: #007CBA;
        font-size: 1.1rem;
    }

    .item-info-box span {
        color: #374151;
        font-weight: 500;
        font-size: 0.95rem;
    }

.scan-input {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 1.1rem;
    transition: all 0.3s;
}

    .scan-input:focus {
        border-color: #007CBA;
        box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.15);
    }

.quantity-input-group {
    border-radius: 0.75rem;
    overflow: hidden;
}

    .quantity-input-group .form-control {
        border: 2px solid #e5e7eb;
        border-right: none;
        padding: 1rem;
        font-size: 1.1rem;
    }

        .quantity-input-group .form-control:focus {
            border-color: #007CBA;
            box-shadow: none;
        }

    .quantity-input-group .input-group-text {
        background: white;
        border: 2px solid #e5e7eb;
        border-left: none;
        font-weight: 600;
        color: #007CBA;
    }

.btn-add-inventory {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

    .btn-add-inventory:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
    }

.recent-scans-header {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scans-table-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.scans-table {
    margin: 0;
}

    .scans-table thead {
        background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    }

        .scans-table thead th {
            border: none;
            color: #374151;
            font-weight: 600;
            padding: 1rem 0.75rem;
            font-size: 0.9rem;
        }

    .scans-table tbody td {
        border-color: #f3f4f6;
        padding: 0.875rem 0.75rem;
        vertical-align: middle;
    }

    .scans-table .btn-delete {
        background: white;
        border: 2px solid #fecaca;
        color: #dc2626;
        padding: 0.375rem 0.75rem;
        border-radius: 0.5rem;
        transition: all 0.3s;
    }

        .scans-table .btn-delete:hover {
            background: var(--danger-gradient);
            border-color: transparent;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        }

.empty-state-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px dashed #93c5fd;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

    .empty-state-box i {
        font-size: 4rem;
        color: #3b82f6;
        opacity: 0.5;
        margin-bottom: 1rem;
    }

    .empty-state-box p {
        color: #1e40af;
        font-weight: 500;
        margin: 0;
    }

.btn-home {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
}

    .btn-home:hover {
        background: #f9fafb;
        border-color: #007CBA;
        color: #007CBA;
        transform: translateY(-2px);
    }

/* Mobile optimization for inventory */
@media (max-width: 768px) {
    .inventory-form-card {
        padding: 1.5rem;
    }

    .scans-table {
        font-size: 0.85rem;
    }

        .scans-table thead th,
        .scans-table tbody td {
            padding: 0.625rem 0.5rem;
        }
}

/* ============================================
   Inventory Transfer Page
   ============================================ */

.transfer-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.transfer-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.warehouse-select {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.875rem;
    transition: all 0.3s;
}

    .warehouse-select:focus {
        border-color: #007CBA;
        box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.15);
    }

.stock-info-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.75rem;
}

    .stock-info-section .stock-title {
        color: #1e40af;
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .stock-info-section .stock-item {
        color: #1e40af;
        padding: 0.25rem 0;
        font-size: 0.9rem;
    }

.btn-transfer {
    background: var(--info-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

    .btn-transfer:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
    }

.transfer-direction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: white;
    font-size: 1.5rem;
}

    .transfer-direction i {
        font-size: 2.5rem;
        color: #007CBA;
        background: white;
        padding: 0.5rem;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(0, 124, 186, 0.2);
    }

@media (max-width: 768px) {
    .transfer-form-card {
        padding: 1.5rem;
    }
}


/* ============================================
   FIX: Location Select Dropdowns & Autocomplete
   Tilføj til site.css efter warehouse-select styling
   ============================================ */

/* Location Select - Match warehouse-select styling */
.location-select {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.875rem;
    transition: all 0.3s;
    background: white;
    font-size: 1rem;
    color: #1f2937;
}

    .location-select:focus {
        border-color: #007CBA;
        box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.15);
        outline: none;
    }

    .location-select:hover:not(:focus) {
        border-color: #cbd5e1;
    }

    /* Small text under selects */
    .form-select + small.text-muted,
    .warehouse-select + small.text-muted,
    .location-select + small.text-muted {
        display: block;
        margin-top: 0.375rem;
        font-size: 0.8rem;
        color: #6b7280;
    }

/* ============================================
   jQuery UI Autocomplete - 2doIT Styling
   ============================================ */

/* Main autocomplete container */
.ui-autocomplete {
    background: white;
    border: 2px solid #007CBA;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 124, 186, 0.2);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1050 !important; /* Over modals */
}

/* Individual menu items */
.ui-menu-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ui-menu-item-wrapper {
    display: block;
    padding: 0.75rem 1rem;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

    /* Hover state */
    .ui-menu-item-wrapper:hover,
    .ui-menu-item-wrapper.ui-state-active,
    .ui-state-focus {
        background: linear-gradient(90deg, #e0f2fe 0%, #f0f9ff 100%);
        border-left-color: #007CBA;
        color: #004B6F;
        font-weight: 500;
    }

/* Selected/focused item */
.ui-state-active {
    background: linear-gradient(90deg, #bae6fd 0%, #e0f2fe 100%);
    border-left-color: #0096d6;
    color: #003047;
    font-weight: 600;
}

/* Scrollbar styling for autocomplete */
.ui-autocomplete::-webkit-scrollbar {
    width: 8px;
}

.ui-autocomplete::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 0.75rem 0.75rem 0;
}

.ui-autocomplete::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.3s;
}

    .ui-autocomplete::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* Helper text if no results */
.ui-menu-item .ui-menu-item-wrapper.ui-state-disabled {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    cursor: default;
    background: transparent;
    border-left: none;
}

/* Mobile adjustments for autocomplete */
@media (max-width: 768px) {
    .ui-autocomplete {
        border-radius: 0.5rem;
        max-height: 250px;
        margin-top: 0.375rem;
    }

    .ui-menu-item-wrapper {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .ui-autocomplete {
        border-radius: 0.5rem;
        max-height: 200px;
        box-shadow: 0 4px 16px rgba(0, 124, 186, 0.25);
    }

    .ui-menu-item-wrapper {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .location-select {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   Enhanced Input Styling (Match rest of form)
   ============================================ */

/* Scan input - enhanced */
.scan-input {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.875rem;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
    color: #1f2937;
}

    .scan-input:focus {
        border-color: #007CBA;
        box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.15);
        outline: none;
    }

    .scan-input::placeholder {
        color: #9ca3af;
        font-style: italic;
    }

/* Form labels - consistent styling */
.form-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

    .form-label i {
        color: #007CBA;
        font-size: 1.1rem;
    }

    /* Required indicator */
    .form-label.required::after,
    label[required]::after {
        content: "*";
        color: #dc2626;
        margin-left: 0.25rem;
        font-weight: 700;
    }

/* ============================================
   Dropdown Arrow Styling
   ============================================ */

/* Custom dropdown arrow for better UX */
.warehouse-select,
.location-select,
select.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23007CBA' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

    /* Hover state for dropdown */
    .warehouse-select:hover:not(:focus),
    .location-select:hover:not(:focus) {
        border-color: #cbd5e1;
        cursor: pointer;
    }

    /* Disabled state */
    .warehouse-select:disabled,
    .location-select:disabled {
        background-color: #f9fafb;
        color: #9ca3af;
        cursor: not-allowed;
        border-color: #e5e7eb;
    }

/* ============================================
   Touch-Friendly Mobile Enhancements
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets on touch devices */
    .warehouse-select,
    .location-select,
    .scan-input {
        min-height: 48px; /* Minimum touch target */
        padding: 0.75rem;
    }

    .ui-menu-item-wrapper {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
}

/* ============================================
   Loading State (Optional Enhancement)
   ============================================ */

/* Add this class via JavaScript when loading */
.warehouse-select.loading,
.location-select.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23007CBA' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 8 8A8 8 0 0 0 8 0zM8 14a6 6 0 1 1 6-6 6 6 0 0 1-6 6z'/%3E%3Cpath d='M8 4a4 4 0 1 0 4 4 4 4 0 0 0-4-4zm0 6a2 2 0 1 1 2-2 2 2 0 0 1-2 2z'/%3E%3C/svg%3E");
    background-size: 14px;
    animation: spin 1s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

/* Focus visible for keyboard navigation */
.warehouse-select:focus-visible,
.location-select:focus-visible,
.scan-input:focus-visible {
    outline: 3px solid #007CBA;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .warehouse-select,
    .location-select {
        border-width: 3px;
    }

    .ui-autocomplete {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .warehouse-select,
    .location-select,
    .ui-menu-item-wrapper {
        transition: none;
    }
}

/* ============================================
   Print Styling
   ============================================ */

@media print {
    .ui-autocomplete {
        display: none !important;
    }

    .warehouse-select,
    .location-select {
        border: 1px solid #000;
        background-image: none;
    }
}

/* ============================================
   Project Scan Page
   ============================================ */

.project-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.project-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    margin: 0.5rem 0;
}

.btn-add-project {
    background: var(--success-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

    .btn-add-project:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    }

.project-scans-header {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .project-form-card {
        padding: 1.5rem;
    }
}

/* ============================================
   Add Order Line Page
   ============================================ */

.order-line-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.order-header {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

    .order-header .order-number {
        font-size: 1.5rem;
        font-weight: 700;
        background: var(--warning-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.order-line-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.btn-add-line {
    background: var(--warning-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

    .btn-add-line:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    }

.order-lines-header {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-lines-table-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.order-lines-table {
    margin: 0;
}

    .order-lines-table thead {
        background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    }

        .order-lines-table thead th {
            border: none;
            color: #78350f;
            font-weight: 600;
            padding: 1rem 0.75rem;
            font-size: 0.9rem;
        }

    .order-lines-table tbody td {
        border-color: #fef3c7;
        padding: 0.875rem 0.75rem;
        vertical-align: middle;
    }

@media (max-width: 768px) {
    .order-line-form-card {
        padding: 1.5rem;
    }

    .order-header {
        text-align: center;
        justify-content: center;
    }
}

/* ============================================
   Create Purchase Order Page
   ============================================ */

.create-po-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.create-po-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.btn-create-po {
    background: var(--success-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

    .btn-create-po:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    }

.previous-orders-header {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.po-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}

    .po-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        border-color: #007CBA;
    }

    .po-card .po-number {
        font-size: 1.2rem;
        font-weight: 700;
        color: #007CBA;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .po-card .po-info {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        color: #6b7280;
    }

    .po-card .po-info-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .po-card .po-info-item i {
            color: #007CBA;
            width: 20px;
        }

.btn-edit-po {
    background: var(--success-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

    .btn-edit-po:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
    }

.empty-orders-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px dashed #6ee7b7;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

    .empty-orders-box i {
        font-size: 4rem;
        color: #059669;
        opacity: 0.5;
        margin-bottom: 1rem;
    }

    .empty-orders-box p {
        color: #065f46;
        font-weight: 500;
        margin: 0;
    }

@media (max-width: 768px) {
    .create-po-form-card {
        padding: 1.5rem;
    }

    .po-card {
        padding: 1.25rem;
    }

        .po-card .d-flex {
            flex-direction: column !important;
            align-items: flex-start !important;
        }

        .po-card .text-md-end {
            margin-top: 1rem;
            width: 100%;
        }

    .btn-edit-po {
        width: 100%;
    }
}

/* ============================================
   Create Sales Order Page
   ============================================ */

.sales-order-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.customer-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.customer-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #7dd3fc;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.75rem;
}

    .customer-info-box .info-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        color: #0c4a6e;
    }

        .customer-info-box .info-row:last-child {
            margin-bottom: 0;
        }

        .customer-info-box .info-row i {
            color: #0284c7;
            font-size: 1rem;
        }

.add-item-form-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

    .add-item-form-card h5 {
        color: #1f2937;
        font-weight: 700;
        margin-bottom: 1.5rem;
    }

.order-lines-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

    .order-lines-card h5 {
        color: #1f2937;
        font-weight: 700;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.line-count-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.order-line-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

    .order-line-item:hover {
        border-color: #007CBA;
        transform: translateX(3px);
    }

    .order-line-item .line-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .order-line-item .line-item {
        font-weight: 700;
        color: #1f2937;
        font-size: 1.1rem;
    }

    .order-line-item .line-remove {
        background: white;
        border: 2px solid #fecaca;
        color: #dc2626;
        padding: 0.25rem 0.5rem;
        border-radius: 0.5rem;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.3s;
    }

        .order-line-item .line-remove:hover {
            background: var(--danger-gradient);
            border-color: transparent;
            color: white;
        }

    .order-line-item .line-details {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
        color: #6b7280;
        font-size: 0.9rem;
    }

    .order-line-item .line-detail-item {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

        .order-line-item .line-detail-item strong {
            color: #374151;
        }

.btn-add-to-order {
    background: var(--success-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

    .btn-add-to-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    }

.btn-create-sales-order {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

    .btn-create-sales-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
    }

.btn-clear-lines {
    background: white;
    border: 2px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
}

    .btn-clear-lines:hover {
        background: var(--danger-gradient);
        border-color: transparent;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    }

@media (max-width: 768px) {
    .customer-form-card,
    .add-item-form-card,
    .order-lines-card {
        padding: 1.5rem;
    }

    .order-line-item .line-details {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Create Purchase Order Page
   Same structure as Sales Order for consistency
   ============================================ */

.purchase-order-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.btn-create-purchase-order {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

    .btn-create-purchase-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    }

/* ============================================
   Historik Page
   ============================================ */

.historik-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.historik-header {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

    .historik-header i {
        font-size: 2rem;
    }

.historik-order-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}

    .historik-order-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        border-color: #007CBA;
    }

    .historik-order-card .order-number {
        font-size: 1.2rem;
        font-weight: 700;
        color: #007CBA;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .historik-order-card .order-info {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        color: #6b7280;
    }

    .historik-order-card .order-info-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .historik-order-card .order-info-item i {
            color: #007CBA;
            width: 20px;
        }

.btn-view-order {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-view-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 124, 186, 0.4);
        color: white;
    }

.historik-empty-state {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px dashed #7dd3fc;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

    .historik-empty-state i {
        font-size: 4rem;
        color: #0284c7;
        opacity: 0.5;
        margin-bottom: 1rem;
    }

    .historik-empty-state p {
        color: #0c4a6e;
        font-weight: 500;
        margin: 0;
    }

@media (max-width: 768px) {
    .historik-order-card {
        padding: 1.25rem;
    }

        .historik-order-card .d-flex {
            flex-direction: column !important;
            align-items: flex-start !important;
        }

        .historik-order-card .text-md-end {
            margin-top: 1rem;
            width: 100%;
        }

    .btn-view-order {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Settings Page
   ============================================ */

.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.settings-card {
    background: white;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: none;
}

.settings-card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.25rem 1.5rem;
    border: none;
}

    .settings-card-header h5 {
        margin: 0;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.settings-card-body {
    padding: 1.5rem;
}

.settings-form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.settings-form-control {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.3s;
}

    .settings-form-control:focus {
        border-color: #007CBA;
        box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.15);
    }

    .settings-form-control:read-only {
        background-color: #f3f4f6;
        color: #6b7280;
    }

.settings-form-switch {
    padding-left: 2.5rem;
    margin-bottom: 1rem;
}

    .settings-form-switch .form-check-input {
        width: 3rem;
        height: 1.5rem;
        margin-left: -2.5rem;
        cursor: pointer;
    }

        .settings-form-switch .form-check-input:checked {
            background-color: #007CBA;
            border-color: #007CBA;
        }

    .settings-form-switch .form-check-label {
        font-weight: 500;
        color: #374151;
        cursor: pointer;
    }

.form-text {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn-save-settings {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

    .btn-save-settings:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 124, 186, 0.4);
    }

.btn-cancel-settings {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

    .btn-cancel-settings:hover {
        background: #f9fafb;
        border-color: #d1d5db;
        transform: translateY(-2px);
    }

.settings-metadata {
    background: #f9fafb;
    border-radius: 1rem;
    padding: 1.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

    .settings-metadata strong {
        color: #374151;
    }

@media (max-width: 768px) {
    .settings-card-header {
        padding: 1rem 1.25rem;
    }

    .settings-card-body {
        padding: 1.25rem;
    }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 360px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .menu-container {
        padding: 2rem 1rem;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

        .card-grid.full-width {
            grid-template-columns: repeat(3, 1fr);
        }

    .menu-card {
        min-height: 180px;
        padding: 2rem 1rem;
    }

        .menu-card .icon {
            font-size: 3.5rem;
        }

        .menu-card h5 {
            font-size: 1.1rem;
        }
}

@media (max-width: 768px) {
    .app-header .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Small screens - login already compact, ensure it stays that way */
@media (max-width: 576px) {
    .login-card {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }

    .login-header h1 {
        font-size: 0.95rem;
    }

    .login-header .logo {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.9rem;
    }

    .login-header p {
        font-size: 0.65rem;
    }

    .btn-login {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

.badge .bg-secondary {
    background-color: #fff;
}

=== CSS TILFØJELSER ===

.badge.bg-warning {
    background: var(--warning-gradient) !important;
}


/ /* ============================================
   Stock Info Section - KOMPAKT & PROFESSIONEL
   ============================================ */
/* Vareinfo box - reduceret padding */
.item-info-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem; /* Reduced from default */
    margin-top: 0.75rem;
}

.item-info-box .info-row {
    padding: 0.25rem 0; /* Meget kompakt */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #334155;
}

    .item-info-box .info-row i {
        color: #007CBA;
        font-size: 1rem;
    }

/* Stock Info Section - MEGET mere kompakt */
.stock-info-section {
    background: transparent; /* Ingen extra background */
    border: none; /* Fjern border */
    border-top: 1px solid #cbd5e1; /* Kun top border som separator */
    padding: 0.5rem 0 0 0; /* Minimal padding - kun top */
    margin-top: 0.5rem; /* Reduceret margin */
}

    .stock-info-section .stock-title {
        color: #1e40af;
        font-weight: 600;
        font-size: 0.85rem; /* Smaller */
        margin-bottom: 0.4rem; /* Meget lille margin */
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

        .stock-info-section .stock-title i {
            font-size: 0.95rem;
        }

/* Stock Matrix - Ultra kompakt */
.stock-matrix {
    margin-top: 0; /* Ingen top margin */
    background: #ffffff;
    border-radius: 6px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* Subtil shadow */
    -webkit-overflow-scrolling: touch;
}

    .stock-matrix table {
        margin-bottom: 0;
        font-size: 0.8rem; /* Smaller font */
        width: 100%;
        border-collapse: collapse;
    }

    /* Header - kompakt */
    .stock-matrix thead {
        background: linear-gradient(135deg, #007CBA 0%, #005A87 100%);
        color: white;
    }

        .stock-matrix thead th {
            font-weight: 600;
            padding: 0.4rem 0.5rem; /* Meget kompakt padding */
            border: none;
            white-space: nowrap;
            font-size: 0.7rem; /* Small font */
            text-transform: uppercase;
            letter-spacing: 0.3px;
            line-height: 1.2;
        }

    /* Body - kompakt */
    .stock-matrix tbody tr {
        transition: background-color 0.2s ease;
        border-bottom: 1px solid #f1f5f9;
    }

        .stock-matrix tbody tr:last-child {
            border-bottom: none;
        }

        .stock-matrix tbody tr:hover {
            background-color: #f0f9ff;
        }

    .stock-matrix tbody td {
        padding: 0.4rem 0.5rem; /* Meget kompakt */
        vertical-align: middle;
        font-size: 0.8rem;
        line-height: 1.3;
    }

        /* Strong numbers - bedre synlighed */
        .stock-matrix tbody td strong {
            font-weight: 700;
        }

    /* Success/Danger colors */
    .stock-matrix .text-success {
        color: #059669 !important;
    }

    .stock-matrix .text-danger {
        color: #dc2626 !important;
    }

/* ============================================
   Mobile Optimization - Ekstra kompakt
   ============================================ */

@media (max-width: 768px) {
    .item-info-box {
        padding: 0.6rem;
        margin-top: 0.5rem;
    }

        .item-info-box .info-row {
            padding: 0.2rem 0;
            font-size: 0.85rem;
        }

    .stock-info-section {
        padding: 0.4rem 0 0 0;
        margin-top: 0.4rem;
    }

        .stock-info-section .stock-title {
            font-size: 0.8rem;
            margin-bottom: 0.3rem;
            gap: 0.3rem;
        }

            .stock-info-section .stock-title i {
                font-size: 0.9rem;
            }

    .stock-matrix {
        border-radius: 5px;
    }

        .stock-matrix table {
            font-size: 0.75rem;
        }

        .stock-matrix thead th {
            padding: 0.35rem 0.4rem;
            font-size: 0.65rem;
        }

        .stock-matrix tbody td {
            padding: 0.35rem 0.4rem;
            font-size: 0.75rem;
        }
}

/* Very small screens - maximum kompakt */
@media (max-width: 480px) {
    .item-info-box {
        padding: 0.5rem;
        border-radius: 6px;
    }

        .item-info-box .info-row {
            padding: 0.15rem 0;
            font-size: 0.8rem;
            gap: 0.4rem;
        }

            .item-info-box .info-row i {
                font-size: 0.9rem;
            }

    .stock-info-section {
        padding: 0.3rem 0 0 0;
        margin-top: 0.3rem;
    }

        .stock-info-section .stock-title {
            font-size: 0.75rem;
            margin-bottom: 0.25rem;
        }

    .stock-matrix {
        border-radius: 4px;
    }

        .stock-matrix table {
            font-size: 0.7rem;
        }

        .stock-matrix thead th {
            padding: 0.3rem 0.3rem;
            font-size: 0.6rem;
            letter-spacing: 0.2px;
        }

        .stock-matrix tbody td {
            padding: 0.3rem 0.3rem;
            font-size: 0.7rem;
        }

            /* Skjul "Reserveret" kolonne på små skærme for mere plads */
            .stock-matrix thead th:last-child,
            .stock-matrix tbody td:last-child {
                display: none;
            }

            /* Comprimér warehouse navne */
            .stock-matrix tbody td:first-child,
            .stock-matrix thead th:first-child {
                max-width: 55px;
                overflow: hidden;
                text-overflow: ellipsis;
                font-size: 0.65rem;
            }

            /* Location kolonne */
            .stock-matrix tbody td:nth-child(2),
            .stock-matrix thead th:nth-child(2) {
                max-width: 85px;
                overflow: hidden;
                text-overflow: ellipsis;
            }
}

/* ============================================
   Alternative: Endnu mere kompakt (optional)
   Tilføj class "ultra-compact" til item-info-box
   ============================================ */

.item-info-box.ultra-compact {
    padding: 0.5rem;
    margin-top: 0.5rem;
}

    .item-info-box.ultra-compact .info-row {
        padding: 0.15rem 0;
        font-size: 0.85rem;
    }

    .item-info-box.ultra-compact .stock-info-section {
        padding: 0.3rem 0 0 0;
        margin-top: 0.3rem;
    }

    .item-info-box.ultra-compact .stock-title {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .item-info-box.ultra-compact .stock-matrix table {
        font-size: 0.75rem;
    }

    .item-info-box.ultra-compact .stock-matrix thead th {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
    }

    .item-info-box.ultra-compact .stock-matrix tbody td {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }

/* ============================================
/* ============================================
   Accessibility - Touch targets
   ============================================ */

/* Sørg for at table rows er touchable på mobile */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .stock-matrix tbody td {
        min-height: 36px; /* Minimum touch target */
    }
}
/* ============================================
   Responsive Design - Mobile First
   ============================================ */

/* Tablets og mindre (under 768px) */
@media (max-width: 768px) {
    .stock-info-section {
        padding: 0.75rem;
        margin-top: 0.5rem;
    }

        .stock-info-section .stock-title {
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
        }

            .stock-info-section .stock-title i {
                font-size: 1rem;
            }

    .stock-matrix {
        margin-top: 0.25rem;
        border-radius: 6px;
    }

        .stock-matrix table {
            font-size: 0.75rem;
        }

        .stock-matrix thead th {
            padding: 8px 4px;
            font-size: 0.7rem;
            letter-spacing: 0.3px;
        }

        .stock-matrix tbody td {
            padding: 8px 4px;
            font-size: 0.75rem;
        }

            /* Reducer kolonne bredder på mobile */
            .stock-matrix tbody td:first-child,
            .stock-matrix thead th:first-child {
                max-width: 60px;
                overflow: hidden;
                text-overflow: ellipsis;
            }
}

/* Meget små skærme (under 480px) */
@media (max-width: 480px) {
    .stock-info-section {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }

        .stock-info-section .stock-title {
            font-size: 0.85rem;
            margin-bottom: 0.4rem;
        }

    .stock-matrix {
        font-size: 0.7rem;
        border-radius: 4px;
    }

        .stock-matrix table {
            font-size: 0.7rem;
        }

        .stock-matrix thead th {
            padding: 6px 3px;
            font-size: 0.65rem;
            letter-spacing: 0.2px;
        }

        .stock-matrix tbody td {
            padding: 6px 3px;
            font-size: 0.7rem;
        }

            /* Kompakt visning - skjul "Reserveret" kolonne på meget små skærme */
            .stock-matrix thead th:last-child,
            .stock-matrix tbody td:last-child {
                display: none;
            }

            /* Reducer warehouse/location navne yderligere */
            .stock-matrix tbody td:first-child,
            .stock-matrix thead th:first-child {
                max-width: 50px;
                font-size: 0.65rem;
            }

            .stock-matrix tbody td:nth-child(2),
            .stock-matrix thead th:nth-child(2) {
                max-width: 80px;
            }
}

/* ============================================
   Alternativ: Compact Mode til Mobile
   ============================================ */

/* Tilføj denne class til stock-matrix div på mobile hvis ønsket */
.stock-matrix.compact {
    font-size: 0.7rem;
}

    .stock-matrix.compact thead th {
        padding: 6px 4px;
        font-size: 0.65rem;
    }

    .stock-matrix.compact tbody td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }

/* ============================================
   Alternativ: Card Layout til Mobile
   Tilføj denne CSS hvis du vil vise som cards i stedet
   ============================================ */

@media (max-width: 480px) {
    /* Uncomment dette hvis du vil bruge card layout på mobile
    
    .stock-matrix table {
        display: block;
    }

    .stock-matrix thead {
        display: none;
    }

    .stock-matrix tbody {
        display: block;
    }

    .stock-matrix tbody tr {
        display: block;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
    }

    .stock-matrix tbody td {
        display: block;
        text-align: left !important;
        padding: 0.25rem 0;
        border: none;
    }

    .stock-matrix tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.5rem;
        color: #004B6F;
    }
    */
}

/* ============================================
   Settings Page - Loading States
   ============================================ */

select.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cstyle%3E.spinner{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{to{transform:rotate(360deg)}}%3C/style%3E%3Ccircle class='spinner' cx='12' cy='12' r='8' fill='none' stroke='%23007CBA' stroke-width='2' stroke-dasharray='32' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2.5rem center;
    background-size: 1.25rem;
    color: #6c757d;
}

select.loading:disabled {
    background-color: #f8f9fa;
    cursor: wait;
}

.dropdown-error {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.orphaned-warning {
    font-size: 0.8rem;
}

/* ============================================
   END OF STYLES - Cleaned & Optimized
   ============================================ */
