/* General Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Card Styles */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
}

.card-header {
    font-weight: bold;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0 !important;
}

.card-body {
    padding: 20px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

/* Badge Styles */
.badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Footer Styles */
footer {
    margin-top: 50px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
}

/* Form Styles */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Button Styles */
.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 8px 16px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    padding: 12px 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Dashboard Card Styles */
.card.text-white {
    border-radius: 8px;
    transition: transform 0.2s;
}

.card.text-white:hover {
    transform: translateY(-2px);
}

.card.text-white .card-header {
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: none;
}

.card.text-white .card-body {
    padding: 15px;
}

.card.text-white .card-title {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.card.text-white .card-text {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 0;
}

/* Modal Styles */
.modal-content {
    border-radius: 8px;
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Price List Specific Styles */
.price-list-table {
    font-size: 14px;
}

.price-list-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.price-list-table td:last-child {
    font-weight: 500;
}

/* Order Form Styles */
.product-row td {
    vertical-align: middle;
}

.qty-input {
    width: 80px;
    text-align: center;
}

.product-total,
.product-dealer-total {
    font-weight: 500;
    color: #28a745;
}

/* Totals Section */
.totals-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.totals-section div {
    font-size: 16px;
}

.totals-section strong {
    color: #495057;
}

/* Invoice Styles */
.invoice-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.invoice-header h1 {
    margin-bottom: 5px;
    color: #333;
}

.invoice-info {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.invoice-table th,
.invoice-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
}

.invoice-table th {
    background-color: #f8f9fa;
}

.invoice-totals {
    margin-top: 20px;
    text-align: right;
}

.invoice-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar, 
    .breadcrumb, 
    footer, 
    .btn, 
    .card-header .btn-group,
    .list-group {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card-header {
        background: none !important;
        border-bottom: 2px solid #000 !important;
        text-align: center !important;
    }
    
    .table-bordered {
        border: 1px solid #000 !important;
    }
    
    body {
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }
    
    .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .col-md-8,
    .col-md-12,
    .col-md-4,
    .col-md-6,
    .col-md-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    a {
        text-decoration: none !important;
        color: #000 !important;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 2px 5px;
        font-size: 10px;
    }
    
    .card-header {
        font-size: 14px;
    }
    
    .card.text-white .card-text {
        font-size: 20px;
    }
    
    .qty-input {
        width: 60px;
    }
    
    .form-label {
        font-size: 12px;
    }
    
    h1, h2, h3 {
        font-size: 1.2rem;
    }
    
    .breadcrumb {
        font-size: 12px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Tooltip Styles */
.tooltip-inner {
    max-width: 200px;
    padding: 8px 12px;
    background-color: #333;
    border-radius: 4px;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item {
    padding: 8px 20px;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.active {
    background-color: #007bff;
    color: #fff;
}

/* List Group Styles */
.list-group-item {
    border: none;
    padding: 12px 20px;
    margin-bottom: 5px;
    border-radius: 8px !important;
}

.list-group-item.active {
    background-color: #007bff;
    border-color: #007bff;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
}
/* Order Form Column Widths */
.qty-input {
    width: 80px;
    max-width: 80px;
    text-align: center;
}

.unit-price, .product-total, .product-discount-percent, .product-dealer-total {
    width: 100px;
}

.product-discount-percent {
    width: 80px;
}

/* For mobile devices */
@media (max-width: 768px) {
    .qty-input {
        width: 60px;
    }
    .unit-price, .product-total, .product-dealer-total {
        width: 80px;
    }
}
