/* Custom Styles for EPMA CMS - Modern Black, Yellow, White Theme */

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Enhanced Loading Performance */
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Lazy Loading Animation */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.content-container {
    min-height: calc(100vh - 80px);
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduce layout shifts */
img {
    max-width: 100%;
    height: auto;
}

/* Cache-friendly animations */
.card, .btn, .form-control {
    transition: all 0.2s ease-in-out;
}

/* System Settings specific styles */
.system-stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    transition: transform 0.2s ease-in-out;
}

.system-stats-card:hover {
    transform: translateY(-2px);
}

.security-alert {
    border-left: 4px solid var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.captcha-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-left: 4px solid var(--info-color);
}
}

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

:root {
    --primary-color: #1a1a1a;     /* Black */
    --secondary-color: #FFD700;   /* Yellow */
    --accent-color: #87CEEB;      /* Sky Blue */
    --text-light: #FFFFFF;        /* White */
    --text-dark: #1a1a1a;         /* Black */
    --bg-light: #FFFFFF;          /* White */
    --bg-gray: #F8F9FA;           /* Light Gray */
    --success-color: #28a745;     /* Green */
    --danger-color: #dc3545;      /* Red */
    --warning-color: #FFD700;     /* Yellow */
    --info-color: #87CEEB;        /* Sky Blue */
}

/* Status badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    color: white;
}

.status-A {
    background-color: var(--success-color);
}

.status-R {
    background-color: var(--danger-color);
}

.status-P {
    background-color: var(--warning-color);
    color: black;
}

/* Customer Lookup Styling */
.existing-customer-message {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    color: #1976D2;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.existing-customer-message:hover {
    background: #bbdefb;
    border-color: #1976D2;
}

.existing-customer-phone {
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25) !important;
}

/* jQuery UI Datepicker Styling */
.ui-datepicker {
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 13px !important;
    z-index: 9999 !important;
}

.ui-datepicker-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 8px !important;
    border-radius: 6px 6px 0 0 !important;
}

.ui-datepicker-title {
    color: #495057 !important;
    font-weight: 600 !important;
}

.ui-datepicker-calendar {
    margin: 0 !important;
    width: 100% !important;
}

.ui-datepicker-calendar td {
    border: none !important;
    padding: 2px !important;
}

.ui-datepicker-calendar a {
    padding: 6px !important;
    text-decoration: none !important;
    color: #495057 !important;
    border-radius: 4px !important;
    display: block !important;
    text-align: center !important;
}

.ui-datepicker-calendar a:hover {
    background: #e9ecef !important;
    color: #495057 !important;
}

.ui-state-active {
    background: #007bff !important;
    color: white !important;
}

/* Customer Information Section Background */
.customer-info-section {
    background-color: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    border-radius: 6px !important;
}

/* General styling */
body {
    background-color: var(--bg-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* Form styling improvements */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 150px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(135, 206, 235, 0.25);
}

/* Validation error styling */
.form-control.error, .form-select.error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Compact form layout */
.form-section {
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Customer Information section with light yellow background */
.customer-info-section {
    background: #FFF9C4 !important;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.form-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

/* Compact row spacing */
.row {
    margin-bottom: 6px;
}

.col-md-3, .col-md-4, .col-md-6 {
    padding: 0 6px;
    margin-bottom: 8px;
}

/* Phone number highlighting for existing customers */
.existing-customer-phone {
    border-color: #007bff !important;
    background-color: #e3f2fd !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.existing-customer-message {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 1px solid #2196F3;
    color: #1565C0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.customer-actions {
    text-align: center;
}

.customer-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
    margin: 3px 2px;
    border-radius: 4px;
    font-weight: 500;
}

.customer-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
}

.customer-actions .btn-success:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.customer-actions .btn-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    border: none;
    color: white;
}

.customer-actions .btn-info:hover {
    background: linear-gradient(135deg, #138496, #5a32a3);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

/* Label styling */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-size: 13px;
}

/* Enhanced Date picker UI with better cross-browser support */
input[type="date"] {
    position: relative;
    background: linear-gradient(135deg, white, #f8f9fa);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.1);
    color: var(--text-dark);
}

input[type="date"]:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.2);
    transform: translateY(-1px);
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

/* Calendar icon styling for WebKit browsers */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="%23FFD700" viewBox="0 0 16 16"><path d="M14 2h-3V1a1 1 0 0 0-2 0v1H7V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM2 4h12v9H2V4z"/><path d="M4 6h2v2H4V6zm4 0h2v2H8V6zm4 0h2v2h-2V6zM4 10h2v2H4v-2zm4 0h2v2H8v-2zm4 0h2v2h-2v-2z"/></svg>') no-repeat center;
    cursor: pointer;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    transition: all 0.3s ease;
    border-radius: 4px;
    opacity: 0.8;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    transform: scale(1.1);
    opacity: 1;
    background-color: rgba(255, 215, 0, 0.1);
}

/* Date input placeholder and styling improvements */
input[type="date"]:valid {
    color: var(--text-dark);
}

input[type="date"]:invalid {
    color: #999;
}

/* Add visual feedback for date range constraints */
input[type="date"][min][max] {
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
}

/* Button styling */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #333);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #333, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--secondary-color), #FFB000);
    border: none;
    color: var(--text-dark);
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #FFB000, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Tab styling */
.nav-tabs .nav-link {
    border: none;
    border-radius: 12px 12px 0 0;
    margin-right: 4px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--accent-color), #5DADE2);
    color: white;
    border-bottom: 3px solid var(--secondary-color);
}

.nav-tabs .nav-link:not(.active) {
    background: #f8f9fa;
    color: var(--text-dark);
}

.nav-tabs .nav-link:hover:not(.active) {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Login page specific styling */
body:not(.has-sidebar) {
    display: flex;
    flex-direction: column;
}

/* Body with sidebar */
body.has-sidebar {
    display: flex;
    flex-direction: column;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: var(--text-light);
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1000;
    padding-top: 20px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

/* New class for collapsed sidebar */
.sidebar.collapsed {
    width: 60px;
    overflow: hidden;
}

/* Style modifications for collapsed sidebar */
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .sidebar-user,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .sidebar-dropdown-toggle .fa-chevron-down {
    display: none;
}

/* Hide all text in menu items, only show icons */
.sidebar.collapsed .sidebar-menu a span {
    display: none;
}

.sidebar.collapsed .sidebar-menu a {
    padding: 15px 20px;
    text-align: center;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
}

/* Special popup styling for collapsed sidebar submenus */
.sidebar.collapsed .sidebar-submenu {
    position: absolute;
    left: 60px; /* Same as collapsed sidebar width */
    top: 0;
    background-color: var(--primary-color);
    min-width: 180px;
    z-index: 1002;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    max-height: none !important; /* Override the default max-height */
    overflow: visible !important; /* Override the default overflow hidden */
    padding: 5px 0;
    border-left: 3px solid var(--accent-color);
}

.sidebar.collapsed .sidebar-menu li {
    position: relative;
}

/* Show submenu on hover for better UX */
.sidebar.collapsed .sidebar-menu li:hover > .sidebar-submenu {
    opacity: 1;
    visibility: visible;
}

/* Show submenu on click via JS-applied class */
.sidebar.collapsed .sidebar-submenu.submenu-visible {
    opacity: 1;
    visibility: visible;
}

/* Style for active state in collapsed mode */
.sidebar.collapsed .sidebar-dropdown-toggle.active-collapsed {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

.sidebar.collapsed .sidebar-submenu a {
    text-align: left;
    padding: 10px 15px 10px 15px;
    display: flex;
    align-items: center;
}

.sidebar.collapsed .sidebar-submenu a i {
    margin-right: 10px;
    display: inline-block !important;
    width: 20px;
    text-align: center;
    font-size: 1.1em;
    color: var(--accent-color);
}

.sidebar.collapsed .sidebar-submenu a span {
    display: inline;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar.collapsed .sidebar-submenu a:hover i,
.sidebar.collapsed .sidebar-submenu a.active i {
    color: #ffffff;
}

.sidebar.collapsed .sidebar-submenu a:hover,
.sidebar.collapsed .sidebar-submenu a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.sidebar-user {
    margin-top: 10px;
    font-size: 0.9rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    padding: 0;
}

.sidebar-menu a {
    padding: 12px 20px;
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, 
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Sidebar dropdown menus */
.sidebar-dropdown-toggle {
    position: relative;
}

.sidebar-dropdown-toggle .fa-chevron-down {
    font-size: 0.9rem;
    transition: transform 0.3s;
    margin-top: 3px;
    color: var(--accent-color);
}

.sidebar-dropdown-toggle.active .fa-chevron-down {
    transform: rotate(-180deg);
    color: #ffffff;
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-submenu.active {
    max-height: 500px;
    opacity: 1;
}

.sidebar-submenu a {
    padding-left: 50px !important;
    font-size: 0.9rem;
}

.sidebar-divider {
    height: 1px;
    margin: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s;
    width: calc(100% - 250px);
    min-height: 100vh;
}

/* Main content adjustment when sidebar is collapsed */
.main-content.expanded {
    margin-left: 60px;
    width: calc(100% - 60px);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Content padding/margins */
.main-content .card,
.main-content .admin-section,
.main-content .dashboard-card {
    margin-bottom: 1.5rem;
}

.main-content h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
        box-shadow: none;
    }
    
    .sidebar.active {
        margin-left: 0;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px;
    }
    
    .main-content.active {
        margin-left: 0;
        opacity: 0.8;
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    body.has-sidebar {
        position: relative;
        overflow-x: hidden;
    }
    
    /* Fix submenu display on mobile */
    .sidebar-submenu {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        margin: 5px 10px;
    }
    
    .sidebar-submenu a {
        padding-left: 40px !important;
        border-left: none !important;
    }
    
    /* Ensure collapsed sidebar features don't interfere on mobile */
    .sidebar.collapsed .sidebar-submenu {
        position: static;
        left: auto;
        top: auto;
        background-color: rgba(0, 0, 0, 0.2);
        min-width: auto;
        box-shadow: none;
        border-radius: 4px;
        margin: 5px 10px;
    }
}

.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: var(--primary-color);
    color: var(--accent-color);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    display: block; /* Always display the toggle button */
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background-color: #000;
    color: #fff;
}

/* Adjust toggle position when sidebar is collapsed */
.sidebar.collapsed ~ .sidebar-toggle {
    left: 70px;
}

/* Form styling */
.form-section-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-weight: 500;
}

.submit-btn {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-dark);
    padding: 10px 30px;
    font-size: 1.2rem;
}

.credit-site-matrix {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.credit-site-option {
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: all 0.2s;
}

.credit-site-option:hover {
    background-color: #e9ecef;
}

.credit-site-option.selected {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

/* Dashboard styling */
.dashboard-card {
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.dashboard-card h4 {
    color: var(--primary-color);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.stats-highlight {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.progress-container {
    margin: 10px 0;
}

.progress {
    height: 25px;
}

/* Action buttons uniform sizing */
.btn-action-uniform {
    min-width: 40px;
    min-height: 38px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    font-size: 14px;
    line-height: 1.2;
}

/* Submissions management action buttons */
.submissions-actions .btn {
    min-width: 40px;
    min-height: 38px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    font-size: 14px;
    line-height: 1.2;
}

/* Manager table action buttons */
.manager-actions .btn {
    min-width: 40px;
    min-height: 38px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    font-size: 14px;
    line-height: 1.2;
}

/* Calendar styling */
.calendar-day {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    border-radius: 4px;
    background-color: var(--bg-gray);
    font-weight: bold;
}

.calendar-day.has-data {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
}

/* Table styling */
.table-hover tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.1);
}

.status-badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 15px;
}

.status-pending {
    background-color: var(--warning-color);
    color: var(--text-dark);
}

.status-accepted {
    background-color: var(--success-color);
    color: var(--text-light);
}

.status-rejected {
    background-color: var(--danger-color);
    color: var(--text-light);
}

/* Admin panel styling */
.admin-section {
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.admin-section h2 {
    color: var(--primary-color);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

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

.btn-secondary {
    background-color: var(--bg-gray);
    border-color: #dee2e6;
    color: var(--text-dark);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--text-dark);
}

/* Card styling */
.card-header.bg-primary {
    background-color: var(--primary-color) !important;
}

.card {
    border-color: #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Sales Form Styling */
.sales-form .input-group-text {
    min-width: 120px;
    justify-content: center;
    padding: 0.25rem 0.5rem;
}

.sales-form .form-control {
    height: 32px;
    padding: 0.25rem 0.5rem;
}

.sales-form .form-select {
    height: 32px;
    padding: 0.25rem 0.5rem;
    min-width: 120px;
}

.credit-site-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.credit-site-row:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.credit-site-row.selected {
    background-color: rgba(13, 110, 253, 0.1);
}

.credit-site-row td {
    padding: 0.2rem;
}

/* Reduce table height for submit form */
.sales-form .table-sm td, 
.sales-form .table-sm th {
    padding: 0.2rem;
    vertical-align: middle;
}

/* Reduce form spacing */
.sales-form .row.g-2 {
    margin-bottom: 0.4rem !important;
}

.sales-form .mb-2 {
    margin-bottom: 0.4rem !important;
}

.sales-form .bg-info {
    background-color: #0dcaf0 !important;
}

.agent-info {
    padding: 8px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .credit-site-matrix {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-day {
        width: 25px;
        height: 25px;
        margin: 1px;
        font-size: 0.8rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .sales-form .input-group-text {
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .calendar-container {
        overflow-x: auto;
    }
    
    .sales-form .input-group-text {
        min-width: 80px;
        font-size: 0.8rem;
    }
}

