﻿/* ============================================
   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
   ============================================ */

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s ease-out;
    width: 100%;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .login-header .logo {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
        background: var(--primary-gradient);
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 2.5rem;
        box-shadow: 0 10px 30px rgba(0, 124, 186, 0.3);
    }

    .login-header h1 {
        font-size: 1.75rem;
        font-weight: 700;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
    }

    .login-header p {
        color: #6b7280;
        font-size: 0.95rem;
    }

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s;
}

    .form-control:focus {
        border-color: #007CBA;
        box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.15);
    }

.form-check {
    padding-left: 1.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.375rem;
    border: 2px solid #d1d5db;
    margin-top: 0.125rem;
}

    .form-check-input:checked {
        background-color: #007CBA;
        border-color: #007CBA;
    }

.form-check-label {
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 500;
}

.btn-login {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    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);
    }

.input-icon {
    position: relative;
}

    .input-icon i {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
        font-size: 1.2rem;
    }

    .input-icon .form-control {
        padding-left: 3rem;
    }

/* ============================================
   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;
    }
}

/* ============================================
   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;
    }
}

/* ============================================
   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;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-header .logo {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

.badge .bg-secondary{
    background-color:#fff;
}
