.toggle-sidebar {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 20px;
}

.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content>li .sidebar-link.active i{
        color: var(--theme-default);
}
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content>li.sidebar-list:hover>a i {
    color: var(--theme-default);
}

/* Fix: Theme overrides make .offcanvas position: unset and always visible.
   Restore proper Bootstrap behavior for our create-offcanvas only. */
#createOffcanvas {
    position: fixed !important; /* override theme */
    visibility: hidden;         /* hidden until shown */
    z-index: 1045;              /* above content */
    background: var(--bs-body-bg, #fff);
    transition: 0.3s ease-in-out;
}
#createOffcanvas.show { 
    visibility: visible; 
    transition: 0.3s ease-in-out;
}
.error{
    margin: 10px 0 ;
}
.alert-success{
    background: #43a53a;
}

.form-control.is-invalid, .was-validated .form-control:invalid {
    border-color: #dc3545 !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .logo-wrapper .sidebar-logo{
    max-height: 60px ;
    width: 100%;
}

.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .logo-wrapper{
    padding: 13px 35px;
}

/* Action Icon Buttons - Square with shadow style */
.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 0 !important;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-icon-btn:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #333;
    transform: translateY(-1px);
}

.action-icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.action-icon-btn i {
    font-size: 16px;
    line-height: 1;
}

.action-icon-btn.btn-outline-primary,
.action-icon-btn.btn-outline-secondary,
.action-icon-btn.btn-outline-info,
.action-icon-btn.btn-outline-warning,
.action-icon-btn.btn-outline-danger {
    background: #ffffff;
    border-color: #e0e0e0;
    color: #666;
}

.action-icon-btn.btn-outline-primary:hover,
.action-icon-btn.btn-outline-secondary:hover,
.action-icon-btn.btn-outline-info:hover,
.action-icon-btn.btn-outline-warning:hover,
.action-icon-btn.btn-outline-danger:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    color: #333;
}

.profile-info-field {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    color: #374151;
    font-size: 14px;
}

.form-label-detail {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.detail-field-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 50px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.detail-field-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.detail-value {
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.profile-card,
.details-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Filter Loader Styles */
.filter-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

.filter-loader-spinner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.filter-loader-spinner .spinner-border {
    border-width: 0.3em;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.filter-loading {
    position: relative;
    overflow: hidden;
}

/* ============================================
   Show Content Styles - Reusable Components
   ============================================ */

/* Header Icon Circle with Gradient */
.show-header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.show-header-icon i {
    font-size: 35px;
}

/* Show Header Title */
.show-header-title {
    color: #2c3e50;
    font-size: 22px;
}

/* Show Code Badge */
.show-code-badge {
    font-size: 13px;
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* Show Status Badge */
.show-status-badge {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
}

/* Detail Card */
.show-detail-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.show-detail-card .card-body {
    padding: 0.75rem;
}

/* Detail Card Header with Icon */
.show-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.show-detail-header i {
    font-size: 16px;
    margin-right: 0.5rem;
}

.show-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

/* Detail Card Value */
.show-detail-value {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.show-detail-value.mono {
    font-family: monospace;
}

/* Additional Information Section */
.show-additional-info {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.show-additional-info-title {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.show-additional-info-title i {
    margin-right: 0.5rem;
}

/* Info Item with Icon Circle */
.show-info-item {
    display: flex;
    align-items: flex-start;
}

.show-info-icon-circle {
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.show-info-icon-circle i {
    font-size: 14px;
}

/* Info Label */
.show-info-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Info Value */
.show-info-value {
    color: #2c3e50;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

/* ============================================
   Generic Show/Edit Page Styles - Reusable across all models
   ============================================ */

/* Card Styles */
.profile-card,
.details-card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
}

/* Icon Circle */
.icon-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icon-circle i {
    font-size: 50px;
}

/* Icon Circle Small */
.icon-circle-sm {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icon-circle-sm i {
    font-size: 2rem;
}

/* Name Title */
.name-title {
    color: #2c3e50;
    font-size: 24px;
}

/* Code Badge */
.code-badge {
    font-size: 14px;
    font-family: monospace;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

/* Username Badge (smaller than code badge) */
.username-badge {
    font-size: 12px;
    font-family: monospace;
}

/* Profile Photo with Border */
.profile-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.status-indicator.status-active {
    color: #10b981;
}

.status-indicator.status-inactive {
    color: #6b7280;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.status-active {
    background: #10b981;
}

.status-dot.status-inactive {
    background: #6b7280;
}

/* Divider */
.content-divider {
    margin: 24px 0;
    opacity: 0.1;
}

/* Icon Colors */
.icon-gray {
    color: #6b7280;
}

/* Buttons */
.btn-rounded {
    border-radius: 8px;
    padding: 10px;
    font-weight: 500;
}

.btn-rounded-lg {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
}

.btn-outline-secondary-custom {
    border-color: #e5e7eb;
    background: #fff;
}

/* Card Headers */
.card-header-relative {
    position: relative;
}

.card-header-title {
    color: #2c3e50;
    font-size: 20px;
}

/* Read Only Badge */
.read-only-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
}

/* Status Values */
.status-value-active {
    color: #10b981;
}

.status-value-inactive {
    color: #6b7280;
}

/* Avatar */
.avatar-circle {
    width: 60px;
    height: 60px;
}

.avatar-icon {
    font-size: 24px;
}

.avatar-img {
    object-fit: cover;
}

/* Image Styles */
.img-cover {
    object-fit: cover;
}

.img-cover-150 {
    height: 150px;
    object-fit: cover;
}

.img-cover-200 {
    height: 200px;
    object-fit: cover;
}

.video-max-height-200 {
    max-height: 200px;
}

.video-max-height-400 {
    max-height: 400px;
}

/* Photo Preview */
.photo-preview-container {
    display: none;
}

.photo-preview-container.show {
    display: block;
}

.photo-preview-img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.current-photo-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

/* Code Text (Monospace) */
.text-code {
    font-family: monospace;
}

/* Hidden State */
.hidden-display {
    display: none !important;
}

/* Table Styles */
.scrollable-table {
    max-height: 500px;
    overflow-y: auto;
}

.table-header-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Readonly Input */
.input-readonly {
    background-color: #f8f9fa;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder{
    color: #000 !important;
}
.select2-container .select2-selection--single {
    border-color: #efefef;
    border-radius: 0.25rem !important;
    height: 39px !important;
    padding: 4px 10px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow
 {
    top: 7px;
    right: 5px;
}

/* Remove gap between Select2 input and dropdown options */
.select2-container--open .select2-dropdown {
    margin-top: 0 !important;
}

.select2-container--open.select2-container--below .select2-dropdown {
    margin-top: 0 !important;
    border-top: none !important;
}

.select2-container--open.select2-container--below .select2-selection--single,
.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.select2-container + .invalid-feedback {
    display: block !important;
    margin-top: 0.25rem;
}

/* Style for invalid Select2 */
.select2-selection.is-invalid {
    border:1px solid #dc3545 !important;
}

.scope-bottom-wrapper .sidebar-left-icons .nav-item .nav-link .nav-rounded .product-icons i{
    font-size: 18px;
    margin: 0;
    padding: 0;
}

/* ============================================
   Order Receipt Styles - Responsive Div Boxes
   ============================================ */

/* Receipt Card */
.receipt-card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

/* Receipt Header Title */
.receipt-header-title {
    color: #2c3e50;
    font-size: 20px;
}

/* Receipt Items Container */
.receipt-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Receipt Item - Base Styles */
.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    gap: 16px;
}

/* Receipt Item - Background Variants */
.receipt-item-gray {
    background-color: #f8f9fa;
}

.receipt-item-danger {
    background-color: #fff5f5;
}

.receipt-item-warning {
    background-color: #fffbf0;
}

.receipt-item-success {
    background-color: #f0fdf4;
}

.receipt-item-highlight {
    background-color: #f0f9ff;
    border-left: 3px solid #3b82f6;
}

/* Receipt Item - Left Side */
.receipt-item-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Receipt Item - Right Side */
.receipt-item-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-align: right;
}

/* Receipt Item Label */
.receipt-item-label {
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    display: block;
}

/* Receipt Item Label Large (for Total) */
.receipt-item-label-large {
    font-weight: 700;
    font-size: 18px;
    color: #2c3e50;
    display: block;
}

/* Receipt Item Description */
.receipt-item-description {
    color: #6c757d;
    font-size: 13px;
    display: block;
}

/* Receipt Item Value */
.receipt-item-value {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
}

/* Receipt Item Value Large (for Total) */
.receipt-item-value-large {
    font-weight: 700;
    font-size: 18px;
}

/* Receipt Item Code (monospace for order numbers) */
.receipt-item-code {
    font-family: monospace;
    background-color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 15px;
}

/* Receipt Badge */
.receipt-badge {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

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

.receipt-badge-primary {
    background-color: #cfe2ff;
    color: #084298;
}

/* Receipt Badge Small */
.receipt-badge-small {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.receipt-badge-danger {
    background-color: #f8d7da;
    color: #842029;
}

.receipt-badge-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.receipt-badge-status {
    background-color: #e0e7ff;
    color: #3730a3;
    text-transform: capitalize;
}

/* Receipt Divider */
.receipt-divider {
    margin: 8px 0;
    border: 0;
    opacity: 1;
}

.receipt-divider-dashed {
    border-top: 1px dashed #dee2e6;
}

.receipt-divider-solid {
    margin: 16px 0;
    border-top: 2px solid #dee2e6;
}

/* Receipt Gift Alert */
.receipt-gift-alert {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .receipt-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .receipt-item-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .receipt-item-label,
    .receipt-item-label-large {
        font-size: 14px;
    }
    
    .receipt-item-value,
    .receipt-item-value-large {
        font-size: 15px;
    }
    
    .receipt-badge {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .receipt-header-title {
        font-size: 18px;
    }
    
    .receipt-items-container {
        gap: 10px;
    }
}

/* ============================================
   Activity Log Styles - Timeline View
   ============================================ */

/* Activity Log Card */
.activity-log-card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

/* Activity Log Header */
.activity-log-header-title {
    color: #2c3e50;
    font-size: 20px;
}

/* Activity Timeline Container */
.activity-timeline {
    position: relative;
    padding: 0;
}

/* Activity Item */
.activity-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.activity-item:last-child {
    margin-bottom: 0;
}

/* Activity Icon Wrapper */
.activity-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

/* Activity Icon */
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
    position: relative;
}

.activity-icon-created {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.activity-icon-updated {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.activity-icon-deleted {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Activity Line */
.activity-line {
    width: 2px;
    flex-grow: 1;
    background: linear-gradient(to bottom, #e5e7eb 0%, #f3f4f6 100%);
    margin-top: 8px;
}

/* Activity Content */
.activity-content {
    flex: 1;
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.activity-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

/* Activity Header */
.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 16px;
}

/* Activity Title */
.activity-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Activity Event Badge */
.activity-event-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-event-created {
    background-color: #d1fae5;
    color: #065f46;
}

.activity-event-updated {
    background-color: #dbeafe;
    color: #1e40af;
}

.activity-event-deleted {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Activity Description */
.activity-description {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Activity Meta */
.activity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.activity-time {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.activity-date {
    font-size: 11px;
    color: #9ca3af;
}

/* Activity Causer */
.activity-causer {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.activity-causer strong {
    color: #374151;
}

/* Activity Properties */
.activity-properties {
    margin-top: 12px;
}

/* Activity Toggle Button */
.activity-toggle-btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.activity-toggle-btn:hover {
    background-color: #f3f4f6;
}

/* Activity Changes Content */
.activity-changes-content,
.activity-created-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

/* Change Item */
.change-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 10px;
}

.change-item:last-child {
    margin-bottom: 0;
}

.change-field {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.change-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.change-old,
.change-new {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.change-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.5px;
}

.change-old .change-value {
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    word-break: break-word;
}

.change-new .change-value {
    background: #d1fae5;
    color: #065f46;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    word-break: break-word;
}

/* Created Item */
.created-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 4px;
    margin-bottom: 6px;
}

.created-item:last-child {
    margin-bottom: 0;
}

.created-key {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.created-value {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    word-break: break-word;
    text-align: right;
    max-width: 60%;
}

/* Activity Empty State */
.activity-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.activity-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-empty-icon i {
    font-size: 36px;
    color: #9ca3af;
}

.activity-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.activity-empty-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design for Activity Log */
@media (max-width: 768px) {
    .activity-item {
        gap: 12px;
    }

    .activity-header {
        flex-direction: column;
        gap: 8px;
    }

    .activity-meta {
        align-items: flex-start;
    }

    .change-values {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .activity-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .activity-content {
        padding: 12px 16px;
    }

    .created-item {
        flex-direction: column;
        gap: 4px;
    }

    .created-value {
        text-align: left;
        max-width: 100%;
    }
}

/* ============================================
   Status History Styles - Timeline View
   ============================================ */

/* Status History Card */
.status-history-card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

/* Status History Header */
.status-history-header-title {
    color: #2c3e50;
    font-size: 20px;
}

/* Status History Timeline Container */
.status-history-timeline {
    position: relative;
    padding: 0;
    margin-bottom: 30px;
}

/* Status History Item */
.status-history-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.status-history-item:last-child {
    margin-bottom: 0;
}

/* Status History Icon Wrapper */
.status-history-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

/* Status History Icon */
.status-history-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    z-index: 2;
    position: relative;
}

/* Status History Line */
.status-history-line {
    width: 3px;
    flex-grow: 1;
    background: linear-gradient(to bottom, #e9d5ff 0%, #f3e8ff 100%);
    margin-top: 8px;
}

/* Status History Content */
.status-history-content {
    flex: 1;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border-radius: 12px;
    padding: 20px 24px;
    border: 2px solid #e9d5ff;
    transition: all 0.3s ease;
}

.status-history-content:hover {
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.15);
    border-color: #d8b4fe;
    transform: translateY(-2px);
}

/* Status History Header */
.status-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

/* Status History Change */
.status-history-change {
    flex: 1;
}

.status-change-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-change-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-change-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Status Badge */
.status-badge {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    text-transform: capitalize;
}

.status-badge-old {
    background-color: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
}

.status-badge-new {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge-sub-old {
    background-color: #fef3c7;
    color: #92400e;
    text-decoration: line-through;
    font-size: 12px;
}

.status-badge-sub-new {
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 12px;
}

/* Status History Meta */
.status-history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.status-history-time {
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
}

.status-history-date {
    font-size: 11px;
    color: #9ca3af;
}

/* Status History User */
.status-history-user {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    display: inline-block;
}

.status-history-user strong {
    color: #374151;
}

/* Status History Note */
.status-history-note {
    margin-top: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
}

.status-history-note-label {
    font-size: 12px;
    font-weight: 700;
    color: #7c3aed;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-history-note-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* Status History Summary */
.status-history-summary {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px dashed #e9d5ff;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
    border-radius: 12px;
    border: 1px solid #e9d5ff;
    transition: all 0.3s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
    border-color: #d8b4fe;
    transform: translateY(-2px);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
}

/* Status History Empty State */
.status-history-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.status-history-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-history-empty-icon i {
    font-size: 36px;
    color: #9ca3af;
}

.status-history-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.status-history-empty-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design for Status History */
@media (max-width: 768px) {
    .status-history-item {
        gap: 12px;
    }

    .status-history-header {
        flex-direction: column;
        gap: 12px;
    }

    .status-history-meta {
        align-items: flex-start;
    }

    .status-history-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .status-history-content {
        padding: 16px 18px;
    }

    .status-change-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-card {
        padding: 16px;
    }

    .summary-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .summary-value {
        font-size: 16px;
    }
}

.dropdown .dropdown-toggle:after{
    display: none;
}
.dropdown .dropdown-toggle{
    width: auto ;
}
.product-page-main .nav.nav-tabs .nav-item .nav-link{
    padding: 10px;
    font-size: 16px;
}
.nav i{
    margin-right: 2px;
}
.dropdown-menu .dropdown-item{
    color: #000;
}

/* ============================================
   Create Order Modal - Modern Design Styles
   ============================================ */

/* Modal Content */
#createOrderModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

/* Modern Header with Gradient */
#createOrderModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: none;
}

#createOrderModal .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

#createOrderModal .btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#createOrderModal .btn-close-white:hover {
    opacity: 1;
}

/* Modal Body */
#createOrderModal .modal-body {
    background: #ffffff;
}

/* Merchant Selection */
#createOrderModal .merchant-select-wrapper {
    margin-bottom: 2rem;
}

#createOrderModal .merchant-select-wrapper .form-label {
    color: #1e293b;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

#createOrderModal .merchant-select-wrapper .form-select {
    border-radius: 10px;
    border: 2px solid #e0e7ff;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#createOrderModal .merchant-select-wrapper .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Divider with Text */
#createOrderModal .divider-with-text {
    position: relative;
}

#createOrderModal .divider-with-text hr {
    margin: 0;
}

#createOrderModal .divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 1rem;
}

/* Creation Type Cards */
.creation-type-card {
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.creation-type-card.manual-card {
    border: 2px solid #e0e7ff;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
}

.creation-type-card.import-card {
    border: 2px solid #d1fae5;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.creation-type-card .card-body {
    padding: 2rem 1.5rem;
}

/* Icon Circle */
.creation-type-card .icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s ease;
}

.creation-type-card.manual-card .icon-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.creation-type-card.import-card .icon-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.creation-type-card .icon-circle i {
    font-size: 2rem;
}

.creation-type-card .card-title {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.creation-type-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Button Styles */
.creation-type-card .btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.creation-type-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.creation-type-card .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.creation-type-card .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
}

.creation-type-card .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #0ea472 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.creation-type-card .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hover Effects */
.creation-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.creation-type-card.manual-card:hover {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%) !important;
}

.creation-type-card.import-card:hover {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%) !important;
}

.creation-type-card:hover .icon-circle {
    transform: scale(1.1) rotate(5deg);
}

/* Selected State */
.creation-type-card.manual-card.border-primary {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%) !important;
}

.creation-type-card.import-card.border-primary {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%) !important;
}

/* Badge Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.creation-type-card:hover .badge {
    animation: pulse 2s infinite;
}

/* Modal Footer */
#createOrderModal .modal-footer {
    border-radius: 0 0 15px 15px;
    padding: 1.5rem 2rem;
}

#createOrderModal .modal-footer .btn {
    border-radius: 10px;
}

/* Select2 Custom Styling */
#createOrderModal .select2-container--default .select2-selection--single {
    border-radius: 10px !important;
    border: 2px solid #e0e7ff !important;
    height: auto !important;
    padding: 0.5rem !important;
}

#createOrderModal .select2-container--default .select2-selection--single:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Alert Styling */
#createOrderModal .alert-warning {
    border-radius: 10px;
    border: 1px solid #fbbf24;
    background-color: #fef3c7;
    color: #92400e;
}

#createOrderModal .alert-warning i {
    color: #f59e0b;
}

/* Responsive Design */
@media (max-width: 768px) {
    #createOrderModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #createOrderModal .modal-header {
        padding: 1.5rem;
    }
    
    #createOrderModal .modal-body {
        padding: 1.5rem;
    }
    
    #createOrderModal .creation-type-card .icon-circle {
        width: 60px;
        height: 60px;
    }
    
    #createOrderModal .creation-type-card .icon-circle i {
        font-size: 1.5rem;
    }
    
    #createOrderModal .creation-type-card .card-title {
        font-size: 1.1rem;
    }
}

/* ============================================
   Order Create Page - Locked Merchant Styles
   ============================================ */

/* Locked Merchant Input */
.input-group .bg-light[readonly] {
    background-color: #f8f9fa !important;
    border-color: #e0e7ff;
    font-weight: 500;
    color: #1e293b;
}

.input-group-text.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
    font-weight: 600;
}

/* Product Search Alert */
.alert-info.py-2 {
    border-left: 4px solid #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
    border-color: #e0e7ff;
}

/* ============================================
   Order Create - Product & Customer Search Styles
   ============================================ */

/* Product Search Styles */
.product-search-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.product-search-item:hover {
    background-color: #f8f9fa !important;
}

.hover-bg-light:hover {
    background-color: #f8f9fa;
}

#product-search-results {
    max-height: 400px;
    overflow-y: auto;
}

/* Customer Search Styles */
.customer-search-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.customer-search-item:hover {
    background-color: #f8f9fa !important;
}

#customer-search-results {
    max-height: 300px;
    overflow-y: auto;
}

#selected-customer-display {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure validation messages are visible for Select2 */
.select2-container + .invalid-feedback {
    display: block !important;
    margin-top: 0.25rem;
}

/* Style for invalid Select2 */
.select2-selection.is-invalid {
    border-color: #dc3545 !important;
}

