/* Custom styles for Sales Huong Tien application */

/* Optimized Navigation Menu */
.nav-item {
    padding-bottom: 0.2rem !important;
    margin-bottom: 0;
}

.nav-item .nav-link {
    padding: 0.4rem 0.75rem;
    margin-bottom: 0.1rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

.nav-item .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
    color: rgba(255, 255, 255, 1);
}

.nav-item .nav-link.active {
    background-color: #007bff;
    color: white !important;
    border-radius: 0.375rem;
}

/* Compact Developer Tools */
.collapse .nav-item {
    padding-bottom: 0;
    margin-bottom: 0;
}

.collapse .nav-link {
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 0.05rem;
}

.collapse .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Developer Tools Container */
#devTools {
    margin-top: 0.1rem;
    padding-top: 0.1rem;
}

#devTools .nav-item {
    margin-bottom: 0.1rem;
    padding-bottom: 0 !important;
}

#devTools .nav-item:last-child {
    margin-bottom: 0.3rem;
}

/* Tighter spacing for all sub-menu items */
.collapse .nav-item .nav-link.small {
    padding: 0.12rem 0.5rem;
    margin: 0.02rem 0;
    font-size: 0.82rem;
    line-height: 1.1;
}

/* Section Headers */
.nav-section-header {
    color: #ffc107;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem 0.2rem;
    margin-top: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Collapsible Button */
.btn-link.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
}

.btn-link.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.btn {
    border-radius: 0.375rem;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #343a40 !important;
    color: white !important;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.badge {
    font-size: 0.75em;
    font-weight: 500;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.15s ease-in-out;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.alert {
    border: 0;
    border-radius: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
}

.dashboard-card {
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.text-primary { color: #0d6efd !important; }
.text-success { color: #198754 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #0dcaf0 !important; }
.text-danger { color: #dc3545 !important; }

.bg-primary { background-color: #0d6efd !important; }
.bg-success { background-color: #198754 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #0dcaf0 !important; }
.bg-danger { background-color: #dc3545 !important; }

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Modal improvements */
.modal-dialog {
    margin: 1.75rem auto;
}

.modal-xl {
    max-width: 1140px;
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 0.375rem;
}

/* Custom scrollbar */
.nav-scrollable::-webkit-scrollbar {
    width: 6px;
}

.nav-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nav-scrollable::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.nav-scrollable::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utility classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Inventory table dropdown improvements */
.table .dropdown-toggle {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    min-width: 40px;
}

.table .dropdown-toggle:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.table .dropdown-menu {
    font-size: 0.875rem;
    min-width: 220px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid #dee2e6;
}

.table .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem 0.25rem;
    margin-bottom: 0;
}

.table .dropdown-item {
    padding: 0.5rem 0.75rem;
    color: #495057;
    transition: all 0.15s ease-in-out;
}

.table .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #16181b;
    transform: translateX(2px);
}

.table .dropdown-item i {
    width: 1.2rem;
    text-align: center;
}

.table .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #dee2e6;
}
