/* GL Logistics - Modern CSS Design */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #48bb78;
    --warning-color: #f6ad55;
    --danger-color: #fc5c65;
    --info-color: #4fc3f7;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --border-color: #4a5568;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    transition: background-color var(--transition-normal);
}

/* Navbar Styles */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.navbar {
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: translateX(-5px);
}

.brand-icon {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-link {
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 10px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 120px);
    padding-top: 2rem;
}

/* Hero Section */
.hero-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card-primary { border-top: 4px solid var(--primary-color); }
.stat-card-success { border-top: 4px solid var(--success-color); }
.stat-card-warning { border-top: 4px solid var(--warning-color); }
.stat-card-info { border-top: 4px solid var(--info-color); }

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-card-primary .stat-icon { color: var(--primary-color); }
.stat-card-success .stat-icon { color: var(--success-color); }
.stat-card-warning .stat-icon { color: var(--warning-color); }
.stat-card-info .stat-icon { color: var(--info-color); }

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-content p {
    margin: 0;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Action Cards */
.action-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.action-card:hover .action-arrow {
    transform: translateX(-5px);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.action-card h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.action-card p {
    margin-bottom: 0;
    color: #6c757d;
}

.action-arrow {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 1.2rem;
    color: #cbd5e0;
    transition: transform var(--transition-fast);
}

/* Buttons */
.btn-modern {
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

/* Forms */
.form-control-modern {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.form-control-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select-modern {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.form-label-modern {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Scan Area */
.scan-area {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border: 3px dashed #cbd5e0;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.scan-area:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f4ff 0%, #e5e9ff 100%);
}

.barcode-input {
    font-size: 1.5rem !important;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
}

/* Item Badges */
.item-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.badge-wood {
    background: #f6ad55;
    color: white;
}

.badge-metal {
    background: #4a5568;
    color: white;
}

.item-badge:hover {
    transform: scale(1.05);
}

/* Section Titles */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alerts */
.alert-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    min-width: 300px;
    box-shadow: var(--shadow-xl);
}

/* Animations */
.animate-in {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .brand-icon {
        font-size: 1.4rem;
    }
}

/* Barcode Scanner Improvements */
.barcode-scanner-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e5e9ff 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.barcode-scanner-section .form-control {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scanned-item {
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    background: #f8f9fa;
    transition: all var(--transition-fast);
}

.scanned-item:hover {
    background: #e9ecef;
}

.scan-count-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.quantity-override-section {
    border-left: 4px solid var(--warning-color);
}

.scan-success-animation {
    animation: scanSuccess 0.5s ease-out;
}

@keyframes scanSuccess {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .action-card {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .stat-card, .hero-section {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
