/**
 * X-Cart Admin UI Kit - Combined Styles
 *
 * This file combines:
 * - xcart-layout.css - Layout structure (sidebar, topbar, content)
 * - xcart-styles.css - CSS variables and base styles
 * - acumatica-bootstrap.css - Extended component styles
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */

:root {
    /* Primary Colors - from Figma */
    --xcart-primary: #2274A6;
    --xcart-primary-hover: #1a5a80;

    /* Text Colors - from Figma */
    --xcart-text-primary: #333333;
    --xcart-text-secondary: #555555;
    --xcart-text-muted: #ABABAB;

    /* Background Colors */
    --xcart-bg-main: #f5f5f5;
    --xcart-bg-white: #ffffff;
    --xcart-bg-gray: #fafafa;
    --xcart-bg-filter: #f5f5f5;

    /* Border Colors - from Figma */
    --xcart-border: #ABABAB;
    --xcart-border-light: #E2E2E2;
    --xcart-border-lighter: #f0f0f0;

    /* Layout Colors - from Figma */
    --xcart-sidebar-bg: #333333;
    --xcart-topbar-bg: #333333;

    /* Status Colors */
    --xcart-success: #28a745;
    --xcart-success-bg: #d4edda;
    --xcart-success-border: #c3e6cb;
    --xcart-success-text: #155724;

    --xcart-warning: #ffc107;
    --xcart-warning-bg: #fff3cd;
    --xcart-warning-border: #ffeaa7;
    --xcart-warning-text: #856404;

    --xcart-danger: #e74c3c;
    --xcart-danger-bg: #f8d7da;
    --xcart-danger-border: #f5c6cb;
    --xcart-danger-text: #721c24;

    --xcart-info: #17a2b8;
    --xcart-info-bg: #d1ecf1;
    --xcart-info-border: #bee5eb;
    --xcart-info-text: #0c5460;

    /* Layout Dimensions */
    --xcart-sidebar-width: 70px;
    --xcart-topbar-height: 40px;
    --xcart-content-padding: 30px 40px;
}

/* ==========================================
   RESET & BASE
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--xcart-text-primary);
    background: var(--xcart-bg-main);
    overflow-x: hidden;
}

a {
    color: var(--xcart-primary);
    text-decoration: none;
}

a:hover {
    color: var(--xcart-primary-hover);
    text-decoration: underline;
}

/* ==========================================
   LAYOUT: SIDEBAR
   ========================================== */

.xcart-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--xcart-sidebar-width);
    height: 100vh;
    background: var(--xcart-sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.xcart-sidebar-logo {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 10px;
    cursor: pointer;
}

.xcart-sidebar-logo img {
    max-width: 100%;
    max-height: 100%;
}

.xcart-sidebar-menu {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.xcart-sidebar-item {
    width: 70px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ABABAB;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    text-decoration: none;
}

.xcart-sidebar-item:hover,
.xcart-sidebar-item.active {
    background: rgba(52, 152, 219, 0.1);
    color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-sidebar-item i {
    font-size: 20px;
}

/* ==========================================
   LAYOUT: TOP BAR
   ========================================== */

.xcart-topbar {
    position: fixed;
    left: var(--xcart-sidebar-width);
    top: 0;
    right: 0;
    height: var(--xcart-topbar-height);
    background: var(--xcart-topbar-bg);
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: white;
}

.xcart-topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.xcart-topbar-hamburger {
    font-size: 18px;
    cursor: pointer;
    color: #ecf0f1;
}

.xcart-topbar-storefront {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.xcart-topbar-storefront:hover {
    color: white;
    text-decoration: none;
}

.xcart-topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.xcart-topbar-search {
    position: relative;
    width: 400px;
}

.xcart-topbar-search input {
    width: 100%;
    height: 28px;
    background: rgba(221, 241, 255, 0.05);
    border: none;
    border-radius: 4px;
    padding: 0 35px 0 35px;
    color: white;
    font-size: 13px;
}

.xcart-topbar-search input::placeholder {
    color: #ABABAB;
}

.xcart-topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ABABAB;
    font-size: 14px;
}

.xcart-topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.xcart-topbar-icon {
    color: #ecf0f1;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

.xcart-topbar-icon:hover {
    color: white;
}

.xcart-topbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--xcart-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================
   LAYOUT: MAIN CONTENT
   ========================================== */

.xcart-main {
    margin-left: var(--xcart-sidebar-width);
    margin-top: var(--xcart-topbar-height);
    min-height: calc(100vh - var(--xcart-topbar-height));
    background: var(--xcart-bg-main);
}

.xcart-container {
    padding: var(--xcart-content-padding);
    max-width: 1600px;
}

/* ==========================================
   PAGE HEADER
   ========================================== */

.xcart-page-header {
    margin-bottom: 20px;
}

.xcart-page-title {
    font-size: 28px;
    font-weight: 400;
    color: #333333;
    margin-bottom: 0;
}

/* ==========================================
   TABS
   ========================================== */

.xcart-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--xcart-border-light);
    margin-bottom: 25px;
}

.xcart-tab {
    padding: 12px 20px;
    color: var(--xcart-text-muted);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}

.xcart-tab:hover {
    color: #333333;
    text-decoration: none;
}

.xcart-tab.active {
    color: #333333;
    font-weight: 600;
    border-bottom-color: var(--xcart-primary);
}

/* ==========================================
   BUTTONS - X-Cart Design System (from Figma)
   ========================================== */

.xcart-btn {
    padding: 5px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    line-height: 30px;
    height: 40px;
    white-space: nowrap;
}

.xcart-btn:hover {
    text-decoration: none;
}

.xcart-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 116, 166, 0.2);
}

.xcart-btn:disabled,
.xcart-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary Button - Blue solid */
.xcart-btn-primary {
    background: var(--xcart-primary);
    color: white;
    border-color: var(--xcart-primary);
}

.xcart-btn-primary:hover {
    background: var(--xcart-primary-hover);
    border-color: var(--xcart-primary-hover);
    color: white;
}

.xcart-btn-primary:active {
    background: #165070;
    border-color: #165070;
}

/* Secondary Button - White with border, inverts on hover (from Figma) */
.xcart-btn-secondary,
.xcart-btn-outline {
    background: white;
    color: var(--xcart-primary);
    border-color: var(--xcart-border);
}

.xcart-btn-secondary:hover,
.xcart-btn-outline:hover {
    background: var(--xcart-primary);
    border-color: var(--xcart-primary);
    color: white;
}

.xcart-btn-secondary:active,
.xcart-btn-outline:active {
    background: var(--xcart-primary-hover);
    border-color: var(--xcart-primary-hover);
}

/* Link Button - Text only */
.xcart-btn-link {
    background: transparent;
    color: var(--xcart-primary);
    border: none;
    padding: 4px 8px;
    height: auto;
}

.xcart-btn-link:hover {
    color: var(--xcart-primary-hover);
    text-decoration: underline;
}

/* Status Buttons */
.xcart-btn-success {
    background: var(--xcart-success);
    color: white;
    border-color: var(--xcart-success);
}

.xcart-btn-success:hover {
    background: #1e8449;
    border-color: #1e8449;
}

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

.xcart-btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Button Sizes (from Figma) */
.xcart-btn-sm {
    padding: 4px 10px;
    font-size: 14px;
    height: 32px;
    line-height: 24px;
}

.xcart-btn-lg {
    padding: 8px 24px;
    font-size: 16px;
    height: 48px;
    line-height: 32px;
}

/* Disclosure Button - with dropdown caret (from Figma) */
.xcart-btn-disclosure {
    padding-right: 12px;
}

.xcart-btn-disclosure::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
}

/* Icon-only Button (from Figma) */
.xcart-btn-icon {
    width: 40px;
    padding: 0;
    justify-content: center;
}

.xcart-btn-icon.xcart-btn-sm {
    width: 32px;
    height: 32px;
}

.xcart-btn-icon.xcart-btn-lg {
    width: 48px;
    height: 48px;
}

.xcart-btn-icon i {
    margin: 0;
}

/* Loading State (from Figma) */
.xcart-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.xcart-btn-loading::after {
    content: '•••';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    letter-spacing: 2px;
    animation: loading-dots 1.4s infinite;
}

.xcart-btn-secondary.xcart-btn-loading::after,
.xcart-btn-outline.xcart-btn-loading::after {
    color: var(--xcart-primary);
}

@keyframes loading-dots {
    0%, 20% { opacity: 0.3; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0.3; }
}

/* ==========================================
   FORM CONTROLS - X-Cart Design System (from Figma)
   ========================================== */

/* Base Input Styles */
.xcart-input,
.xcart-select {
    height: 40px;
    padding: 5px 10px;
    border: 1px solid var(--xcart-border);
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    line-height: 30px;
    background: white;
    color: var(--xcart-text-primary);
    transition: all 0.2s ease;
}

.xcart-input::placeholder {
    color: var(--xcart-text-muted);
}

/* Focus/Typing State (from Figma) */
.xcart-input:focus,
.xcart-select:focus {
    outline: none;
    border-color: var(--xcart-primary);
    box-shadow: 0 0 10px rgba(34, 116, 166, 0.5);
}

/* Filled State */
.xcart-input:not(:placeholder-shown),
.xcart-select:valid {
    border-color: var(--xcart-border);
}

/* Error State (from Figma) */
.xcart-input-error,
.xcart-input.error,
.xcart-select-error,
.xcart-select.error {
    border-color: #BB1F34;
    box-shadow: 0 0 10px rgba(187, 31, 52, 0.5);
}

.xcart-input-error:focus,
.xcart-input.error:focus,
.xcart-select-error:focus,
.xcart-select.error:focus {
    border-color: #BB1F34;
    box-shadow: 0 0 10px rgba(187, 31, 52, 0.5);
}

/* Success State */
.xcart-input-success,
.xcart-input.success,
.xcart-select-success,
.xcart-select.success {
    border-color: var(--xcart-success);
}

/* Disabled State (from Figma) */
.xcart-input:disabled,
.xcart-input.disabled,
.xcart-select:disabled,
.xcart-select.disabled {
    background: #f5f5f5;
    border-color: var(--xcart-border-light);
    color: var(--xcart-text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Select Dropdown Styles */
.xcart-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23333333' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Input Sizes */
.xcart-input-sm,
.xcart-select-sm {
    height: 32px;
    font-size: 14px;
    padding: 4px 10px;
    line-height: 24px;
}

.xcart-input-lg,
.xcart-select-lg {
    height: 48px;
    font-size: 16px;
    padding: 8px 12px;
    line-height: 32px;
}

/* Textarea */
.xcart-textarea {
    padding: 10px;
    border: 1px solid var(--xcart-border);
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    line-height: 24px;
    background: white;
    color: var(--xcart-text-primary);
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
}

.xcart-textarea::placeholder {
    color: var(--xcart-text-muted);
}

.xcart-textarea:focus {
    outline: none;
    border-color: var(--xcart-primary);
    box-shadow: 0 0 10px rgba(34, 116, 166, 0.5);
}

.xcart-textarea.error {
    border-color: #BB1F34;
    box-shadow: 0 0 10px rgba(187, 31, 52, 0.5);
}

.xcart-textarea:disabled {
    background: #f5f5f5;
    border-color: var(--xcart-border-light);
    color: var(--xcart-text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ==========================================
   FORM GROUPS & LAYOUTS
   ========================================== */

/* Vertical Form Group (default) */
.xcart-form-group {
    margin-bottom: 20px;
}

.xcart-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    color: var(--xcart-text-primary);
    font-size: 16px;
    line-height: 30px;
}

/* Horizontal Form Layout (from Figma) */
.xcart-form-horizontal .xcart-form-group {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.xcart-form-horizontal .xcart-form-label {
    width: 250px;
    min-width: 250px;
    text-align: right;
    margin-bottom: 0;
    padding-top: 5px;
}

.xcart-form-horizontal .xcart-form-field {
    flex: 1;
}

/* Required Field Indicator */
.xcart-form-label .xcart-required {
    color: #BB1F34;
    margin-left: 2px;
}

/* Helper Text (from Figma) */
.xcart-form-helper {
    font-size: 12px;
    line-height: 20px;
    color: var(--xcart-text-muted);
    margin-top: 4px;
}

/* Error Message */
.xcart-form-error {
    font-size: 12px;
    line-height: 20px;
    color: #BB1F34;
    margin-top: 4px;
}

/* Success Message */
.xcart-form-success {
    font-size: 12px;
    line-height: 20px;
    color: var(--xcart-success);
    margin-top: 4px;
}

/* Legacy aliases */
.xcart-form-hint {
    font-size: 12px;
    color: var(--xcart-text-muted);
    margin-top: 4px;
}

/* ==========================================
   CHECKBOX & RADIO (from Figma Design System)
   ========================================== */

/* Custom Checkbox - Figma exact styles */
.xcart-checkbox-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
    user-select: none;
}

.xcart-checkbox-custom input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.xcart-checkbox-custom .xcart-checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #ABABAB;
    border-radius: 4px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

/* Checkmark icon */
.xcart-checkbox-custom .xcart-checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Hover state */
.xcart-checkbox-custom:hover input:not(:disabled) ~ .xcart-checkmark {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
}

/* Focus state */
.xcart-checkbox-custom input:focus ~ .xcart-checkmark {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
    outline: none;
}

/* Checked state */
.xcart-checkbox-custom input:checked ~ .xcart-checkmark {
    background: #2274A6;
    border-color: #2274A6;
}

.xcart-checkbox-custom input:checked ~ .xcart-checkmark::after {
    display: block;
}

/* Checked + Hover/Focus */
.xcart-checkbox-custom:hover input:checked:not(:disabled) ~ .xcart-checkmark,
.xcart-checkbox-custom input:checked:focus ~ .xcart-checkmark {
    box-shadow: 0 0 5px #2274A6;
}

/* Indeterminate state (not-all-child) */
.xcart-checkbox-custom input:indeterminate ~ .xcart-checkmark {
    background: #2274A6;
    border-color: #2274A6;
}

.xcart-checkbox-custom input:indeterminate ~ .xcart-checkmark::after {
    display: block;
    left: 4px;
    top: 8px;
    width: 10px;
    height: 0;
    border: none;
    border-top: 2px solid white;
    transform: none;
}

/* Disabled state - 20% opacity per Figma */
.xcart-checkbox-custom input:disabled ~ .xcart-checkmark {
    opacity: 0.2;
    cursor: not-allowed;
}

.xcart-checkbox-custom input:disabled ~ * {
    cursor: not-allowed;
}

/* Standalone checkbox (no label) */
.xcart-checkmark-only {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.xcart-checkmark-only input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}

.xcart-checkmark-only .xcart-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #ABABAB;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.xcart-checkmark-only .xcart-checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.xcart-checkmark-only:hover input:not(:disabled) ~ .xcart-checkmark {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
}

.xcart-checkmark-only input:checked ~ .xcart-checkmark {
    background: #2274A6;
    border-color: #2274A6;
}

.xcart-checkmark-only input:checked ~ .xcart-checkmark::after {
    display: block;
}

.xcart-checkmark-only input:disabled ~ .xcart-checkmark {
    opacity: 0.2;
    cursor: not-allowed;
}

/* ==========================================
   RADIO BUTTON (from Figma Design System)
   ========================================== */

/* Custom Radio Button - Figma exact styles */
.xcart-radio-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
    user-select: none;
}

.xcart-radio-custom input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.xcart-radio-custom .xcart-radiomark {
    position: relative;
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #ABABAB;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

/* Inner dot for selected state */
.xcart-radio-custom .xcart-radiomark::after {
    content: '';
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Hover state */
.xcart-radio-custom:hover input:not(:disabled) ~ .xcart-radiomark {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
}

/* Focus state */
.xcart-radio-custom input:focus ~ .xcart-radiomark {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
    outline: none;
}

/* Selected state */
.xcart-radio-custom input:checked ~ .xcart-radiomark {
    background: #2274A6;
    border-color: #2274A6;
}

.xcart-radio-custom input:checked ~ .xcart-radiomark::after {
    display: block;
}

/* Selected + Hover/Focus */
.xcart-radio-custom:hover input:checked:not(:disabled) ~ .xcart-radiomark,
.xcart-radio-custom input:checked:focus ~ .xcart-radiomark {
    box-shadow: 0 0 5px #2274A6;
}

/* Disabled state - 20% opacity per Figma */
.xcart-radio-custom input:disabled ~ .xcart-radiomark {
    opacity: 0.2;
    cursor: not-allowed;
}

.xcart-radio-custom input:disabled ~ * {
    cursor: not-allowed;
}

/* Standalone radio (no label) */
.xcart-radiomark-only {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.xcart-radiomark-only input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}

.xcart-radiomark-only .xcart-radiomark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #ABABAB;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.xcart-radiomark-only .xcart-radiomark::after {
    content: '';
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.xcart-radiomark-only:hover input:not(:disabled) ~ .xcart-radiomark {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
}

.xcart-radiomark-only input:checked ~ .xcart-radiomark {
    background: #2274A6;
    border-color: #2274A6;
}

.xcart-radiomark-only input:checked ~ .xcart-radiomark::after {
    display: block;
}

.xcart-radiomark-only input:disabled ~ .xcart-radiomark {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Legacy checkbox styles (fallback) */
.xcart-checkbox,
.xcart-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
}

.xcart-checkbox input,
.xcart-radio input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--xcart-primary);
    margin: 0;
}

.xcart-checkbox.disabled,
.xcart-radio.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.xcart-checkbox.disabled input,
.xcart-radio.disabled input {
    cursor: not-allowed;
}

/* ==========================================
   SPECIAL INPUTS (from Figma)
   ========================================== */

/* Date Picker */
.xcart-datepicker {
    position: relative;
    display: inline-block;
}

.xcart-datepicker .xcart-input {
    padding-left: 38px;
}

.xcart-datepicker i,
.xcart-datepicker .xcart-datepicker-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--xcart-primary);
    pointer-events: none;
    font-size: 16px;
}

/* Input with Icon (left) */
.xcart-input-icon-left {
    position: relative;
}

.xcart-input-icon-left .xcart-input {
    padding-left: 38px;
}

.xcart-input-icon-left i,
.xcart-input-icon-left .xcart-input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--xcart-text-muted);
    pointer-events: none;
}

/* Input with Icon (right) */
.xcart-input-icon-right {
    position: relative;
}

.xcart-input-icon-right .xcart-input {
    padding-right: 38px;
}

.xcart-input-icon-right i,
.xcart-input-icon-right .xcart-input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--xcart-text-muted);
    pointer-events: none;
}

/* Input with Info Icon (from Figma) */
.xcart-input-with-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xcart-input-info-icon {
    color: var(--xcart-primary);
    cursor: help;
    font-size: 20px;
}

/* Password Toggle */
.xcart-input-password {
    position: relative;
}

.xcart-input-password .xcart-input {
    padding-right: 42px;
}

.xcart-input-password .xcart-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--xcart-text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.xcart-input-password .xcart-password-toggle:hover {
    color: var(--xcart-primary);
}

/* ==========================================
   FIGMA SETTINGS FORM LAYOUT
   Based on SEMA Data Settings Page
   ========================================== */

/* Settings Page Container (no cards, flat layout) */
.xcart-settings-page {
    max-width: 800px;
}

.xcart-settings-page-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--xcart-text-primary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.xcart-settings-page-section {
    margin-bottom: 40px;
}

.xcart-settings-page-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--xcart-text-primary);
    line-height: 40px;
    margin-bottom: 10px;
}

.xcart-settings-page-section-desc {
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
    margin-bottom: 20px;
}

.xcart-settings-page-section-desc a {
    color: var(--xcart-primary);
}

/* Horizontal Form Row (Figma: 250px label + 420px input + 20px gap) */
.xcart-hform-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.xcart-hform-row:last-child {
    margin-bottom: 0;
}

.xcart-hform-label {
    width: 250px;
    min-width: 250px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
    text-align: right;
}

.xcart-hform-label .xcart-info-icon {
    color: var(--xcart-primary);
    cursor: help;
    font-size: 16px;
}

.xcart-hform-field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.xcart-hform-field .xcart-input,
.xcart-hform-field .xcart-select {
    width: 420px;
}

.xcart-hform-field .xcart-input-password {
    width: 420px;
}

.xcart-hform-field .xcart-input-password .xcart-input {
    width: 100%;
}

/* Input with Info Icon inline */
.xcart-hform-input-with-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xcart-hform-input-with-info .xcart-info-icon {
    color: var(--xcart-primary);
    cursor: help;
    font-size: 20px;
    flex-shrink: 0;
}

/* Helper text under input */
.xcart-hform-helper {
    font-size: 12px;
    line-height: 20px;
    color: var(--xcart-text-primary);
    margin-top: 0;
}

/* Static value (read-only) */
.xcart-hform-static {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 40px;
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
}

.xcart-hform-static a {
    color: var(--xcart-primary);
}

/* Checkbox Group (multi-column) */
.xcart-checkbox-group {
    display: flex;
    gap: 20px;
}

.xcart-checkbox-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Checkbox Item - Custom styled (Figma) */
.xcart-checkbox-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 30px;
    font-size: 16px;
    line-height: 30px;
    color: var(--xcart-text-primary);
    cursor: pointer;
    user-select: none;
}

.xcart-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.xcart-checkbox-item span {
    position: relative;
    padding-left: 30px;
}

.xcart-checkbox-item span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #ABABAB;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.xcart-checkbox-item span::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) translateY(-2px) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.xcart-checkbox-item:hover input:not(:disabled) ~ span::before {
    border-color: #2274A6;
    box-shadow: 0 0 5px #2274A6;
}

.xcart-checkbox-item input:checked ~ span::before {
    background: #2274A6;
    border-color: #2274A6;
}

.xcart-checkbox-item input:checked ~ span::after {
    display: block;
}

.xcart-checkbox-item input:disabled ~ span {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Sticky Footer (Figma: shadow 0px -5px 10px rgba(51,51,51,0.1)) */
.xcart-sticky-save {
    position: fixed;
    bottom: 0;
    left: var(--xcart-sidebar-width);
    right: 0;
    background: white;
    box-shadow: 0px -5px 10px rgba(51, 51, 51, 0.1);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 998;
}

.xcart-sticky-save .xcart-btn {
    min-width: auto;
}

/* Disabled state at 20% opacity (per Figma) */
.xcart-sticky-save .xcart-btn.disabled,
.xcart-sticky-save .xcart-btn:disabled,
.xcart-btn.xcart-btn-disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================
   FILTERS SECTION
   ========================================== */

.xcart-filters-section {
    background: var(--xcart-bg-filter);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.xcart-filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.xcart-filters-advanced-toggle {
    color: var(--xcart-primary);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.xcart-filters-advanced-toggle:hover {
    color: var(--xcart-primary-hover);
}

.xcart-filters-advanced {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(52, 152, 219, 0.2);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.xcart-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xcart-filter-label {
    font-size: 13px;
    color: var(--xcart-text-secondary);
    min-width: 100px;
    text-align: right;
}

/* ==========================================
   TABLE
   Based on Figma Design System
   - Row padding: 10px horizontal, 15px vertical
   - Border: 1px solid #E2E2E2
   - Text: Open Sans Regular 14px
   - Title: SemiBold 14px
   - Links: #2274A6
   ========================================== */

.xcart-table-wrapper {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.xcart-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Open Sans', sans-serif;
}

.xcart-table thead {
    background: var(--xcart-bg-gray);
}

.xcart-table th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--xcart-text-primary);
    border-bottom: 1px solid #E2E2E2;
}

.xcart-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.xcart-table th.sortable:hover {
    background: #f0f0f0;
}

.xcart-table th.sortable i {
    margin-left: 5px;
    color: #999;
}

.xcart-table th.sorted-asc i,
.xcart-table th.sorted-desc i {
    color: var(--xcart-primary);
}

.xcart-table td {
    padding: 15px 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--xcart-text-primary);
    border-bottom: 1px solid #E2E2E2;
    vertical-align: middle;
}

.xcart-table tbody tr:hover {
    background: var(--xcart-bg-gray);
}

.xcart-table tbody tr:last-child td {
    border-bottom: none;
}

/* Checkbox column */
.xcart-table-checkbox {
    width: 40px;
    text-align: center;
    padding-left: 15px !important;
    padding-right: 5px !important;
}

/* Drag handle column */
.xcart-table-drag {
    width: 30px;
    text-align: center;
    padding: 15px 5px !important;
    cursor: grab;
    color: #999;
}

.xcart-table-drag:hover {
    color: #666;
}

.xcart-table-drag:active {
    cursor: grabbing;
}

/* Enable/disable toggle column */
.xcart-table-enable {
    width: 50px;
    text-align: center;
    padding: 15px 5px !important;
}

/* Image column - 60x60px */
.xcart-table-image {
    width: 80px;
    padding: 10px !important;
}

.xcart-table-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #E2E2E2;
}

/* Amount column */
.xcart-table-amount {
    text-align: right;
    font-weight: 600;
}

/* Link styling in table */
.xcart-table a {
    color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-table a:hover {
    text-decoration: underline;
}

/* Table select dropdown */
.xcart-table-select {
    min-width: 140px;
    height: 32px;
    font-size: 13px;
}

/* Table Footer */
.xcart-table-footer {
    padding: 15px 20px;
    background: var(--xcart-bg-gray);
    border-top: 1px solid #E2E2E2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xcart-selected-count {
    font-size: 13px;
    color: #666;
}

/* ==========================================
   TABLE ROW ACTIONS
   Icons with vertical dividers (20px height)
   ========================================== */

.xcart-table-actions {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

.xcart-table-actions .xcart-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.xcart-table-actions .xcart-btn-icon:hover {
    color: var(--xcart-primary);
}

.xcart-table-actions .xcart-btn-icon.danger:hover {
    color: var(--xcart-danger);
}

/* Vertical divider between actions */
.xcart-table-actions-divider {
    width: 1px;
    height: 20px;
    background: #E2E2E2;
    margin: 0 4px;
}

/* ==========================================
   INLINE SELECT WITH STATUS COLORS
   Based on Figma Orders List
   - Status-colored left border (3px)
   - Green: Paid, Delivered
   - Orange: Awaiting payment
   - Red: Declined, Will not deliver
   ========================================== */

.xcart-inline-select {
    height: 30px;
    padding: 0 24px 0 8px;
    font-size: 12px;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    background-color: white;
    min-width: 130px;
    font-family: 'Open Sans', sans-serif;
}

.xcart-inline-select.disabled,
.xcart-inline-select:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #e2e2e2;
}

/* Status-colored borders */
.xcart-inline-select.status-awaiting {
    border-left: 3px solid #F5A623;
}

.xcart-inline-select.status-declined,
.xcart-inline-select.status-will-not-deliver {
    border-left: 3px solid var(--xcart-danger, #BB1F34);
}

.xcart-inline-select.status-paid,
.xcart-inline-select.status-delivered {
    border-left: 3px solid var(--xcart-success, #27AE60);
}

/* ==========================================
   SALES CHANNEL BADGES
   Based on Figma Orders List
   ========================================== */

.xcart-channel-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.xcart-channel-online {
    background: #dfe9f3;
    color: #2c5282;
}

.xcart-channel-manual {
    background: #4A4A4A;
    color: #FFFFFF;
}

.xcart-channel-ebay {
    background: #C8E6C9;
    color: #2E7D32;
}

.xcart-channel-amazon {
    background: #FFE0B2;
    color: #E65100;
}

/* ==========================================
   FULFILLED BY BADGES
   Based on Figma Orders List
   ========================================== */

.xcart-shipped-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.xcart-shipped-multi {
    background: #ffe8d9;
    color: #c05621;
}

.xcart-shipped-keystone {
    background: #ffe4e6;
    color: #c53030;
}

.xcart-shipped-atd {
    background: #e6f2ff;
    color: #0066cc;
}

.xcart-shipped-mystore {
    background: #e0e7ff;
    color: #5850ec;
}

/* ==========================================
   PRODUCT ROW LAYOUT
   Drag | Checkbox | Enable | Image | SKU | Name | Category | Brand | Price | Cost | Stock | Actions
   ========================================== */

.xcart-table-product .xcart-table-sku {
    width: 100px;
    font-family: monospace;
    font-size: 13px;
    color: #666;
}

.xcart-table-product .xcart-table-name {
    min-width: 200px;
}

.xcart-table-product .xcart-table-name a {
    font-weight: 600;
    color: var(--xcart-primary);
}

.xcart-table-product .xcart-table-category,
.xcart-table-product .xcart-table-brand {
    color: #666;
    font-size: 13px;
}

.xcart-table-product .xcart-table-price,
.xcart-table-product .xcart-table-cost {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.xcart-table-product .xcart-table-stock {
    text-align: center;
    min-width: 60px;
}

.xcart-table-product .xcart-table-stock.in-stock {
    color: var(--xcart-success);
}

.xcart-table-product .xcart-table-stock.low-stock {
    color: var(--xcart-warning);
}

.xcart-table-product .xcart-table-stock.out-of-stock {
    color: var(--xcart-danger);
}

/* Compact table variant */
.xcart-table-compact th,
.xcart-table-compact td {
    padding: 8px 10px;
    font-size: 13px;
}

/* ==========================================
   PAGINATION
   ========================================== */

.xcart-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.xcart-pagination-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--xcart-border);
    border-radius: 4px;
    background: white;
    color: var(--xcart-text-secondary);
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.xcart-pagination-item:hover {
    background: #f5f5f5;
    border-color: var(--xcart-primary);
    color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-pagination-item.active {
    background: var(--xcart-primary);
    border-color: var(--xcart-primary);
    color: white;
}

.xcart-pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   BADGES / TAGS
   Based on Figma Design System
   - Font: Open Sans Regular 12px
   - Padding: 4px 10px
   - Border-radius: 3px
   ========================================== */

.xcart-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    white-space: nowrap;
}

/* ---- Status Badges ---- */
.xcart-badge-success,
.xcart-badge-synced {
    background: #CEEBC5;
    color: #2B7616;
}

.xcart-badge-warning,
.xcart-badge-pending {
    background: #F7E9C6;
    color: #8B6914;
}

.xcart-badge-danger,
.xcart-badge-failed {
    background: #F6E4E6;
    color: #BB1F34;
}

.xcart-badge-info {
    background: #DDF1FF;
    color: #2274A6;
}

.xcart-badge-not-synced {
    background: #F5F5F5;
    color: #666666;
}

/* ---- Sales Channel Badges ---- */
.xcart-badge-ebay {
    background: #D6ECD7;
    color: #2B7616;
}

.xcart-badge-amazon {
    background: #FFEBCC;
    color: #8B5A00;
}

.xcart-badge-walmart {
    background: #FFF7B6;
    color: #8B6914;
}

.xcart-badge-online-store {
    background: #F5F5F5;
    color: #333333;
}

.xcart-badge-manual-order {
    background: #F5F5F5;
    color: #666666;
}

.xcart-badge-quote {
    background: #FFF7B6;
    color: #8B6914;
}

/* ---- Supplier Badges ---- */
.xcart-badge-atd {
    background: #DDDAFF;
    color: #5850EC;
}

.xcart-badge-keystone {
    background: #FFCACA;
    color: #BB1F34;
}

.xcart-badge-torqued {
    background: #FEE0FD;
    color: #9C27B0;
}

.xcart-badge-my-store {
    background: #F5F5F5;
    color: #333333;
}

.xcart-badge-turn14 {
    background: #CCECF8;
    color: #0277BD;
}

.xcart-badge-multi {
    background: #FFDBC5;
    color: #C05621;
}

.xcart-badge-meyer {
    background: #FFDC99;
    color: #8B5A00;
}

.xcart-badge-wheel-pros {
    background: #FFC9DD;
    color: #C2185B;
}

.xcart-badge-premier {
    background: #D6ECD7;
    color: #2B7616;
}

.xcart-badge-dix-performance {
    background: #D6ECD7;
    color: #2B7616;
}

/* ---- Provider Badges ---- */
.xcart-badge-sema {
    background: #FFE4E4;
    color: #BB1F34;
}

.xcart-badge-autosync {
    background: #EAEAEA;
    color: #666666;
}

.xcart-badge-asap {
    background: #C4E0FA;
    color: #1565C0;
}

.xcart-badge-catalograck {
    background: #D6ECD7;
    color: #2B7616;
}

/* ---- Type Badges ---- */
.xcart-badge-type {
    background: #F5F5F5;
    color: #666666;
}

.xcart-badge-catalog-provider {
    background: #F5F5F5;
    color: #666666;
}

.xcart-badge-supplier {
    background: #F5F5F5;
    color: #666666;
}

/* ---- Draft badge ---- */
.xcart-badge-draft {
    background: #F5F5F5;
    color: #ABABAB;
}

/* ---- Disabled state ---- */
.xcart-badge-disabled,
.xcart-badge[disabled] {
    background: #F5F5F5;
    color: #ABABAB;
    opacity: 0.6;
}

/* ---- Clickable badges ---- */
.xcart-badge-clickable {
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.xcart-badge-clickable:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ---- Badge with icon ---- */
.xcart-badge i {
    font-size: 10px;
}

/* ==========================================
   ALERTS / INFO BARS
   Based on Figma Design System
   - Font: Open Sans Regular 14px
   - Padding: 14px 16px
   - Border-radius: 4px
   ========================================== */

.xcart-alert {
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.xcart-alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.xcart-alert i {
    flex-shrink: 0;
}

/* Info bar (default) */
.xcart-alert-info {
    background: #DDF1FF;
    color: #333333;
}

/* Success bar */
.xcart-alert-success {
    background: #CEEBC5;
    color: #2B7616;
}

/* Error bar */
.xcart-alert-danger,
.xcart-alert-error {
    background: #F6E4E6;
    color: #BB1F34;
}

/* Warning bar */
.xcart-alert-warning {
    background: #F7E9C6;
    color: #8B6914;
}

/* Alert with toggle */
.xcart-alert-toggle {
    flex-shrink: 0;
    margin-left: auto;
}

/* Dismissible alert */
.xcart-alert-dismissible {
    padding-right: 40px;
    position: relative;
}

.xcart-alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.7;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    padding: 4px;
}

.xcart-alert-close:hover {
    opacity: 1;
}

/* ==========================================
   SNACK BAR / TOAST NOTIFICATIONS
   Based on Figma Design System
   - Width: auto (min 300px)
   - Border-radius: 4px
   - Close button on right
   ========================================== */

.xcart-snack {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 500px;
    padding: 12px 16px;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.xcart-snack-content {
    flex: 1;
}

.xcart-snack-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
    font-size: 16px;
    padding: 0;
    transition: opacity 0.15s;
}

.xcart-snack-close:hover {
    opacity: 1;
}

/* Success snack - green solid */
.xcart-snack-success {
    background: #5AB237;
    color: white;
}

.xcart-snack-success .xcart-snack-close {
    color: white;
}

/* Error snack - red solid */
.xcart-snack-error,
.xcart-snack-danger {
    background: #BB1F34;
    color: white;
}

.xcart-snack-error .xcart-snack-close,
.xcart-snack-danger .xcart-snack-close {
    color: white;
}

/* Warning snack - white with border */
.xcart-snack-warning {
    background: white;
    color: #333333;
    border: 1px solid #E2E2E2;
}

.xcart-snack-warning .xcart-snack-close {
    color: #666666;
}

/* Info snack - light blue */
.xcart-snack-info {
    background: #DDF1FF;
    color: #333333;
}

/* Snack container for positioning */
.xcart-snack-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Animation */
.xcart-snack-enter {
    animation: snackSlideUp 0.3s ease-out;
}

.xcart-snack-exit {
    animation: snackSlideDown 0.2s ease-in forwards;
}

@keyframes snackSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes snackSlideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* ==========================================
   PANELS / CARDS
   ========================================== */

.xcart-panel {
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    margin-bottom: 20px;
}

.xcart-panel-header {
    background: var(--xcart-bg-gray);
    border-bottom: 1px solid var(--xcart-border-light);
    padding: 12px 20px;
}

.xcart-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--xcart-text-primary);
    margin: 0;
}

.xcart-panel-body {
    padding: 20px;
}

/* Metric Card */
.xcart-metric-card {
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.15s;
}

.xcart-metric-card:hover {
    border-color: var(--xcart-primary);
}

.xcart-metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--xcart-text-primary);
}

.xcart-metric-label {
    font-size: 0.875rem;
    color: var(--xcart-text-muted);
}

/* ==========================================
   NOTIFICATION SYSTEM
   ========================================== */

#xcart-notifications {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 9999;
    width: 360px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.xcart-notification {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.xcart-notification-success {
    background: #28A745;
    color: white;
}

.xcart-notification-warning {
    background: #FFA500;
    color: white;
}

.xcart-notification-danger {
    background: #BB1F34;
    color: white;
}

.xcart-notification-info {
    background: #0D6EFD;
    color: white;
}

.xcart-notification-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.8;
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
}

.xcart-notification-close:hover {
    opacity: 1;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .xcart-sidebar {
        transform: translateX(-100%);
    }

    .xcart-topbar,
    .xcart-main {
        margin-left: 0;
    }

    .xcart-container {
        padding: 20px 15px;
    }

    .xcart-filters-advanced {
        grid-template-columns: 1fr;
    }

    #xcart-notifications {
        left: 10px;
        right: 10px;
        width: auto;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */

.xcart-text-muted {
    color: var(--xcart-text-muted);
}

.xcart-text-success {
    color: var(--xcart-success);
}

.xcart-text-danger {
    color: var(--xcart-danger);
}

.xcart-text-warning {
    color: var(--xcart-warning);
}

.xcart-mb-0 { margin-bottom: 0; }
.xcart-mb-1 { margin-bottom: 5px; }
.xcart-mb-2 { margin-bottom: 10px; }
.xcart-mb-3 { margin-bottom: 15px; }
.xcart-mb-4 { margin-bottom: 20px; }

.xcart-mt-0 { margin-top: 0; }
.xcart-mt-1 { margin-top: 5px; }
.xcart-mt-2 { margin-top: 10px; }
.xcart-mt-3 { margin-top: 15px; }
.xcart-mt-4 { margin-top: 20px; }

.xcart-d-flex { display: flex; }
.xcart-align-center { align-items: center; }
.xcart-justify-between { justify-content: space-between; }
.xcart-gap-1 { gap: 5px; }
.xcart-gap-2 { gap: 10px; }
.xcart-gap-3 { gap: 15px; }

/* ==========================================
   ORDER DETAIL PAGE
   ========================================== */

.xcart-order-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

.xcart-order-main {
    min-width: 0;
}

.xcart-order-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Order Header */
.xcart-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.xcart-order-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.xcart-order-number {
    font-size: 28px;
    font-weight: 400;
    color: #333333;
    margin: 0;
}

.xcart-order-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Order Items Table */
.xcart-order-items {
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    overflow: hidden;
}

.xcart-order-items-header {
    background: var(--xcart-bg-gray);
    padding: 12px 20px;
    border-bottom: 1px solid var(--xcart-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xcart-order-items-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--xcart-text-primary);
    margin: 0;
}

.xcart-order-items-body {
    padding: 0;
}

/* Product Row */
.xcart-product-row {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid var(--xcart-border-lighter);
    gap: 15px;
    align-items: flex-start;
}

.xcart-product-row:last-child {
    border-bottom: none;
}

.xcart-product-image {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.xcart-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.xcart-product-info {
    flex: 1;
    min-width: 0;
}

.xcart-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--xcart-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xcart-product-name:hover {
    text-decoration: underline;
}

.xcart-product-sku {
    font-size: 12px;
    color: var(--xcart-text-muted);
}

.xcart-product-meta {
    font-size: 12px;
    color: var(--xcart-text-muted);
    margin-top: 4px;
}

.xcart-product-pricing {
    display: flex;
    align-items: center;
    gap: 20px;
}

.xcart-product-field {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.xcart-product-field-label {
    font-size: 11px;
    color: var(--xcart-text-muted);
    text-transform: uppercase;
}

.xcart-product-field-value {
    font-size: 14px;
    color: var(--xcart-text-primary);
    font-weight: 500;
}

.xcart-product-field input {
    width: 80px;
    text-align: right;
}

.xcart-product-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--xcart-text-primary);
    min-width: 80px;
    text-align: right;
}

/* Order Summary */
.xcart-order-summary {
    padding: 15px 20px;
    background: var(--xcart-bg-gray);
    border-top: 1px solid var(--xcart-border-light);
}

.xcart-order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.xcart-order-summary-row.total {
    font-weight: 700;
    font-size: 16px;
    border-top: 1px solid var(--xcart-border-light);
    margin-top: 8px;
    padding-top: 12px;
}

/* Customer Card */
.xcart-customer-card {
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    overflow: hidden;
}

.xcart-customer-header {
    background: var(--xcart-bg-gray);
    padding: 12px 15px;
    border-bottom: 1px solid var(--xcart-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xcart-customer-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.xcart-customer-body {
    padding: 15px;
}

.xcart-customer-info {
    margin-bottom: 15px;
}

.xcart-customer-name {
    font-weight: 600;
    color: var(--xcart-primary);
    margin-bottom: 4px;
}

.xcart-customer-name:hover {
    text-decoration: underline;
    cursor: pointer;
}

.xcart-customer-email {
    font-size: 13px;
    color: var(--xcart-text-muted);
}

.xcart-customer-field {
    margin-bottom: 12px;
}

.xcart-customer-field:last-child {
    margin-bottom: 0;
}

.xcart-customer-field-label {
    font-size: 12px;
    color: var(--xcart-text-muted);
    margin-bottom: 4px;
}

/* Address Card */
.xcart-address-card {
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    padding: 15px;
}

.xcart-address-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xcart-address-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--xcart-text-secondary);
}

/* Shipping Info */
.xcart-shipping-info {
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    padding: 15px;
}

.xcart-shipping-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--xcart-border-lighter);
}

.xcart-shipping-row:last-child {
    border-bottom: none;
}

.xcart-shipping-label {
    color: var(--xcart-text-muted);
    font-size: 13px;
}

.xcart-shipping-value {
    font-size: 13px;
    font-weight: 500;
}

/* Back button */
.xcart-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--xcart-text-muted);
    font-size: 14px;
    text-decoration: none;
}

.xcart-back-link:hover {
    color: var(--xcart-primary);
    text-decoration: none;
}

/* Responsive Order Layout */
@media (max-width: 1024px) {
    .xcart-order-layout {
        grid-template-columns: 1fr;
    }

    .xcart-order-sidebar {
        order: -1;
    }
}

/* ==========================================
   TOGGLE SWITCH
   ========================================== */

.xcart-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.xcart-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.xcart-toggle-slider {
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}

.xcart-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.xcart-toggle input:checked + .xcart-toggle-slider {
    background: var(--xcart-primary);
}

.xcart-toggle input:checked + .xcart-toggle-slider::before {
    transform: translateX(20px);
}

.xcart-toggle-label {
    margin-left: 10px;
    font-size: 14px;
}

/* ==========================================
   GRID SYSTEM
   ========================================== */

.uikit-grid {
    display: grid;
    gap: 20px;
}

.uikit-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.uikit-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.uikit-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .uikit-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .uikit-grid-2,
    .uikit-grid-3,
    .uikit-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   SETTINGS FORM LAYOUT
   ========================================== */

.xcart-settings-section {
    margin-bottom: 30px;
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
}

.xcart-settings-header {
    padding: 20px;
    border-bottom: 1px solid var(--xcart-border-light);
}

.xcart-settings-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--xcart-text-primary);
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xcart-settings-header p {
    font-size: 13px;
    color: var(--xcart-text-muted);
    margin: 0;
}

.xcart-settings-body {
    padding: 20px;
}

.xcart-form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.xcart-form-row:last-child {
    margin-bottom: 0;
}

.xcart-form-row .xcart-form-label {
    width: 160px;
    min-width: 160px;
    padding-top: 8px;
    font-weight: 600;
    color: var(--xcart-text-primary);
    font-size: 14px;
}

.xcart-form-row .xcart-form-field {
    flex: 1;
}

.xcart-form-row .xcart-form-field .xcart-input,
.xcart-form-row .xcart-form-field .xcart-select {
    width: 100%;
    max-width: 400px;
}

.xcart-required {
    color: var(--xcart-danger);
}

.xcart-help-text {
    display: block;
    font-size: 12px;
    color: var(--xcart-text-muted);
    margin-top: 5px;
}

.xcart-success-text {
    display: block;
    font-size: 12px;
    color: var(--xcart-success);
    margin-top: 5px;
}

.xcart-error-text {
    display: block;
    font-size: 12px;
    color: var(--xcart-danger);
    margin-top: 5px;
}

.xcart-input-success {
    border-color: var(--xcart-success);
}

.xcart-input-error {
    border-color: var(--xcart-danger);
}

.xcart-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    background: var(--xcart-bg-gray);
    border-top: 1px solid var(--xcart-border-light);
}

/* Checkbox styling */
.xcart-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.xcart-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--xcart-primary);
}

.xcart-checkbox-label {
    font-size: 14px;
    color: var(--xcart-text-primary);
}

/* ==========================================
   FILTER SECTION / SEARCH PANEL
   Based on Figma Design System
   - Background: #DDF1FF (Light Blue)
   - Padding: 20px 10px
   - Border-radius: 4px
   - Gap: 20px between elements
   ========================================== */

.xcart-filter-section,
.xcart-search-panel {
    background: #DDF1FF;
    border-radius: 4px;
    padding: 20px 10px;
    margin-bottom: 20px;
    font-family: 'Open Sans', sans-serif;
}

/* Main filter row */
.xcart-filter-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Main search input - takes remaining space */
.xcart-filter-main-input {
    flex: 1;
    min-width: 200px;
}

/* Fixed width selectors (245px from Figma) */
.xcart-filter-selector {
    width: 245px;
    flex-shrink: 0;
}

/* Filter inputs override */
.xcart-filter-section .xcart-input,
.xcart-filter-section .xcart-select,
.xcart-search-panel .xcart-input,
.xcart-search-panel .xcart-select {
    height: 40px;
    border: 1px solid #ABABAB;
    border-radius: 4px;
    font-size: 16px;
    background: white;
}

.xcart-filter-section .xcart-input::placeholder,
.xcart-search-panel .xcart-input::placeholder {
    color: #ABABAB;
}

/* Secondary row with links */
.xcart-filter-row-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Advanced filters link (left side) */
.xcart-filter-advanced-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #2274A6;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px dashed #2274A6;
    padding-bottom: 2px;
}

.xcart-filter-advanced-link:hover {
    color: #1a5a80;
    border-bottom-color: #1a5a80;
    text-decoration: none;
}

.xcart-filter-advanced-link i {
    font-size: 12px;
    transition: transform 0.2s;
}

.xcart-filter-advanced-link.expanded i {
    transform: rotate(90deg);
}

/* Action links (right side) */
.xcart-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xcart-filter-action-link {
    color: #2274A6;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px dashed #2274A6;
    padding-bottom: 2px;
}

.xcart-filter-action-link:hover {
    color: #1a5a80;
    border-bottom-color: #1a5a80;
    text-decoration: none;
}

.xcart-filter-action-link.disabled {
    opacity: 0.2;
    pointer-events: none;
}

.xcart-filter-actions-divider {
    width: 1px;
    height: 19px;
    background: #ABABAB;
}

/* Advanced filters panel (expandable) */
.xcart-filter-advanced-panel {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(34, 116, 166, 0.2);
}

.xcart-filter-advanced-panel.show {
    display: block;
}

.xcart-filter-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 20px;
}

/* Filter group with label */
.xcart-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xcart-filter-label {
    font-size: 14px;
    font-weight: 400;
    color: #333333;
    white-space: nowrap;
    min-width: 120px;
}

/* Legacy support */
.xcart-filter-search {
    flex: 1;
    min-width: 250px;
}

.xcart-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.xcart-input-icon {
    position: absolute;
    left: 12px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.xcart-input-with-icon {
    padding-left: 38px;
    width: 100%;
}

/* ==========================================
   TABS (improved)
   ========================================== */

.xcart-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--xcart-border-light);
    margin-bottom: 0;
    list-style: none;
    padding: 0;
}

.xcart-tab-item {
    list-style: none;
}

.xcart-tab-link {
    display: inline-block;
    padding: 12px 20px;
    color: var(--xcart-text-muted);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}

.xcart-tab-link:hover {
    color: #333333;
    text-decoration: none;
}

.xcart-tab-link.active {
    color: #333333;
    font-weight: 600;
    border-bottom-color: var(--xcart-primary);
}

.xcart-tab-badge {
    display: inline-block;
    background: var(--xcart-danger);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* ==========================================
   STATUS BANNER
   ========================================== */

.xcart-status-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.xcart-status-connected {
    background: var(--xcart-success-bg);
    color: var(--xcart-success-text);
    border: 1px solid var(--xcart-success-border);
}

.xcart-status-disconnected {
    background: var(--xcart-danger-bg);
    color: var(--xcart-danger-text);
    border: 1px solid var(--xcart-danger-border);
}

/* ==========================================
   TABLE IMPROVEMENTS
   ========================================== */

.xcart-table-compact th,
.xcart-table-compact td {
    padding: 8px 12px;
}

.xcart-sortable {
    cursor: pointer;
    user-select: none;
}

.xcart-sortable:hover {
    background: #f0f0f0;
}

.xcart-sorted-desc i,
.xcart-sorted-asc i {
    color: var(--xcart-primary);
}

/* ==========================================
   SIDEBAR NAV (list style)
   ========================================== */

.xcart-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.xcart-sidebar-item {
    list-style: none;
}

.xcart-sidebar-link {
    display: flex;
    width: 70px;
    height: 50px;
    align-items: center;
    justify-content: center;
    color: #ABABAB;
    text-decoration: none;
    transition: all 0.2s;
}

.xcart-sidebar-link:hover,
.xcart-sidebar-link.active {
    background: rgba(52, 152, 219, 0.1);
    color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-sidebar-link i {
    font-size: 18px;
}

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

/* Sidebar SVG Icons (from Figma) */
.xcart-sidebar-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.xcart-sidebar-link:hover .xcart-sidebar-icon,
.xcart-sidebar-link.active .xcart-sidebar-icon {
    opacity: 1;
}

/* XC Logo Box */
.xcart-logo-box {
    width: 40px;
    height: 40px;
    background: #333333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
}

.xcart-logo-x {
    color: #4E72F4;
}

.xcart-logo-c {
    color: white;
}

/* Orders indicator (blue dot) */
.xcart-sidebar-link {
    position: relative;
}

.xcart-sidebar-indicator {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #4E72F4;
    border-radius: 50%;
}

/* ==========================================
   TOPBAR IMPROVEMENTS
   ========================================== */

.xcart-topbar-title {
    font-size: 14px;
    font-weight: 600;
}

.xcart-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.xcart-search-box i {
    position: absolute;
    left: 12px;
    color: #ABABAB;
}

.xcart-search-box input {
    width: 300px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    padding: 0 12px 0 36px;
    color: white;
    font-size: 13px;
}

.xcart-search-box input::placeholder {
    color: #ABABAB;
}

.xcart-topbar-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--xcart-danger);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.xcart-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.xcart-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.xcart-user-name {
    font-size: 13px;
}

/* ==========================================
   BREADCRUMB
   ========================================== */

.xcart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.xcart-breadcrumb-item {
    color: var(--xcart-text-muted);
    text-decoration: none;
}

.xcart-breadcrumb-item:hover {
    color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-breadcrumb-active {
    color: var(--xcart-text-primary);
}

.xcart-breadcrumb-separator {
    color: var(--xcart-text-muted);
}

/* ==========================================
   PAGE HEADER WITH ACTIONS
   ========================================== */

.xcart-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.xcart-page-header h1 {
    font-size: 28px;
    font-weight: 400;
    color: #333333;
    margin: 0;
}

.xcart-page-actions {
    display: flex;
    gap: 10px;
}

/* ==========================================
   CONTENT AREA
   ========================================== */

.xcart-content {
    padding: 30px 40px;
    padding-bottom: 80px;
}

/* ==========================================
   DROPDOWN MENU
   ========================================== */

.xcart-dropdown {
    position: relative;
    display: inline-block;
}

.xcart-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 180px;
    padding: 8px 0;
    margin-top: 4px;
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.xcart-dropdown-item {
    display: block;
    padding: 8px 16px;
    color: var(--xcart-text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

.xcart-dropdown-item:hover {
    background: #f5f5f5;
    color: var(--xcart-text-primary);
    text-decoration: none;
}

.xcart-dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: var(--xcart-text-muted);
}

.xcart-dropdown-item-danger {
    color: var(--xcart-danger);
}

.xcart-dropdown-item-danger i {
    color: var(--xcart-danger);
}

.xcart-dropdown-item-danger:hover {
    background: var(--xcart-danger-bg);
    color: var(--xcart-danger);
}

.xcart-dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--xcart-border-light);
}

/* ==========================================
   SUBNAV (Secondary Navigation)
   ========================================== */

.xcart-subnav {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.xcart-subnav-item {
    padding: 8px 16px;
    color: var(--xcart-text-muted);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.xcart-subnav-item:hover {
    color: var(--xcart-text-primary);
    text-decoration: none;
}

.xcart-subnav-item.active {
    color: var(--xcart-primary);
    border-bottom-color: var(--xcart-primary);
    font-weight: 600;
}

/* ==========================================
   FILTER TAB PILLS
   ========================================== */

.xcart-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.xcart-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    font-size: 13px;
    color: var(--xcart-text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.xcart-filter-pill:hover {
    border-color: var(--xcart-primary);
    color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-filter-pill.active {
    background: var(--xcart-primary);
    border-color: var(--xcart-primary);
    color: white;
}

.xcart-filter-pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--xcart-danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
}

.xcart-filter-pill.active .xcart-filter-pill-badge {
    background: rgba(255, 255, 255, 0.3);
}

.xcart-filter-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    margin-right: -4px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--xcart-text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.xcart-filter-pill-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--xcart-danger);
}

.xcart-filter-pill.active .xcart-filter-pill-remove {
    color: rgba(255, 255, 255, 0.7);
}

.xcart-filter-pill.active .xcart-filter-pill-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ==========================================
   INLINE STATUS DROPDOWNS
   ========================================== */

.xcart-status-select {
    height: 28px;
    padding: 0 24px 0 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.15s;
}

.xcart-status-select:hover {
    border-color: var(--xcart-border);
}

.xcart-status-select:focus {
    outline: none;
    border-color: var(--xcart-primary);
}

/* Payment Status Colors */
.xcart-status-select-paid {
    background-color: #d4edda;
    color: #155724;
}

.xcart-status-select-pending,
.xcart-status-select-awaiting {
    background-color: #fff3cd;
    color: #856404;
}

.xcart-status-select-declined,
.xcart-status-select-cancelled,
.xcart-status-select-refunded {
    background-color: #f8d7da;
    color: #721c24;
}

.xcart-status-select-new {
    background-color: #e2e3e5;
    color: #383d41;
}

.xcart-status-select-partially {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Fulfillment Status Colors */
.xcart-status-select-delivered {
    background-color: #d4edda;
    color: #155724;
}

.xcart-status-select-shipped {
    background-color: #cce5ff;
    color: #004085;
}

.xcart-status-select-processing {
    background-color: #fff3cd;
    color: #856404;
}

.xcart-status-select-failed,
.xcart-status-select-will-not-deliver {
    background-color: #f8d7da;
    color: #721c24;
}

.xcart-status-select-returned,
.xcart-status-select-back-ordered {
    background-color: #e2e3e5;
    color: #383d41;
}

/* ==========================================
   SIDEBAR FLYOUT SUBMENU
   ========================================== */

.xcart-sidebar-item {
    position: relative;
}

.xcart-sidebar-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 220px;
    background: var(--xcart-sidebar-bg);
    border-radius: 0 6px 6px 0;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.xcart-sidebar-item:hover .xcart-sidebar-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.xcart-sidebar-submenu-header {
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--xcart-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
}

.xcart-sidebar-submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.xcart-sidebar-submenu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    text-decoration: none;
}

.xcart-sidebar-submenu-item.active {
    color: var(--xcart-primary);
    background: rgba(34, 116, 166, 0.1);
}

.xcart-sidebar-submenu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--xcart-danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

.xcart-sidebar-submenu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* ==========================================
   TABLE ROW ACTIONS
   ========================================== */

.xcart-table-actions {
    width: 50px;
    text-align: center;
}

.xcart-row-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--xcart-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.xcart-row-action-btn:hover {
    background: #f0f0f0;
    color: var(--xcart-primary);
}

.xcart-row-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--xcart-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 16px;
}

.xcart-row-menu-btn:hover {
    background: #f0f0f0;
    color: var(--xcart-text-primary);
}

/* Row action dropdown */
.xcart-row-dropdown {
    position: relative;
    display: inline-block;
}

.xcart-row-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 150px;
    padding: 6px 0;
    margin-top: 4px;
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.xcart-row-dropdown.open .xcart-row-dropdown-menu {
    display: block;
}

.xcart-row-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--xcart-text-primary);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.xcart-row-dropdown-item:hover {
    background: #f5f5f5;
}

.xcart-row-dropdown-item i {
    width: 14px;
    color: var(--xcart-text-muted);
}

.xcart-row-dropdown-item-danger {
    color: var(--xcart-danger);
}

.xcart-row-dropdown-item-danger i {
    color: var(--xcart-danger);
}

/* ==========================================
   STICKY FOOTER SAVE BAR
   ========================================== */

.xcart-sticky-footer {
    position: fixed;
    bottom: 0;
    left: var(--xcart-sidebar-width);
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--xcart-border-light);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 40px;
    gap: 15px;
    z-index: 998;
}

.xcart-sticky-footer .xcart-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.xcart-sticky-footer-info {
    margin-right: auto;
    font-size: 13px;
    color: var(--xcart-text-muted);
}

.xcart-sticky-footer-info i {
    margin-right: 6px;
}

/* ==========================================
   TOPBAR SEARCH WITH DROPDOWN
   ========================================== */

.xcart-topbar-search-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.xcart-topbar-search-select {
    height: 32px;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23ccc' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.xcart-topbar-search-select:focus {
    outline: none;
}

.xcart-topbar-search-group input {
    flex: 1;
    height: 32px;
    background: transparent;
    border: none;
    padding: 0 12px;
    color: white;
    font-size: 13px;
    min-width: 200px;
}

.xcart-topbar-search-group input::placeholder {
    color: #999;
}

.xcart-topbar-search-group input:focus {
    outline: none;
}

.xcart-topbar-search-btn {
    height: 32px;
    width: 36px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xcart-topbar-search-btn:hover {
    color: white;
}

/* ==========================================
   PAGE HEADER WITH BREADCRUMB
   ========================================== */

.xcart-page-header-with-breadcrumb {
    margin-bottom: 20px;
}

.xcart-page-header-with-breadcrumb h1 {
    font-size: 24px;
    font-weight: 400;
    color: var(--xcart-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.xcart-page-header-with-breadcrumb h1 .xcart-breadcrumb-inline {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: var(--xcart-text-muted);
    margin-left: 0;
}

.xcart-page-header-with-breadcrumb h1 .xcart-breadcrumb-inline a {
    color: var(--xcart-text-muted);
    text-decoration: none;
}

.xcart-page-header-with-breadcrumb h1 .xcart-breadcrumb-inline a:hover {
    color: var(--xcart-primary);
}

.xcart-page-header-with-breadcrumb h1 .xcart-breadcrumb-inline span {
    margin: 0 8px;
}

/* ==========================================
   PRIMARY/SECONDARY TABS
   ========================================== */

.xcart-tabs-primary {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--xcart-border-light);
    margin-bottom: 0;
}

.xcart-tabs-primary .xcart-tab-link {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 400;
    color: var(--xcart-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.xcart-tabs-primary .xcart-tab-link:hover {
    color: var(--xcart-text-primary);
}

.xcart-tabs-primary .xcart-tab-link.active {
    color: var(--xcart-text-primary);
    font-weight: 600;
    border-bottom-color: var(--xcart-primary);
}

.xcart-tabs-secondary {
    display: flex;
    gap: 0;
    background: var(--xcart-bg-gray);
    padding: 0 15px;
    margin-bottom: 15px;
}

.xcart-tabs-secondary .xcart-tab-link {
    padding: 10px 15px;
    font-size: 13px;
    color: var(--xcart-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.xcart-tabs-secondary .xcart-tab-link:hover {
    color: var(--xcart-text-primary);
}

.xcart-tabs-secondary .xcart-tab-link.active {
    color: var(--xcart-primary);
    border-bottom-color: var(--xcart-primary);
}

/* ==========================================
   EMAIL TAG CHIPS
   ========================================== */

.xcart-email-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 4px;
    min-height: 40px;
}

.xcart-email-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 13px;
    color: var(--xcart-text-primary);
}

.xcart-email-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--xcart-text-muted);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s;
}

.xcart-email-tag-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--xcart-danger);
}

.xcart-email-input {
    flex: 1;
    min-width: 150px;
    border: none;
    background: transparent;
    font-size: 13px;
    padding: 4px;
}

.xcart-email-input:focus {
    outline: none;
}

/* ==========================================
   STATUS INDICATORS
   ========================================== */

.xcart-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.xcart-status-indicator-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
}

.xcart-status-indicator-synced .xcart-status-indicator-icon {
    background: var(--xcart-success);
    color: white;
}

.xcart-status-indicator-synced {
    color: var(--xcart-success-text);
}

.xcart-status-indicator-not-synced .xcart-status-indicator-icon {
    background: #6c757d;
    color: white;
}

.xcart-status-indicator-not-synced {
    color: #6c757d;
}

.xcart-status-indicator-error .xcart-status-indicator-icon {
    background: var(--xcart-danger);
    color: white;
}

.xcart-status-indicator-error {
    color: var(--xcart-danger);
}

/* Widget badge (like low stock info) */
.xcart-widget-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--xcart-border-light);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.xcart-widget-badge:hover {
    border-color: var(--xcart-primary);
    text-decoration: none;
}

.xcart-widget-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff3cd;
    border-radius: 50%;
    color: #856404;
    font-size: 16px;
}

.xcart-widget-badge-content {
    flex: 1;
}

.xcart-widget-badge-title {
    font-size: 13px;
    color: var(--xcart-text-primary);
    margin-bottom: 2px;
}

.xcart-widget-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--xcart-danger);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}
