/* HidFlex Basic CSS */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 15px;
}

.login-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: none;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Content Sections */
.content-section {
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Stats Cards */
.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

/* Tables */
.table {
    background-color: white;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    border: none;
    color: #495057;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
    border: none;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Input Groups */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Barcode Scanner */
#barcode-scanner {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

#barcode-scanner video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

#barcode-scanner canvas {
    display: none;
}

/* Image Preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 5px;
    background-color: white;
}

/* Status Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #6c757d;
}

.status-low-stock {
    background-color: #ffc107;
    color: #212529;
}

.status-out-of-stock {
    background-color: #dc3545;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-approved {
    background-color: #28a745;
}

.status-rejected {
    background-color: #dc3545;
}

.status-delivered {
    background-color: #17a2b8;
}

.status-shipped {
    background-color: #6f42c1;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    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); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        margin: 20px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        margin-bottom: 5px;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        margin: 2px 0;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .card {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .table {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .table th {
        background-color: #4a5568;
    }
    
    .form-control, .form-select {
        background-color: #4a5568;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .modal-content {
        background-color: #2d3748;
        color: #e9ecef;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        font-size: 12px;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
}

.toast .toast-body {
    padding: 0.75rem;
}

.toast .toast-body i {
    margin-right: 0.5rem;
}

/* Product Management Styles */
.badge-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.btn-group .btn {
    margin: 0;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table code {
    font-size: 0.875rem;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Quick Product Form */
.card.border-primary {
    border-width: 2px !important;
}

.form-control-sm {
    font-size: 0.875rem;
}

/* Modal Improvements */
.modal-dialog {
    margin-top: 3rem;
}

.modal-header.bg-danger .btn-close,
.modal-header.bg-info .btn-close {
    filter: brightness(0) invert(1);
}

/* Low Stock Alert */
.card.border-warning {
    border-width: 2px !important;
}

#lowStockAlert .card-header {
    font-weight: 600;
}

/* Dashboard Cards Animation */
.card:hover .card-body {
    transform: translateY(-1px);
}

/* Button Hover Effects */
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Status Badge Colors */
.bg-success {
    background-color: #28a745 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Table Improvements */
.table th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

/* Recent Products Table */
#recentProductsTable .badge {
    font-size: 0.7rem;
}

#recentProductsTable td {
    vertical-align: middle;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Confirmation Modal */
.modal-content .alert {
    margin-bottom: 1rem;
}

.modal-content .card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Utility Classes */
.fw-bold {
    font-weight: 600 !important;
}

.text-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Dark Mode Support Enhancement */
@media (prefers-color-scheme: dark) {
    .toast {
        background-color: #343a40 !important;
        color: #fff !important;
    }
    
    .table code {
        background-color: #495057;
        color: #e9ecef;
    }
    
    .card.border-primary {
        border-color: #0d6efd !important;
    }
    
    .card.border-warning {
        border-color: #ffc107 !important;
    }
    
    .form-control-sm {
        background-color: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
}/ *   C R M   T i m e l i n e   a n d   A n a l y t i c s   S t y l e s   * / 
 
 / *   M e t r i c   C a r d s   * / 
 . m e t r i c - c a r d   { 
         b a c k g r o u n d :   # f 8 f 9 f a ; 
         b o r d e r :   1 p x   s o l i d   # e 9 e c e f ; 
         b o r d e r - r a d i u s :   0 . 3 7 5 r e m ; 
         p a d d i n g :   1 r e m ; 
         t e x t - a l i g n :   c e n t e r ; 
         m a r g i n - b o t t o m :   1 r e m ; 
 } 
 
 . m e t r i c - v a l u e   { 
         f o n t - s i z e :   1 . 5 r e m ; 
         f o n t - w e i g h t :   b o l d ; 
         c o l o r :   # 0 0 7 b f f ; 
         m a r g i n - b o t t o m :   0 . 2 5 r e m ; 
 } 
 
 . m e t r i c - l a b e l   { 


/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .container-fluid { padding: 0; }
    .navbar-brand { font-size: 1.1rem; }
    .navbar-nav .nav-link { padding: 10px 15px; font-size: 14px; }
    .card { margin-bottom: 15px; border-radius: 8px; }
    .btn { margin-bottom: 5px; min-height: 44px; }
    .btn-group { display: block; width: 100%; }
    .btn-group .btn { display: block; width: 100%; border-radius: 4px !important; margin-bottom: 5px; }
    .table-responsive { border: none; font-size: 12px; }
    .modal-dialog { margin: 10px; max-width: calc(100vw - 20px); }
    .form-control { font-size: 16px; padding: 12px; }
}

/* QR Code Styles */
.qr-modal .modal-body { text-align: center; }
.qr-scanner-modal video { border-radius: 8px; border: 2px solid #007bff; }

/* Touch Friendly */
.touch-device .btn, .touch-device .form-control { min-height: 44px; }

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto { background-color: #1a1a1a; color: #e0e0e0; }
    .dark-mode-auto .card { background-color: #2d2d2d; border-color: #404040; }
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .container-fluid { padding: 0; }
    .table { border-collapse: collapse; }
}

