/* ============================================
   Mavikon User Panel CSS v2.0
   Modern, Clean, Mobile-First
   ============================================ */

/* ============================================
   Design System - Variables
   ============================================ */
:root {
    /* Colors - Primary */
    --primary-50: #eef2ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #2563eb;
    --primary-600: #1e40af;
    --primary-700: #1e3a8a;

    /* Colors - Success */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;

    /* Colors - Danger */
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;

    /* Colors - Warning */
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --warning-800: #92400e;
    --warning-900: #78350f;

    /* Other */
    --color-surface: #ffffff;
    --color-surface-alt: #f3f4f6;

    /* Colors - Gray */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --color-text-primary: var(--gray-900);
    --color-text-secondary: var(--gray-600);
    --color-text-tertiary: var(--gray-400);
    --color-text-muted: var(--gray-500);
    --color-border: var(--gray-200);
    --color-bg-primary: #ffffff;
    --color-bg-secondary: var(--gray-50);
    --color-bg-app: var(--gray-100);
    --color-surface-primary: #ffffff;
    --color-surface-secondary: var(--gray-50);

    /* Sidebar */
    --sidebar-bg: #ffffff;
    --sidebar-border: var(--gray-200);
    --sidebar-text: var(--gray-600);
    --sidebar-text-hover: var(--gray-900);
    --sidebar-hover-bg: var(--gray-50);
    --sidebar-active-bg: var(--primary-500);
    --sidebar-active-text: #ffffff;

    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --max-width: 1440px;

    /* Transitions */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Dark Mode
   ============================================ */
[data-theme="dark"] {
    --gray-50: #1a1a1e;
    --gray-100: #202024;
    --gray-200: #2c2c31;
    --gray-300: #3f3f46;
    --gray-400: #71717a;
    --gray-500: #a1a1aa;
    --gray-600: #d4d4d8;
    --gray-700: #e4e4e7;
    --gray-800: #f4f4f5;
    --gray-900: #fafafa;

    --color-text-primary: #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-tertiary: #71717a;
    --color-text-muted: #71717a;
    --color-border: #2c2c31;
    --color-bg-primary: #18181b;
    --color-bg-secondary: #1a1a1e;
    --color-bg-app: #111113;
    --color-surface-primary: #1a1a1e;
    --color-surface-secondary: #202024;

    --sidebar-bg: #18181b;
    --sidebar-border: #2c2c31;
    --sidebar-text: #a1a1aa;
    --sidebar-text-hover: #fafafa;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);

    --primary-50: rgba(37, 99, 235, 0.1);
    --primary-100: rgba(37, 99, 235, 0.15);
    --primary-200: rgba(37, 99, 235, 0.2);
    --primary-300: #3b82f6;
    --primary-400: #60a5fa;
    --primary-600: #60a5fa;
    --primary-700: #93c5fd;

    --success-50: rgba(16, 185, 129, 0.1);
    --success-100: rgba(16, 185, 129, 0.15);
    --success-600: #34d399;
    --success-700: #6ee7b7;

    --danger-50: rgba(239, 68, 68, 0.1);
    --danger-100: rgba(239, 68, 68, 0.15);
    --danger-700: #fca5a5;

    --warning-50: rgba(245, 158, 11, 0.1);
    --warning-100: rgba(245, 158, 11, 0.15);
    --warning-200: rgba(245, 158, 11, 0.2);
    --warning-700: #fcd34d;
    --warning-800: #fde68a;
    --warning-900: #fef3c7;

    --color-surface: var(--color-surface-primary);
    --color-surface-alt: var(--color-surface-secondary);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-primary);
    background: var(--color-bg-app);
    overflow-x: hidden;
}

a {
    color: inherit;
}

a:visited {
    color: inherit;
}

a.btn:visited {
    color: inherit;
}

a.btn-primary,
a.btn-primary:visited {
    color: white;
}

a.btn-outline,
a.btn-outline:visited {
    color: var(--color-text-primary);
}

a.btn-danger,
a.btn-danger:visited {
    color: white;
}

/* ============================================
   Layout Structure
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    overflow: visible;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: var(--space-8);
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.sidebar-logo-dark {
    display: none;
}
[data-theme="dark"] .sidebar-logo-light {
    display: none;
}
[data-theme="dark"] .sidebar-logo-dark {
    display: block;
}

/* Store Selector */
.store-selector {
    padding: var(--space-3) var(--space-4);
    position: relative;
}

.store-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--space-3);
    background: var(--gray-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.store-trigger:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.store-selector.open .store-trigger {
    background: var(--gray-50);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.store-trigger-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.store-trigger-label {
    font-size: 10px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: var(--font-medium);
}

.store-trigger-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-trigger-arrow {
    font-size: 10px;
    color: var(--color-text-tertiary);
    transition: transform var(--transition);
    margin-left: var(--space-2);
}

.store-selector.open .store-trigger-arrow {
    transform: rotate(180deg);
}

.store-dropdown {
    display: none;
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    top: calc(100% + 4px);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.store-selector.open .store-dropdown {
    display: block;
}

.store-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.store-dropdown-item:hover {
    background: var(--gray-50);
    color: var(--color-text-primary);
}

.store-dropdown-item.active {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary-600);
}

.store-dropdown-item.active .fa-check {
    margin-left: auto;
    font-size: 10px;
    color: var(--primary-500);
}

.store-dropdown-add {
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-1);
    padding-top: var(--space-2);
    color: var(--primary-500);
    font-size: var(--text-xs);
}

.store-dropdown-add i {
    font-size: 10px;
}

.store-dropdown-add:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary-600);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3) var(--space-3);
    overflow-y: auto;
}

.nav-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-3) var(--space-2) var(--space-2);
}

.nav-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 var(--space-3);
    margin-bottom: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 9px var(--space-3);
    border-radius: var(--radius);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition);
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--color-text-primary);
}

.nav-item.active {
    background: var(--primary-500);
    color: white;
    font-weight: var(--font-semibold);
}

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 13px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-3) var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-plan-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
    padding: 8px 10px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text-tertiary);
    font-size: 10px;
    font-weight: var(--font-medium);
    font-variant-numeric: tabular-nums;
    transition: all var(--transition);
}
.sidebar-plan-compact:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}
.sidebar-plan-compact > .fa-crown {
    color: #d97706;
    font-size: 11px;
}
.sidebar-plan-stats {
    display: flex;
    gap: 10px;
}
.sidebar-plan-stats i {
    font-size: 9px;
    margin-right: 2px;
}
.sidebar-plan-compact-empty {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
    color: #b45309;
    font-size: 11px;
    font-weight: var(--font-semibold);
}
.sidebar-plan-compact-empty:hover {
    background: rgba(245, 158, 11, 0.1);
}

.sidebar-plan-compact {
    position: relative;
}
.sidebar-plan-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    white-space: nowrap;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 8px 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 50;
}
.sidebar-plan-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 16px;
    width: 8px;
    height: 8px;
    background: var(--color-bg-primary);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transform: rotate(45deg);
}
.sidebar-plan-compact:hover .sidebar-plan-tooltip {
    display: block;
}
.sidebar-plan-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 3px 0;
    font-size: 12px;
    color: var(--color-text-secondary);
}
.sidebar-plan-tooltip-row span i {
    width: 14px;
    text-align: center;
    margin-right: 6px;
    color: var(--color-text-muted);
}
.sidebar-plan-tooltip-row strong {
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.sidebar-feedback-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: var(--font-medium);
    white-space: nowrap;
    transition: all var(--transition);
}
.sidebar-feedback-compact i { font-size: 11px; }
.sidebar-feedback-compact:hover {
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-color: var(--gray-300);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    color: var(--color-text-tertiary);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    transition: all var(--transition);
}

.sidebar-logout i {
    width: 18px;
    text-align: center;
    font-size: 12px;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.06);
    color: var(--danger-600);
}

.sidebar-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-footer-row .sidebar-logout {
    flex: 1;
}

.sidebar-footer-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg-secondary);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    text-decoration: none;
}

.sidebar-icon-btn:hover {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-color: var(--gray-300);
}

.sidebar-wa-btn {
    color: #25d366 !important;
    border-color: rgba(37, 211, 102, 0.3);
}
.sidebar-wa-btn:hover {
    background: rgba(37, 211, 102, 0.1) !important;
    border-color: #25d366;
}


.theme-toggle {
    width: 32px;
    height: 32px;
}

.theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: inline;
}

/* ============================================
   Mobile
   ============================================ */
.mobile-toggle {
    display: none;
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 50;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.mobile-toggle:hover {
    background: var(--color-bg-secondary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: none;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-footer {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-overlay.active {
        display: block;
    }

    .app-main {
        margin-left: 0;
        width: 100%;
    }

    .app-content {
        padding: var(--space-4);
        padding-top: var(--space-4);
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    position: relative;
    margin-bottom: var(--space-8);
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--color-border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    font-weight: var(--font-medium);
}

.breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-500);
}

.breadcrumb span:last-child {
    color: var(--color-text-primary);
}

.page-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.page-header-top h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    letter-spacing: -0.02em;
}

.page-header-top h1 i {
    font-size: var(--text-xl);
    color: var(--primary-500);
}

.page-header-top p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
    font-weight: var(--font-normal);
}

.page-header-actions {
    display: flex;
    gap: var(--space-3);
}

@media (max-width: 640px) {
    .page-header {
        padding: var(--space-4);
    }

    .page-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-top h1 {
        font-size: var(--text-xl);
    }

    .page-header {
        margin-bottom: var(--space-6);
    }

    .breadcrumb {
        margin-bottom: var(--space-2);
    }

    .page-header-top p {
        font-size: var(--text-xs);
    }
}

/* ============================================
   Stats Cards (KPI)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stats-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition);
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-500);
}

.stats-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.stats-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
}

.stats-card-icon.primary {
    background: var(--primary-50);
    color: var(--primary-600);
}

.stats-card-icon.success {
    background: var(--success-50);
    color: var(--success-600);
}

.stats-card-icon.danger {
    background: var(--danger-50);
    color: var(--danger-600);
}

.stats-card-icon.warning {
    background: var(--warning-50);
    color: var(--warning-600);
}

.stats-card-trend {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
}

.stats-card-trend.positive {
    background: var(--success-50);
    color: var(--success-600);
}

.stats-card-trend.negative {
    background: var(--danger-50);
    color: var(--danger-600);
}

.stats-card-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.stats-card-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.card-body {
    padding: var(--space-6);
}

.card-body.no-padding {
    padding: 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--color-text-primary);
    border-color: var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.btn-outline:hover {
    background: var(--color-bg-secondary);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: var(--space-4);
}

.alert-success {
    background: var(--success-50);
    border-color: var(--success-500);
    color: var(--success-600);
}

.alert-danger {
    background: var(--danger-50);
    border-color: var(--danger-500);
    color: var(--danger-600);
}

.alert-warning {
    background: var(--warning-50);
    border-color: var(--warning-500);
    color: var(--warning-600);
}

.alert-info {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-600);
}

/* ============================================
   Footer
   ============================================ */
.app-footer {
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-8);
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-content p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.footer-content p strong {
    color: var(--color-text-secondary);
    font-weight: var(--font-semibold);
}

.footer-social {
    display: flex;
    gap: var(--space-1);
}

.footer-social a {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--transition);
}

.footer-social a:hover {
    color: var(--primary-500);
    background: var(--color-bg-secondary);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    transition: all var(--transition);
}

.footer-theme-toggle:hover {
    color: var(--primary-500);
    border-color: var(--primary-500);
}

.footer-theme-toggle .theme-icon-light {
    display: none;
}

[data-theme="dark"] .footer-theme-toggle .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .footer-theme-toggle .theme-icon-light {
    display: inline;
}

/* ============================================
   Mobile Bottom Bar
   ============================================ */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-1) 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--space-1) 0;
    font-size: 10px;
    color: var(--color-text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.mobile-bar-item i {
    font-size: 18px;
}

.mobile-bar-item span {
    font-weight: var(--font-medium);
    letter-spacing: 0.01em;
}

.mobile-bar-item.active,
.mobile-bar-item:active {
    color: var(--primary-500);
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
        justify-content: space-around;
    }

    .app-footer {
        padding-bottom: calc(var(--space-4) + 64px);
    }

    .app-content {
        padding-bottom: 80px;
    }

    .footer-content {
        padding: 0 var(--space-2);
    }
}

/* ============================================
   Loading States
   ============================================ */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-100) 25%,
        var(--gray-200) 50%,
        var(--gray-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    font-size: 2rem;
    color: var(--primary-500);
}

.empty-state h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.empty-state > p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    max-width: 480px;
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.empty-state > .btn {
    margin-bottom: var(--space-12);
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: var(--text-3xl);
    color: var(--color-text-muted);
}

.empty-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.empty-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    max-width: 400px;
    margin-bottom: var(--space-6);
}

/* ============================================
   Maintenance / Coming Soon
   ============================================ */
.maintenance-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.maintenance-state-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: 2rem;
    color: var(--primary-500);
    animation: maintenance-pulse 2s ease-in-out infinite;
}

.maintenance-state-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--primary-600);
    background: var(--primary-50);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    letter-spacing: 0.02em;
}

@keyframes maintenance-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.maintenance-state h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.maintenance-state > p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.maintenance-state > .btn {
    margin-top: var(--space-2);
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-500); }
.text-success { color: var(--success-500); }
.text-danger { color: var(--danger-500); }
.text-warning { color: var(--warning-500); }

/* ============================================
   Period Filters (Above KPI Cards)
   ============================================ */
.period-filters-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-4);
}

.period-filters {
    display: inline-flex;
    gap: var(--space-2);
    background: var(--color-bg-primary);
    padding: var(--space-2);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.period-btn {
    padding: var(--space-2) var(--space-4);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.period-btn:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.period-btn.active {
    background: var(--primary-500);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

@media (max-width: 768px) {
    .period-filters-wrapper {
        justify-content: stretch;
    }

    .period-filters {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .period-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }
}

/* ============================================
   KPI Cards
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.kpi-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    gap: var(--space-4);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border-left: 4px solid;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kpi-card.kpi-primary {
    border-color: var(--primary-500);
}

.kpi-card.kpi-primary .kpi-icon {
    background: var(--primary-50);
    color: var(--primary-600);
}

.kpi-card.kpi-success {
    border-color: var(--success-500);
}

.kpi-card.kpi-success .kpi-icon {
    background: var(--success-50);
    color: var(--success-600);
}

.kpi-card.kpi-accent {
    border-color: #8b5cf6;
}

.kpi-card.kpi-accent .kpi-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.kpi-card.kpi-warning {
    border-color: var(--warning-500);
}

.kpi-card.kpi-warning .kpi-icon {
    background: var(--warning-50);
    color: var(--warning-600);
}

.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
    font-weight: var(--font-medium);
}

.kpi-value {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    line-height: 1.2;
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    margin-top: var(--space-1);
}

.kpi-change.positive {
    background: var(--success-50);
    color: var(--success-600);
}

.kpi-change.negative {
    background: var(--danger-50);
    color: var(--danger-600);
}

.kpi-change.neutral {
    background: var(--gray-100);
    color: var(--gray-600);
}

.kpi-change:empty {
    display: none;
}

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

@media (max-width: 768px) {
    .kpi-grid {
        gap: var(--space-4);
        margin-bottom: var(--space-6);
    }

    .kpi-card:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .kpi-card {
        padding: var(--space-4);
    }

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

    .kpi-value {
        font-size: 1.25rem;
    }

    .kpi-label {
        font-size: var(--text-xs);
    }

    .kpi-change {
        font-size: 10px;
        padding: 2px var(--space-1);
    }
}

/* ============================================
   Dashboard Grid
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.dashboard-col-4 {
    grid-column: span 4;
}

.dashboard-col-6 {
    grid-column: span 6;
}

.dashboard-col-8 {
    grid-column: span 8;
}

@media (max-width: 1024px) {
    .dashboard-col-4,
    .dashboard-col-6,
    .dashboard-col-8 {
        grid-column: span 12;
    }
}

/* ============================================
   Chart Card
   ============================================ */
.chart-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chart-card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chart-card-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.chart-card-header p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

.chart-card-body {
    padding: var(--space-6);
    min-height: 320px;
    position: relative;
}

/* External Chart Tooltip */
.chart-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 20;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.chart-tooltip .ct-title {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}

.chart-tooltip .ct-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.chart-tooltip .ct-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chart-tooltip .ct-dot-ring {
    background: transparent;
    border: 2px solid;
}

.chart-tooltip .ct-label {
    flex: 1;
    font-weight: 500;
    font-size: 12px;
}

.chart-tooltip .ct-val {
    font-weight: 600;
    font-size: 13px;
    margin-left: 12px;
}

.chart-tooltip .ct-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

.chart-legend {
    display: flex;
    gap: var(--space-4);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-primary {
    background: var(--primary-500);
}

.legend-success {
    background: var(--success-500);
}

.legend-dash {
    width: 16px;
    height: 0;
    border-top: 2px dashed var(--color-text-secondary);
    opacity: 0.5;
}

@media (max-width: 640px) {
    .chart-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
        padding: var(--space-4);
    }

    .chart-card-body {
        padding: var(--space-3);
    }

    .chart-legend {
        gap: var(--space-3);
    }

    .legend-item {
        font-size: var(--text-xs);
    }
}

/* ============================================
   Welcome Section
   ============================================ */
/* No Cost Alert Banner */
.no-cost-alert {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    animation: fadeInUp 0.4s ease;
}
.no-cost-alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}
.no-cost-alert-content {
    flex: 1;
    min-width: 0;
}
.no-cost-alert-content strong {
    display: block;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 2px;
}
.no-cost-alert-content p {
    font-size: 12px;
    color: #a16207;
    margin: 0 0 8px;
}
.no-cost-alert-products {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.no-cost-product-chip {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.no-cost-product-chip.more {
    background: rgba(245, 158, 11, 0.25);
    font-weight: 600;
}
.no-cost-alert-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f59e0b;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.no-cost-alert-btn:hover {
    background: #d97706;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 768px) {
    .no-cost-alert {
        flex-direction: column;
        text-align: center;
    }
    .no-cost-alert-products {
        justify-content: center;
    }
}

.welcome-section {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    border: 1px solid var(--color-border);
}

.welcome-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.welcome-greeting h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.welcome-greeting p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.welcome-greeting p strong {
    color: var(--color-text-primary);
}

.welcome-pending-metrics {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-left: auto;
}

.welcome-pending-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.welcome-pending-stat-value {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    white-space: nowrap;
}

.welcome-pending-stat-value.positive { color: var(--success-600); }
.welcome-pending-stat-value.negative { color: var(--danger-600); }

.welcome-pending-stat-label {
    font-size: 10px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.welcome-pending-stat-label.highlight {
    color: var(--primary-600);
    font-weight: var(--font-semibold);
}

.welcome-pending-divider {
    width: 1px;
    height: 32px;
    background: var(--color-border);
    flex-shrink: 0;
}

.welcome-pending-margin {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 0;
    border: 2.5px solid;
}

.welcome-pending-margin.high {
    border-color: var(--success-500);
    background: var(--success-50);
}

.welcome-pending-margin.medium {
    border-color: var(--warning-500);
    background: var(--warning-50);
}

.welcome-pending-margin.low {
    border-color: var(--danger-500);
    background: var(--danger-50);
}

.welcome-pending-margin-value {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    line-height: 1;
}

.welcome-pending-margin.high .welcome-pending-margin-value { color: var(--success-700); }
.welcome-pending-margin.medium .welcome-pending-margin-value { color: var(--warning-700); }
.welcome-pending-margin.low .welcome-pending-margin-value { color: var(--danger-700); }

.welcome-pending-margin-label {
    font-size: 8px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1;
}

/* ============================================
   Modern Card Variant
   ============================================ */
.card.modern {
    box-shadow: var(--shadow);
    margin-top: var(--space-8);
}

.card.modern .card-header {
    background: var(--color-bg-secondary);
}

.card.modern .card-header h3 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card.modern .card-header h3 i {
    color: var(--primary-500);
}

/* ============================================
   Top Products List
   ============================================ */
/* ============================================
   Top Products – Zengin Kart Listesi
   ============================================ */
.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Top Products Filter */
.tp-filter-group {
    display: flex;
    gap: 2px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius);
    padding: 3px;
}

.tp-filter-btn {
    padding: 5px 14px;
    border: none;
    background: transparent;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.tp-filter-btn:hover {
    color: var(--color-text-primary);
}

.tp-filter-btn.active {
    background: var(--primary-500);
    color: var(--primary-50);
    box-shadow: 0 1px 4px var(--primary-200);
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 12px;
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.top-product-item:hover {
    background: var(--color-bg-secondary);
}

.top-product-rank {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: 13px;
    flex-shrink: 0;
    background: var(--primary-500);
    color: #fff;
}

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

.top-product-name {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-product-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Rank Badge */
.tp-rank {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: 13px;
    flex-shrink: 0;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
}

.tp-rank.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.tp-rank.silver {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #334155;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
}

.tp-rank.bronze {
    background: linear-gradient(135deg, #d4a373, #cd7f32);
    color: #451a03;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

/* Ürün Görseli */
.tp-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.tp-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    color: var(--color-text-tertiary, #94a3b8);
    font-size: 16px;
}

/* İçerik */
.tp-content {
    flex: 1;
    min-width: 0;
}

.tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: 4px;
}

.tp-name {
    font-size: 13px;
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.tp-qty {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-500, #2563eb);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Metrikler */
.tp-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.tp-metric {
    font-size: 11px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tp-metric i {
    font-size: 10px;
    opacity: 0.6;
}

.tp-metric.positive {
    color: #059669;
}

.tp-metric.negative {
    color: #dc2626;
}

/* Progress Bar */
.tp-bar-wrap {
    height: 4px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 2px;
    overflow: hidden;
}

.tp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500, #2563eb), #60a5fa);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* Skeleton Loading */
.top-products-skeleton {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.skeleton-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 12px;
}

.skeleton-item.rich {
    align-items: flex-start;
}

.skeleton-rank {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-line {
    border-radius: 4px;
    background: var(--color-bg-secondary);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-name {
    height: 14px;
    width: 65%;
}

.skeleton-meta {
    height: 12px;
    width: 40%;
}

.skeleton-bar {
    height: 4px;
    width: 80%;
    border-radius: 2px;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@media (max-width: 640px) {
    .card.modern {
        margin-top: var(--space-6);
    }

    .card-header {
        padding: var(--space-4);
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .card.modern .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tp-filter-group {
        width: 100%;
    }

    .tp-filter-btn {
        flex: 1;
        text-align: center;
        padding: 6px 8px;
    }

    .card-body {
        padding: var(--space-4);
    }

    .top-products-list {
        gap: 0;
    }

    .top-product-item {
        padding: 10px 8px;
    }

    .tp-rank {
        width: 26px;
        height: 26px;
        font-size: 11px;
        border-radius: 6px;
    }

    .tp-img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .tp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .tp-name {
        font-size: 12px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .tp-qty {
        font-size: 11px;
    }

    .tp-metrics {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tp-metric {
        font-size: 10px;
    }

    .skeleton-img {
        width: 36px;
        height: 36px;
    }

    .skeleton-rank {
        width: 26px;
        height: 26px;
    }

    .welcome-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .welcome-pending-metrics {
        width: 100%;
        justify-content: center;
    }

    .welcome-pending-margin {
        width: 48px;
        height: 48px;
    }
}

/* ============================================
   Activity Timeline
   ============================================ */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.activity-item {
    display: flex;
    gap: var(--space-3);
    position: relative;
}

.activity-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 28px;
    bottom: -16px;
    width: 2px;
    background: var(--color-border);
}

.activity-dot {
    width: 20px;
    height: 20px;
    background: var(--primary-500);
    border-radius: 50%;
    border: 3px solid var(--color-bg-primary);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.activity-time {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ============================================
   Quick Actions Card
   ============================================ */
.quick-actions-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow);
}

.quick-actions-card h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition);
}

.quick-action-btn:hover {
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.qai-primary {
    background: var(--primary-50);
    color: var(--primary-600);
}

.qai-success {
    background: var(--success-50);
    color: var(--success-600);
}

.qai-info {
    background: #dbeafe;
    color: #2563eb;
}

.qai-warning {
    background: var(--warning-50);
    color: var(--warning-600);
}

@media (max-width: 640px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Action Cards (Analytics)
   ============================================ */
.action-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.action-card {
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.action-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.action-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.action-text {
    flex: 1;
    min-width: 0;
}

.action-title {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.action-msg {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.action-products {
    margin-top: var(--space-3);
    margin-left: 44px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: var(--color-bg-primary);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    gap: var(--space-3);
}

.action-product-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.action-product-name {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.action-product-detail {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.action-product-item.action-product-hidden {
    display: none;
}

.action-product-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--primary-600);
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    transition: color var(--transition);
}

.action-product-toggle:hover {
    color: var(--primary-700);
}

/* ============================================
   Empty State Mini
   ============================================ */
.empty-state-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    text-align: center;
}

.empty-state-mini i {
    font-size: var(--text-3xl);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.empty-state-mini p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

/* ============================================
   Feature Grid (Empty State)
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    width: 100%;
    max-width: 800px;
}

.feature-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
}

.feature-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-50);
    color: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    margin: 0 auto var(--space-3);
}

.feature-card-icon-success { background: var(--success-50); color: var(--success-500); }
.feature-card-icon-warning { background: var(--warning-50); color: var(--warning-500); }
.feature-card-icon-info { background: var(--primary-50); color: var(--primary-500); }

.feature-card h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.feature-card p {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
}

@media (max-width: 480px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .empty-state {
        padding: var(--space-8) var(--space-4);
    }
}

/* ============================================
   Stores Page
   ============================================ */
.stores-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.store-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    transition: all var(--transition);
}

.store-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.store-card-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.store-card-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    object-fit: contain;
    background: var(--color-bg-secondary);
    padding: 4px;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.store-card-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-50);
    color: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.store-card-info {
    min-width: 0;
}

.store-card-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.store-card-meta i {
    margin-right: 2px;
}

.store-card-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
}

.store-card-status-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.store-status {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.02em;
}

.store-status-active {
    background: var(--success-50);
    color: var(--success-500);
}

.store-status-inactive {
    background: var(--gray-100);
    color: var(--color-text-muted);
}

.store-status-error {
    background: var(--danger-50);
    color: var(--danger-500);
}

.store-card-sync-time {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.store-card-sync-time i {
    margin-right: 2px;
    font-size: 10px;
}

.store-card-actions {
    display: flex;
    gap: var(--space-1);
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
}

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

.btn-danger-outline:hover {
    background: var(--danger-50);
    border-color: var(--danger-500);
    color: var(--danger-500);
}

@media (max-width: 768px) {
    .store-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .store-card-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-end;
    pointer-events: none;
}

.toast-notification {
    position: relative;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: var(--success-500);
    color: white;
}

.toast-error {
    background: var(--danger-500);
    color: white;
}

.toast-info {
    background: var(--gray-700);
    color: white;
}

.toast-warning {
    background: var(--warning-500);
    color: var(--gray-900);
}

/* ============================================
   Store Wizard
   ============================================ */
.wizard-container {
    max-width: 100%;
}

/* Progress Bar */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    margin-bottom: var(--space-6);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.wizard-step .step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.wizard-step.active {
    color: var(--primary-500);
}

.wizard-step.active .step-dot {
    background: var(--primary-500);
    color: white;
}

.wizard-step.completed .step-dot {
    background: var(--success-500);
    color: white;
    font-size: 10px;
}

.wizard-step.completed {
    color: var(--success-500);
}

/* Wizard Card */
.wizard-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.wizard-card-header {
    margin-bottom: var(--space-6);
}

.wizard-card-header h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.wizard-card-header p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Wizard Form */
.wizard-form-group {
    margin-bottom: var(--space-5);
}

.wizard-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.wizard-label i {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.wizard-input {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--text-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: all var(--transition);
    font-family: inherit;
}

.wizard-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.wizard-hint {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.wizard-error {
    display: block;
    font-size: var(--text-xs);
    color: var(--danger-500);
    margin-top: var(--space-1);
}

.wizard-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* Marketplace Selection */
.wizard-container .marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
}

.marketplace-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.marketplace-option input[type="radio"] {
    display: none;
}

.marketplace-option:hover {
    border-color: var(--gray-300);
}

.marketplace-option.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.marketplace-option-check {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-500);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.marketplace-option.selected .marketplace-option-check {
    display: flex;
}

.marketplace-option-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius);
}

.marketplace-option-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: var(--color-text-muted);
}

.marketplace-option-name {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
}

/* Trust Box - Always Visible */
.wizard-trust-box.always-visible {
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg, 12px);
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: var(--space-4) var(--space-5);
}

.wizard-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: #fff;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: var(--space-4);
}

.wizard-trust-badge i {
    font-size: 13px;
}

.wizard-trust-box.always-visible .wizard-trust-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    padding: 0;
}

.wizard-trust-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.7);
    padding: var(--space-3);
    border-radius: var(--radius);
    border: 1px solid rgba(22, 163, 74, 0.1);
}

.wizard-trust-item > i {
    color: #16a34a;
    font-size: 15px;
    margin-top: 1px;
    flex-shrink: 0;
}

.wizard-trust-item strong {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: #15803d;
    margin-bottom: 2px;
}

.wizard-trust-item span {
    display: block;
    font-size: 11px;
    color: #166534;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .wizard-trust-box.always-visible .wizard-trust-items {
        grid-template-columns: 1fr;
    }

    .wizard-trust-box.always-visible {
        padding: var(--space-3) var(--space-4);
    }
}

/* Dark theme */
[data-theme="dark"] .wizard-trust-box.always-visible {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.15) 100%);
    border-color: rgba(22, 163, 74, 0.25);
}

[data-theme="dark"] .wizard-trust-badge {
    background: rgba(22, 163, 74, 0.8);
}

[data-theme="dark"] .wizard-trust-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(22, 163, 74, 0.15);
}

[data-theme="dark"] .wizard-trust-item > i {
    color: #4ade80;
}

[data-theme="dark"] .wizard-trust-item strong {
    color: #86efac;
}

[data-theme="dark"] .wizard-trust-item span {
    color: #bbf7d0;
}

/* Help Box */
.wizard-help-box {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--primary-50);
    border-radius: var(--radius);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
}

.wizard-help-icon {
    color: var(--primary-500);
    font-size: var(--text-lg);
    flex-shrink: 0;
    margin-top: 2px;
}

.wizard-help-box strong {
    display: block;
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.wizard-help-box p {
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.wizard-help-box a {
    color: var(--primary-500);
    font-weight: var(--font-medium);
}

/* Error Box */
.wizard-error-box {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    font-size: var(--text-sm);
}

.wizard-error-box > i {
    color: #dc2626;
    font-size: var(--text-lg);
    flex-shrink: 0;
    margin-top: 2px;
}

.wizard-error-box strong {
    display: block;
    color: #991b1b;
    margin-bottom: var(--space-1);
}

.wizard-error-box p {
    color: #b91c1c;
    margin: 0;
    line-height: 1.5;
}

[data-theme="dark"] .wizard-error-box {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .wizard-error-box strong {
    color: #fca5a5;
}

[data-theme="dark"] .wizard-error-box p {
    color: #fecaca;
}

/* Coming Soon Marketplace */
.marketplace-option.marketplace-coming-soon {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.marketplace-coming-badge {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    font-size: 10px;
    font-weight: var(--font-bold);
    color: var(--color-text-muted);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .marketplace-coming-badge {
    background: var(--gray-800);
    color: var(--gray-400);
}

/* Apple-style Wizard Hero */
.wizard-apple-hero {
    text-align: center;
    padding: var(--space-6) 0 var(--space-8);
}

.wizard-apple-greeting {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
    font-weight: var(--font-normal);
}

.wizard-apple-title {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.wizard-apple-subtitle {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.wizard-apple-subtitle strong {
    color: var(--primary-500);
    font-weight: var(--font-semibold);
}

@media (max-width: 640px) {
    .wizard-apple-title {
        font-size: 1.5rem;
    }

    .wizard-apple-hero {
        padding: var(--space-4) 0 var(--space-6);
    }
}

/* Main Marketplace Card (Trendyol — center, big) */
.wz-main-marketplace {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.wz-main-mp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-6) var(--space-8);
    border: 2px solid var(--primary-500);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    background: var(--color-bg-primary);
    transition: all 0.2s;
    min-width: 220px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wz-main-mp-card input[type="radio"] {
    display: none;
}

.wz-main-mp-check {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-500);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.wz-main-mp-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius);
}

.wz-main-mp-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--color-text-muted);
}

.wz-main-mp-name {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

.wz-main-mp-desc {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Other Marketplaces (coming soon — small row) */
.wz-other-marketplaces {
    text-align: center;
    margin-bottom: var(--space-6);
}

.wz-other-mp-label {
    display: inline-block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-medium);
}

.wz-other-mp-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

.wz-other-mp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    opacity: 0.45;
}

.wz-other-mp-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: var(--radius-sm, 4px);
    filter: grayscale(1);
}

.wz-other-mp-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm, 4px);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--color-text-muted);
}

.wz-other-mp-item span {
    font-size: 11px;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .wz-main-mp-card {
        min-width: unset;
        width: 100%;
        padding: var(--space-5) var(--space-4);
    }
}

/* Trust Cards */
.wizard-trust-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.wizard-trust-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.wizard-trust-card > i {
    color: var(--success-500);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.wizard-trust-card strong {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.wizard-trust-card span {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

@media (max-width: 640px) {
    .wizard-trust-cards {
        grid-template-columns: 1fr;
    }
}

/* Trust Banner (Compact) */
.wizard-trust-banner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
    color: #15803d;
}

.wizard-trust-banner > i {
    color: #16a34a;
    font-size: 16px;
    flex-shrink: 0;
}

.wizard-trust-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: #16a34a;
    font-size: var(--text-xs);
    cursor: pointer;
    white-space: nowrap;
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: 4px;
}

.wizard-trust-toggle i {
    font-size: 10px;
    transition: transform 0.2s;
}

[data-theme="dark"] .wizard-trust-banner {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.15) 100%);
    border-color: rgba(22, 163, 74, 0.25);
    color: #86efac;
}

[data-theme="dark"] .wizard-trust-toggle {
    color: #4ade80;
}

/* Trust Collapse */
.wizard-trust-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-bottom: var(--space-5);
}

.wizard-trust-collapse.wizard-trust-open {
    max-height: 300px;
}

.wizard-trust-collapse-items {
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    border: 1px solid #bbf7d0;
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(240, 253, 244, 0.5);
}

.wizard-trust-collapse-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: #166534;
}

.wizard-trust-collapse-item i {
    color: #16a34a;
    font-size: 12px;
    flex-shrink: 0;
}

[data-theme="dark"] .wizard-trust-collapse-items {
    background: rgba(22, 163, 74, 0.05);
    border-color: rgba(22, 163, 74, 0.25);
}

[data-theme="dark"] .wizard-trust-collapse-item {
    color: #bbf7d0;
}

/* API Test Result */
.wizard-test-result {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    animation: wizardFadeIn 0.3s ease;
}

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

.wizard-test-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.wizard-test-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

[data-theme="dark"] .wizard-test-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}

[data-theme="dark"] .wizard-test-error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

/* Input Status Icon */
.wizard-input-wrapper {
    position: relative;
}

.wizard-input-wrapper .wizard-input {
    padding-right: 36px;
}

.wizard-input-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* Footer Actions */
.wizard-footer-actions {
    display: flex;
    gap: var(--space-2);
}

@media (max-width: 640px) {
    .wizard-footer-actions {
        flex-direction: column;
    }

    .wizard-trust-banner {
        flex-wrap: wrap;
    }

    .wizard-trust-toggle {
        margin-left: 0;
        margin-top: var(--space-1);
    }
}

/* Free Trial Banner */
.wizard-free-trial-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.wizard-free-trial-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #16a34a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.wizard-free-trial-content strong {
    display: block;
    font-size: var(--text-base);
    color: #15803d;
    margin-bottom: 4px;
}

.wizard-free-trial-content span {
    font-size: var(--text-sm);
    color: #166534;
}

[data-theme="dark"] .wizard-free-trial-banner {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.18) 100%);
    border-color: rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .wizard-free-trial-content strong {
    color: #86efac;
}

[data-theme="dark"] .wizard-free-trial-content span {
    color: #bbf7d0;
}

@media (max-width: 640px) {
    .wizard-free-trial-banner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
        padding: var(--space-4);
    }
}

/* Strikethrough Original Price */
.wz-original-price {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    margin-right: var(--space-2);
}

/* Popular Plan Enhanced — sadece badge, ekstra border/shadow yok */
.usub-pricing-card.popular {
    transform: none;
    box-shadow: none;
}

/* Confetti Animation */
.wizard-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confettiFall 3s ease-in forwards;
}

.confetti-piece:nth-child(1) { left: 10%; background: #2563eb; animation-delay: 0s; border-radius: 50%; }
.confetti-piece:nth-child(2) { left: 20%; background: #10b981; animation-delay: 0.2s; }
.confetti-piece:nth-child(3) { left: 30%; background: #f59e0b; animation-delay: 0.1s; border-radius: 50%; }
.confetti-piece:nth-child(4) { left: 40%; background: #ef4444; animation-delay: 0.3s; }
.confetti-piece:nth-child(5) { left: 50%; background: #8b5cf6; animation-delay: 0.15s; border-radius: 50%; }
.confetti-piece:nth-child(6) { left: 60%; background: #2563eb; animation-delay: 0.25s; }
.confetti-piece:nth-child(7) { left: 70%; background: #10b981; animation-delay: 0.05s; border-radius: 50%; }
.confetti-piece:nth-child(8) { left: 80%; background: #f59e0b; animation-delay: 0.35s; }
.confetti-piece:nth-child(9) { left: 15%; background: #ef4444; animation-delay: 0.4s; border-radius: 50%; }
.confetti-piece:nth-child(10) { left: 45%; background: #8b5cf6; animation-delay: 0.1s; }
.confetti-piece:nth-child(11) { left: 65%; background: #2563eb; animation-delay: 0.3s; border-radius: 50%; }
.confetti-piece:nth-child(12) { left: 85%; background: #10b981; animation-delay: 0.2s; }

@keyframes confettiFall {
    0% { top: -10px; opacity: 1; transform: rotate(0deg) scale(1); }
    50% { opacity: 1; }
    100% { top: 100vh; opacity: 0; transform: rotate(720deg) scale(0.5); }
}

/* Inline Settings in Sync Page */
.wizard-inline-settings {
    margin-top: var(--space-6);
    animation: wizardFadeIn 0.5s ease;
}

.wizard-settings-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.wizard-settings-divider::before,
.wizard-settings-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.wizard-settings-divider span {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    white-space: nowrap;
}

.wizard-settings-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-5);
    text-align: center;
}

/* Summary (Step 3) */
.wizard-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.wizard-summary-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius);
}

.wizard-summary-item > i {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary-50);
    color: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wizard-summary-item strong {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

.wizard-summary-item span {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Info Box */
.wizard-info-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--warning-50);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.wizard-info-box > i {
    color: var(--warning-500);
    margin-top: 2px;
}

.wizard-info-box p {
    margin: 0;
    line-height: 1.5;
}

.wizard-info-box--primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: var(--primary-500);
}

.wizard-info-box--primary > i {
    color: var(--primary-500);
}

.wizard-footer--center {
    justify-content: center;
}

/* Sync Progress */
.wizard-sync-spinner {
    font-size: 2.5rem;
    color: var(--primary-500);
    margin-bottom: var(--space-4);
}

.wizard-sync-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4) 0;
}

.sync-step {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    padding: var(--space-2) 0;
}

.sync-step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    background: var(--gray-100);
    color: var(--color-text-muted);
}

.sync-step-loading .sync-step-icon {
    background: var(--primary-50);
    color: var(--primary-500);
}

.sync-step-done {
    color: var(--success-500);
}

.sync-step-done .sync-step-icon {
    background: var(--success-500);
    color: white;
}

/* Success / Error states */
.wizard-success-icon {
    font-size: 3rem;
    color: var(--success-500);
    margin-bottom: var(--space-4);
}

.wizard-error-icon {
    font-size: 3rem;
    color: var(--warning-500);
    margin-bottom: var(--space-4);
}

.wizard-result-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-6) 0;
}

.wizard-result-stat {
    text-align: center;
}

.wizard-result-value {
    display: block;
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--primary-500);
}

.wizard-result-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-5);
}

/* Wizard Settings */
.wizard-settings-section {
    margin-bottom: var(--space-5);
}

.wizard-settings-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.wizard-settings-title i {
    width: 16px;
    text-align: center;
    color: var(--primary-500);
    opacity: 0.8;
}

/* Wizard Cost Table */
.wizard-cost-table {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.wizard-cost-header {
    display: grid;
    grid-template-columns: 1fr 60px 90px 100px;
    gap: 8px;
    padding: 10px 14px;
    background: var(--color-surface-secondary);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wizard-cost-row {
    display: grid;
    grid-template-columns: 1fr 60px 90px 100px;
    gap: 8px;
    align-items: center;
    padding: 8px 14px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
}

.wizard-cost-row:first-child {
    border-top: none;
}

.wizard-cost-product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wizard-cost-img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.wizard-cost-img-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-text-tertiary);
    font-size: 14px;
}

.wizard-cost-product-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wizard-cost-product-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-cost-product-sku {
    font-size: 10px;
    color: var(--color-text-tertiary);
}

.wizard-cost-col-sold {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.wizard-cost-col-price {
    text-align: right;
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.wizard-cost-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 12px;
    text-align: right;
    background: var(--color-surface-primary);
    color: var(--color-text-primary);
    transition: border-color 0.15s;
}

.wizard-cost-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.wizard-cost-input::placeholder {
    color: var(--color-text-tertiary);
}

@media (max-width: 640px) {
    .wizard-progress {
        gap: 0;
    }

    .wizard-step span {
        display: none;
    }

    .wizard-card {
        padding: var(--space-4);
    }

    .wizard-form-row {
        grid-template-columns: 1fr;
    }

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

    .wizard-result-stats {
        gap: var(--space-6);
    }

    .wizard-cost-header,
    .wizard-cost-row {
        grid-template-columns: 1fr 50px 70px 80px;
        gap: 4px;
        padding: 8px 10px;
    }

    .wizard-cost-img {
        width: 28px;
        height: 28px;
    }

    .wizard-cost-img-placeholder {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Store Edit Page
   ============================================ */
.store-edit-container {
    max-width: 100%;
}

.edit-marketplace-banner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: var(--space-6);
}

.edit-marketplace-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    object-fit: contain;
    background: white;
    border: 1px solid var(--color-border);
    padding: 4px;
    flex-shrink: 0;
}

.edit-marketplace-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-500);
    color: white;
    font-size: var(--text-lg);
    border: none;
    padding: 0;
}

.edit-marketplace-banner > div:nth-child(2) {
    flex: 1;
}

.edit-marketplace-banner > div:nth-child(2) strong {
    display: block;
    color: var(--color-text-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

.edit-marketplace-banner > div:nth-child(2) span {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.edit-store-status {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.edit-store-status.status-active {
    background: var(--green-50, #f0fdf4);
    color: var(--green-600, #16a34a);
}

.edit-store-status.status-active i {
    font-size: 6px;
    color: var(--green-500, #22c55e);
}

.edit-store-status.status-inactive {
    background: var(--gray-100);
    color: var(--color-text-muted);
}

.edit-store-status.status-inactive i {
    font-size: 6px;
}

.edit-section {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.edit-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.edit-section-header i {
    color: var(--primary-500);
}

.edit-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.edit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-5);
}

.edit-actions-right {
    display: flex;
    gap: var(--space-3);
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-box {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 480px;
    width: 100%;
    animation: fadeInUp 0.2s ease;
}

.modal-box-header {
    text-align: center;
    margin-bottom: var(--space-4);
}

.modal-box-header i {
    font-size: 2.5rem;
    color: #dc2626;
    margin-bottom: var(--space-3);
    display: block;
}

.modal-box-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin: 0;
}

.modal-box p {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.modal-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3);
    background: #fef2f2;
    border-radius: var(--radius);
    font-size: var(--text-xs);
    color: #b91c1c;
    margin-bottom: var(--space-5);
}

.modal-warning i {
    color: #dc2626;
    margin-top: 2px;
    flex-shrink: 0;
}

[data-theme="dark"] .modal-warning {
    background: rgba(220, 38, 38, 0.1);
    color: #fecaca;
}

[data-theme="dark"] .modal-warning i {
    color: #f87171;
}

.modal-box-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

/* Store Edit Mobile */
@media (max-width: 768px) {
    .edit-form-row {
        grid-template-columns: 1fr;
    }

    .edit-marketplace-banner {
        flex-wrap: wrap;
    }

    .edit-store-status {
        margin-left: auto;
    }

    .edit-actions {
        flex-direction: column;
        gap: var(--space-3);
    }

    .edit-actions-right {
        width: 100%;
    }

    .edit-actions-right .btn {
        flex: 1;
    }

    .edit-actions > .btn-danger-outline {
        width: 100%;
    }

    .modal-box {
        margin: var(--space-4);
    }

    .modal-box-actions {
        flex-direction: column;
    }
}

/* ============================================
   Products Page
   ============================================ */

/* Stats Grid */
.products-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

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

.products-stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-surface-primary);
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.products-stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.products-stat-card.products-stat-active {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 1px var(--primary-200);
}

.products-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-50);
    color: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    flex-shrink: 0;
}

.products-stat-warning .products-stat-icon {
    background: #fef3c7;
    color: #d97706;
}

.products-stat-danger .products-stat-icon {
    background: var(--danger-50);
    color: var(--danger-600);
}

.products-stat-value {
    display: block;
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: 1.2;
}

.products-stat-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.products-active-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.products-active-filter i {
    margin-right: var(--space-1);
}

.products-active-filter-clear {
    color: var(--primary-600);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    transition: color var(--transition);
}

.products-active-filter-clear:hover {
    color: var(--danger-600);
}

/* Filter Bar */
.products-filter-bar {
    background: var(--color-surface-primary);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.products-filter-form {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.products-filter-search {
    position: relative;
    flex: 2;
    min-width: 200px;
}

.products-filter-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.products-filter-search input {
    width: 100%;
    padding: var(--space-2) var(--space-3) var(--space-2) 36px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    background: var(--color-surface-secondary);
    color: var(--color-text-primary);
    transition: border-color var(--transition);
}

.products-filter-search input:focus {
    outline: none;
    border-color: var(--primary-500);
}

.products-filter-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    background: var(--color-surface-secondary);
    color: var(--color-text-primary);
    min-width: 120px;
    cursor: pointer;
}

.products-filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* Product List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.product-card {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
}

.product-card-main {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.product-card-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-50);
    color: var(--primary-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.product-card-title {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.product-card-title:hover {
    color: var(--primary-500);
}

.product-card-meta {
    display: flex;
    gap: var(--space-3);
    font-size: 11px;
    color: var(--color-text-muted);
}

.product-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card-stats {
    display: flex;
    gap: var(--space-5);
    align-items: center;
}

.product-card-stat {
    text-align: center;
    min-width: 65px;
}

.product-card-stat-value {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.product-card-stat-value.stock-low {
    color: #dc2626;
}

.product-card-stat-label {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-margin-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-semibold);
    margin-top: 2px;
}

.margin-high {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.margin-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.margin-low {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.product-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-semibold);
}

.product-status-badge.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.product-status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.product-status-badge.status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.product-card-actions {
    display: flex;
    gap: var(--space-1);
    flex-shrink: 0;
}

.btn-icon-danger:hover {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
}

/* Product Inline Edit */
.product-inline-edit {
    min-width: 65px;
}

.inline-edit-field {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

.inline-edit-input {
    width: 64px;
    padding: 3px 5px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    text-align: center;
    transition: all 0.15s ease;
    -moz-appearance: textfield;
    appearance: textfield;
}

.inline-edit-input::-webkit-outer-spin-button,
.inline-edit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.inline-edit-input:hover {
    border-color: var(--color-text-tertiary);
    background: var(--color-surface-primary);
    cursor: text;
}

.inline-edit-input:focus {
    outline: none;
    border-color: var(--primary-400);
    background: var(--color-surface-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.inline-edit-suffix {
    font-size: 10px;
    color: #94a3b8;
}

.inline-edit-select {
    padding: 3px 20px 3px 8px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    transition: all 0.15s ease;
}

.inline-edit-select:hover {
    border-color: var(--color-text-tertiary);
    background-color: var(--color-surface-primary);
}

.inline-edit-select:focus {
    outline: none;
    border-color: var(--primary-400);
    background-color: var(--color-surface-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.inline-edit-field.inline-edit-saving {
    opacity: 0.5;
    pointer-events: none;
}

.inline-edit-field.inline-edit-success .inline-edit-input,
.inline-edit-field.inline-edit-success .inline-edit-select {
    border-color: #10b981;
    background: var(--success-50);
}

.inline-edit-field.inline-edit-error .inline-edit-input,
.inline-edit-field.inline-edit-error .inline-edit-select {
    border-color: #ef4444;
    background: var(--danger-50);
}

/* Inline Edit Spinner */
.inline-edit-spinner {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-500);
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.inline-edit-spinner.active {
    opacity: 1;
    visibility: visible;
}

/* Small Toast Styles */
.small-toast {
    font-size: 13px !important;
}

.small-toast-title {
    font-size: 13px !important;
    margin: 0 !important;
}

.small-toast-icon {
    width: 1.5em !important;
    height: 1.5em !important;
    margin: 0 8px 0 0 !important;
}

/* Pagination */
.products-pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--space-5);
}

/* ── Mavikon Pager ─────────────────────────────────────── */
.mav-pager {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.mav-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface-1, #fff);
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.mav-pager-btn:hover {
    background: var(--primary-50, #f0f9ff);
    border-color: var(--primary-300, #7dd3fc);
    color: var(--primary-600, #0284c7);
}

.mav-pager-btn.active {
    background: var(--primary-600, #0284c7);
    border-color: var(--primary-600, #0284c7);
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}

/* Products Mobile */
@media (max-width: 1024px) {
    .product-card-stats {
        display: none;
    }
}

@media (max-width: 768px) {
    .products-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .products-stats-grid.stats-col-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-stats-grid.stats-col-3 .products-stat-card:last-child {
        grid-column: 1 / -1;
    }

    .products-filter-form {
        flex-direction: column;
    }

    .products-filter-search {
        width: 100%;
        min-width: auto;
    }

    .products-filter-select {
        width: 100%;
    }

    .product-card-main {
        flex-wrap: wrap;
    }

    .product-card-info {
        flex: 1 0 calc(100% - 64px);
    }

    .product-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   Product Detail Page
   ============================================ */

/* Top Grid: Score + Stats */
.detail-top-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-5);
}

/* Performance Score Card */
.detail-score-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.detail-score-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-50);
    color: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.detail-score-value {
    font-size: 36px;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: 1;
}

.detail-score-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-medium);
}

.detail-score-breakdown {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    width: 100%;
    justify-content: center;
}

.detail-score-item {
    text-align: center;
}

.detail-score-item span {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-score-item strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.detail-score-item small {
    font-size: 10px;
    color: var(--color-text-tertiary);
}

/* Detail Stats Grid */
.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    align-content: start;
}

/* Section Card */
.detail-section-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}

.detail-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.detail-section-title i {
    font-size: 18px;
}

/* Return Cost Info Bar */
.return-cost-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--color-border);
}

.return-cost-bar i {
    color: var(--color-text-tertiary);
    font-size: 13px;
    flex-shrink: 0;
}

.return-cost-bar strong {
    color: var(--color-text-secondary);
    font-weight: var(--font-medium);
}

/* Alert / Recommendation Cards */
.detail-alert {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.detail-alert:last-child {
    margin-bottom: 0;
}

.detail-alert-warning {
    background: var(--warning-50);
    border-left: 3px solid var(--warning-500);
}

.detail-alert-danger {
    background: var(--danger-50);
    border-left: 3px solid var(--danger-500);
}

.detail-alert-success {
    background: var(--success-50);
    border-left: 3px solid var(--success-500);
}

.detail-alert-info {
    background: var(--primary-50);
    border-left: 3px solid var(--primary-500);
}

.detail-alert-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.detail-alert-warning .detail-alert-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-600);
}

.detail-alert-danger .detail-alert-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-600);
}

.detail-alert-success .detail-alert-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-600);
}

.detail-alert-info .detail-alert-icon {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-600);
}

.detail-alert strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.detail-alert p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.detail-alert-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: var(--font-semibold);
    color: var(--primary-500);
    margin-top: var(--space-2);
}

/* Sales History Table */
.detail-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.detail-table thead th {
    padding: var(--space-3) var(--space-4);
    font-size: 11px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    background: var(--color-surface-secondary);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.detail-table tbody td {
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

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

.detail-table tbody tr:hover {
    background: var(--color-surface-secondary);
}

/* Action Buttons */
.detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

/* Product Detail - Utility Classes */
.detail-stat-icon-danger {
    background: #fef2f2;
    color: #dc2626;
}

.detail-section-title i {
    color: var(--primary-500);
}

.detail-section-title .icon-warning {
    color: #d97706;
}

.detail-chart-container {
    height: 300px;
}

.detail-table .text-center {
    text-align: center;
}

.detail-table .text-right {
    text-align: right;
}

.detail-empty-state {
    padding: var(--space-8) 0;
}

/* Product Detail Dark Mode */
[data-theme="dark"] .detail-score-icon {
    background: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .detail-stat-icon-danger {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

[data-theme="dark"] .detail-alert-warning {
    background: rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .detail-alert-danger {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .detail-alert-success {
    background: rgba(16, 185, 129, 0.08);
}

[data-theme="dark"] .detail-alert-info {
    background: rgba(37, 99, 235, 0.08);
}

/* Product Detail Responsive */
@media (max-width: 1024px) {
    .detail-top-grid {
        grid-template-columns: 1fr;
    }

    .detail-score-card {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-4);
    }

    .detail-score-breakdown {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }

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

@media (max-width: 768px) {
    .detail-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-section-card {
        padding: var(--space-4);
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Product Edit Page
   ============================================ */

/* Product Info Banner */
.pedit-product-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--color-surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
}

.pedit-product-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--primary-50);
    color: var(--primary-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

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

.pedit-product-info strong {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pedit-product-meta {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.pedit-product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Grid Layout */
.pedit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: start;
}

/* Card */
.pedit-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.pedit-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.pedit-card-header i {
    color: var(--primary-500);
    font-size: 16px;
}

/* Current Value Display */
.pedit-current-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface-secondary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.pedit-current-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.pedit-current-amount {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

/* Currency Input */
.pedit-currency-input {
    position: relative;
}

.pedit-currency-input .wizard-input {
    padding-right: 40px;
}

.pedit-currency-symbol {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    pointer-events: none;
}

/* Form Actions */
.pedit-form-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.pedit-form-actions .btn {
    flex: 1;
}

/* Profit Card */
.pedit-profit-card {
    margin-bottom: 0;
}

.pedit-profit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.pedit-profit-header .pedit-card-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
}

.pedit-badge-success {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-size: 12px;
    font-weight: var(--font-semibold);
    flex-shrink: 0;
}

.pedit-profit-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--primary-50);
    color: var(--primary-600);
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
}

/* Profit Summary */
.pedit-profit-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.pedit-profit-summary-item {
    background: var(--color-surface-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    text-align: center;
}

.pedit-profit-summary-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.pedit-profit-summary-value {
    display: block;
    font-size: 24px;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: 1.2;
}

.pedit-profit-summary-unit {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Profit Section */
.pedit-profit-section {
    margin-bottom: var(--space-4);
}

.pedit-profit-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-3);
}

.pedit-profit-section-title i {
    font-size: 12px;
}

.pedit-profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

.pedit-profit-row:last-child {
    border-bottom: none;
}

.pedit-profit-row i {
    margin-right: 4px;
    font-size: 11px;
    opacity: 0.6;
}

.pedit-profit-row small {
    font-size: 11px;
    opacity: 0.7;
}

.pedit-profit-row-total {
    border-top: 1px dashed var(--color-border);
    border-bottom: none;
    padding-top: var(--space-3);
    margin-top: var(--space-2);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

/* Net Profit Box */
.pedit-net-profit {
    text-align: center;
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    color: white;
    margin-top: var(--space-4);
}

.pedit-net-positive {
    background: linear-gradient(135deg, #059669, #047857);
}

.pedit-net-negative {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.pedit-net-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: var(--space-2);
}

.pedit-net-value {
    display: block;
    font-size: 36px;
    font-weight: var(--font-bold);
    line-height: 1;
}

.pedit-net-margin {
    display: block;
    font-size: var(--text-base);
    margin-top: var(--space-2);
    opacity: 0.9;
}

/* Per Unit Stats */
.pedit-unit-stats {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--color-surface-secondary);
    border-radius: var(--radius-lg);
}

.pedit-unit-stats-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-3);
}

.pedit-unit-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    text-align: center;
}

.pedit-unit-value {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.pedit-unit-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
}

/* No Data State */
.pedit-no-data {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.pedit-no-data-icon {
    width: 64px;
    height: 64px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 24px;
    color: var(--color-text-muted);
}

.pedit-no-data h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.pedit-no-data p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Estimate Box */
.pedit-estimate {
    background: var(--color-surface-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}

.pedit-estimate-title {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-3);
}

.pedit-estimate-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    background: var(--warning-50);
    color: var(--warning-600);
    font-size: 12px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
    line-height: 1.5;
}

.pedit-estimate-warning i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Product Edit Dark Mode */
[data-theme="dark"] .pedit-product-icon {
    background: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .pedit-profit-info {
    background: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .pedit-badge-success {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .pedit-estimate-warning {
    background: rgba(245, 158, 11, 0.1);
}

/* Product Edit Responsive */
@media (max-width: 1024px) {
    .pedit-grid {
        grid-template-columns: 1fr;
    }

    .pedit-profit-card {
        margin-bottom: var(--space-5);
    }
}

@media (max-width: 768px) {
    .pedit-product-banner {
        flex-wrap: wrap;
    }

    .pedit-product-banner .btn {
        width: 100%;
    }

    .pedit-net-value {
        font-size: 28px;
    }

    .pedit-form-actions {
        flex-direction: column;
    }
}

/* ============================================
   Orders Page
   ============================================ */

/* Status Tabs */
.orders-status-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.orders-status-tab {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--color-surface-primary);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.orders-status-tab:hover {
    color: var(--primary-500);
    box-shadow: var(--shadow-md);
}

.orders-status-tab.active {
    background: var(--primary-500);
    color: white;
}

.orders-tab-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--font-semibold);
}

.orders-status-tab.active .orders-tab-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Filter Bar */
.orders-filter-bar {
    background: var(--color-surface-primary);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.orders-filter-form {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

/* Order Card */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.order-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    transition: box-shadow 0.15s;
}

.order-card:hover {
    box-shadow: var(--shadow-md);
}

.order-card-main {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.order-card-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.order-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-card-image i {
    color: var(--color-text-muted);
    font-size: 18px;
}

.order-card-info {
    flex: 1;
    min-width: 0;
}

.order-card-title {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-card-title:hover {
    color: var(--primary-500);
}

.order-card-meta {
    display: flex;
    gap: var(--space-3);
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.order-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-card-stats {
    display: flex;
    gap: var(--space-5);
    align-items: center;
}

.order-card-stat {
    text-align: center;
    min-width: 70px;
}

.order-card-stat-value {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.order-card-stat-label {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Over-limit Order Blur */
.order-card-over-limit {
    position: relative;
    overflow: hidden;
    border: 1px dashed var(--color-border-secondary);
}
.order-card-over-limit:hover {
    box-shadow: var(--shadow-sm);
}
.order-card-blur-content {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}
.order-limit-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(1px);
}
.order-limit-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 10px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-primary);
}
.order-limit-message i {
    color: var(--primary-500);
    font-size: 16px;
}
.order-limit-message .btn {
    padding: 4px 14px;
    font-size: 12px;
    border-radius: var(--radius-md);
}

/* Order Status Badges */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--font-semibold);
    white-space: nowrap;
    flex-shrink: 0;
}

.order-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.order-status-badge.delivered { background: rgba(16, 185, 129, 0.1); color: #065f46; }
.order-status-badge.delivered::before { background: #10b981; }
.order-status-badge.shipped { background: rgba(59, 130, 246, 0.1); color: #1e40af; }
.order-status-badge.shipped::before { background: #3b82f6; }
.order-status-badge.pending { background: rgba(245, 158, 11, 0.1); color: #92400e; }
.order-status-badge.pending::before { background: #f59e0b; }
.order-status-badge.cancelled { background: rgba(239, 68, 68, 0.1); color: #991b1b; }
.order-status-badge.cancelled::before { background: #ef4444; }
.order-status-badge.returned { background: rgba(139, 92, 246, 0.1); color: #5b21b6; }
.order-status-badge.returned::before { background: #8b5cf6; }

/* İhracat Badge */
.order-export-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-semibold);
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.order-export-badge i { font-size: 10px; }
[data-theme="dark"] .order-export-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Yurtiçi Badge */
.order-domestic-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.order-domestic-badge i { font-size: 10px; }
[data-theme="dark"] .order-domestic-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

/* İhracat Filtre Toggle */
.order-export-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-600);
    transition: all 0.15s;
    white-space: nowrap;
}
.order-export-filter-toggle:has(input:checked) {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #065f46;
}
.order-export-filter-toggle input { display: none; }
[data-theme="dark"] .order-export-filter-toggle {
    background: var(--gray-800);
    border-color: var(--gray-700);
    color: var(--gray-400);
}
[data-theme="dark"] .order-export-filter-toggle:has(input:checked) {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Order Badges Container */
.order-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* Tahmini / Kesinleşmiş Badge */
.badge-estimated {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.order-estimated-badge {
    font-size: 9px;
    font-weight: 600;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 2px;
}

/* Tahmini Veri Bilgi Kutusu (Sipariş Detay) */
.estimated-info-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.estimated-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.estimated-info-content h5 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
}

.estimated-info-content p {
    margin: 0;
    font-size: 12px;
    color: #78716c;
    line-height: 1.5;
}

/* Dark mode */
[data-theme="dark"] .badge-estimated {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .order-estimated-badge {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .estimated-info-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.08) 100%);
    border-color: rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .estimated-info-content h5 { color: #fbbf24; }
[data-theme="dark"] .estimated-info-content p { color: #a8a29e; }

/* Cancelled info box */
.cancelled-info-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.06) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}
.cancelled-info-icon {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}
.cancelled-info-title { color: #991b1b !important; }

[data-theme="dark"] .cancelled-info-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="dark"] .cancelled-info-icon {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}
[data-theme="dark"] .cancelled-info-title { color: #fca5a5 !important; }

/* Orders Dark Mode */
[data-theme="dark"] .orders-status-tab {
    background: var(--color-surface-primary);
}

[data-theme="dark"] .orders-tab-count {
    background: rgba(255, 255, 255, 0.08);
}

/* Orders Responsive */
@media (max-width: 1024px) {
    .order-card-stats {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    .order-card-stat {
        min-width: auto;
    }
}
@media (max-width: 480px) {
    .order-card-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
        width: 100%;
        margin-top: var(--space-2);
    }
}

@media (max-width: 768px) {
    .orders-status-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-2);
    }

    .orders-status-tab {
        white-space: nowrap;
    }

    .orders-filter-form {
        flex-direction: column;
    }

    .orders-filter-form .products-filter-search,
    .orders-filter-form .products-filter-select {
        width: 100%;
        min-width: auto;
    }

    .order-card-main {
        flex-wrap: wrap;
    }

    .order-card-info {
        flex: 1 0 calc(100% - 64px);
    }

    .order-status-badge {
        margin-left: auto;
    }
}

/* Order Multi-Item Expand/Collapse */
.order-multi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-600);
    background: rgba(37, 99, 235, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 6px;
    vertical-align: middle;
}
.order-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.order-expand-btn:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}
.order-expand-icon {
    font-size: 11px;
    transition: transform 0.2s ease;
}
.order-sub-items {
    padding: 0 var(--space-4) var(--space-3);
    border-top: 1px solid var(--color-border-primary);
}
.order-sub-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-size: var(--text-xs);
}
.order-sub-item:not(:last-child) {
    border-bottom: 1px dashed var(--color-border-primary);
}
.order-sub-tree {
    color: var(--color-text-muted);
    font-family: monospace;
    font-size: 14px;
    width: 16px;
    flex-shrink: 0;
}
.order-sub-thumb {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}
.order-sub-thumb-empty {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 12px;
    flex-shrink: 0;
}
.order-sub-info {
    flex: 1;
    min-width: 0;
}
.order-sub-name {
    display: block;
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-sub-sku {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
}
.order-sub-qty {
    color: var(--color-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}
.order-sub-price {
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .order-sub-item {
        flex-wrap: wrap;
    }
    .order-sub-info {
        flex: 1 0 calc(100% - 60px);
    }
    .order-sub-qty,
    .order-sub-price {
        font-size: 11px;
    }
}

/* ========================================
   PRICE CALCULATOR
   ======================================== */

.pcalc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.pcalc-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.pcalc-card-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pcalc-card-header i {
    color: var(--primary-500);
}

/* Tabs */
.calc-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.calc-tab {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-primary);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.calc-tab:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.calc-tab.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.calc-form {
    display: none;
}

.calc-form.active {
    display: block;
}

/* Form Groups */
.pcalc-form-group {
    margin-bottom: var(--space-4);
}

.pcalc-row {
    display: flex;
    gap: var(--space-4);
}

.pcalc-row .pcalc-form-group {
    flex: 1;
}

.pcalc-input-group {
    display: flex;
    position: relative;
}

.pcalc-input-group .wizard-input {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    flex: 1;
}

.pcalc-input-suffix {
    padding: 10px 16px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.pcalc-type-select {
    padding: 10px 12px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* Toggle Switch */
.pcalc-toggle-box {
    margin-bottom: var(--space-4);
    padding: 12px 16px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
}

.pcalc-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.pcalc-toggle-label input {
    display: none;
}

.pcalc-toggle-switch {
    width: 48px;
    height: 26px;
    background: var(--color-border);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.pcalc-toggle-switch::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pcalc-toggle-label input:checked + .pcalc-toggle-switch {
    background: var(--primary-500);
}

.pcalc-toggle-label input:checked + .pcalc-toggle-switch::before {
    left: 24px;
}

.pcalc-toggle-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.pcalc-toggle-label input:checked ~ .pcalc-toggle-text {
    color: var(--primary-500);
}

/* Button Success */
.btn-success {
    background: var(--success-500);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
    color: white;
}

/* Result Card */
.pcalc-result-card {
    display: none;
}

.pcalc-result-card.visible {
    display: block;
}

/* Calculated Price Box */
.pcalc-calculated-price {
    display: none;
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
}

.pcalc-calculated-price.visible {
    display: block;
}

.pcalc-calculated-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.pcalc-calculated-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-500);
}

/* Hero Profit Box */
.profit-hero {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    color: white;
    margin-bottom: var(--space-5);
    position: relative;
    overflow: hidden;
}

.profit-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.profit-hero.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.profit-hero.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.profit-hero-main {
    position: relative;
    z-index: 1;
}

.profit-hero-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profit-hero-value {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
}

.profit-hero-margin {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
}

.profit-hero-status {
    margin-top: 16px;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.profit-hero-status i {
    font-size: 18px;
}

/* Summary Grid */
.pcalc-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: var(--space-5);
}

.pcalc-summary-item {
    background: var(--color-surface-secondary);
    padding: 14px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-border);
}

.pcalc-summary-item.pcalc-summary-primary {
    border-left-color: var(--primary-500);
}

.pcalc-summary-item.pcalc-summary-warning {
    border-left-color: #f59e0b;
}

.pcalc-summary-item.pcalc-summary-danger {
    border-left-color: var(--danger-500);
}

.pcalc-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.pcalc-summary-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* KDV Section */
.pcalc-vat-section {
    background: var(--color-surface-secondary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.pcalc-vat-section h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.pcalc-vat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
}

.pcalc-vat-row:last-child {
    border-bottom: none;
}

.pcalc-vat-row.pcalc-vat-total {
    margin-top: var(--space-2);
    padding-top: 12px;
    border-top: 2px solid var(--color-border);
    border-bottom: none;
    font-weight: 700;
}

.pcalc-vat-label {
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pcalc-vat-value {
    font-weight: 600;
}

.pcalc-vat-value.positive { color: var(--success-500); }
.pcalc-vat-value.negative { color: var(--danger-500); }
.pcalc-vat-value.warning { color: #f59e0b; }

/* Section Title */
.pcalc-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin: var(--space-5) 0 12px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Expense List */
.pcalc-expense-list {
    max-height: 300px;
    overflow-y: auto;
}

.pcalc-expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: var(--space-2);
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--danger-500);
}

.pcalc-expense-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.pcalc-expense-detail {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.pcalc-expense-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger-500);
    white-space: nowrap;
    margin-left: var(--space-3);
}

/* Distribution Chart */
.pcalc-distribution {
    margin-top: var(--space-5);
}

.pcalc-dist-bar {
    display: flex;
    height: 48px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pcalc-dist-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: width 0.5s ease;
}

.pcalc-dist-cost { background: #6b7280; }
.pcalc-dist-expenses { background: var(--danger-500); }
.pcalc-dist-profit { background: var(--success-500); }

.pcalc-dist-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pcalc-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    color: var(--color-text-muted);
}

.pcalc-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Export Info Card */
.pcalc-export-info {
    display: none;
}

.pcalc-export-info.visible {
    display: block;
}

.pcalc-info-box {
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.pcalc-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pcalc-info-box ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-muted);
}

.pcalc-info-box ul li:last-child {
    border-bottom: none;
}

.pcalc-warning-box {
    background: #fef3c7;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 13px;
    color: #92400e;
}

.pcalc-warning-box ul {
    margin: var(--space-2) 0 0;
    padding-left: var(--space-4);
}

.pcalc-warning-box li {
    margin-bottom: 4px;
}

/* Empty Info */
.pcalc-empty-info {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-text-muted);
}

.pcalc-empty-info i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.pcalc-empty-info p {
    margin: 0;
    font-size: 14px;
}

/* Price Calculator Dark Mode */
[data-theme="dark"] .pcalc-calculated-price {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
}

[data-theme="dark"] .pcalc-warning-box {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .pcalc-info-box ul li {
    color: var(--color-text-muted);
}

/* Price Calculator Responsive */
@media (max-width: 1024px) {
    .pcalc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pcalc-row {
        flex-direction: column;
    }

    .calc-tabs {
        flex-direction: column;
    }

    .pcalc-summary {
        grid-template-columns: 1fr;
    }

    .profit-hero-value {
        font-size: 36px;
    }

    .pcalc-card {
        padding: var(--space-4);
    }
}

/* ========================================
   COMMISSION RATES (index)
   ======================================== */

.crates-info-steps {
    margin: var(--space-3) 0 0;
    padding-left: var(--space-5);
    counter-reset: steps;
}

.crates-info-steps li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.crates-info-steps li strong {
    color: var(--color-text-primary);
}

/* Card */
.crates-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.crates-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5);
    border-bottom: 1px solid var(--color-border);
}

.crates-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.crates-card-header h3 i {
    color: #16a34a;
}

.crates-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-500);
    border-radius: 20px;
}

/* Table */
.crates-table-wrap {
    overflow-x: auto;
}

.crates-table {
    width: 100%;
    border-collapse: collapse;
}

.crates-table thead th {
    padding: 12px var(--space-5);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    background: var(--color-surface-secondary);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.crates-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}

.crates-table tbody tr:hover {
    background: var(--color-surface-secondary);
}

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

.crates-table td {
    padding: 14px var(--space-5);
    font-size: 14px;
    vertical-align: middle;
}

.crates-date {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--color-text-primary);
}

.crates-date i {
    color: var(--primary-500);
    font-size: 13px;
}

.crates-validity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.crates-validity i {
    font-size: 11px;
}

.crates-muted {
    opacity: 0.5;
}

.crates-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.crates-count i {
    color: var(--primary-500);
}

/* Actions */
.crates-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
}

.crates-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.crates-btn-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-500);
}

.crates-btn-primary:hover,
a.crates-btn-primary:visited:hover {
    background: var(--primary-500);
    color: white;
}

a.crates-btn-primary:visited {
    color: var(--primary-500);
}

.crates-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-500);
}

.crates-btn-danger:hover,
a.crates-btn-danger:visited:hover {
    background: var(--danger-500);
    color: white;
}

a.crates-btn-danger:visited {
    color: var(--danger-500);
}

/* Empty State */
.crates-empty {
    text-align: center;
    padding: 48px 24px;
}

.crates-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.crates-empty-icon i {
    font-size: 28px;
    color: var(--color-text-muted);
    opacity: 0.5;
}

.crates-empty h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 var(--space-2);
}

.crates-empty p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-5);
}

/* Upload Zone */
.crates-upload-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.crates-upload-zone:hover,
.crates-upload-zone.dragover {
    border-color: var(--primary-500);
    background: rgba(37, 99, 235, 0.04);
}

.crates-upload-zone-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.crates-upload-zone-icon i {
    font-size: 24px;
    color: #16a34a;
}

.crates-upload-zone h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--color-text-primary);
}

.crates-upload-zone p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

.crates-upload-zone input[type="file"] {
    display: none;
}

/* File Preview */
.crates-file-preview {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: 14px 16px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.crates-file-preview.active {
    display: flex;
}

.crates-file-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(22, 163, 74, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crates-file-preview-icon i {
    font-size: 18px;
    color: #16a34a;
}

.crates-file-preview-info {
    flex: 1;
    min-width: 0;
}

.crates-file-preview-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crates-file-preview-size {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Loading Overlay */
.crates-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.crates-loading.active {
    display: flex;
}

.crates-loading-box {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    max-width: 400px;
}

.crates-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.crates-loading-box h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 var(--space-2);
}

.crates-loading-box p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

/* Commission Rates Responsive */
@media (max-width: 768px) {
    .crates-table thead {
        display: none;
    }

    .crates-table tbody tr {
        display: block;
        padding: var(--space-4);
    }

    .crates-table td {
        display: block;
        padding: 4px 0;
    }

    .crates-table td:last-child {
        margin-top: var(--space-3);
    }

    .crates-actions {
        justify-content: flex-start;
    }
}

/* =============================================
   COMMISSION ANALYZE PAGE (canalyze-*)
   ============================================= */

/* Filter Bar */
.canalyze-filter-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    flex-wrap: wrap;
    border: 1px solid var(--color-border);
}

.canalyze-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.canalyze-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.canalyze-filter-label i {
    color: var(--primary-500);
}

.canalyze-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.canalyze-quick-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: rgba(37, 99, 235, 0.06);
}

.canalyze-quick-primary {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.canalyze-quick-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

/* Table Wrapper */
.canalyze-table-wrap {
    overflow-x: auto;
    max-height: 65vh;
    overflow-y: auto;
}

.canalyze-table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.canalyze-table-wrap::-webkit-scrollbar-track {
    background: var(--color-surface-secondary);
}

.canalyze-table-wrap::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.canalyze-table-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Product Table */
.canalyze-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

.canalyze-table thead th {
    position: sticky;
    top: 0;
    background: var(--color-surface-secondary);
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
    text-align: left;
    z-index: 10;
    white-space: nowrap;
}

.canalyze-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}

.canalyze-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.canalyze-table tbody tr.selected {
    background: rgba(22, 163, 74, 0.05);
}

/* Product Info Cell */
.canalyze-product-cell {
    padding: 12px;
    min-width: 280px;
    position: sticky;
    left: 0;
    background: var(--color-surface-primary);
    z-index: 5;
}

.canalyze-table tbody tr:hover .canalyze-product-cell {
    background: rgba(37, 99, 235, 0.03);
}

.canalyze-table tbody tr.selected .canalyze-product-cell {
    background: rgba(22, 163, 74, 0.05);
}

.canalyze-product-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.canalyze-product-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.canalyze-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.canalyze-product-image i {
    font-size: 18px;
    color: var(--color-text-muted);
}

.canalyze-product-details {
    flex: 1;
    min-width: 0;
}

.canalyze-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.canalyze-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--color-text-secondary);
}

.canalyze-product-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Cost Badges */
.canalyze-cost-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.canalyze-cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.canalyze-cost-success {
    background: rgba(22, 163, 74, 0.08);
    color: var(--success-500);
}

.canalyze-cost-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
}

.canalyze-unmatched {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

/* Level Cell */
.canalyze-level-cell {
    padding: 8px;
    min-width: 160px;
    vertical-align: top;
}

/* Level Card */
.canalyze-level-card {
    background: var(--color-surface-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.canalyze-level-card:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-sm);
}

.canalyze-level-card.best {
    background: var(--color-surface-secondary);
}

.canalyze-level-card.preferred {
    border: 2px dashed #93c5fd;
    background: rgba(37, 99, 235, 0.02);
}

.canalyze-level-card.selected {
    background: rgba(22, 163, 74, 0.08);
    border: 2px solid var(--success-500) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.canalyze-level-card.negative {
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Level Badge */
.canalyze-level-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.canalyze-level-badge.best {
    background: #64748b;
    color: white;
}

.canalyze-level-badge.preferred {
    background: var(--primary-500);
    color: white;
}

.canalyze-level-card.selected .canalyze-level-badge {
    background: var(--success-500);
}

/* Info Button */
.canalyze-info-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
}

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

/* Level Content */
.canalyze-level-range {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: 24px;
    margin-bottom: 4px;
}

.canalyze-level-commission {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Level Profit */
.canalyze-level-profit {
    background: rgba(22, 163, 74, 0.08);
    border-radius: var(--radius-md);
    padding: 8px;
    text-align: center;
    margin: 8px 0;
}

.canalyze-level-profit.negative {
    background: rgba(239, 68, 68, 0.08);
}

.canalyze-level-profit-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--success-500);
}

.canalyze-level-profit.negative .canalyze-level-profit-value {
    color: var(--danger-500);
}

.canalyze-level-profit-margin {
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    margin-top: 2px;
}

.canalyze-level-profit.negative .canalyze-level-profit-margin {
    color: #dc2626;
}

/* Select Button */
.canalyze-select-btn {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--color-border);
    background: var(--color-surface-primary);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.canalyze-select-btn.selected {
    border-color: var(--success-500);
    background: var(--success-500);
    color: white;
}

.canalyze-select-btn.auto-recommended {
    border: 2px dashed #93c5fd;
    color: var(--primary-500);
}

.canalyze-select-btn.auto-recommended:hover {
    background: rgba(37, 99, 235, 0.1);
    border-style: solid;
}

.canalyze-select-btn.auto-recommended.selected {
    border: 2px solid var(--success-500);
    background: var(--success-500);
    color: white;
}

/* No Data */
.canalyze-no-data {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 12px;
    padding: 20px 8px;
}

.canalyze-no-data i {
    font-size: 20px;
    opacity: 0.4;
    margin-bottom: 4px;
}

/* Export Section */
.canalyze-export {
    padding: 16px 20px;
    background: var(--color-surface-secondary);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.canalyze-export-info {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.canalyze-export-info strong {
    color: var(--primary-500);
    font-weight: 700;
}

/* =============================================
   COMMISSION ANALYZE — MODAL
   ============================================= */

.canalyze-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.canalyze-modal-loading,
.canalyze-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--color-text-muted);
}

.canalyze-modal-loading i {
    font-size: 32px;
    color: var(--primary-500);
}

.canalyze-modal-error i {
    font-size: 32px;
    color: var(--danger-500);
}

/* Modal Product Info */
.canalyze-modal-product {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.canalyze-modal-product-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.canalyze-modal-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.canalyze-modal-product-img i {
    font-size: 28px;
    color: var(--color-text-muted);
}

.canalyze-modal-product h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.canalyze-modal-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.canalyze-modal-product-meta span {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modal Cost Grid */
.canalyze-modal-cost-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.canalyze-modal-cost-item {
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.canalyze-modal-cost-label {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.canalyze-modal-cost-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Modal Cargo Section */
.canalyze-modal-cargo {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(251, 191, 36, 0.04) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
}

.canalyze-modal-cargo h5 {
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.canalyze-modal-cargo.insufficient {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.canalyze-modal-cargo-warn {
    padding: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--danger-500);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.canalyze-modal-cargo-warn i {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.canalyze-modal-cargo-warn strong {
    display: block;
    margin-bottom: 4px;
}

.canalyze-modal-cargo-warn p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.canalyze-modal-cargo-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.canalyze-modal-cargo-details span {
    font-size: 12px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.canalyze-modal-cargo-details strong {
    color: var(--color-text-primary);
}

.canalyze-modal-cargo-source {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(22, 163, 74, 0.08);
    border-radius: var(--radius-md);
    font-size: 11px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.canalyze-modal-cargo-source i {
    color: var(--success-500);
}

/* Modal Levels */
.canalyze-modal-levels {
    margin-top: 20px;
}

.canalyze-modal-levels h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.canalyze-modal-levels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.canalyze-modal-level {
    background: var(--color-surface-secondary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s;
}

.canalyze-modal-level.highlight {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.canalyze-modal-level.negative {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.02);
}

.canalyze-modal-level.disabled {
    opacity: 0.5;
}

.canalyze-modal-level-header {
    padding: 12px;
    background: var(--color-surface-primary);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
}

.canalyze-highlight-badge {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--primary-500);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.canalyze-modal-level-body {
    padding: 12px;
}

.canalyze-modal-level-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 4px 0;
    color: var(--color-text-secondary);
}

.canalyze-modal-level-row span:last-child {
    font-weight: 500;
    color: var(--color-text-primary);
}

.canalyze-modal-level-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 0;
}

.canalyze-modal-level-total {
    font-weight: 600;
    font-size: 12px;
    padding-top: 8px;
}

.canalyze-modal-level-total.positive span:last-child {
    color: var(--success-500);
}

.canalyze-modal-level-total.negative span:last-child {
    color: var(--danger-500);
}

/* =============================================
   COMMISSION ANALYZE — DARK MODE
   ============================================= */

[data-theme="dark"] .canalyze-cost-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .canalyze-unmatched {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .canalyze-level-commission {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .canalyze-level-card.preferred {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(37, 99, 235, 0.06);
}

[data-theme="dark"] .canalyze-level-card.negative {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .canalyze-select-btn.auto-recommended {
    border-color: rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] .canalyze-modal-cargo {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.06) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .canalyze-modal-cargo h5 {
    color: #fbbf24;
}

[data-theme="dark"] .canalyze-modal-cargo.insufficient {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(251, 191, 36, 0.08) 100%);
}

[data-theme="dark"] .canalyze-modal-cargo-warn {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .canalyze-modal-cargo-source {
    background: rgba(22, 163, 74, 0.12);
}

[data-theme="dark"] .canalyze-modal-level.negative {
    background: rgba(239, 68, 68, 0.06);
}

/* Stats Grid — 5 columns */
.canalyze-stats-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* =============================================
   COMMISSION ANALYZE — RESPONSIVE
   ============================================= */

@media (max-width: 1200px) {
    .canalyze-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .canalyze-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .canalyze-filter-group {
        justify-content: flex-start;
    }

    .canalyze-filter-group:last-child {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    /* Stats: 2 columns */
    .canalyze-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Filter bar */
    .canalyze-filter-group {
        flex-wrap: wrap;
    }

    .canalyze-quick-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    /* Table → Card layout */
    .canalyze-table {
        min-width: 0;
    }

    .canalyze-table thead {
        display: none;
    }

    .canalyze-table tbody tr {
        display: block;
        padding: 16px;
        margin-bottom: 12px;
        background: var(--color-surface-primary);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        border-bottom: none;
    }

    .canalyze-table tbody tr.selected {
        border-color: var(--success-500);
        box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
    }

    .canalyze-table tbody tr td {
        display: block;
        padding: 0;
    }

    /* Checkbox — top-right of card */
    .canalyze-table tbody tr td:first-child {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 2;
    }

    .canalyze-table tbody tr {
        position: relative;
    }

    /* Product cell — no sticky */
    .canalyze-product-cell {
        position: static;
        min-width: 0;
        padding: 0;
        margin-bottom: 12px;
        padding-right: 30px;
    }

    .canalyze-table tbody tr:hover .canalyze-product-cell,
    .canalyze-table tbody tr.selected .canalyze-product-cell {
        background: transparent;
    }

    /* Level cells — 2-column grid */
    .canalyze-level-cell {
        display: inline-block;
        width: calc(50% - 4px);
        padding: 4px;
        vertical-align: top;
        min-width: 0;
    }

    .canalyze-level-card {
        border-radius: var(--radius-md);
    }

    .canalyze-level-range {
        font-size: 11px;
    }

    .canalyze-level-profit-value {
        font-size: 14px;
    }

    /* Export */
    .canalyze-export {
        flex-direction: column;
        align-items: stretch;
    }

    .canalyze-export .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal */
    .canalyze-modal-cost-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .canalyze-modal-body {
        padding: 16px;
    }

    .canalyze-modal-product-img {
        width: 60px;
        height: 60px;
    }

    .canalyze-modal-product h4 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Stats: single column */
    .canalyze-stats-grid {
        grid-template-columns: 1fr;
    }

    /* Level cells — single column */
    .canalyze-level-cell {
        width: 100%;
    }

    .canalyze-modal-cost-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .canalyze-modal-levels-grid {
        grid-template-columns: 1fr;
    }

    .canalyze-modal-cost-value {
        font-size: 15px;
    }

    .canalyze-modal-cargo-details {
        flex-direction: column;
        gap: 8px;
    }

    .canalyze-quick-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* =============================================
   PROFILE PAGE (uprof-*)
   ============================================= */

/* Card Grid */
.uprof-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Card */
.uprof-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--color-border);
}

.uprof-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.uprof-card-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    flex: 1;
}

/* Card Icon */
.uprof-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-500) 0%, #2563eb 100%);
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.uprof-card-icon.primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, #1d4ed8 100%);
}

.uprof-card-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.uprof-card-icon.success {
    background: linear-gradient(135deg, var(--success-500) 0%, #059669 100%);
}

.uprof-card-icon.danger {
    background: linear-gradient(135deg, var(--danger-500) 0%, #dc2626 100%);
}

/* Form Grid */
.uprof-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.uprof-form-single {
    grid-template-columns: 1fr;
}

.uprof-full {
    grid-column: 1 / -1;
}

/* Checkbox */
.uprof-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-primary);
}

.uprof-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--primary-500);
}

/* Info List */
.uprof-info-list {
    display: flex;
    flex-direction: column;
}

.uprof-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.uprof-info-item:last-child {
    border-bottom: none;
}

.uprof-info-label {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.uprof-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Badge */
.uprof-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.uprof-badge.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-500);
}

.uprof-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-500);
}

/* Subscription Section */
.uprof-subscription {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.uprof-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-500) 0%, #1d4ed8 100%);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
}

.uprof-sub-badge i {
    color: #fbbf24;
}

/* Usage Grid */
.uprof-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.uprof-usage-item {
    text-align: center;
    padding: 12px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.uprof-usage-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.uprof-usage-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    margin-top: 4px;
}

.uprof-sub-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--primary-500);
}

/* Payment List */
.uprof-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uprof-payment-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.uprof-payment-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-500) 0%, #1d4ed8 100%);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.uprof-payment-info {
    flex: 1;
    min-width: 0;
}

.uprof-payment-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 4px;
}

.uprof-payment-info span {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.uprof-payment-amount {
    text-align: right;
    flex-shrink: 0;
}

.uprof-payment-price {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.uprof-payment-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.uprof-payment-status.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-500);
}

.uprof-payment-status.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-500);
}

/* Empty State */
.uprof-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-text-muted);
}

.uprof-empty i {
    font-size: 32px;
    opacity: 0.4;
    margin-bottom: 12px;
    display: block;
}

.uprof-empty p {
    font-size: 14px;
    margin: 0;
}

/* =============================================
   PROFILE — DARK MODE
   ============================================= */

[data-theme="dark"] .uprof-sub-note {
    background: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .uprof-badge.success {
    background: rgba(22, 163, 74, 0.15);
}

[data-theme="dark"] .uprof-badge.danger {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .uprof-payment-status.success {
    background: rgba(22, 163, 74, 0.15);
}

[data-theme="dark"] .uprof-payment-status.danger {
    background: rgba(239, 68, 68, 0.15);
}

/* =============================================
   PROFILE — RESPONSIVE
   ============================================= */

@media (max-width: 992px) {
    .uprof-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .uprof-form-grid {
        grid-template-columns: 1fr;
    }

    .uprof-card {
        padding: 20px 16px;
    }

    .uprof-payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .uprof-payment-amount {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .uprof-usage-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .uprof-usage-value {
        font-size: 20px;
    }
}

/* ============================================================
   SETTINGS PAGE (uset-*)
   ============================================================ */

.uset-card {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
}

.uset-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.uset-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.uset-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--color-surface-secondary);
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.uset-card-icon.primary { background: rgba(37, 99, 235, 0.1); color: var(--primary-500); }
.uset-card-icon.warning { background: rgba(234, 179, 8, 0.1); color: #d97706; }
.uset-card-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger-500); }

.uset-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 20px;
    padding-left: 56px;
}

.uset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.uset-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uset-group h4 i {
    color: var(--color-text-muted);
    font-size: 13px;
}

/* Checkbox Toggle */
.uset-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
}

.uset-check:hover {
    background: var(--color-surface-secondary);
}

.uset-check input[type="checkbox"] {
    display: none;
}

.uset-check-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
    margin-top: 2px;
}

.uset-check input:checked + .uset-check-box {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.uset-check input:checked + .uset-check-box::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.uset-check-content {
    flex: 1;
}

.uset-check-content strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.uset-check-content small {
    font-size: 12px;
    color: var(--color-text-muted);
}

.uset-check-locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.uset-check-locked:hover {
    background: transparent;
}

.uset-check-locked .uset-check-box {
    background: var(--color-surface-secondary);
    border-color: var(--color-border);
}

.uset-upgrade-hint {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.uset-upgrade-hint i {
    margin-right: 4px;
}

.uset-upgrade-cta {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    font-size: 13px;
}

.uset-upgrade-cta a {
    color: var(--primary-500);
    font-weight: 600;
}

.uset-upgrade-cta a:hover {
    text-decoration: underline;
}

/* Card Footer */
.uset-card-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* Sessions */
.uset-sessions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uset-session-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.uset-session-item.current {
    border-color: var(--primary-500);
    background: rgba(37, 99, 235, 0.04);
}

.uset-session-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.uset-session-info {
    flex: 1;
    min-width: 0;
}

.uset-session-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.uset-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.uset-badge.success {
    background: var(--success-50);
    color: #15803d;
}

.uset-session-meta {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.uset-session-meta i {
    margin-right: 4px;
}

/* Empty state */
.uset-empty {
    text-align: center;
    padding: 24px;
    color: var(--color-text-muted);
}

.uset-empty i {
    font-size: 28px;
    color: var(--success-500);
    margin-bottom: 8px;
    display: block;
}

/* Danger Zone */
.uset-danger-card {
    border-color: rgba(239, 68, 68, 0.3);
}

.uset-danger-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uset-danger-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.uset-danger-info {
    flex: 1;
}

.uset-danger-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.uset-danger-info p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Dark Mode */
[data-theme="dark"] .uset-card-icon.primary { background: rgba(37, 99, 235, 0.15); }
[data-theme="dark"] .uset-card-icon.warning { background: rgba(234, 179, 8, 0.15); color: #facc15; }
[data-theme="dark"] .uset-card-icon.danger { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .uset-danger-card { border-color: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .uset-badge.success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }

/* Responsive */
@media (max-width: 768px) {
    .uset-card {
        padding: 20px 16px;
    }

    .uset-desc {
        padding-left: 0;
    }

    .uset-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .uset-session-item {
        flex-wrap: wrap;
    }

    .uset-session-item .btn {
        width: 100%;
        justify-content: center;
    }

    .uset-danger-action {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .uset-danger-action .btn {
        width: 100%;
    }
}

/* ============================================================
   KDV GÜNCELLEME MODALI (vat-modal-*)
   ============================================================ */

.vat-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vat-modal-overlay.active {
    display: flex;
}

.vat-modal {
    background: var(--color-surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.2));
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: vatModalIn 0.2s ease-out;
}

@keyframes vatModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.vat-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--color-border);
}

.vat-modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--warning-50, #fffbeb);
    color: var(--warning-600, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.vat-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.3;
}

.vat-modal-header p {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin: 2px 0 0;
}

.vat-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-md);
    line-height: 1;
}

.vat-modal-close:hover {
    color: var(--color-text-primary);
    background: var(--color-surface-secondary);
}

.vat-modal-body {
    padding: 20px 24px;
}

.vat-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 10px;
}

.vat-option:last-child {
    margin-bottom: 0;
}

.vat-option:hover {
    border-color: var(--primary-300, #93c5fd);
    background: var(--primary-50, #eff6ff);
}

.vat-option.selected {
    border-color: var(--primary-500, #3b82f6);
    background: var(--primary-50, #eff6ff);
}

.vat-option input[type="radio"] {
    margin-top: 2px;
    accent-color: var(--primary-500, #3b82f6);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.vat-option-content strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.vat-option-content span {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.vat-categories-panel {
    display: none;
    margin-top: 12px;
    padding: 16px;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.vat-categories-panel.visible {
    display: block;
}

.vat-categories-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.vat-categories-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.vat-categories-select-all input {
    accent-color: var(--primary-500, #3b82f6);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.vat-category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.vat-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    transition: background 0.1s;
}

.vat-category-item:hover {
    background: var(--color-surface-hover, rgba(0,0,0,0.04));
}

.vat-category-item input {
    accent-color: var(--primary-500, #3b82f6);
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.vat-category-badge {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    background: var(--color-surface-tertiary, #f3f4f6);
    padding: 2px 8px;
    border-radius: 20px;
}

.vat-categories-loading {
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
    padding: 8px 4px;
}

/* Settings save feedback */
.settings-feedback {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    margin-left: 8px;
    animation: feedbackFadeIn 0.2s ease;
}

@keyframes feedbackFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.settings-feedback--success {
    background: var(--success-50, #f0fdf4);
    color: var(--success-700, #15803d);
    border: 1px solid var(--success-200, #bbf7d0);
}

.settings-feedback--error {
    background: var(--danger-50, #fef2f2);
    color: var(--danger-700, #b91c1c);
    border: 1px solid var(--danger-200, #fecaca);
}

.vat-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--color-border);
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .vat-modal-footer {
        flex-direction: column-reverse;
    }
    .vat-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   SUBSCRIPTION PAGE (usub-*)
   ============================================================ */

.usub-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.usub-pricing-card {
    background: var(--color-surface-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.usub-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.usub-pricing-card.popular {
    border-color: var(--color-border);
}

.usub-pricing-card.current {
    border-color: var(--success-500);
}

.usub-popular-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

.usub-plan-content {
    padding: 28px 24px;
}

.usub-plan-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usub-free-badge {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--success-50);
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
}

.usub-plan-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0 0 20px;
    line-height: 1.5;
}

.usub-plan-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 24px;
}

.usub-currency {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.usub-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1;
}

.usub-period {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.usub-card-fair-usage {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--primary-50);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.usub-card-fair-usage i {
    color: var(--primary-500);
    font-size: 14px;
}

.usub-card-fair-usage strong {
    color: var(--primary-600);
}

/* Plan Features */
.usub-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.usub-plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
}

.usub-plan-features li:last-child {
    border-bottom: none;
}

.usub-plan-features li i.fa-check {
    color: var(--success-500);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.usub-plan-features li i.fa-times {
    color: var(--color-text-muted);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.usub-plan-features li.unavailable {
    color: var(--color-text-muted);
    text-decoration: line-through;
    opacity: 0.6;
}

.usub-btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    text-decoration: none;
}

/* FAQ Section */
.usub-faq-section {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.usub-faq-section > h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usub-faq-section > h3 i {
    color: var(--primary-500);
}

.usub-faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.usub-faq-item {
    padding: 16px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.usub-faq-item h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usub-faq-item h5 i {
    color: var(--primary-500);
    font-size: 13px;
}

.usub-faq-item p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
}

.usub-faq-contact {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.usub-faq-contact p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
}

.usub-faq-contact a {
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 600;
}

.usub-faq-contact a:hover {
    text-decoration: underline;
}

/* Payment Modal (Plan Summary + POS iframe) */
.usub-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.usub-payment-modal.open {
    opacity: 1;
    visibility: visible;
}

body.modal-open {
    overflow: hidden;
}

.usub-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.usub-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: auto;
    max-height: 90vh;
    background: var(--color-surface-primary);
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.usub-payment-modal.open .usub-modal-dialog {
    transform: scale(1);
}

.usub-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-secondary);
}

.usub-modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usub-modal-header h3 i {
    color: var(--primary-500);
}

.usub-modal-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.usub-modal-close:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.usub-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.usub-modal-step {
    padding: 24px 28px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#usubSummaryStep {
    overflow-y: auto;
}

/* Plan Hero (Modal) */
.usub-modal-plan-hero {
    margin: -24px -28px 20px;
    padding: 28px 28px 24px;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800, #1e3a8a) 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.usub-modal-plan-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.usub-modal-plan-hero::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: -24px;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.usub-modal-hero-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.usub-modal-hero-name {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.usub-modal-hero-price {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.usub-modal-hero-price .strike {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    display: block;
    margin-bottom: 4px;
}

.usub-modal-hero-price .usub-free-price {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.usub-modal-hero-gift {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    position: relative;
    z-index: 1;
}

/* Plan İçeriği section */
.usub-modal-features-section {
    margin-bottom: 16px;
}

.usub-modal-features-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.usub-modal-features-title i {
    color: var(--success-500);
    font-size: 12px;
}

/* Cancel/back button in modal actions */
.usub-btn-cancel-action {
    width: 100%;
    justify-content: center;
}

.usub-modal-cancel-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    font-family: inherit;
}

.usub-modal-cancel-link:hover {
    color: var(--color-text-primary);
}

/* Modal Metrik Chip Grid */
.usub-modal-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.usub-modal-metric-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.usub-modal-metric-chip i {
    color: var(--primary-500);
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Legacy classes (kept for compatibility) */
.usub-summary-plan-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.usub-summary-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary-500);
    margin-bottom: 16px;
}

.usub-summary-price .strike {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.usub-summary-gift {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--warning-50);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 18px;
}

.usub-summary-gift i {
    color: var(--warning-500);
}

.usub-fair-usage {
    padding: 14px 16px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}

.usub-fair-usage h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usub-fair-usage h5 i {
    color: var(--primary-500);
}

.usub-fair-usage-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.usub-fair-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.usub-fair-row span {
    color: var(--color-text-secondary);
}

.usub-fair-row strong {
    color: var(--color-text-primary);
}

.usub-fair-total {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--color-border);
    font-size: 15px;
}

.usub-fair-total strong {
    color: var(--primary-500);
}

.usub-summary-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
}

.usub-summary-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--color-text-primary);
}

.usub-summary-features li i {
    color: var(--success-500);
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.usub-fair-usage-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 12px;
    background: var(--warning-50);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
}

.usub-fair-usage-warning i {
    color: var(--warning-600);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.usub-fair-usage-warning strong {
    color: var(--warning-700);
}

.usub-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.usub-summary-actions .usub-btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.usub-btn-primary-action {
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
}

.usub-btn-outline {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.usub-btn-outline:hover {
    background: var(--color-surface-secondary);
    border-color: var(--gray-300);
    color: var(--color-text-primary);
}

#usubIframeStep {
    display: flex;
    flex-direction: column;
    padding: 0;
    flex: 1;
    min-height: 0;
    position: relative;
}

#usubIframeStep iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: none;
    display: block;
}

.usub-iframe-back {
    position: absolute;
    bottom: 20px;
    left: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.15s;
}

.usub-iframe-back:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

@media (max-width: 600px) {
    .usub-modal-dialog {
        height: 90vh;
        max-height: none;
    }
    .usub-summary-features {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode */
[data-theme="dark"] .usub-free-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .usub-pricing-card.popular {
    border-color: var(--color-border);
}

[data-theme="dark"] .usub-pricing-card.current {
    border-color: #4ade80;
}

/* Responsive */
@media (max-width: 768px) {
    .usub-pricing-grid {
        grid-template-columns: 1fr;
    }

    .usub-faq-grid {
        grid-template-columns: 1fr;
    }

    .usub-plan-content {
        padding: 24px 20px;
    }
}

/* ============================================================
   PAYMENT PAGE (upay-*)
   ============================================================ */

.upay-body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    margin: 0;
}

.upay-container {
    width: 100%;
    max-width: 480px;
}

.upay-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.upay-header {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: #fff;
    text-align: center;
    padding: 32px 24px;
}

.upay-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.upay-header h2 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin: 0 0 4px;
}

.upay-plan-title {
    font-size: 24px;
    font-weight: 800;
}

.upay-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
}

.upay-price {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.upay-price-currency {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.85;
}

.upay-price-amount {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.upay-price-period {
    font-size: 16px;
    opacity: 0.7;
}

.upay-body {
    padding: 28px 24px;
}

.upay-gift-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.upay-gift-banner > i {
    font-size: 20px;
    color: #d97706;
    margin-top: 2px;
}

.upay-gift-banner h4 {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 4px;
}

.upay-gift-banner p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
}

.upay-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upay-section-title i {
    color: var(--primary-500);
}

.upay-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.upay-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
}

.upay-feature-list li:last-child {
    border-bottom: none;
}

.upay-feature-list li i {
    color: var(--success-500);
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.upay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--primary-500);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 10px;
}

.upay-btn:hover {
    background: var(--primary-600);
}

.upay-btn.free {
    background: var(--success-500);
}

.upay-btn.free:hover {
    background: #16a34a;
}

.upay-btn-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background 0.15s;
}

.upay-btn-cancel:hover {
    background: var(--color-surface-secondary);
}

.upay-security {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Dark Mode */
[data-theme="dark"] .upay-body {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

[data-theme="dark"] .upay-gift-banner {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.15);
}

[data-theme="dark"] .upay-gift-banner h4 {
    color: #fbbf24;
}

/* Responsive */
@media (max-width: 480px) {
    .upay-body {
        padding: 16px;
    }

    .upay-header {
        padding: 24px 20px;
    }

    .upay-price-amount {
        font-size: 40px;
    }

    div.upay-body {
        padding: 20px 16px;
    }
}

/* ============================================
   Notification System
   ============================================ */
.notification-wrapper-fixed {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-preview {
    background: var(--primary-500);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    white-space: nowrap;
    box-shadow: var(--shadow);
    animation: slideInFromRight 0.4s ease-out;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.notification-btn:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border-color: var(--gray-300);
    box-shadow: var(--shadow);
}

.notification-btn i {
    font-size: 18px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-500);
    color: white;
    font-size: 10px;
    font-weight: var(--font-semibold);
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-bg-primary);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 400px;
    max-height: 500px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.notification-header h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.notification-mark-all {
    font-size: var(--text-xs);
    color: var(--primary-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-mark-all:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--color-bg-secondary);
}

.notification-item.unread {
    background: var(--primary-50);
}

.notification-item.unread .notification-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-primary);
}

.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gray-100);
    color: var(--gray-600);
}

.notification-icon-success {
    background: var(--success-50);
    color: var(--success-600);
}

.notification-icon-warning {
    background: var(--warning-50);
    color: var(--warning-600);
}

.notification-icon-info {
    background: var(--primary-50);
    color: var(--primary-600);
}

.notification-icon-danger {
    background: var(--danger-50);
    color: var(--danger-600);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0 0 4px 0;
}

.notification-text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.notification-time {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.notification-close {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0;
}

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

.notification-close:hover {
    background: var(--danger-50);
    color: var(--danger-500);
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.notification-view-all {
    display: block;
    text-align: center;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--primary-500);
    text-decoration: none;
    transition: color 0.2s;
}

.notification-view-all:hover {
    color: var(--primary-600);
}

/* Empty State */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
}

.notification-empty i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 12px;
}

.notification-empty p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* Dark Mode */
[data-theme="dark"] .notification-preview {
    background: var(--primary-600);
}

[data-theme="dark"] .notification-btn {
    background: var(--color-surface-primary);
    border-color: var(--color-border);
}

[data-theme="dark"] .notification-btn:hover {
    background: var(--color-surface-secondary);
    border-color: var(--gray-300);
}

[data-theme="dark"] .notification-dropdown {
    background: var(--color-bg-primary);
    border-color: var(--color-border);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .notification-header {
    border-color: var(--color-border);
}

[data-theme="dark"] .notification-item {
    border-color: var(--color-border);
}

[data-theme="dark"] .notification-item:hover {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .notification-item.unread {
    background: var(--primary-50);
}

[data-theme="dark"] .notification-icon {
    background: var(--color-surface-secondary);
}

[data-theme="dark"] .notification-icon-success {
    background: var(--success-50);
    color: var(--success-500);
}

[data-theme="dark"] .notification-icon-warning {
    background: var(--warning-50);
    color: var(--warning-500);
}

[data-theme="dark"] .notification-icon-info {
    background: var(--primary-50);
    color: var(--primary-500);
}

[data-theme="dark"] .notification-icon-danger {
    background: var(--danger-50);
    color: var(--danger-500);
}

[data-theme="dark"] .notification-footer {
    border-color: var(--color-border);
}

/* Responsive */
@media (max-width: 900px) {
    .notification-preview {
        max-width: 180px;
        font-size: var(--text-xs);
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .notification-wrapper-fixed {
        top: 12px;
        right: 12px;
    }
    
    .notification-preview {
        display: none;
    }
    
    .notification-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 640px) {
    .notification-dropdown {
        width: 340px;
    }
}

@media (max-width: 480px) {
    .notification-wrapper-fixed {
        top: 10px;
        right: 10px;
    }
    
    .notification-btn {
        width: 38px;
        height: 38px;
    }
    
    .notification-btn i {
        font-size: 16px;
    }
    
    .notification-dropdown {
        position: fixed;
        top: 60px !important;
        right: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
    
    .notification-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .notification-header h4 {
        font-size: var(--text-base);
    }
    
    .notification-mark-all {
        font-size: 11px;
        padding: 6px 10px;
        width: 100%;
        justify-content: center;
        border-radius: var(--radius);
        background: var(--primary-50);
        color: var(--primary-600);
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
    }
    
    .notification-title {
        font-size: var(--text-sm);
    }
    
    .notification-text {
        font-size: var(--text-xs);
        line-height: 1.5;
    }
    
    .notification-time {
        font-size: 10px;
    }
    
    .notification-footer {
        padding: 10px 16px;
    }
    
    .notification-view-all {
        font-size: var(--text-sm);
        padding: 8px;
        background: var(--primary-50);
        border-radius: var(--radius);
        color: var(--primary-600);
        font-weight: var(--font-semibold);
    }
}

/* ========================================
   PRODUCTS PAGE - INLINE EDIT
   ======================================== */

.editable-stat {
    position: relative;
    cursor: pointer;
    transition: all 0.15s;
}

.editable-stat:hover {
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
}

.editable-value {
    display: block;
    position: relative;
}

.edit-icon {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 9px;
    opacity: 0;
    transition: opacity 0.2s;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 3px;
    border-radius: 3px;
}

.editable-stat:hover .edit-icon {
    opacity: 1;
}

/* Editing mode */
.editable-stat.editing {
    background: rgba(59, 130, 246, 0.05);
    padding: 8px;
    border-radius: 8px;
}

.inline-edit-input,
.inline-edit-select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    text-align: center;
    transition: all 0.2s;
}

.inline-edit-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 24px;
}

.inline-edit-input:focus,
.inline-edit-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.inline-edit-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    justify-content: center;
}

.inline-edit-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inline-edit-save {
    background: #10b981;
    color: white;
}

.inline-edit-save:hover {
    background: #059669;
}

.inline-edit-cancel {
    background: #6b7280;
    color: white;
}

.inline-edit-cancel:hover {
    background: #4b5563;
}

.saving-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 500;
}

.saving-indicator i {
    font-size: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: var(--space-4);
}

.back-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--primary-300);
    color: var(--primary-600);
    transform: translateX(-2px);
}

.back-btn i {
    font-size: 14px;
}

/* Pending Spinner Small */
.pending-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--warning-200);
    border-top-color: var(--warning-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Pending Alert */
.pending-alert {
    display: flex;
    gap: var(--space-4);
    background: var(--warning-50);
    border: 1px solid var(--warning-200);
    border-left: 4px solid var(--warning-500);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.pending-alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning-100);
    border-radius: 50%;
    color: var(--warning-600);
    font-size: 20px;
}

.pending-alert-content h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--warning-900);
    margin-bottom: var(--space-2);
}

.pending-alert-content p {
    font-size: var(--text-sm);
    color: var(--warning-800);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.pending-alert-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pending-alert-content ul li {
    position: relative;
    padding-left: 20px;
    font-size: var(--text-sm);
    color: var(--warning-700);
    margin-bottom: var(--space-2);
}

.pending-alert-content ul li:before {
    content: '•';
    position: absolute;
    left: 6px;
    color: var(--warning-500);
    font-weight: bold;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.info-card {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

.info-card-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-100);
    border-radius: 6px;
    color: var(--primary-600);
    font-size: 14px;
}

.info-card-icon.success {
    background: var(--success-100);
    color: var(--success-600);
}

.info-card-icon.info {
    background: var(--primary-100);
    color: var(--primary-600);
}

.info-card-icon.warning {
    background: var(--warning-100);
    color: var(--warning-600);
}

.info-card-header h5 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color-light);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.info-value {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-medium);
    text-align: right;
}

.info-value.info {
    color: var(--primary-600);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.status-badge.completed {
    background: var(--success-100);
    color: var(--success-700);
}

.status-badge.shipped {
    background: var(--primary-100);
    color: var(--primary-700);
}

.status-badge.pending {
    background: var(--warning-100);
    color: var(--warning-700);
}

.status-badge.cancelled {
    background: var(--danger-100);
    color: var(--danger-700);
}

.status-badge.returned {
    background: var(--warning-100);
    color: var(--warning-700);
}

/* Delivery Badge */
.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.delivery-badge.fast {
    background: var(--warning-100);
    color: var(--warning-700);
}

.delivery-badge.normal {
    background: var(--primary-100);
    color: var(--primary-700);
}

/* Items Card */
.items-card {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
}

.items-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

.items-card-header h5 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.item-row {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    transition: all 0.2s ease;
}

.item-row:hover {
    background: var(--color-bg-secondary);
    border-color: var(--primary-200);
}

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

.item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image i {
    font-size: 32px;
    color: var(--color-text-tertiary);
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0 0 var(--space-3) 0;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-4);
}

.item-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-meta-label {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.item-meta-value {
    font-size: var(--text-xs);
    color: var(--color-text-primary);
    font-weight: var(--font-medium);
}

.item-meta-value.success {
    color: var(--success-600);
}

.item-meta-value.danger {
    color: var(--danger-600);
}

.item-meta-value.warning {
    color: var(--warning-600);
}

.item-meta-item.discount .item-meta-value {
    color: var(--warning-600);
}

.item-pricing {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-total {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.item-unit-price {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.item-discount-note {
    font-size: 11px;
    color: var(--warning-600);
    margin-top: 4px;
}

/* Bottom Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

/* Timeline Card */
.timeline-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
}

.timeline-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

.timeline-card-header h5 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-3);
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: -12px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-item.latest:before {
    background: var(--primary-300);
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.timeline-item.completed .timeline-icon {
    background: var(--success-100);
    border-color: var(--success-300);
    color: var(--success-600);
}

.timeline-item.shipped .timeline-icon {
    background: var(--primary-100);
    border-color: var(--primary-300);
    color: var(--primary-600);
}

.timeline-item.delivered .timeline-icon {
    background: var(--success-100);
    border-color: var(--success-400);
    color: var(--success-700);
}

.timeline-item.cancelled .timeline-icon {
    background: var(--danger-100);
    border-color: var(--danger-300);
    color: var(--danger-600);
}

.timeline-item.returned .timeline-icon {
    background: var(--warning-100);
    border-color: var(--warning-300);
    color: var(--warning-600);
}

.timeline-item.latest .timeline-icon {
    background: var(--primary-500);
    border-color: var(--primary-600);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-100);
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px var(--primary-100);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.15);
    }
}

.timeline-content {
    padding-top: 0;
}

.timeline-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.latest-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-500);
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.latest-event-badge:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.timeline-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-2);
}

.timeline-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    background: var(--color-bg-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 6px;
}

.empty-timeline {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    color: var(--color-text-tertiary);
}

.empty-timeline i {
    font-size: 32px;
    margin-bottom: var(--space-2);
}

.empty-timeline p {
    font-size: var(--text-sm);
    margin: 0;
}

/* Totals Card */
.totals-card {
    background: var(--color-surface-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
}

.totals-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

.totals-card-header h5 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color-light);
}

.totals-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.totals-row.subtotal {
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    margin: var(--space-2) 0;
}

.totals-row.profit {
    background: var(--success-50);
    border: 1px solid var(--success-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-top: var(--space-3);
}

.totals-row.profit.negative {
    background: var(--danger-50);
    border-color: var(--danger-200);
}

.totals-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.totals-label .totals-icon {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    opacity: .65;
    display: inline-block;
}

.totals-section-title.warning {
    color: var(--warning-600);
}

.totals-discount-label {
    color: #d97706;
}

.stat-margin {
    font-size: 14px;
    opacity: 0.8;
    margin-left: 6px;
}

.stat-sub-label {
    display: block;
    font-size: 11px;
    opacity: 0.7;
}

.stat-pending-value {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.totals-value {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-semibold);
    text-align: right;
}

.totals-value.positive {
    color: var(--success-600);
}

.totals-value.negative {
    color: var(--danger-600);
}

.totals-value small {
    font-size: 11px;
    margin-left: 4px;
    opacity: 0.8;
}

.totals-section-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: var(--space-4) 0 var(--space-2) 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
}

.pending-profit-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--space-4);
    background: var(--warning-50);
    border: 1px solid var(--warning-200);
    border-radius: var(--radius-md);
    color: var(--warning-700);
    font-size: var(--text-sm);
    margin-top: var(--space-3);
}

.pending-profit-box i {
    font-size: 18px;
}

/* Discount Section */
.discount-section {
    background: var(--warning-50);
    border: 1px solid var(--warning-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin: var(--space-3) 0;
}

.discount-item {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--warning-100);
}

.discount-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.discount-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discount-item-label {
    font-size: var(--text-xs);
    color: var(--warning-800);
    display: flex;
    align-items: center;
    gap: 6px;
}

.discount-item-label i {
    color: var(--warning-600);
}

.discount-item-value {
    font-size: var(--text-xs);
    color: var(--warning-700);
    font-weight: var(--font-semibold);
}

.discount-item-desc {
    font-size: 11px;
    color: var(--warning-700);
    margin-top: 4px;
    padding-left: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .item-row {
        flex-direction: column;
    }

    .item-pricing {
        text-align: left;
    }
}

/* ============================================
   ORDER DETAIL v2 — Minimal Layout Additions
   ============================================ */

/* Status Strip */
.od-status-strip {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    border-left: 4px solid var(--neutral-300);
}
.od-status-strip.completed  { border-left-color: var(--success-500); }
.od-status-strip.shipped    { border-left-color: var(--primary-500); }
.od-status-strip.pending    { border-left-color: var(--warning-500); }
.od-status-strip.cancelled  { border-left-color: var(--danger-500); }
.od-status-strip.returned   { border-left-color: var(--warning-600); }

.od-status-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.od-date {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
}
.od-date i { font-size: 10px; margin-right: 2px; }
.od-date-sep { font-size: 8px; color: var(--neutral-300); }

.od-tracking {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-left: auto;
}
.od-tracking code {
    font-size: 11px;
    background: var(--color-bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}
.od-mixed-note {
    font-size: var(--text-xs);
    color: var(--warning-600);
    font-weight: var(--font-medium);
}

/* 2 Column Detail Grid */
.od-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-4);
    align-items: start;
}
.od-detail-sidebar .info-card {
    margin-bottom: var(--space-4);
}
.od-detail-sidebar .info-card:last-child {
    margin-bottom: 0;
}

/* Items Total Row (multi-item) */
.od-items-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-3) var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-top: 2px solid var(--border-color);
    margin-top: var(--space-2);
}
.od-items-total-row strong {
    color: var(--color-text-primary);
}

/* Responsive */
@media (max-width: 992px) {
    .od-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .od-status-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .od-tracking { margin-left: 0; }
}

/* ── Subscription Cancel Link (under current plan card) ────── */
.usub-cancel-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    padding: 4px 0;
    transition: color 0.15s;
}
.usub-cancel-link:hover {
    color: var(--danger-600, #dc3545);
    text-decoration: underline;
}
.usub-cancelled-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    background: var(--warning-50, #fffbeb);
    border: 1px solid var(--warning-200, #fde68a);
    border-radius: 8px;
    font-size: 12px;
    color: var(--warning-700, #92400e);
    font-weight: 500;
}
.usub-reactivate-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    color: var(--primary-500, #2563eb);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
}
.usub-reactivate-link:hover {
    text-decoration: underline;
}

/* ── Subscription Modals (downgrade / cancel) ────────────────── */
.usub-sub-modal .usub-modal-dialog {
    max-width: 480px;
    height: auto;
    max-height: 90vh;
}
.usub-sub-modal .usub-modal-body {
    overflow-y: auto;
    padding: 24px;
}
.usub-modal-section {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.7;
}
.usub-modal-section ul {
    margin: 6px 0 0;
    padding-left: 18px;
}
.usub-modal-section-warning {
    background: var(--warning-50, #fffbeb);
    border: 1px solid var(--warning-200, #fde68a);
    color: var(--warning-800, #78350f);
}
.usub-modal-section-warning strong {
    font-weight: 600;
}
.usub-modal-section-info {
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}
.usub-modal-section-tip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
}
.usub-modal-section-tip strong {
    font-weight: 600;
}
.usub-modal-section-title {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.75;
}
.usub-modal-lead {
    font-size: 15px;
    color: var(--color-text-primary);
    line-height: 1.55;
    margin: 0 0 16px;
}
.usub-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.usub-modal-actions .btn-danger-solid {
    background: var(--danger-600, #dc3545);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background 0.15s;
}
.usub-modal-actions .btn-danger-solid:hover {
    background: var(--danger-700, #b91c1c);
}
.usub-modal-actions .btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: border-color 0.15s, color 0.15s;
}
.usub-modal-actions .btn-ghost:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}
.usub-modal-header-warning {
    background: var(--warning-50, #fffbeb);
    border-bottom: 1px solid var(--warning-200, #fde68a);
}
.usub-modal-header-warning h3 {
    color: var(--warning-800, #78350f);
}
.usub-modal-header-danger {
    background: var(--color-surface-secondary);
    border-bottom: 1px solid var(--color-border);
}

@media (max-width: 600px) {
    .usub-sub-modal .usub-modal-dialog {
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}

/* ============================================================
   Geçmiş Sipariş Maliyet Güncelleme Modalı
   ============================================================ */
.cost-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: 16px;
}
.cost-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cost-modal {
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 440px;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}
.cost-modal-overlay.active .cost-modal {
    transform: translateY(0) scale(1);
}

.cost-modal-header {
    padding: 28px 28px 20px;
    text-align: center;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.cost-modal-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: #fff;
    font-size: 20px;
}
.cost-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-primary, #111827);
    margin: 0 0 6px;
}
.cost-modal-subtitle {
    font-size: 13px;
    color: var(--color-text-secondary, #6b7280);
    margin: 0;
    line-height: 1.5;
}

.cost-modal-body {
    padding: 22px 28px;
}
.cost-modal-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
    margin: 0 0 12px;
}
.cost-modal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cost-modal-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.cost-modal-option:hover {
    border-color: #6366f1;
    background: var(--primary-50);
}
.cost-modal-option input[type="radio"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}
.cost-modal-option input[type="radio"]:checked ~ .cost-modal-option-content .cost-modal-option-title {
    color: #4f46e5;
}
.cost-modal-option:has(input:checked) {
    border-color: #6366f1;
    background: var(--primary-50);
}
.cost-modal-option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cost-modal-option-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary, #111827);
    transition: color 0.15s;
}
.cost-modal-option-desc {
    font-size: 12px;
    color: var(--color-text-secondary, #6b7280);
}

.cost-modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.cost-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.cost-modal-btn:active { transform: scale(0.97); }
.cost-modal-btn-skip {
    background: var(--color-surface-alt);
    color: var(--color-text-secondary);
}
.cost-modal-btn-skip:hover { background: var(--color-border); }
.cost-modal-btn-confirm {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}
.cost-modal-btn-confirm:hover { background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%); }
.cost-modal-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .cost-modal { border-radius: 12px 12px 0 0; }
    .cost-modal-overlay { align-items: flex-end; padding: 0; }
    .cost-modal-footer { flex-direction: column-reverse; }
    .cost-modal-btn { justify-content: center; }
}

/* ============================================
   PayTR Redirect Countdown (Subscription Modal)
   ============================================ */
.usub-paytr-redirect-info {
    text-align: center;
    padding: 2rem 1rem;
}
.usub-paytr-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--primary-50, #eff6ff); color: var(--primary-500, #2563eb);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 1.25rem;
}
.usub-paytr-redirect-info h4 {
    font-size: 1.05rem; font-weight: 600; color: var(--text-primary, #1e293b);
    margin: 0 0 1.25rem;
}
.usub-paytr-countdown {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--primary-500, #2563eb); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; margin: 0 auto 1.25rem;
    animation: paytrCountdownPulse 1s ease-in-out infinite;
}
@keyframes paytrCountdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.usub-phone-field {
    margin-bottom: 1rem;
}
.usub-phone-field .form-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    margin-bottom: 0.35rem;
}
.usub-phone-field .form-label i {
    margin-right: 0.25rem;
}
.usub-phone-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-tertiary, #94a3b8);
}
.usub-paytr-badges {
    display: flex; gap: 0.75rem; justify-content: center;
    flex-wrap: wrap; margin-bottom: 1.25rem;
}
.usub-paytr-badges span {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.8rem; color: var(--text-secondary, #64748b);
    background: var(--surface-secondary, #f8fafc);
    padding: 0.3rem 0.75rem; border-radius: 100px;
    border: 1px solid var(--color-border, #e2e8f0);
}
.usub-paytr-skip {
    background: none; border: none; color: var(--primary-500, #2563eb);
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    padding: 0.5rem 1rem; border-radius: 6px;
    transition: background 0.15s;
}
.usub-paytr-skip:hover { background: var(--primary-50, #eff6ff); }

/* ============================================
   Payment Result Page — Minimal
   ============================================ */
.payresult-wrap {
    max-width: 480px;
    margin: 0.5rem auto 2rem;
    padding: 0 1rem;
}
.payresult-state {
    animation: payresultIn 0.35s ease;
}
@keyframes payresultIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Card */
.payresult-card {
    background: var(--color-surface-primary, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 2rem 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 6px 24px rgba(0,0,0,0.04);
}
/* Icon */
.payresult-icon-sm {
    width: 48px; height: 48px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; margin-bottom: 1rem;
}
.payresult-icon-pending { background: var(--primary-50, #eff6ff); color: var(--primary-500, #2563eb); }
.payresult-icon-success { background: #f0fdf4; color: #16a34a; }
.payresult-icon-failed  { background: #fef2f2; color: #dc2626; }
.payresult-icon-timeout { background: #fffbeb; color: #d97706; }
/* Headings */
.payresult-card h2 {
    font-size: 1.15rem; font-weight: 700;
    color: var(--color-text-primary, #1e293b);
    margin: 0 0 0.35rem;
}
.payresult-sub {
    font-size: 0.88rem; color: var(--color-text-secondary, #64748b);
    margin: 0 0 1.5rem; line-height: 1.45;
}
.payresult-sub strong {
    color: var(--color-text-primary, #1e293b);
}
/* Progress */
.payresult-progress {
    width: 60%; height: 3px; margin: 0 auto 0;
    background: var(--color-border, #e2e8f0);
    border-radius: 2px; overflow: hidden;
}
.payresult-progress-fill {
    height: 100%; width: 0;
    background: var(--primary-500, #2563eb);
    border-radius: 2px;
    transition: width 1s linear;
}
/* Limits — 2×2 grid */
.payresult-limits {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    margin-bottom: 1rem; text-align: left;
}
.payresult-limit-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--color-surface-secondary, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    font-size: 0.82rem; color: var(--color-text-primary, #1e293b);
}
.payresult-limit-item i {
    color: var(--primary-500, #2563eb); font-size: 0.75rem;
    width: 16px; text-align: center; flex-shrink: 0;
}
/* Features — 2 col */
.payresult-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.75rem;
    margin-bottom: 1.25rem; text-align: left;
}
.payresult-feature-item {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0;
    font-size: 0.8rem; color: var(--color-text-secondary, #64748b);
}
.payresult-feature-item i {
    color: #16a34a; font-size: 0.65rem; width: 12px;
    text-align: center; flex-shrink: 0;
}
/* Amount */
.payresult-amount {
    font-size: 1.75rem; font-weight: 700;
    color: var(--color-text-primary, #1e293b);
    margin: -0.25rem 0 1.25rem;
    letter-spacing: -0.02em;
}
.payresult-amount span {
    font-size: 1rem; font-weight: 500;
    color: var(--color-text-secondary, #64748b);
}
/* Mail note */
.payresult-mail-note {
    font-size: 0.8rem; color: var(--color-text-tertiary, #94a3b8);
    margin: 0 0 1.5rem;
}
.payresult-mail-note i {
    margin-right: 0.3rem; font-size: 0.75rem;
}
/* Actions */
.payresult-actions {
    text-align: center;
}
a.payresult-btn-primary,
.payresult-btn-primary {
    display: inline-block;
    padding: 0.65rem 2.25rem;
    background: var(--primary-500, #2563eb); color: #fff !important;
    font-size: 0.9rem; font-weight: 600;
    border-radius: 8px; border: none;
    text-decoration: none; cursor: pointer;
    transition: background 0.15s;
}
a.payresult-btn-primary:hover,
.payresult-btn-primary:hover {
    background: var(--primary-600, #1d4ed8); color: #fff !important;
}
.payresult-btn-fail {
    background: #dc2626;
}
.payresult-btn-fail:hover {
    background: #b91c1c;
}
.payresult-links {
    display: flex; align-items: center; justify-content: center;
    gap: 0.75rem; margin-top: 0.75rem;
}
.payresult-links a {
    font-size: 0.8rem; color: var(--color-text-secondary, #64748b);
    text-decoration: none; transition: color 0.15s;
}
.payresult-links a:hover {
    color: var(--primary-500, #2563eb);
}
.payresult-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--color-text-tertiary, #cbd5e1);
}
/* Failed reasons */
.payresult-reasons {
    list-style: none; padding: 0; margin: 0 0 1.5rem;
    text-align: left;
    background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 8px; padding: 0.75rem 1rem;
}
.payresult-reasons li {
    font-size: 0.8rem; color: #b91c1c;
    padding: 0.2rem 0 0.2rem 0.9rem;
    position: relative;
}
.payresult-reasons li::before {
    content: '\2022'; position: absolute; left: 0;
}
/* Responsive */
@media (max-width: 480px) {
    .payresult-wrap { padding: 0 0.5rem; margin: 1.5rem auto; }
    .payresult-card { padding: 1.75rem 1.25rem; }
    .payresult-limits { grid-template-columns: 1fr; }
    .payresult-features { grid-template-columns: 1fr; }
}

/* ============================================
   Page Spinner - Sayfa Geçiş Yükleyici
   ============================================ */
.page-spinner {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: #2563eb;
    border-radius: 50%;
    display: none;
    pointer-events: none;
    z-index: 99999;
}
.page-spinner.active {
    display: block;
    animation: spinnerRotate 0.6s linear infinite;
}
@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

/* ============================================
   Zarar Eden Ürünler — Analytics
   ============================================ */
.unprofitable-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-500);
    border-radius: 20px;
}
.unprofitable-product-link {
    font-weight: 500;
    color: var(--primary-500);
    text-decoration: none;
}
.unprofitable-sku {
    font-size: 12px;
    color: var(--color-text-muted);
}
.unprofitable-return-tag {
    margin-left: 4px;
    color: var(--danger-500);
}
.unprofitable-detail-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}
.unprofitable-detail-btn:hover {
    color: var(--primary-500);
    background: rgba(37, 99, 235, 0.08);
}

/* Breakdown Modal */
.breakdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}
.breakdown-overlay.active {
    display: flex;
}
.breakdown-modal {
    max-width: 520px;
}
.modal-container {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    animation: fadeInUp 0.2s ease;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
}
.modal-header h4 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}
.modal-close-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 16px;
}
.modal-close-btn:hover {
    color: var(--color-text-primary);
    background: var(--color-surface-secondary);
}
.modal-body {
    padding: var(--space-4) var(--space-5);
}
.breakdown-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-muted);
}
.breakdown-summary {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}
.breakdown-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
}
.breakdown-badge-sales {
    background: #eff6ff;
    color: #2563eb;
}
.breakdown-badge-return {
    background: #fef2f2;
    color: #dc2626;
}
.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.breakdown-col-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}
.breakdown-line {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 13px;
}
.breakdown-line-name {
    color: var(--color-text-secondary);
}
.breakdown-line-val {
    font-variant-numeric: tabular-nums;
}
.breakdown-line-total {
    margin-top: var(--space-1);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
    font-weight: 600;
}
.breakdown-net {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-base);
}
.breakdown-net-loss {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-500);
}
.breakdown-net-profit {
    background: rgba(34, 197, 94, 0.08);
    color: var(--success-500);
}
@media (max-width: 480px) {
    .breakdown-grid { grid-template-columns: 1fr; }
}

/* Dark mode */
[data-theme="dark"] .modal-container {
    background: var(--color-surface-primary);
}
[data-theme="dark"] .unprofitable-detail-btn:hover {
    background: rgba(37, 99, 235, 0.15);
}

/* ==================== Demo Banner ==================== */
.demo-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.demo-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    flex-wrap: wrap;
}
.demo-banner-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #1e40af;
}
.demo-banner-text i {
    font-size: 1rem;
    color: #2563eb;
}
.demo-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.demo-banner-btn-register {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background 0.2s;
}
.demo-banner-btn-register:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}
.demo-banner-btn-exit {
    background: transparent;
    color: #1e40af;
    border: 1px solid #93c5fd;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s;
}
.demo-banner-btn-exit:hover {
    border-color: #2563eb;
    color: #1e3a8a;
    text-decoration: none;
}
@media (max-width: 640px) {
    .demo-banner-inner { gap: 0.75rem; }
    .demo-banner-actions { width: 100%; }
    .demo-banner-btn-register { flex: 1; justify-content: center; }
    .demo-banner-btn-exit { flex: 1; justify-content: center; }
}
[data-theme="dark"] .demo-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}
[data-theme="dark"] .demo-banner-text { color: #93c5fd; }
[data-theme="dark"] .demo-banner-text i { color: #60a5fa; }
[data-theme="dark"] .demo-banner-btn-exit {
    color: #93c5fd;
    border-color: #334155;
}
[data-theme="dark"] .demo-banner-btn-exit:hover {
    border-color: #60a5fa;
    color: #bfdbfe;
}

/* Demo Warning Toast */
.demo-toast {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    animation: demoToastIn 0.4s ease;
}
.demo-toast-inner {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    flex-wrap: wrap;
}
.demo-toast-inner > i {
    color: #b45309;
    font-size: 1rem;
    flex-shrink: 0;
}
.demo-toast-inner > span {
    flex: 1;
    font-size: 0.875rem;
    color: #78350f;
    font-weight: 500;
    min-width: 200px;
}
.demo-toast-btn {
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: background 0.2s;
    flex-shrink: 0;
}
.demo-toast-btn:hover {
    background: #d97706;
    color: #fff;
    text-decoration: none;
}
.demo-toast-close {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.demo-toast-close:hover {
    opacity: 1;
}
@keyframes demoToastIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .demo-toast-inner { gap: 0.5rem; }
    .demo-toast-btn { width: 100%; justify-content: center; }
}
[data-theme="dark"] .demo-toast {
    background: linear-gradient(135deg, #422006 0%, #451a03 100%);
    border-color: #b45309;
}
[data-theme="dark"] .demo-toast-inner > i { color: #fbbf24; }
[data-theme="dark"] .demo-toast-inner > span { color: #fde68a; }
[data-theme="dark"] .demo-toast-close { color: #fbbf24; }

/* ============================================
   Cookie Consent Bar
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-consent-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-consent-link {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent-link:hover {
    color: #60a5fa;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}

.cookie-btn-reject {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}

.cookie-btn-accept {
    background: #2563eb;
    color: #fff;
}

.cookie-btn-accept:hover {
    background: #1e40af;
}

@media (max-width: 640px) {
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}

[data-theme="dark"] .cookie-consent {
    background: rgba(2, 6, 23, 0.98);
    border-top-color: rgba(255, 255, 255, 0.06);
}


/* ===== GERİ BİLDİRİM WIDGET ===== */
.feedback-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.feedback-float-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.45);
}
.feedback-float-btn i { font-size: 1rem; }

/* Overlay */
.feedback-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(0,0,0,0.45);
    align-items: center;
    justify-content: center;
}
.feedback-modal-overlay.show {
    display: flex;
}

/* Modal kutusu */
.feedback-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    animation: feedbackSlideIn 0.2s ease;
}
@keyframes feedbackSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.feedback-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.feedback-modal-close:hover { color: #374151; background: #f3f4f6; }

.feedback-modal-header {
    text-align: center;
    margin-bottom: 20px;
}
.feedback-modal-header h3 {
    margin: 8px 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}
.feedback-modal-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Yıldızlar */
.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}
.feedback-star-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #d1d5db;
    cursor: pointer;
    padding: 2px;
    transition: color 0.15s, transform 0.1s;
    line-height: 1;
}
.feedback-star-btn:hover,
.feedback-star-btn.active { color: #f59e0b; }
.feedback-star-btn:hover { transform: scale(1.15); }

.feedback-star-label {
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    min-height: 18px;
    margin-bottom: 14px;
    font-weight: 500;
}

/* Textarea */
.feedback-textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    color: #374151;
}
.feedback-textarea:focus { border-color: #2563eb; }

/* Hata */
.feedback-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: center;
}

/* Gönder butonu */
.feedback-submit-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.feedback-submit-btn:hover:not(:disabled) { background: #1d4ed8; }
.feedback-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Mobil */
@media (max-width: 480px) {
    .feedback-float-btn { display: none; }
    .feedback-weekly-card { display: none !important; }
    .feedback-modal-box { margin: 16px; padding: 24px 18px 20px; }
}

/* ===== MAVİBOT SIDEBAR TEASER ===== */
.mavibot-teaser {
    cursor: default !important;
    position: relative;
}
.mavibot-teaser i {
    animation: mavibot-pulse 3s ease-in-out infinite;
}
.mavibot-badge {
    font-size: 10px;
    font-weight: 500;
    background: var(--sidebar-hover-bg);
    color: var(--color-text-tertiary);
    border: 1px solid var(--color-border);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-left: auto;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}
@keyframes mavibot-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== HAFTALIK PROAKTİF FEEDBACK KARTI ===== */
.feedback-weekly-card {
    position: fixed;
    bottom: 90px;
    right: 28px;
    z-index: 1055;
    width: 340px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #2563eb;
    border-radius: 14px;
    padding: 22px 20px 18px;
    box-shadow: 0 8px 32px rgba(37,99,235,0.18);
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.35s ease-out, opacity 0.35s ease-out;
    pointer-events: none;
}
.feedback-weekly-card.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.feedback-weekly-card-header {
    margin-bottom: 14px;
}
.feedback-weekly-card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 4px;
}
.feedback-weekly-card-header p {
    font-size: 0.8rem;
    color: #3b82f6;
    margin: 0;
    font-weight: 500;
}
.feedback-weekly-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}
.feedback-weekly-star-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #bfdbfe;
    cursor: pointer;
    padding: 2px;
    transition: color 0.15s, transform 0.1s;
    line-height: 1;
}
.feedback-weekly-star-btn:hover,
.feedback-weekly-star-btn.active { color: #f59e0b; }
.feedback-weekly-star-btn:hover { transform: scale(1.15); }
.feedback-weekly-star-label {
    font-size: 0.75rem;
    color: #6b7280;
    min-height: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}
.feedback-weekly-textarea {
    width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-family: inherit;
    resize: none;
    outline: none;
    background: rgba(255,255,255,0.7);
    color: #374151;
    transition: border-color 0.2s;
}
.feedback-weekly-textarea:focus { border-color: #2563eb; background: #fff; }
.feedback-weekly-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 6px;
    display: none;
}
.feedback-weekly-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 10px;
}
.feedback-weekly-submit {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.feedback-weekly-submit:hover:not(:disabled) { background: #1d4ed8; }
.feedback-weekly-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.feedback-weekly-dismiss {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.feedback-weekly-dismiss:hover { color: #374151; }

@media (max-width: 480px) {
    .feedback-weekly-card {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 130px;
    }
}

/* ============================================
   Dashboard Notifications Panel
   ============================================ */
.dashboard-notifications {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.dashboard-notif {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    border-radius: var(--radius-lg);
    padding: var(--space-4) 40px var(--space-4) var(--space-5);
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: dn-slideIn 0.4s ease both;
}

/* --- on_dashboard: dikkat çekici, kapatılabilir --- */
.dashboard-notif-info:not(.pinned) {
    background: linear-gradient(135deg, #eef2ff, #dbeafe);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--primary-500);
    animation: dn-slideIn 0.4s ease both, dn-glow-blue 3s ease-in-out 1s 2;
}
.dashboard-notif-success:not(.pinned) {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-left: 4px solid var(--success-500);
    animation: dn-slideIn 0.4s ease both, dn-glow-green 3s ease-in-out 1s 2;
}
.dashboard-notif-warning:not(.pinned) {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid var(--warning-500);
    animation: dn-slideIn 0.4s ease both, dn-glow-yellow 3s ease-in-out 1s 2;
}
.dashboard-notif-danger:not(.pinned) {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 4px solid var(--danger-500);
    animation: dn-slideIn 0.4s ease both, dn-glow-red 3s ease-in-out 1s 2;
}
.dashboard-notif-system:not(.pinned) {
    background: linear-gradient(135deg, #eef2ff, #dbeafe);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--primary-500);
    animation: dn-slideIn 0.4s ease both, dn-glow-blue 3s ease-in-out 1s 2;
}

/* --- pinned: sakin, kalıcı, rahatsız etmeyen --- */
.dashboard-notif.pinned {
    background: var(--color-bg-primary);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--primary-500);
    box-shadow: var(--shadow-sm);
}

/* Glow animasyonları: sayfa açıldığında 2 kez nabız atar, sonra durur */
@keyframes dn-glow-blue {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 12px 2px rgba(37, 99, 235, 0.15); }
}
@keyframes dn-glow-green {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.15); }
}
@keyframes dn-glow-yellow {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 12px 2px rgba(245, 158, 11, 0.18); }
}
@keyframes dn-glow-red {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.18); }
}
@keyframes dn-slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Icon */
.dashboard-notif-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.dashboard-notif-info .dashboard-notif-icon,
.dashboard-notif-system .dashboard-notif-icon {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-500);
}
.dashboard-notif-success .dashboard-notif-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-600);
}
.dashboard-notif-warning .dashboard-notif-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-600);
}
.dashboard-notif-danger .dashboard-notif-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-600);
}

/* Content */
.dashboard-notif-content {
    flex: 1;
    min-width: 0;
}
.dashboard-notif-content strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}
.dashboard-notif-content p {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}
.dashboard-notif-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: var(--font-medium);
    color: var(--primary-500);
    text-decoration: none;
    margin-top: 6px;
    transition: color 0.2s;
}
.dashboard-notif-link:hover {
    color: var(--primary-600, #1d4ed8);
    text-decoration: none;
}

/* Meta */
.dashboard-notif-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.dashboard-notif-time {
    font-size: 11px;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}
.dashboard-notif-badge-pinned {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: var(--font-semibold);
    color: var(--primary-500);
    background: var(--primary-100);
    padding: 2px 8px;
    border-radius: var(--radius-full, 9999px);
    white-space: nowrap;
}

/* Dismiss button */
.dashboard-notif-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(0,0,0,0.06);
    color: var(--color-text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.dashboard-notif-dismiss:hover {
    background: var(--danger-100);
    color: var(--danger-600);
}

/* Mobile */
@media (max-width: 768px) {
    .dashboard-notif {
        flex-wrap: wrap;
        padding: var(--space-3) var(--space-4);
        gap: var(--space-3);
    }
    .dashboard-notif-meta {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding-top: var(--space-2);
        border-top: 1px solid rgba(0,0,0,0.06);
    }
    .dashboard-notif-content {
        flex-basis: calc(100% - 52px);
    }
}

/* Dark Theme */
[data-theme="dark"] .dashboard-notif-info:not(.pinned),
[data-theme="dark"] .dashboard-notif-system:not(.pinned) {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border-color: rgba(37, 99, 235, 0.2);
    border-left-color: var(--primary-500);
}
[data-theme="dark"] .dashboard-notif-success:not(.pinned) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-color: rgba(16, 185, 129, 0.2);
    border-left-color: var(--success-500);
}
[data-theme="dark"] .dashboard-notif-warning:not(.pinned) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border-color: rgba(245, 158, 11, 0.2);
    border-left-color: var(--warning-500);
}
[data-theme="dark"] .dashboard-notif-danger:not(.pinned) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.2);
    border-left-color: var(--danger-500);
}
[data-theme="dark"] .dashboard-notif.pinned {
    background: var(--color-bg-primary);
    border-color: rgba(37, 99, 235, 0.2);
    border-left-color: var(--primary-500);
}
[data-theme="dark"] .dashboard-notif-dismiss {
    background: rgba(255,255,255,0.08);
    color: var(--color-text-secondary);
}
[data-theme="dark"] .dashboard-notif-dismiss:hover {
    background: rgba(239, 68, 68, 0.15);
}


/* ============================================
   MaviBot — Card List Styles (v2)
   ============================================ */

/* ─── Feature Gate (v2) ────────────────────────────────────── */
.mb-gate {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    padding: var(--space-4) 0;
}
.mb-gate-card {
    flex: 1;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 12px);
    padding: var(--space-6) var(--space-5);
}
.mb-gate-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-3);
}
.mb-gate-avatar > i {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}
.mb-gate-lock {
    position: absolute;
    bottom: -4px; right: -8px;
    width: 24px; height: 24px;
    background: var(--warning-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #fff;
    border: 2px solid var(--color-surface);
}
.mb-gate-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 var(--space-1);
    color: var(--color-text-primary);
}
.mb-gate-subtitle {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-4);
}
.mb-gate-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--warning-50);
    border: 1px solid var(--warning-200);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--warning-800);
    margin-bottom: var(--space-4);
}
.mb-gate-alert i {
    color: var(--warning-500);
}
a.mb-gate-cta,
a.mb-gate-cta:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff !important;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
a.mb-gate-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    color: #fff !important;
    text-decoration: none;
}
.mb-gate-plan-hint {
    font-size: 0.72rem;
    color: var(--color-text-tertiary, var(--gray-400));
    margin: var(--space-2) 0 0;
}

/* Feature list */
.mb-gate-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mb-gate-feat {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 10px);
    transition: box-shadow 0.2s;
}
.mb-gate-feat:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.mb-gate-feat-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--primary-500);
}
.mb-gate-feat strong {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1px;
}
.mb-gate-feat span {
    font-size: 0.76rem;
    color: var(--color-text-secondary);
    line-height: 1.35;
}
.mb-gate-feat-body {
    flex: 1;
    min-width: 0;
}

/* Active feat — tespit bulunan tip */
.mb-gate-feat-active {
    border-color: var(--warning-200);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), transparent);
}
.mb-gate-feat-icon-alert {
    background: var(--warning-50) !important;
    color: var(--warning-600) !important;
}
.mb-gate-feat-count {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--warning-700);
}
.mb-gate-feat-count i {
    font-size: 0.65rem;
    margin-right: 2px;
}
.mb-gate-feat-lock {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--gray-400);
}

/* Gate responsive */
@media (max-width: 768px) {
    .mb-gate {
        flex-direction: column;
    }
    .mb-gate-features {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .mb-gate-feat {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
}
@media (max-width: 480px) {
    .mb-gate-feat {
        flex: 1 1 100%;
    }
}

/* Gate dark */
[data-theme="dark"] .mb-gate-card {
    background: var(--color-bg-primary);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .mb-gate-feat {
    background: var(--color-bg-primary);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .mb-gate-alert {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}
[data-theme="dark"] .mb-gate-lock {
    border-color: var(--color-bg-primary);
}
[data-theme="dark"] .mb-gate-feat-active {
    border-color: rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
}
[data-theme="dark"] .mb-gate-feat-lock {
    background: rgba(255,255,255,0.06);
    color: var(--gray-500);
}

/* ─── MaviBot Welcome Avatar ───────────────────────────────── */
.mb-welcome-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}
.mb-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

@media (max-width: 768px) {
    .mb-avatar {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 1rem;
    }
}

/* ─── Disclaimer ───────────────────────────────────────────── */
.mb-disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: var(--space-3);
    font-size: 0.75rem;
    color: var(--color-text-tertiary, var(--gray-400));
    background: var(--gray-50);
    border-radius: var(--radius, 8px);
    line-height: 1.4;
}
.mb-disclaimer i {
    flex-shrink: 0;
    font-size: 0.7rem;
}
[data-theme="dark"] .mb-disclaimer {
    background: rgba(255,255,255,0.03);
    color: var(--gray-500);
}

/* ─── Toolbar ──────────────────────────────────────────────── */
.mavibot-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

/* Badge inside tp-filter-btn */
.tp-filter-btn .mb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px; height: 16px;
    padding: 0 5px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.35);
    border-radius: 8px;
    margin-left: 4px;
}
.tp-filter-btn:not(.active) .mb-badge {
    background: var(--primary-500);
    color: #fff;
}
.tp-filter-btn:not(.active) .mb-badge-muted {
    background: var(--gray-400);
}

/* Filter select */
.mavibot-filter-select {
    padding: 6px 30px 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 8px);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    font-family: inherit;
    transition: border-color 0.2s;
}
.mavibot-filter-select:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Tab content */
.mavibot-tab-content { display: none; }
.mavibot-tab-content.active { display: block; }

/* ─── Card List ────────────────────────────────────────────── */
.mb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Card ─────────────────────────────────────────────────── */
.mb-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 10px);
    border-left: 3px solid var(--gray-300);
    transition: box-shadow 0.2s, opacity 0.3s, transform 0.3s;
}
.mb-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.mb-card-new {
    background: linear-gradient(135deg, rgba(37,99,235,0.02), transparent);
}

/* Severity left border */
.mb-severity-critical { border-left-color: var(--danger-500); }
.mb-severity-high { border-left-color: var(--warning-500); }
.mb-severity-medium { border-left-color: var(--primary-500); }
.mb-severity-low { border-left-color: var(--gray-400); }

/* Card main row */
.mb-card-main {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 12px 14px 8px;
}

/* Left icon */
.mb-card-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}
.mb-icon-critical { background: var(--danger-50); color: var(--danger-500); }
.mb-icon-high { background: var(--warning-50); color: var(--warning-600); }
.mb-icon-medium { background: var(--primary-50); color: var(--primary-500); }
.mb-icon-low { background: var(--gray-100); color: var(--gray-500); }
.mb-icon-resolved { background: var(--success-50); color: var(--success-500); }

/* Card body */
.mb-card-body {
    flex: 1;
    min-width: 0;
}
.mb-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.mb-card-type {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-tertiary, var(--gray-400));
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mb-card-severity {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mb-sev-critical { background: var(--danger-50); color: var(--danger-600); }
.mb-sev-high { background: var(--warning-50); color: var(--warning-700); }
.mb-sev-medium { background: var(--primary-50); color: var(--primary-600); }
.mb-sev-low { background: var(--gray-100); color: var(--gray-500); }

.mb-card-new-dot {
    width: 7px; height: 7px;
    background: var(--primary-500);
    border-radius: 50%;
    flex-shrink: 0;
}

.mb-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.35;
    margin-bottom: 2px;
}
.mb-card-desc {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
    margin-bottom: 4px;
}
.mb-card-rec {
    font-size: 0.75rem;
    color: var(--primary-600);
    background: var(--primary-50);
    padding: 5px 8px;
    border-radius: 6px;
    line-height: 1.4;
    display: inline-block;
    margin-top: 2px;
}
.mb-card-rec i {
    color: var(--warning-500);
    font-size: 0.68rem;
    margin-right: 2px;
}

/* Impact column */
.mb-card-impact {
    flex-shrink: 0;
    text-align: right;
    padding-left: var(--space-3);
}
.mb-card-impact-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--success-600);
    white-space: nowrap;
}
.mb-card-impact-label {
    font-size: 0.65rem;
    color: var(--color-text-tertiary, var(--gray-400));
}

/* Card footer */
.mb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px 10px;
    gap: var(--space-2);
}
.mb-card-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.mb-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    color: var(--color-text-secondary);
}
.mb-action:hover { background: var(--gray-50); }
.mb-action-seen:hover { color: var(--primary-500); border-color: var(--primary-200); background: var(--primary-50); }
.mb-action-handled:hover { color: var(--success-600); border-color: var(--success-100); background: var(--success-50); }
.mb-action-ignored:hover { color: var(--gray-500); background: var(--gray-50); }
.mb-action:disabled { opacity: 0.5; cursor: default; }

.mb-card-time {
    font-size: 0.7rem;
    color: var(--color-text-tertiary, var(--gray-400));
    white-space: nowrap;
}

/* Resolved card */
.mb-card-resolved {
    opacity: 0.7;
}
.mb-card-resolved:hover {
    opacity: 0.85;
}
.mb-resolved-tag {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--success-600);
}
.mb-resolved-tag i { font-size: 0.62rem; }

/* ─── Empty state ──────────────────────────────────────────── */
.mb-empty {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-text-secondary);
}
.mb-empty i {
    font-size: 2rem;
    color: var(--gray-300);
    margin-bottom: var(--space-3);
    display: block;
}
.mb-empty p {
    font-size: 0.88rem;
    margin: 0;
}

/* ─── Load more / Period info ──────────────────────────────── */
.mb-load-more {
    text-align: center;
    padding: var(--space-4) 0 var(--space-2);
}
.mb-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-500);
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    text-decoration: none;
    transition: all 0.2s;
}
.mb-load-more-btn:hover {
    background: var(--primary-100);
    color: var(--primary-600);
    text-decoration: none;
}
.mb-period-info {
    text-align: center;
    font-size: 0.72rem;
    color: var(--color-text-tertiary, var(--gray-400));
    padding: var(--space-2) 0;
}


/* ============================================
   MaviBot — Dark Theme
   ============================================ */
[data-theme="dark"] .mavibot-filter-select {
    background-color: var(--color-bg-primary);
    border-color: rgba(255,255,255,0.1);
    color: var(--color-text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
}
[data-theme="dark"] .mb-card {
    background: var(--color-bg-primary);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .mb-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .mb-card-new {
    background: linear-gradient(135deg, rgba(37,99,235,0.06), transparent);
}
[data-theme="dark"] .mb-card-rec {
    background: rgba(37,99,235,0.1);
    color: var(--primary-400);
}
[data-theme="dark"] .mb-action {
    border-color: rgba(255,255,255,0.1);
    color: var(--color-text-secondary);
}
[data-theme="dark"] .mb-action:hover {
    background: rgba(255,255,255,0.06);
}
[data-theme="dark"] .mb-load-more-btn {
    background: rgba(37,99,235,0.1);
    border-color: rgba(37,99,235,0.25);
    color: var(--primary-400);
}
[data-theme="dark"] .mb-empty i {
    color: var(--gray-600);
}


/* ============================================
   MaviBot — Responsive
   ============================================ */
@media (max-width: 768px) {
    .mavibot-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .mavibot-toolbar .tp-filter-group {
        align-self: flex-start;
    }
    .mavibot-filter-select {
        width: 100%;
    }
    .mb-card-main {
        padding: 10px 12px 6px;
    }
    .mb-card-impact {
        display: none;
    }
    .mb-card-footer {
        padding: 4px 12px 8px;
    }
}

@media (max-width: 480px) {
    .mb-card-actions {
        gap: 3px;
    }
    .mb-action {
        padding: 3px 8px;
        font-size: 0.68rem;
    }
}

/* ============================================
   Referans Sistemi
   ============================================ */

/* Sidebar badge */
.nav-badge {
    background: var(--warning-500);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}

/* Hero banner */
.ref-hero {
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 40px 36px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.ref-hero-left {
    flex: 1;
    min-width: 0;
}
.ref-hero-content {
    margin-bottom: 28px;
}
.ref-hero-greeting {
    font-size: 0.88rem;
    color: var(--primary-500);
    font-weight: 600;
    margin: 0 0 8px;
}
.ref-hero h2 {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 14px;
    color: var(--color-text-primary);
}
.ref-hero-desc {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 520px;
    line-height: 1.6;
}
.ref-hero-desc strong {
    color: var(--color-text-primary);
    font-weight: 600;
}
.ref-hero-link {
    max-width: 600px;
}

/* Hero visual — orbit illüstrasyon */
.ref-hero-visual {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ref-orbit {
    position: relative;
    width: 160px;
    height: 160px;
}
.ref-orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--warning-500), #f97316);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 24px rgba(245,158,11,0.3);
    z-index: 2;
    animation: ref-center-pulse 3s ease-in-out infinite;
}
@keyframes ref-center-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}
.ref-orbit-track {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}
.ref-orbit-track-1 { animation: ref-spin 10s linear infinite; }
.ref-orbit-track-2 { animation: ref-spin 10s linear infinite; animation-delay: -3.33s; }
.ref-orbit-track-3 { animation: ref-spin 10s linear infinite; animation-delay: -6.66s; }

@keyframes ref-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.ref-orbit-user {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: #fff;
    top: -18px;
    left: -18px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    transform: translateX(72px) rotate(0deg);
}
/* Counter-rotate ile ikon her zaman dik kalır */
.ref-orbit-track-1 .ref-orbit-user { animation: ref-counter-spin 10s linear infinite; }
.ref-orbit-track-2 .ref-orbit-user { animation: ref-counter-spin 10s linear infinite; animation-delay: -3.33s; }
.ref-orbit-track-3 .ref-orbit-user { animation: ref-counter-spin 10s linear infinite; animation-delay: -6.66s; }

@keyframes ref-counter-spin {
    from { transform: translateX(72px) rotate(0deg); }
    to { transform: translateX(72px) rotate(-360deg); }
}
.ref-orbit-user-1 { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.ref-orbit-user-2 { background: linear-gradient(135deg, #10b981, #34d399); }
.ref-orbit-user-3 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

[data-theme="dark"] .ref-orbit-center {
    box-shadow: 0 6px 24px rgba(245,158,11,0.15);
}
[data-theme="dark"] .ref-orbit-user {
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}
.ref-link-box {
    display: flex;
    gap: 8px;
}
.ref-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    cursor: text;
    font-family: inherit;
}
.ref-link-input:focus {
    outline: none;
    border-color: var(--primary-500);
}
.ref-link-btn {
    padding: 12px 24px;
    background: var(--primary-500);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ref-link-btn:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}
.ref-link-btn.copied {
    background: var(--success-500);
    color: #fff;
}

/* Stat icon renk sınıfları */
.ref-stat-icon-blue {
    background: var(--primary-50);
    color: var(--primary-500);
}
.ref-stat-icon-green {
    background: var(--success-50);
    color: var(--success-500);
}
.ref-stat-icon-amber {
    background: var(--warning-50);
    color: var(--warning-500);
}

/* İstatistik kartları */
.ref-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.ref-stat-card {
    background: var(--color-surface-primary);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--color-border);
    position: relative;
}
.ref-stat-highlight {
    border-color: var(--warning-500);
    background: linear-gradient(135deg, var(--warning-50) 0%, var(--color-surface-primary) 100%);
}
.ref-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.ref-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.ref-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}
.ref-use-gift-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--warning-500);
    font-weight: 600;
    text-decoration: none;
}
.ref-use-gift-link:hover {
    color: var(--warning-600);
}

/* Nasıl Çalışır */
.ref-steps-section {
    margin-bottom: 24px;
}
.ref-steps-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 16px;
}
.ref-steps-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.ref-step-card {
    flex: 1;
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
}
.ref-step-card strong {
    display: block;
    font-size: 0.88rem;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}
.ref-step-card span {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}
.ref-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 14px;
}
.ref-step-icon-blue { background: var(--primary-50); color: var(--primary-500); }
.ref-step-icon-green { background: var(--success-50); color: var(--success-500); }
.ref-step-icon-purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.ref-step-icon-amber { background: var(--warning-50); color: var(--warning-500); }

.ref-step-num {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--color-text-tertiary);
}
.ref-step-connector {
    display: flex;
    align-items: center;
    padding: 0 6px;
    color: var(--color-text-tertiary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

[data-theme="dark"] .ref-step-icon-purple {
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
}

/* Geçmiş kartları ve tablo */
.ref-history-card {
    background: var(--color-surface-primary);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
}
.ref-history-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 16px;
}
.ref-table-wrap {
    overflow-x: auto;
}
.ref-table {
    width: 100%;
    border-collapse: collapse;
}
.ref-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
}
.ref-table td {
    padding: 14px 12px;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.ref-person {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ref-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-100);
    color: var(--primary-500);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ref-name {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.88rem;
}
.ref-email {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Durum badge'leri */
.ref-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.ref-status-pending {
    background: var(--warning-100);
    color: var(--warning-800);
}
.ref-status-connected {
    background: var(--primary-100);
    color: var(--primary-600);
}
.ref-status-completed {
    background: var(--success-100);
    color: var(--success-700);
}
.ref-status-used {
    background: var(--color-surface-secondary);
    color: var(--color-text-secondary);
}
.ref-status-expired {
    background: var(--danger-100);
    color: var(--danger-700);
}

.ref-gift-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.ref-gift-type i {
    color: var(--color-text-muted);
}

/* Gift banner (abonelik sayfası) */
.gift-banner {
    background: linear-gradient(135deg, var(--warning-50) 0%, var(--warning-100) 100%);
    border: 1px solid var(--warning-500);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--warning-900);
}
.gift-banner i {
    font-size: 1.3rem;
    color: var(--warning-500);
}

/* Hediye hakkı kullan butonu (abonelik kartı) */
.usub-gift-form {
    margin-top: 8px;
}
.usub-use-gift-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.usub-use-gift-btn:hover {
    background: linear-gradient(135deg, var(--warning-600), var(--warning-700));
    transform: translateY(-1px);
}

/* Dark mode overrides */
[data-theme="dark"] .ref-stat-icon-blue {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
}
[data-theme="dark"] .ref-stat-icon-green {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
}
[data-theme="dark"] .ref-stat-icon-amber {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
}
[data-theme="dark"] .ref-stat-highlight {
    background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, var(--color-surface-primary) 100%);
}
[data-theme="dark"] .ref-status-pending {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
}
[data-theme="dark"] .ref-status-connected {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
}
[data-theme="dark"] .ref-status-completed {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
}
[data-theme="dark"] .ref-status-used {
    background: rgba(255,255,255,0.05);
    color: var(--color-text-muted);
}
[data-theme="dark"] .ref-status-expired {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
}
[data-theme="dark"] .gift-banner {
    background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.15) 100%);
    border-color: rgba(245,158,11,0.3);
    color: #fbbf24;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ref-hero {
        flex-direction: column;
        padding: 28px 20px;
    }
    .ref-hero-visual {
        display: none;
    }
    .ref-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .ref-stat-card {
        padding: 16px 12px;
    }
    .ref-stat-value {
        font-size: 1.5rem;
    }
    .ref-steps-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .ref-step-connector {
        display: none;
    }
    .ref-step-card {
        padding: 20px 16px;
    }
    .ref-link-box {
        flex-direction: column;
    }
    .ref-link-btn {
        justify-content: center;
    }
    .ref-how-it-works, .ref-history-card {
        padding: 20px;
    }
}
