/* Export Shipment Planner - Custom CSS */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #495057;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button Styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
}

/* Table Styles */
.table {
    font-size: 0.9rem;
}

.table thead {
    background-color: var(--light-bg);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Badge Styles */
.badge {
    padding: 0.4rem 0.7rem;
    font-weight: 500;
    border-radius: 4px;
}

/* Status Select Styles */
.status-select {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-select option[value="Pending"] {
    background-color: #f8d7da;
}

.status-select option[value="In Progress"] {
    background-color: #fff3cd;
}

.status-select option[value="Done"] {
    background-color: #d4edda;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Toast Notifications */
#toastContainer {
    z-index: 10000;
}

#toastContainer .alert {
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Navbar Styles */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Timeline Chart Styles */
#timelineChart {
    min-height: 400px;
}

.apexcharts-tooltip {
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Shipment List Styles */
#shipmentsList {
    max-height: 600px;
    overflow-y: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .status-select {
        font-size: 0.7rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Quick Actions Card */
.card-subtitle {
    font-weight: 600;
    color: #6c757d;
}

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Print Styles */
@media print {
    .navbar, .btn, #loadingOverlay {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Utility Classes */
.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15) !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) border-box;
}

/* Focus Styles for Accessibility */
*:focus {
    outline: none;
}

.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: color 0.15s ease-in-out,
                background-color 0.15s ease-in-out,
                border-color 0.15s ease-in-out,
                box-shadow 0.15s ease-in-out;
}