/* Custom styles for Logistics Management System */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    /* Removed box-shadow frame */
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 2px 10px;
    /* Removed transition for direct show */
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
}

.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 8px 20px;
    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 5px 15px rgba(102, 126, 234, 0.3);
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #333333 !important; /* Bold black border */
    padding: 12px 15px;
    transition: all 0.3s ease;
    background-color: #ffffff !important; /* Force white background */
    color: #000000 !important; /* Force black text */
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-control::placeholder {
    color: #666666 !important;
    font-weight: 400;
}

.form-select {
    border-radius: 10px;
    border: 2px solid #333333 !important; /* Bold black border */
    padding: 12px 15px;
    background-color: #ffffff !important; /* Force white background */
    color: #000000 !important; /* Force black text */
    font-weight: 500;
}

.form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Specific styling for textarea */
textarea.form-control {
    border: 2px solid #333333 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 500;
}

/* Input file styling */
input[type="file"].form-control {
    border: 2px solid #333333 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 500;
}

/* Form labels styling */
.form-label {
    color: #000000 !important;
    font-weight: 600 !important;
    margin-bottom: 8px;
}

/* Form check styling */
.form-check-input {
    border: 2px solid #333333 !important;
}

.form-check-label {
    color: #000000 !important;
    font-weight: 500;
}

.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 10px;
}

.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.dropdown-item {
    border-radius: 5px;
    margin: 2px;
    /* Removed transition for instant show */
}

.dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        padding-top: 0;
    }
    
    main {
        margin-left: 0 !important;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading Overlay Spinner */
#loadingOverlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    .module-submenu {
        min-width: 100%;
        margin-bottom: 1rem;
    }
    
    .user-dropdown {
        position: static !important;
        transform: none !important;
        visibility: visible;
        opacity: 1;
        width: 100%;
        margin-top: 0.5rem;
        max-height: 0;
        overflow: hidden;
        padding: 0 1.5rem;
        /* Removed transition for instant show */
    }
    
    .user-dropdown.show {
        max-height: 50vh;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .module-submenu {
        min-width: 100%;
        padding: 1rem;
    }
    
    .action-category {
        min-width: 100%;
        margin-bottom: 0.8rem;
    }
    
    .action-item {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Additional hover effects */
.menu-item::before,
.action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
    z-index: 0;
}

.menu-item:hover::before,
.action-item:hover::before {
    left: 100%;
}

.menu-item > *,
.action-item > * {
    position: relative;
    z-index: 1;
}

/* Removed all slide animations - menus show directly */

/* Disable animations and transitions globally EXCEPT for dropdown menus */
*, *::before, *::after {
    transition: none !important;
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* Allow transitions for dropdown menus only */
.dropdown-menu, 
.dropdown-menu *,
.nav-item.dropdown .dropdown-menu,
.submenu-items.collapse {
    transition: all 0.15s ease-in-out !important;
    animation: none !important;
}

/* Specific dropdown menu transition override */
.dropdown-menu {
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out, visibility 0.15s ease-in-out !important;
}
