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

:root {
    /* Corporate Color Scheme - Muted & Professional */
    --color-chocolate: #2D3748;
    --color-chocolate-light: #4A5568;
    --color-cream: #F7FAFC;
    --color-cream-dark: #EDF2F7;

    /* Primary - Slate Blue (Corporate) */
    --primary-color: #4A5568;
    --primary-hover: #2D3748;
    --primary-light: #718096;
    --primary-dark: #1A202C;
    --secondary-color: #718096;

    /* Semantic Colors - Muted versions */
    --success-color: #38A169;
    --success-light: #C6F6D5;
    --warning-color: #D69E2E;
    --warning-light: #FEFCBF;
    --danger-color: #E53E3E;
    --danger-light: #FED7D7;
    --info-color: #3182CE;
    --info-light: #BEE3F8;

    /* Neutral Colors */
    --background: #F7FAFC;
    --surface: #FFFFFF;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #A0AEC0;
    --border-color: #E2E8F0;
    --border-light: #EDF2F7;

    /* Accent - Subdued */
    --accent-color: #DD6B20;
    --accent-hover: #C05621;

    /* Sidebar - Dark Corporate */
    --sidebar-bg: #1A202C;
    --sidebar-hover: #2D3748;
    --sidebar-active: #4A5568;
    --sidebar-text: rgba(255, 255, 255, 0.8);
    --sidebar-text-active: #FFFFFF;
    --sidebar-width: 250px;

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows - Subtle */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08);

    /* Card & Surface Colors */
    --card-bg: #FFFFFF;
    --cream: #F7FAFC;

    /* Background aliases (used across dashboard & components) */
    --bg-secondary: var(--background);
    --bg-hover: var(--border-light);
    --hover-bg: var(--border-light);
}

/* Utility classes */
.text-muted {
    color: var(--text-secondary);
    font-style: italic;
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Shopify linked icon in leads list */
.shopify-linked-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
}

.shopify-linked-icon svg {
    display: inline-block;
    vertical-align: middle;
}

/* Hide mobile elements on desktop */
.mobile-leads-list,
.mobile-orders-list {
    display: none;
}

.mobile-fab {
    display: none;
}

.mobile-filter-toggle {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

body {
    font-family: var(--font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #F8FAFC;
    color: #1E293B;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.modal-header h2,
.section-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Page headers */
.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Links */
a {
    color: var(--info-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #1D4ED8;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 1rem 1rem;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.logo {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem;
}

.logo-img {
    max-width: 140px;
    height: auto;
    max-height: 40px;
    filter: brightness(1.1);
}

/* Connection Status Indicator */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.connection-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.connection-status.online .status-dot {
    background-color: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.connection-status.offline .status-dot {
    background-color: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-cream-dark);
    border-top-color: var(--color-chocolate);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.nav-menu {
    list-style: none;
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sidebar-text);
    position: relative;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-item:hover .nav-icon {
    opacity: 1;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 0 3px 3px 0;
}

/* Navigation Groups */
.nav-group {
    margin-bottom: 1.25rem;
}

.nav-group-title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    padding: 0.5rem 1rem 0.375rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.nav-group .nav-item {
    margin-bottom: 2px;
}

/* Submenu Styles */
.nav-item.has-submenu {
    flex-wrap: wrap;
}

.nav-item.has-submenu > span {
    flex: 1;
}

.submenu-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin-left: auto;
}

.nav-item.has-submenu:hover .submenu-arrow {
    opacity: 0.8;
}

.nav-item.has-submenu.expanded .submenu-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-submenu {
    display: none;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    padding-left: 1rem;
}

.nav-item.has-submenu.expanded .nav-submenu {
    display: block;
}

.nav-subitem {
    padding: 0.5rem 0.75rem;
    margin-bottom: 2px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--sidebar-text);
    position: relative;
}

.nav-subitem .nav-icon {
    width: 16px;
    height: 16px;
}

.nav-subitem:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-subitem.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}

.nav-subitem.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 0 2px 2px 0;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
}

/* Sidebar Bottom - User Section */
.sidebar-bottom {
    flex-shrink: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    background: rgba(0, 0, 0, 0.15);
}

/* News Button in Sidebar */
.news-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.news-button svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.news-button:hover svg {
    opacity: 1;
}

.news-version-badge {
    margin-left: auto;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--color-chocolate, #64748b);
    color: white;
    border-radius: 10px;
}

.news-version-badge:empty {
    display: none;
}

.current-user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.current-user-display {
    flex: 1;
    min-width: 0;
}

.current-user-display .user-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-user-display .user-role {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Main Content - Finlab Style */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 2.5rem;
    background: #F8FAFC;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal overflow */
    min-width: 0; /* Allow shrinking in flex/grid */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.search-bar {
    flex: 1;
    max-width: 480px;
}

.search-bar input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    padding-left: 3rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1rem center;
    background-size: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.12);
}

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

/* Buttons — Compose Email Style */
.btn {
    padding: 9px 20px;
    border: none;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    padding: 9px 24px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 85, 104, 0.25);
}

.btn-secondary {
    background: none;
    color: var(--text-secondary, #64748b);
    border: 1px solid var(--border-color, #e5e7eb);
}

.btn-secondary:hover {
    background: var(--hover-bg, #f1f5f9);
    color: var(--text-primary, #1a1a1a);
    border-color: var(--text-secondary, #94a3b8);
}

.btn-danger {
    background: var(--danger-color);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
}

.btn-danger:hover {
    background: #C53030;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.25);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-success {
    background: var(--success-color);
    color: #FFFFFF;
    border: 1px solid var(--success-color);
}

.btn-success:hover {
    background: #2F855A;
    border-color: #2F855A;
}

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

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Dashboard Year Header */
.dashboard-year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.year-selector-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-selector-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

.year-selector-group select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--background);
    cursor: pointer;
}

.year-selector-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.planning-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--warning-light);
    color: var(--warning-color);
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.year-comparison-toggle {
    display: flex;
    align-items: center;
}

.year-comparison-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.year-comparison-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Year-over-year change indicator */
.yoy-change {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.yoy-change .positive {
    color: var(--success-color);
}

.yoy-change .negative {
    color: var(--error-color);
}

/* Dashboard Layout - Finlab Style */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.75rem;
    min-width: 0; /* Allow grid to shrink below content size */
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    min-width: 0; /* Allow flex container to shrink */
    overflow: hidden; /* Contain children */
}

.dashboard-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    min-width: 0; /* Allow section to shrink */
    overflow: hidden; /* Contain children */
}

.dashboard-section h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* Widget header with fullscreen button */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.widget-header h2 {
    margin-bottom: 0;
    padding-bottom: 0.5rem;
    flex: 1;
}

.widget-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-header-actions .year-select {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.fullscreen-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.fullscreen-btn svg {
    width: 16px;
    height: 16px;
}

.refresh-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

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

/* Fullscreen widget mode */
.dashboard-section.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1001 !important;
    background: white !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 2rem 3rem !important;
    overflow: auto !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none !important;
}

.dashboard-section.fullscreen .widget-header h2 {
    font-size: 1.5rem;
}

.dashboard-section.fullscreen .table-container {
    flex: 1;
    overflow: auto;
}

.dashboard-section.fullscreen table {
    font-size: 1rem;
}

.dashboard-section.fullscreen th,
.dashboard-section.fullscreen td {
    padding: 1rem;
}

.dashboard-section.fullscreen .probability-grid {
    gap: 1.5rem;
}

.dashboard-section.fullscreen .probability-card {
    padding: 1.5rem;
}

.dashboard-section.fullscreen .fullscreen-btn svg {
    transform: rotate(180deg);
}

/* Fullscreen overlay background */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Body class when widget is fullscreen - helps Chrome Mac */
body.widget-fullscreen-active {
    overflow: hidden !important;
}

body.widget-fullscreen-active .sidebar,
body.widget-fullscreen-active .main-content {
    pointer-events: none;
}

body.widget-fullscreen-active .dashboard-section.fullscreen {
    pointer-events: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0;
    padding-bottom: 0.5rem;
}

/* Editable table */
.editable-table .editable-cell {
    cursor: pointer;
    position: relative;
}

.editable-table .editable-cell:hover {
    background: var(--background);
}

.editable-table .editable-cell::after {
    content: '✎';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.editable-table .editable-cell:hover::after {
    opacity: 1;
}

.editable-table input.cell-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    text-align: right;
    background: white;
}

.editable-table input.cell-input-name {
    text-align: left;
}

.editable-table .actions-col {
    width: 40px;
}

.delete-row-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.delete-row-btn:hover {
    opacity: 1;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.dashboard-table th {
    text-align: left;
    padding: 0.75rem;
    background: var(--background);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.dashboard-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table tbody tr:hover {
    background: var(--background);
}

.dashboard-table tfoot td {
    font-weight: 700;
    background: var(--background);
    border-top: 2px solid var(--border-color);
}

.dashboard-table .loading-cell,
.dashboard-table .no-data,
.dashboard-table .error-cell {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.dashboard-table .error-cell {
    color: var(--danger);
}

.dashboard-table .total-row {
    background: var(--background);
    border-top: 2px solid var(--border-color);
}

.dashboard-table .total-row td {
    font-weight: 600;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-card {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.overview-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.overview-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overview-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.overview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.overview-value {
    font-weight: 600;
    font-size: 0.875rem;
}

.overview-stat.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 0 -0.5rem;
}

.overview-stat.highlight .overview-label {
    color: rgba(255, 255, 255, 0.8);
}

.overview-stat.highlight .overview-value {
    color: white;
}

.overview-stat.large .overview-value {
    font-size: 1.5rem;
}

/* Progress Bar in Pipeline Table */
.progress-cell {
    width: 120px;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-fill.good {
    background: var(--success-color);
}

.progress-fill.warning {
    background: var(--warning-color);
}

.progress-fill.danger {
    background: var(--danger-color);
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Executive Reclamation Stats Widget */
.executive-reclamation-stats {
    margin-top: 1rem;
}

.executive-reclamation-stats h4 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 1rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reclamation-stat-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.reclamation-stat-box {
    flex: 1;
    background: var(--background);
    border-radius: 0.5rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-left: 3px solid var(--primary-color);
}

.reclamation-stat-box.open {
    border-left-color: var(--warning-color);
}

.reclamation-stat-box.closed {
    border-left-color: var(--success-color);
}

.reclamation-stat-box .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.reclamation-stat-box .stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reclamation-avg-time {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.reclamation-avg-time .time-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.avg-time-info {
    display: flex;
    flex-direction: column;
}

.avg-time-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.avg-time-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.reclamation-trends {
    background: var(--background);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 1rem;
}

.reclamation-trends h4 {
    margin-top: 0;
}

.trend-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.trend-label {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.trend-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.75rem;
}

.trend-change {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    background: var(--success-color);
    color: white;
}

.trend-change.negative {
    background: var(--danger-color);
}

.trend-change.neutral {
    background: var(--text-secondary);
}

.reclamation-top-issues {
    margin-top: 1rem;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.top-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: var(--background);
    border-radius: 0.35rem;
    font-size: 0.8rem;
}

.top-list-item .rank {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}

.top-list-item .name {
    flex: 1;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-list-item .count {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Marketing Leads Stats */
.marketing-leads-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.marketing-leads-stats .stat-card {
    background: var(--background);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    border-left: 4px solid #8b5cf6;
}

.marketing-leads-stats .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.marketing-leads-stats .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

@media (max-width: 768px) {
    .marketing-leads-stats {
        grid-template-columns: 1fr;
    }
}

/* Probability Grid - Finlab Style */
.probability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.probability-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
}

.probability-card.stage-0 { border-left-color: #EF4444; }
.probability-card.stage-10 { border-left-color: #F97316; }
.probability-card.stage-20 { border-left-color: #F59E0B; }
.probability-card.stage-40 { border-left-color: #EAB308; }
.probability-card.stage-60 { border-left-color: #84CC16; }
.probability-card.stage-75 { border-left-color: #22C55E; }
.probability-card.stage-90 { border-left-color: #10B981; }
.probability-card.stage-100 { border-left-color: #059669; }

.probability-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.probability-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Negative values in red */
.negative {
    color: var(--danger-color);
}

.positive {
    color: var(--success-color);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container {
    min-height: 200px;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.chart-bar-label {
    width: 120px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chart-bar-track {
    flex: 1;
    height: 24px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 0.75rem;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.chart-bar-value {
    width: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: right;
}

/* Recent Activity */
.recent-activity {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-activity h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.recent-leads-list {
    max-height: 300px;
    overflow-y: auto;
}

.recent-lead-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-lead-item:last-child {
    border-bottom: none;
}

.recent-lead-name {
    font-weight: 500;
}

.recent-lead-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Leads Table View */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filters select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    background: var(--surface);
}

/* Tables */
.table-container {
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--background);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

th:hover {
    background: var(--border-light);
}

td {
    font-size: 0.875rem;
    color: var(--text-primary);
}

tr:hover {
    background: var(--background);
}

tr:last-child td {
    border-bottom: none;
}

/* Clickable lead rows */
#leadsTableBody tr {
    cursor: pointer;
}

#leadsTableBody tr:hover {
    background: var(--border-light);
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.status-nyt-lead, .status-nyt\ lead {
    background: #fef3c7;
    color: #d97706;
}

.status-kontaktet {
    background: var(--info-light);
    color: #1D4ED8;
}

.status-booket {
    background: var(--success-light);
    color: #059669;
}

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

.status-aktiv-kunde {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-key-account {
    background: #EDE9FE;
    color: #6D28D9;
}

/* Priority Badges */
.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-high {
    background: var(--danger-light);
    color: var(--danger-color);
}

.priority-medium {
    background: var(--warning-light);
    color: #B45309;
}

.priority-low {
    background: var(--border-light);
    color: var(--text-secondary);
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.625rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    background: var(--background);
    color: var(--text-secondary);
}

.action-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.action-btn.edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.action-btn.edit:hover {
    background: #bfdbfe;
}

.action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #fecaca;
}

.action-btn.email {
    background: #f0fdf4;
    color: #16a34a;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
}

.action-btn.email:hover {
    background: #dcfce7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination button:hover {
    background: var(--background);
}

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

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

/* Pipeline View */
.pipeline-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

/* Pipeline - Finlab Style */
.pipeline-column {
    min-width: 280px;
    background: #F8FAFC;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #E2E8F0;
}

.pipeline-column h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pipeline-cards {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    max-height: 500px;
    overflow-y: auto;
}

.pipeline-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: all 0.15s ease;
    border: 1px solid var(--border-color);
}

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

.pipeline-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.pipeline-column.drag-over {
    background: rgba(74, 85, 104, 0.05);
    border: 2px dashed var(--primary-color);
}

.column-revenue {
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.column-count {
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
    background: #16a34a;
    font-weight: 500;
}

.toast.toast-warning {
    background: #d97706;
}

/* Micro-update toast — fun mini notifications */
.micro-update-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.micro-update-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.micro-update-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-chocolate);
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 420px;
    min-width: 320px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.micro-update-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.micro-update-emoji {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.micro-update-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.micro-update-message {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.micro-update-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}

.micro-update-close:hover {
    color: var(--text-primary);
}

/* ============ ORIGIN BADGES ============ */

.origin-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 4px;
    white-space: nowrap;
}

.origin-b2c {
    background: #e6f9e6;
    color: #1a7a1a;
}

.origin-sales {
    background: #e6eeff;
    color: #2952a3;
}

.origin-sap {
    background: #fff3e0;
    color: #b35900;
}

/* ============ LEAD COMPLETENESS INDICATOR ============ */

/* Lead name cell with completeness ring */
.lead-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.completeness-indicator {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.completeness-indicator:hover {
    transform: scale(1.1);
}

.lead-name-info {
    min-width: 0;
}

.completeness-ring {
    display: block;
}

/* Mobile lead card completeness */
.mobile-lead-completeness {
    flex-shrink: 0;
    cursor: pointer;
}

.mobile-lead-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.mobile-lead-name-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Completeness popup/modal */
.completeness-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    animation: fadeIn 0.2s ease;
}

.completeness-popup-content {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 360px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.completeness-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.completeness-popup-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.completeness-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
}

.completeness-popup-close:hover {
    color: var(--text-primary);
}

.completeness-popup-ring {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.completeness-section {
    margin-bottom: 1rem;
}

.completeness-section h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.completeness-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.completeness-section li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.completeness-missing li {
    color: var(--text-secondary);
}

.missing-icon {
    color: #ef4444;
    font-weight: bold;
}

.completed-icon {
    color: #22c55e;
    font-weight: bold;
}

.completeness-popup-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.completeness-popup-actions .btn {
    width: 100%;
}

/* ============ FEEDBACK BUBBLE & MODAL ============ */

/* Floating feedback bubble - speech bubble style */
.feedback-bubble {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #2563eb;
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 24px 24px 6px 24px; /* Speech bubble shape */
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5), 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.feedback-bubble:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
    background: #1d4ed8;
}

.feedback-bubble:active {
    transform: translateY(-1px) scale(0.98);
}

.feedback-bubble svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.feedback-bubble-label {
    white-space: nowrap;
}

/* Hide label on smaller screens, show only icon */
@media (max-width: 768px) {
    .feedback-bubble {
        bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 80px); /* Above mobile FAB + bottom nav */
        right: 16px;
        padding: 0.75rem;
        border-radius: 50%;
    }

    .feedback-bubble-label {
        display: none;
    }

    .feedback-bubble svg {
        width: 24px;
        height: 24px;
    }
}

/* Feedback modal specific styles */
#feedbackModal.modal {
    z-index: 2000;
}

#feedbackModal .modal-content,
#feedbackModal .feedback-modal-content {
    max-width: 520px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* feedback modal now uses unified header style */

#feedbackModal form,
#feedbackModal #feedbackForm {
    padding: 20px;
}

.feedback-intro {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.feedback-intro p {
    margin: 0;
    font-size: 0.9rem;
    color: #1e40af;
    line-height: 1.6;
}

/* Feedback type selector */
.feedback-type-selector {
    display: flex;
    gap: 1rem;
}

.feedback-type-option {
    flex: 1;
    cursor: pointer;
}

.feedback-type-option input {
    display: none;
}

.feedback-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.feedback-type-btn svg {
    width: 20px;
    height: 20px;
}

.feedback-type-option input:checked + .feedback-type-btn {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.feedback-type-btn.bug:hover {
    border-color: #fca5a5;
    color: #dc2626;
    background: #fef2f2;
}

.feedback-type-option input:checked + .feedback-type-btn.bug {
    border-color: #ef4444;
    color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.feedback-type-btn.feature:hover {
    border-color: #86efac;
    color: #16a34a;
    background: #f0fdf4;
}

.feedback-type-option input:checked + .feedback-type-btn.feature {
    border-color: #22c55e;
    color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Feedback form fields */
#feedbackModal .form-group {
    margin-bottom: 1.25rem;
}

#feedbackModal .form-group label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: block;
}

#feedbackModal input[type="text"],
#feedbackModal textarea {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#feedbackModal input[type="text"]:focus,
#feedbackModal textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

#feedbackModal textarea {
    resize: vertical;
    min-height: 100px;
}

/* feedback modal now uses unified btn and form-actions styles */

/* Screenshot preview */
.screenshot-preview {
    margin-top: 0.75rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.screenshot-preview img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

.screenshot-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Checkbox label styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Drag state on body */
body.is-dragging .pipeline-card:not(.dragging) {
    opacity: 0.6;
}

body.is-dragging .pipeline-column:not(.drag-over) {
    opacity: 0.8;
}

.pipeline-card-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.pipeline-card-seller {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.pipeline-card-revenue {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--success-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface, #FFFFFF);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Webkit scrollbar for modals */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color, #e5e7eb);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted, #94a3b8);
}

.modal-small {
    max-width: 420px;
    padding: 0;
    text-align: center;
}

.modal-small .modal-delete-body {
    padding: 2rem 1.5rem 0.5rem;
}

.modal-small h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-small p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--surface, #fff);
    color: var(--text-primary, #1a1a1a);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 svg,
.modal-header h2 .modal-icon {
    color: var(--text-secondary, #64748b);
    flex-shrink: 0;
}

.close-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.125rem;
    cursor: pointer;
    color: var(--text-secondary, #64748b);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    background: var(--hover-bg, #f1f5f9);
    color: var(--text-primary, #1a1a1a);
}

/* Modal body padding for forms */
.modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.modal-content > form > .form-grid {
    padding: 20px;
}

.modal-content > form > .form-group {
    padding: 0 20px;
    margin-bottom: 1rem;
}

.modal-content > form > .form-group:first-child {
    padding-top: 20px;
}

/* Modal delete body */
.modal-delete-body {
    padding: 24px 20px 16px;
    text-align: center;
}

.modal-delete-body p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    line-height: 1.6;
}

/* Form - Finlab Style */
#leadForm {
    padding: 0;
}

/* Lead Modal specific improvements */
#leadModal .modal-content {
    max-width: 800px;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background: var(--surface, #fff);
    padding: 0;
    flex-shrink: 0;
}

.modal-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.75rem 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.modal-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.025);
}

.modal-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.modal-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Tooltip on hover */
.modal-tab[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary, #1f2937);
    color: white;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-tab[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-primary, #1f2937);
    pointer-events: none;
    z-index: 100;
}

.tab-badge {
    background: var(--danger-color);
    color: white;
    font-size: 0.5rem;
    font-weight: 700;
    width: 15px;
    height: 15px;
    line-height: 15px;
    border-radius: 50%;
    text-align: center;
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
}

/* Tab Content */
.modal-tab-content {
    display: none;
    padding: 1.5rem;
}

.modal-tab-content.active {
    display: block;
}

/* Lead Quick Info (for non-Shopify leads) */
.lead-quick-info {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Lead Action Bar - Quick status/assignment controls */
.lead-action-bar {
    margin: 0 -1.5rem 1rem -1.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
}

.action-bar-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

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

.action-bar-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.action-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.action-select:hover {
    border-color: var(--primary-light);
}

.action-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(221, 107, 32, 0.12);
}

/* Status select color coding */
.action-select.status-select[data-status="Nyt Lead"] { border-left: 3px solid #D97706; }
.action-select.status-select[data-status="Kontaktet"] { border-left: 3px solid #1D4ED8; }
.action-select.status-select[data-status="Booket"] { border-left: 3px solid #10B981; }
.action-select.status-select[data-status="Aktiv Kunde"] { border-left: 3px solid #1E40AF; }
.action-select.status-select[data-status="Key Account"] { border-left: 3px solid #6D28D9; }
.action-select.status-select[data-status="Afvist"] { border-left: 3px solid #EF4444; }

/* Priority select color coding */
.action-select.priority-select[data-priority="Low"] { border-left: 3px solid #94A3B8; }
.action-select.priority-select[data-priority="Medium"] { border-left: 3px solid #F59E0B; }
.action-select.priority-select[data-priority="High"] { border-left: 3px solid #EF4444; }

/* Notes in action bar */
.action-bar-notes {
    margin-top: 0.625rem;
}

.action-bar-notes label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.action-bar-notes label svg {
    opacity: 0.6;
}

.action-bar-notes textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    resize: vertical;
    min-height: 2.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    line-height: 1.45;
}

.action-bar-notes textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(221, 107, 32, 0.12);
}

.action-bar-notes textarea::placeholder {
    color: var(--text-muted, #A0AEC0);
    font-style: italic;
}

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

/* Legacy lead-status-section / lead-notes-section kept for backwards compat */
.lead-status-section { display: none; }
.lead-notes-section { display: none; }

/* Details Section */
.details-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.details-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.details-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

/* Segment Data - Section hint */
.section-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.75rem 0;
}

/* Segment Data - Chip buttons (product tags, season prefs) */
.segment-chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.segment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.segment-chip:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.segment-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.segment-chip .chip-suggested {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(251, 191, 36, 0.2);
    color: #d97706;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.segment-chip.active .chip-suggested {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Segment Data - Read-only value display */
.segment-readonly-value {
    padding: 0.55rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.segment-readonly-value.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* No Tasks Message */
.no-tasks-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Tabbed Modal adjustments */
.modal-tabbed .form-actions {
    padding: 14px 20px;
    margin: 0;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--surface, #fff);
}

#leadModal .shopify-section {
    margin: 0 -1.5rem 1.5rem -1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
}

#leadModal .tasks-section {
    background: var(--background);
    margin: 0 -1.5rem 1.25rem -1.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

#leadModal .tasks-section h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.15s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.15);
}

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

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--surface, #fff);
    flex-shrink: 0;
    margin: 0;
    border-radius: 0 0 12px 12px;
}

/* Current User Section in Sidebar */
.current-user-section {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.current-user-section label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.current-user-section select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Authenticated User Display */
.current-user-section .user-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
}

.current-user-section .user-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.current-user-section .user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-user-section .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Filter Input */
.filter-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    background: var(--surface);
    width: 120px;
}

/* Tasks Section in Modal (at top) */
.tasks-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Revenue by Category Section */
.revenue-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Potentiale Tab Header */
.potentiale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.potentiale-year-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.potentiale-year-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.potentiale-year-selector select {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
}

.potentiale-year-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

#potentialePlanningBadge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#potentialePlanningBadge svg {
    stroke: white;
}

/* Probability selector in Potentiale tab */
.probability-group {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--surface-variant, #f8fafc);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.probability-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.probability-group select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
}

.probability-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.revenue-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.revenue-category {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 0.375rem;
    border-left: 3px solid var(--primary-color);
}

.revenue-category:last-child {
    margin-bottom: 0;
}

.revenue-category h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.revenue-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.revenue-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.revenue-grid .form-group,
.revenue-grid-2col .form-group {
    margin-bottom: 0;
}

.revenue-grid .form-group label,
.revenue-grid-2col .form-group label {
    font-size: 0.75rem;
}

.revenue-grid .form-group input,
.revenue-grid-2col .form-group input {
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* Color coding for categories using data attributes */
.revenue-category[data-category="overall"] { border-left-color: #10b981; } /* Overall - green */
.revenue-category[data-category="easter"] { border-left-color: #f59e0b; } /* Easter - orange */
.revenue-category[data-category="christmas"] { border-left-color: #ef4444; } /* Christmas - red */
.revenue-category[data-category="custom"] { border-left-color: #8b5cf6; } /* Custom - purple */

/* Total Kundepotentiale bar */
.potentiale-total-bar {
    margin-top: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
}

.potentiale-total-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.potentiale-total-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.potentiale-total-header .potentiale-year {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    background: var(--surface);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.potentiale-total-numbers {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.75rem;
}

.potentiale-total-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.potentiale-total-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.potentiale-total-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.potentiale-total-value.potentiale-realized {
    color: #10b981;
}

.potentiale-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.potentiale-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.potentiale-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.potentiale-progress-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
    min-width: 36px;
    text-align: right;
}

/* ============ Sælger Potentiale Widget ============ */
#widget-seller-potential .dashboard-table td,
#widget-seller-potential .dashboard-table th {
    font-size: 0.78rem;
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
}

#widget-seller-potential .dashboard-table tfoot td {
    border-top: 2px solid var(--border-color);
    background: var(--surface);
}

/* ============ Sales: Min Kundepotentiale ============ */
.my-pot-summary {
    padding: 0.75rem 0;
}

.my-pot-main {
    text-align: center;
    margin-bottom: 1rem;
}

.my-pot-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.my-pot-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.my-pot-progress-wrap {
    margin-bottom: 1rem;
}

.my-pot-progress-bar {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.my-pot-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.my-pot-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.my-pot-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.my-pot-cat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

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

/* Top 10 clickable rows */
.clickable-row:hover {
    background: rgba(37, 99, 235, 0.05) !important;
}

.probability-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-secondary);
}

.probability-badge.prob-100 { background: #dcfce7; color: #166534; }
.probability-badge.prob-90 { background: #d1fae5; color: #065f46; }
.probability-badge.prob-75 { background: #dbeafe; color: #1e40af; }
.probability-badge.prob-60 { background: #fef3c7; color: #92400e; }
.probability-badge.prob-40 { background: #fde68a; color: #92400e; }
.probability-badge.prob-20 { background: #fee2e2; color: #991b1b; }
.probability-badge.prob-10 { background: #fecaca; color: #991b1b; }
.probability-badge.prob-0 { background: #f3f4f6; color: #6b7280; }

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    padding-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.tasks-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.add-task-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.add-task-row input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
}

.add-task-row input[type="text"]:focus,
.add-task-row input[type="date"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

.add-task-row input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
}

.task-assigned-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    min-width: 120px;
}

.task-assigned-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

.add-task-form {
    margin-bottom: 0.75rem;
}

.add-task-description {
    margin-top: 0.5rem;
}

.add-task-description textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.add-task-description textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

.add-task-actions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

.lead-tasks-list {
    max-height: 180px;
    overflow-y: auto;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-text {
    text-decoration: line-through;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 0.875rem;
}

.task-due {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: var(--surface);
    border-radius: 0.25rem;
}

.task-due.overdue {
    color: var(--danger-color);
    background: #fee2e2;
}

.task-assigned {
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    padding: 0.2rem 0.5rem;
    background: var(--primary-color);
    border-radius: 1rem;
    white-space: nowrap;
}

.task-delete {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

/* My Tasks View */
.my-tasks-container {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.my-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.my-task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.my-task-item.completed {
    opacity: 0.6;
    border-left-color: var(--success-color);
}

.my-task-item.completed .my-task-text {
    text-decoration: line-through;
}

.my-task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.my-task-content {
    flex: 1;
}

.my-task-text {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.my-task-lead {
    font-size: 0.75rem;
    color: var(--primary-color);
    cursor: pointer;
}

.my-task-lead:hover {
    text-decoration: underline;
}

.my-task-due {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    background: var(--surface);
    border-radius: 0.25rem;
}

.my-task-due.overdue {
    color: var(--danger-color);
    background: #fee2e2;
}

/* Task Sections */
.task-section {
    margin-bottom: 1.5rem;
}

.task-section:last-child {
    margin-bottom: 0;
}

.task-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.task-section-icon {
    font-size: 1rem;
}

.task-count-badge {
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    margin-left: auto;
}

/* Admin Task Overview - Specialist Workload */
.admin-workload-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.workload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.workload-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #ccc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.workload-card.low {
    border-left-color: #28a745;
    background: #f8fff9;
}

.workload-card.medium {
    border-left-color: #ffc107;
    background: #fffef5;
}

.workload-card.high {
    border-left-color: #dc3545;
    background: #fff8f8;
}

.workload-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.workload-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workload-stats .stat {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.workload-stats .stat.pending {
    background: #e3f2fd;
    color: #1565c0;
}

.workload-stats .stat.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.workload-stats .stat.overdue {
    background: #ffebee;
    color: #c62828;
}

.my-task-item.assigned-to-me {
    border-left-color: #666;
    background: #fff;
}

.my-task-item.assigned-by-me {
    border-left-color: #999;
    background: #fafafa;
}

.my-task-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.task-from {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
}

.task-assigned-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    background: #e9ecef;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    border: 1px solid #ced4da;
}

.task-status-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-family: monospace;
    color: #666;
}

/* Task description and customer info - klassisk/konservativt design */
.task-description-box {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.8rem;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
}

.task-customer-details {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.8rem;
    color: #333;
}

.task-detail-row {
    margin-bottom: 0.25rem;
}

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

.task-label {
    font-weight: 600;
    color: #555;
}

.task-customer-details a {
    color: #0066cc;
    text-decoration: none;
}

.task-customer-details a:hover {
    text-decoration: underline;
}

/* Navigation Badge - iPhone style */
.nav-badge {
    background: #ff3b30;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.task-filters {
    display: flex;
    gap: 0.5rem;
}

.task-filter-btn {
    background: var(--surface);
    border: 1px solid var(--border-color);
}

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

/* Task count badge in table */
.task-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-count.empty {
    background: var(--border-color);
    color: var(--text-secondary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive - 1920x1080 optimization */
/* ── Full HD optimization (1920x1080 and similar) ── */
@media (max-width: 1920px) {
    /* Cap main content so tables/widgets don't stretch too wide */
    .main-content {
        max-width: calc(1920px - var(--sidebar-width));
    }

    /* Dashboard: tighten the right sidebar on FHD */
    .dashboard-layout {
        grid-template-columns: 1fr 340px;
    }

    /* Probability grid: cap columns so cards aren't too thin */
    .probability-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    /* Charts row: max 2 per row on FHD for better readability */
    .charts-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pipeline columns: give them flex:1 so they fill evenly */
    .pipeline-column {
        flex: 1 1 280px;
        max-width: 340px;
    }

    /* Lead modal: use more of the available space */
    #leadModal .modal-content {
        max-width: 900px;
    }

    /* Leads table: constrain column widths for balanced layout */
    #leadsTable th:first-child,
    #leadsTable td:first-child {
        width: 28%;
    }

    #leadsTable th:last-child,
    #leadsTable td:last-child {
        width: 140px;
    }

    /* Filters: ensure they don't feel too spread out */
    .filters select,
    .filters input {
        max-width: 180px;
    }
}

@media (max-width: 1600px) {
    /* Reduce dashboard sidebar width on smaller FHD screens */
    .dashboard-layout {
        grid-template-columns: 1fr 300px;
        gap: 1.25rem;
    }

    /* Slightly reduce main content padding */
    .main-content {
        padding: 1.5rem 2rem;
    }

    /* Reduce dashboard section padding */
    .dashboard-section {
        padding: 1.25rem;
    }

    /* Smaller probability card padding on narrower screens */
    .probability-card {
        padding: 0.875rem 0.5rem;
    }

    .probability-label {
        font-size: 0.7rem;
    }

    .probability-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 1400px) {
    /* Further reduce sidebar width */
    .dashboard-layout {
        grid-template-columns: 1fr 280px;
    }

    /* Reduce sidebar width for more content space */
    :root {
        --sidebar-width: 220px;
    }

    .main-content {
        padding: 1.25rem 1.5rem;
    }

    /* Charts row: smaller minimum */
    .charts-row {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }

    /* Pipeline columns: narrower for FHD screens */
    .pipeline-column {
        min-width: 220px;
        padding: 1rem;
    }

    .pipeline-column h3 {
        font-size: 0.8rem;
    }

    .pipeline-card {
        padding: 0.875rem;
    }

    .pipeline-cards {
        max-height: 400px;
    }
}

/* Responsive - Stack on smaller screens */
@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 1rem 0.5rem;
    }

    .logo h1 {
        font-size: 1rem;
        text-align: center;
    }

    .nav-item {
        justify-content: center;
        padding: 0.75rem;
    }

    .nav-item span:not(.icon) {
        display: none;
    }

    .main-content {
        margin-left: 60px;
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
    }

    .search-bar {
        max-width: 100%;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

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

    .dashboard-sidebar {
        grid-template-columns: 1fr;
    }

    /* probability-grid uses auto-fit, no override needed */

    .pipeline-board {
        flex-direction: column;
    }

    .pipeline-column {
        min-width: 100%;
    }
}

/* ===========================================
   MOBILE PHONE STYLES - Professional & Clean
   =========================================== */
@media (max-width: 768px) {
    /* Hide sidebar completely on mobile */
    .sidebar {
        display: none !important;
    }

    /* Full width main content */
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
        width: 100% !important;
        background: #f5f6f8;
    }

    /* Hide views not accessible via mobile bottom nav */
    #dashboard-view, #pipeline-view, #mytasks-view,
    #specialist-dashboard-view, #newcustomers-view, #customizedorders-view,
    #products-view, #reclamations-view, #allorders-view, #spons-view,
    #reklamation-dashboard-view, #admin-view, #audiences-view, #shopifyimport-view,
    #changelog-view, #leadfollowup-view {
        display: none !important;
    }

    /* Allow these views to show when active (controlled by bottom nav + action cards) */
    #mobile-dashboard-view.active,
    #leads-view.active,
    #orders-view.active,
    #marketing-view.active,
    #newcustomers-view.active,
    #leadfollowup-view.active {
        display: block !important;
    }

    /* Mobile back bar for sub-views navigated from dashboard */
    .mobile-back-bar {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1rem;
        background: #1a1a2e;
        color: white;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        position: sticky;
        top: 0;
        z-index: 90;
    }

    .mobile-back-bar:active {
        background: #252545;
    }

    .mobile-back-bar svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }

    .mobile-back-bar span {
        font-size: 0.9rem;
        font-weight: 600;
    }

    /* ── HEADER: Clean sticky search ── */
    .header {
        padding: 0.625rem 1rem;
        gap: 0;
        background: #1a1a2e;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .header .search-bar {
        width: 100%;
        max-width: 100%;
    }

    .header .search-bar input {
        font-size: 16px;
        padding: 0.625rem 1rem 0.625rem 2.75rem;
        border-radius: 10px;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.12);
        color: white;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .header .search-bar input::placeholder {
        color: rgba(255,255,255,0.45);
    }

    .header .search-bar input:focus {
        background: rgba(255,255,255,0.18);
        border-color: rgba(255,255,255,0.25);
        box-shadow: none;
    }

    /* Search icon color override for dark bg */
    .header .search-bar input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 0.75rem center;
        background-size: 18px;
    }

    #addLeadBtn {
        display: none !important;
    }

    /* ── VIEW HEADER: Minimal with filter toggle ── */
    .view-header {
        padding: 0.625rem 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        background: white;
        border-bottom: 1px solid #e2e5e9;
        position: sticky;
        top: 47px;
        z-index: 99;
    }

    .view-header h2 {
        font-size: 1rem;
        margin: 0;
        font-weight: 600;
        color: #1a1a2e;
        letter-spacing: -0.01em;
    }

    /* ── FILTERS: Collapsed behind toggle ── */
    .filters {
        display: none !important;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem 1rem;
        background: white;
        border-bottom: 1px solid #e2e5e9;
    }

    .filters.mobile-filters-open {
        display: flex !important;
    }

    .filters select,
    .filters input {
        font-size: 14px;
        padding: 0.625rem 0.75rem;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        background: #f8f9fa;
        width: 100%;
        min-width: unset;
        flex-shrink: unset;
    }

    /* Two-column grid for filters when open */
    .filters.mobile-filters-open {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .filters .filter-searchable-select {
        grid-column: 1 / -1;
    }

    /* ── MOBILE LEAD CARDS ── */
    #leadsTable {
        display: none !important;
    }

    .mobile-leads-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem 6rem;
    }

    .mobile-lead-card {
        background: white;
        border-radius: 12px;
        padding: 0.875rem 1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        cursor: pointer;
        transition: transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
        border: 1px solid #e8eaed;
    }

    .mobile-lead-card:active {
        transform: scale(0.985);
    }

    .mobile-lead-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mobile-lead-name {
        font-weight: 600;
        font-size: 0.9375rem;
        color: #1a1a2e;
        flex: 1;
        line-height: 1.3;
    }

    .mobile-lead-status {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        font-weight: 600;
        flex-shrink: 0;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .mobile-lead-status.booket {
        background: #dcfce7;
        color: #166534;
    }

    .mobile-lead-status.afvist {
        background: #fee2e2;
        color: #991b1b;
    }

    .mobile-lead-status.kontaktet {
        background: #dbeafe;
        color: #1e40af;
    }

    .mobile-lead-status.ny {
        background: #f3f4f6;
        color: #6b7280;
    }

    .mobile-lead-status.nyt-lead {
        background: #fef3c7;
        color: #b45309;
    }

    .mobile-lead-status.aktiv-kunde {
        background: #DBEAFE;
        color: #1E40AF;
    }

    .mobile-lead-status.key-account {
        background: #EDE9FE;
        color: #6D28D9;
    }

    .mobile-lead-name {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .mobile-lead-info {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem 0.75rem;
        font-size: 0.8125rem;
        color: #6b7280;
    }

    .mobile-lead-info span {
        display: flex;
        align-items: center;
        gap: 0.2rem;
    }

    .mobile-lead-revenue {
        font-weight: 600;
        color: #16a34a;
    }

    .mobile-lead-seller {
        background: #f3f4f6;
        padding: 0.15rem 0.4rem;
        border-radius: 3px;
        font-size: 0.6875rem;
        font-weight: 500;
        color: #6b7280;
        letter-spacing: 0.01em;
    }

    .mobile-lead-actions {
        display: flex;
        gap: 0.375rem;
        padding-top: 0.5rem;
        border-top: 1px solid #f3f4f6;
    }

    .mobile-lead-actions button {
        flex: 1;
        padding: 0.5rem;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 600;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        letter-spacing: 0.01em;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 0.15s ease;
    }

    .mobile-lead-actions button:active {
        opacity: 0.7;
    }

    .mobile-lead-actions .btn-call {
        background: #dcfce7;
        color: #166534;
    }

    .mobile-lead-actions .btn-email {
        background: #dbeafe;
        color: #1e40af;
    }

    .mobile-lead-actions .btn-directions {
        background: #fef3c7;
        color: #92400e;
    }

    .mobile-lead-actions .btn-edit {
        background: #f3f4f6;
        color: #374151;
    }

    /* ── MOBILE ORDERS VIEW ── */
    #orders-view .view-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    #orders-view .view-header h2 {
        margin-bottom: 0;
    }

    #orders-view .orders-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    #orders-view .orders-controls .order-search-input {
        grid-column: 1 / -1;
        width: 100%;
        font-size: 16px;
        padding: 0.625rem 0.75rem;
        border-radius: 8px;
        border: 1px solid #d1d5db;
        background: #f9fafb;
    }

    #orders-view .orders-controls select {
        font-size: 14px;
        padding: 0.625rem 0.75rem;
        border-radius: 8px;
        border: 1px solid #d1d5db;
        background: #f9fafb;
        width: 100%;
    }

    #orders-view .orders-controls .btn {
        grid-column: 1 / -1;
        padding: 0.625rem;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
    }

    /* Hide desktop table, show mobile cards */
    .orders-table-container {
        display: none !important;
    }

    .mobile-orders-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem 6rem;
    }

    .mobile-order-card {
        background: white;
        border-radius: 12px;
        padding: 0.875rem 1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        border: 1px solid #e8eaed;
    }

    .mobile-order-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mobile-order-id-row {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .mobile-order-number {
        font-weight: 700;
        font-size: 0.9375rem;
        color: #1a1a2e;
        text-decoration: none;
    }

    a.mobile-order-number {
        color: #2563eb;
    }

    a.mobile-order-number:active {
        opacity: 0.7;
    }

    .mobile-order-date {
        font-size: 0.75rem;
        color: #9ca3af;
    }

    .mobile-order-amount {
        font-weight: 700;
        font-size: 1rem;
        color: #1a1a2e;
        white-space: nowrap;
    }

    .mobile-order-details {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
        align-items: center;
    }

    .mobile-order-details .order-status,
    .mobile-order-details .order-fulfillment {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

    .mobile-order-tracking {
        font-size: 0.75rem;
        color: #6b7280;
    }

    .mobile-order-tracking a {
        color: #2563eb;
        text-decoration: none;
    }

    .mobile-order-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.375rem;
        border-top: 1px solid #f3f4f6;
    }

    .mobile-order-customer {
        font-size: 0.8125rem;
        font-weight: 500;
        color: #2563eb;
        text-decoration: none;
    }

    .mobile-order-customer:active {
        opacity: 0.7;
    }

    .mobile-order-delivery {
        font-size: 0.6875rem;
        color: #6b7280;
        background: #f3f4f6;
        padding: 0.15rem 0.4rem;
        border-radius: 3px;
    }

    .mobile-orders-empty {
        text-align: center;
        padding: 3rem 1rem;
        color: #9ca3af;
        font-size: 0.9375rem;
    }

    /* Orders summary panel mobile optimization */
    .orders-summary-panel {
        margin: 0.5rem 0.75rem;
        border-radius: 10px;
        padding: 0.625rem 0.75rem;
        border: 1px solid #e8eaed;
    }

    .orders-meta {
        padding: 0 0.75rem;
        margin-bottom: 0.5rem;
        font-size: 0.8125rem;
    }

    /* ── MOBILE DASHBOARD ── */
    .mobile-dash-container {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .mobile-dash-greeting {
        padding: 0.5rem 0;
    }

    .mobile-dash-greeting h2 {
        font-size: 1.25rem;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 0.15rem 0;
        letter-spacing: -0.01em;
    }

    .mobile-dash-greeting p {
        font-size: 0.8rem;
        color: #6b7280;
        margin: 0;
    }

    /* Action cards (Nye Leads + Follow Ups) */
    .mdash-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .mdash-action-card {
        background: white;
        border-radius: 12px;
        padding: 0.85rem 0.9rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        display: flex;
        align-items: center;
        gap: 0.65rem;
        cursor: pointer;
        transition: transform 0.15s, box-shadow 0.15s;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        border: 1px solid #e8eaed;
    }

    .mdash-action-card:active {
        transform: scale(0.97);
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

    .mdash-action-leads {
        border-left: 3px solid #6366f1;
    }

    .mdash-action-followup {
        border-left: 3px solid #f59e0b;
    }

    .mdash-action-onboarding {
        border-left: 3px solid #3b82f6;
    }

    .mdash-action-icon {
        font-size: 1.35rem;
        line-height: 1;
        flex-shrink: 0;
    }

    .mdash-action-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

    .mdash-action-count {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1a1a2e;
        line-height: 1.1;
    }

    .mdash-action-label {
        font-size: 0.7rem;
        color: #6b7280;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        line-height: 1.3;
    }

    .mdash-action-arrow {
        flex-shrink: 0;
        color: #d1d5db;
        width: 14px;
        height: 14px;
    }

    /* Pipeline summary card */
    .mdash-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        border: 1px solid #e8eaed;
    }

    .mdash-card-title {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: #6b7280;
        font-weight: 700;
        margin-bottom: 0.75rem;
    }

    /* Big number with subtitle */
    .mdash-hero {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .mdash-hero-number {
        font-size: 1.75rem;
        font-weight: 700;
        color: #1a1a2e;
    }

    .mdash-hero-label {
        font-size: 0.8rem;
        color: #6b7280;
    }

    /* Progress row */
    .mdash-progress-row {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        margin-bottom: 0.4rem;
    }

    .mdash-progress-bar {
        flex: 1;
        height: 8px;
        background: #f3f4f6;
        border-radius: 4px;
        overflow: hidden;
    }

    .mdash-progress-fill {
        height: 100%;
        border-radius: 4px;
        transition: width 0.3s ease;
    }

    .mdash-progress-pct {
        font-size: 0.78rem;
        font-weight: 700;
        min-width: 38px;
        text-align: right;
    }

    /* Category breakdown grid */
    .mdash-categories {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .mdash-cat {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.5rem 0.6rem;
        background: #f9fafb;
        border-radius: 8px;
    }

    .mdash-cat-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .mdash-cat-info {
        display: flex;
        flex-direction: column;
    }

    .mdash-cat-name {
        font-size: 0.7rem;
        color: #6b7280;
        font-weight: 500;
    }

    .mdash-cat-value {
        font-size: 0.85rem;
        font-weight: 700;
        color: #1a1a2e;
    }

    /* Stats row (2 or 3 columns) */
    .mdash-stats-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .mdash-stats-row.three-col {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .mdash-stat {
        text-align: center;
        padding: 0.6rem 0.4rem;
        background: #f9fafb;
        border-radius: 8px;
    }

    .mdash-stat-value {
        font-size: 1.15rem;
        font-weight: 700;
        color: #1a1a2e;
        display: block;
    }

    .mdash-stat-label {
        font-size: 0.68rem;
        color: #6b7280;
        font-weight: 500;
        margin-top: 0.15rem;
        display: block;
    }

    /* Pipeline stages mini-funnel */
    .mdash-funnel {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .mdash-funnel-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mdash-funnel-label {
        font-size: 0.72rem;
        color: #6b7280;
        width: 80px;
        flex-shrink: 0;
        font-weight: 500;
    }

    .mdash-funnel-bar {
        flex: 1;
        height: 22px;
        background: #f3f4f6;
        border-radius: 6px;
        overflow: hidden;
        position: relative;
    }

    .mdash-funnel-fill {
        height: 100%;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 6px;
        min-width: 2px;
    }

    .mdash-funnel-value {
        font-size: 0.68rem;
        font-weight: 700;
        color: white;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    .mdash-funnel-amount {
        font-size: 0.72rem;
        font-weight: 600;
        color: #6b7280;
        min-width: 65px;
        text-align: right;
    }

    /* Top kunder list */
    .mdash-customer-list {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    .mdash-customer-row {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0.6rem;
        background: #f9fafb;
        border-radius: 8px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mdash-customer-row:active {
        background: #e5e7eb;
    }

    .mdash-customer-rank {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.68rem;
        font-weight: 700;
        color: #6b7280;
        flex-shrink: 0;
    }

    .mdash-customer-info {
        flex: 1;
        min-width: 0;
    }

    .mdash-customer-name {
        font-size: 0.82rem;
        font-weight: 600;
        color: #1a1a2e;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mdash-customer-prob {
        font-size: 0.68rem;
        color: #6b7280;
    }

    .mdash-customer-amount {
        font-size: 0.82rem;
        font-weight: 700;
        color: #1a1a2e;
        flex-shrink: 0;
    }

    /* ── FLOATING ACTION BUTTON ── */
    .mobile-fab {
        position: fixed;
        bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 1rem);
        right: 1.25rem;
        width: 52px;
        height: 52px;
        border-radius: 14px;
        background: #1a1a2e;
        color: white;
        border: none;
        font-size: 1.5rem;
        font-weight: 300;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 12px rgba(26, 26, 46, 0.3);
        cursor: pointer;
        z-index: 1000;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .mobile-fab:active {
        transform: scale(0.93);
        box-shadow: 0 1px 6px rgba(26, 26, 46, 0.25);
    }

    /* ── MOBILE BOTTOM NAVIGATION ── */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        background: white;
        border-top: 1px solid #e2e5e9;
        z-index: 1001;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        background: rgba(255,255,255,0.96);
    }

    .mobile-bottom-nav-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        border: none;
        background: none;
        color: #9ca3af;
        font-size: 0.625rem;
        font-weight: 500;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.15s ease;
        padding: 0.375rem 0;
        letter-spacing: 0.01em;
    }

    .mobile-bottom-nav-tab svg {
        transition: color 0.15s ease;
        width: 22px;
        height: 22px;
    }

    .mobile-bottom-nav-tab.active {
        color: #1a1a2e;
        font-weight: 600;
    }

    .mobile-bottom-nav-tab.active svg {
        stroke: #1a1a2e;
        stroke-width: 2.2;
    }

    .mobile-bottom-nav-tab:active {
        opacity: 0.7;
    }

    /* ── FILTER TOGGLE BUTTON ── */
    .mobile-filter-toggle {
        display: flex !important;
        align-items: center;
        gap: 0.375rem;
        padding: 0.375rem 0.625rem;
        border-radius: 6px;
        background: #f3f4f6;
        border: 1px solid #e2e5e9;
        font-size: 0.8125rem;
        font-weight: 500;
        color: #374151;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease, border-color 0.15s ease;
    }

    .mobile-filter-toggle.filters-open {
        background: #e5e7eb;
        border-color: #d1d5db;
    }

    .mobile-filter-toggle.has-active-filters {
        background: #dbeafe;
        border-color: #93c5fd;
        color: #1e40af;
    }

    .mobile-filter-toggle .filter-count-badge {
        background: #1e40af;
        color: white;
        font-size: 0.625rem;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        line-height: 1;
    }

    /* ── MOBILE MODAL ── */
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: var(--surface, #fff);
        z-index: 10;
        padding: 10px 16px;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .modal-header h2 {
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary, #1a1a1a);
    }

    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-tabs {
        position: sticky;
        top: 49px;
        z-index: 9;
        padding: 0;
        background: var(--surface, #fff);
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .modal-tab {
        padding: 0.625rem 0;
    }

    .modal-tab svg {
        width: 17px;
        height: 17px;
    }

    /* No tooltips on touch devices */
    .modal-tab[data-tooltip]:hover::after,
    .modal-tab[data-tooltip]:hover::before {
        display: none;
    }

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

    .action-bar-row {
        flex-wrap: wrap;
    }

    .action-bar-field {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 120px;
    }

    #leadForm {
        padding: 0;
        padding-bottom: 6rem;
    }

    .modal-tab-content {
        padding: 1rem;
    }

    #leadForm input,
    #leadForm select,
    #leadForm textarea {
        font-size: 16px !important;
        padding: 0.75rem !important;
        border-radius: 8px !important;
        border: 1px solid #d1d5db !important;
        transition: border-color 0.15s ease !important;
    }

    #leadForm input:focus,
    #leadForm select:focus,
    #leadForm textarea:focus {
        border-color: #1a1a2e !important;
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(26,26,46,0.08) !important;
    }

    #leadForm label {
        font-size: 0.8125rem;
        font-weight: 500;
        margin-bottom: 0.375rem;
        color: var(--text-secondary, #4a5568);
    }

    .form-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: white;
        border-top: 1px solid #e2e5e9;
        display: flex;
        gap: 0.75rem;
        z-index: 100;
    }

    .form-actions button {
        flex: 1;
        padding: 0.8125rem;
        font-size: 0.9375rem;
        border-radius: 10px;
        font-weight: 600;
    }

    .tasks-section {
        margin-bottom: 1.5rem;
    }

    .add-task-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .add-task-row input,
    .add-task-row button {
        width: 100%;
    }

    .revenue-section h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .revenue-category h4 {
        font-size: 0.875rem;
    }

    .revenue-grid-2col {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .pagination {
        padding: 1rem;
        justify-content: center;
    }

    .pagination button {
        padding: 0.75rem 1rem;
    }

    .toast {
        bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
        left: 1rem;
        right: 1rem;
        max-width: none;
        text-align: center;
        border-radius: 10px;
        font-size: 0.875rem;
    }
}

/* ============ DIRECTIONS PICKER ============ */
.directions-picker-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.directions-picker {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.directions-picker h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.25rem;
}

.directions-picker p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
}

.directions-picker-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.directions-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: transform 0.1s ease;
}

.directions-btn:active {
    transform: scale(0.95);
}

.directions-apple {
    background: #f3f4f6;
    color: #1a1a2e;
}

.directions-google {
    background: #e8f5e9;
    color: #1b5e20;
}

.directions-cancel {
    width: 100%;
    padding: 0.875rem;
    border: none;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
}

.directions-cancel:active {
    background: #e5e7eb;
}

/* Hide mobile-only elements on desktop */
.mobile-filter-toggle {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

/* ============ MY ORDERS VIEW ============ */

#orders-view .view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.orders-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.order-search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 200px;
    font-size: 0.875rem;
}

#orderStatusFilter,
#orderFulfillmentFilter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

/* Orders Summary Panel - Compact */
.orders-summary-panel {
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.orders-summary-panel .summary-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.orders-summary-panel .summary-error {
    text-align: center;
    padding: 0.5rem;
    color: var(--danger-color);
    font-size: 0.875rem;
}

.orders-summary-panel .summary-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.orders-summary-panel .summary-bars {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    max-width: 400px;
}

.orders-summary-panel .summary-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.orders-summary-panel .bar-label {
    min-width: 36px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.orders-summary-panel .bar-container {
    flex: 1;
    height: 16px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.orders-summary-panel .bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.orders-summary-panel .bar-current {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.orders-summary-panel .bar-last {
    background: #cbd5e1;
}

.orders-summary-panel .bar-value {
    min-width: 80px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.orders-summary-panel .summary-growth {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.orders-summary-panel .summary-growth.positive {
    color: #16a34a;
}

.orders-summary-panel .summary-growth.negative {
    color: #dc2626;
}

.orders-summary-panel .summary-growth .growth-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .orders-summary-panel .summary-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .orders-summary-panel .summary-bars {
        max-width: 100%;
    }
}

.orders-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.orders-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    background: var(--color-chocolate);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.orders-table tbody tr:hover {
    background: var(--background);
}

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

.order-lead-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.order-lead-link:hover {
    text-decoration: underline;
}

.order-status,
.order-fulfillment {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.order-status.status-paid {
    background: #dcfce7;
    color: #166534;
}

.order-status.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.status-partially_paid {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.status-refunded {
    background: #fee2e2;
    color: #dc2626;
}

.order-fulfillment.fulfillment-fulfilled {
    background: #dcfce7;
    color: #166534;
}

.order-fulfillment.fulfillment-unfulfilled {
    background: #fef3c7;
    color: #92400e;
}

.order-fulfillment.fulfillment-partial {
    background: #dbeafe;
    color: #1e40af;
}

.orders-loading,
.orders-empty,
.orders-error {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.orders-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.orders-error .error-icon {
    width: 48px;
    height: 48px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.tracking-link {
    color: var(--primary-color);
    text-decoration: none;
}

.tracking-link:hover {
    text-decoration: underline;
}

/* ============ SHOPIFY INTEGRATION STYLES ============ */

/* Products View */
#products-view .view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 250px;
    font-size: 0.875rem;
}

#productStockFilter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

.view-toggle {
    display: flex;
    background: var(--border-color);
    border-radius: 6px;
    padding: 2px;
}

.view-toggle-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
}

.view-toggle-btn.active {
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.view-toggle-btn.active svg {
    stroke: var(--primary-color);
}

.products-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Products Pagination */
.products-pagination {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.products-pagination .load-more-btn {
    min-width: 200px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.product-image {
    aspect-ratio: 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-image .no-image {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.stock-badge.stock-in_stock {
    background: #dcfce7;
    color: #166534;
}

.stock-badge.stock-low_stock {
    background: #fef3c7;
    color: #92400e;
}

.stock-badge.stock-out_of_stock {
    background: #fee2e2;
    color: #991b1b;
}

.stock-qty {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.product-variants {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Products Table */
.products-table-container {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.products-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.products-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.products-table tr:hover {
    background: #f8fafc;
}

.product-thumb {
    width: 60px;
}

.product-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image-small {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Products Loading/Error States */
.products-loading,
.products-error,
.products-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.products-error .error-icon {
    width: 60px;
    height: 60px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.products-error p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.products-error small {
    display: block;
    margin-bottom: 1rem;
}

.products-error .btn {
    margin-top: 0.5rem;
}

/* Shopify Panel in Lead Modal - Clean Corporate Style */
.shopify-section {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.shopify-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.shopify-panel-header h4 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.shopify-panel-header h4::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #5b9a3f;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") no-repeat center;
}

.shopify-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.shopify-status.linked {
    background: #DEF7EC;
    color: #03543F;
}

.shopify-status.not-linked {
    background: var(--border-light);
    color: var(--text-secondary);
}

.shopify-panel-content {
    font-size: 0.875rem;
}

.shopify-panel-content p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.shopify-panel-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.shopify-panel-actions .btn {
    background: var(--background);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.shopify-panel-actions .btn:hover {
    background: var(--border-light);
}

.shopify-panel-actions .btn-primary {
    background: #5b9a3f;
    color: #FFFFFF;
    border-color: #5b9a3f;
}

.shopify-panel-actions .btn-primary:hover {
    background: #4a8832;
    border-color: #4a8832;
}

.shopify-loading {
    color: var(--text-muted);
    font-style: italic;
}

/* Shopify Customer Info */
.shopify-customer-info {
    background: var(--background);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.shopify-stat-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.shopify-stat-row:last-child {
    margin-bottom: 0;
}

.shopify-customer-since {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-style: italic;
}

.shopify-stat {
    flex: 1;
}

.shopify-stat .stat-label {
    font-size: 0.7rem;
    display: block;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.125rem;
}

.shopify-stat .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.shopify-yearly-totals {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.shopify-yearly-totals h5 {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.yearly-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.yearly-row .year {
    color: var(--text-secondary);
}

.yearly-row .amount {
    font-weight: 600;
    color: var(--success-color);
}

.yearly-growth {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.yearly-growth.positive {
    color: #059669;
}

.yearly-growth.negative {
    color: #DC2626;
}

/* Shopify Orders */
.shopify-orders {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.shopify-orders h5 {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item {
    background: var(--background);
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.order-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.375rem;
}

.order-number {
    font-weight: 600;
    color: var(--text-primary);
}

.order-date {
    color: var(--text-secondary);
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.order-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.order-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.order-status.status-paid {
    background: rgba(22, 163, 74, 0.95);
    color: white;
}

.order-status.status-pending {
    background: rgba(180, 83, 9, 0.9);
    color: white;
    font-weight: 600;
}

.no-orders {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Category Breakdown Section */
.category-breakdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-header h5 {
    font-size: 0.8rem;
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.category-header .btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.category-header .btn-icon:hover {
    color: var(--text-primary);
}

.category-header .refresh-icon {
    font-size: 1rem;
}

.category-content {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.category-loading {
    color: var(--text-muted);
    font-style: italic;
}

.category-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.category-summary .total-revenue {
    font-weight: 600;
    color: var(--text-primary);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.category-item {
    background: var(--background);
    border-radius: 4px;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--border-color);
}

.category-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.category-stats {
    color: var(--text-secondary);
}

.category-bar-container {
    background: var(--border-light);
    border-radius: 2px;
    height: 6px;
    overflow: hidden;
}

.category-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
    background: var(--primary-color);
}

.cache-note {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Order Fulfillment & Tracking */
.order-fulfillment {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
}

.fulfillment-status {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
}

.fulfillment-fulfilled {
    background: rgba(22, 163, 74, 0.95);
    color: white;
}

.fulfillment-unfulfilled {
    background: rgba(220, 38, 38, 0.95);
    color: white;
}

.fulfillment-partially_fulfilled {
    background: rgba(180, 83, 9, 0.95);
    color: white;
}

.fulfillment-in_progress,
.fulfillment-pending_fulfillment {
    background: rgba(37, 99, 235, 0.95);
    color: white;
}

.fulfillment-delivered {
    background: rgba(22, 163, 74, 0.95);
    color: white;
}

.tracking-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tracking-company {
    color: var(--text-secondary);
}

.tracking-link {
    color: var(--info-color);
    text-decoration: underline;
}

.tracking-link:hover {
    color: #1D4ED8;
}

.tracking-number {
    font-family: monospace;
    color: var(--text-primary);
}

.delivered-date,
.estimated-date {
    font-size: 0.7rem;
}

.delivered-date {
    color: #059669;
}

.estimated-date {
    color: #D97706;
}

/* Shopify Search Modal */
#shopifySearchModal .modal-content {
    max-width: 500px;
}

.modal-medium {
    max-width: 700px !important;
}

.shopify-search-container {
    padding: 16px 20px;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

.shopify-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-hint,
.no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.search-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.shopify-search-result {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.shopify-search-result:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
}

.result-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.result-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Customer state colors */
.customer-state-enabled {
    color: var(--success-color);
}

.customer-state-disabled {
    color: var(--danger-color);
}

/* Shopify Onboarding Modal */
#shopifyOnboardingModal .modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.onboarding-section {
    background: var(--hover-bg, #f8fafc);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color, #e5e7eb);
}

#shopifyOnboardingModal form,
#shopifyEditModal form {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.onboarding-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.onboarding-section h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
}

#shopifyOnboardingModal .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

#shopifyOnboardingModal .form-group {
    margin-bottom: 0;
}

#shopifyOnboardingModal .form-group.full-width {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

#shopifyOnboardingModal .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.4rem;
}

#shopifyOnboardingModal .form-group input,
#shopifyOnboardingModal .form-group select,
#shopifyOnboardingModal .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s ease;
}

#shopifyOnboardingModal .form-group input:hover,
#shopifyOnboardingModal .form-group select:hover,
#shopifyOnboardingModal .form-group textarea:hover {
    border-color: #cbd5e1;
}

#shopifyOnboardingModal .form-group input:focus,
#shopifyOnboardingModal .form-group select:focus,
#shopifyOnboardingModal .form-group textarea:focus {
    outline: none;
    border-color: #96bf48;
    box-shadow: 0 0 0 3px rgba(150, 191, 72, 0.15);
}

#shopifyOnboardingModal .form-group input::placeholder,
#shopifyOnboardingModal .form-group textarea::placeholder {
    color: #94a3b8;
}

#shopifyOnboardingModal .error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

#shopifyOnboardingModal .success-message {
    background: #f0fdf4;
    color: #16a34a;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid #bbf7d0;
}

/* shopifyOnboardingModal now uses unified form-actions */

#submitOnboardingBtn {
    min-width: 160px;
    background: linear-gradient(135deg, #96bf48 0%, #5b9a3f 100%);
    border-color: #5b9a3f;
    font-weight: 500;
    padding: 0.7rem 1.25rem;
}

#submitOnboardingBtn:hover {
    background: linear-gradient(135deg, #5b9a3f 0%, #4a8832 100%);
    border-color: #4a8832;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 154, 63, 0.3);
}

#submitOnboardingBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#shopifyOnboardingModal .btn-secondary {
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
}

#shopifyOnboardingModal .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#shopifyOnboardingForm {
    padding: 1.5rem;
}

/* B2B settings grid - 3 columns */
.form-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Welcome email option styling */
.welcome-email-option {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.welcome-email-option .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.welcome-email-option .checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #5b9a3f;
}

/* Mobile responsive for Shopify */
@media (max-width: 768px) {
    .products-controls {
        width: 100%;
    }

    .product-search-input {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .shopify-stat-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .shopify-panel-actions {
        flex-direction: column;
    }

    .shopify-panel-actions .btn {
        width: 100%;
        text-align: center;
    }

    .form-grid-3col {
        grid-template-columns: 1fr;
    }
}

/* Price List Modal Styling - Simply Brand Inspired */
#priceListModal .modal-content {
    max-width: 750px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(61, 35, 20, 0.25);
}

/* priceListModal header now uses unified modal-header style */

.price-list-catalog-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.price-list-catalog-row select {
    flex: 1;
    border-radius: 8px;
    border: 2px solid var(--color-cream-dark);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

.price-list-catalog-row select:focus {
    border-color: var(--color-chocolate);
    outline: none;
}

.price-list-products-section {
    background: var(--color-cream);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.25rem 0;
    border: none;
}

.price-list-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-cream-dark);
}

.price-list-products-header label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-chocolate);
    margin: 0;
}

.price-list-btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-list-btn-group .btn-secondary {
    background: white;
    color: var(--color-chocolate);
    border: 2px solid var(--color-cream-dark);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.2s ease;
}

.price-list-btn-group .btn-secondary:hover {
    background: var(--color-chocolate);
    color: white;
    border-color: var(--color-chocolate);
}

.price-list-selected-count {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-chocolate);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid var(--color-cream-dark);
}

.price-list-products-container {
    max-height: 350px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(61, 35, 20, 0.08);
}

.price-list-products-container::-webkit-scrollbar {
    width: 8px;
}

.price-list-products-container::-webkit-scrollbar-track {
    background: var(--color-cream);
    border-radius: 4px;
}

.price-list-products-container::-webkit-scrollbar-thumb {
    background: var(--color-chocolate-light);
    border-radius: 4px;
}

.price-list-category {
    border-bottom: none;
}

.price-list-category-header {
    background: var(--color-cream);
    padding: 0.875rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-chocolate);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--color-cream-dark);
}

.price-list-category-header::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--color-chocolate);
    border-radius: 2px;
}

.price-list-product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--color-cream);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.price-list-product-item:last-child {
    border-bottom: none;
}

.price-list-product-item:hover {
    background: var(--color-cream);
}

.price-list-product-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--color-chocolate);
    cursor: pointer;
}

.price-list-product-item .price-list-product-name {
    flex: 1;
}

.price-list-product-name {
    font-family: var(--font-body);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 400;
}

.price-list-variant-count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-chocolate-light);
    background: var(--color-cream);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
}

.price-list-options-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: var(--color-cream);
    border-radius: 12px;
    border: none;
}

.price-list-option {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.price-list-option input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--color-chocolate);
}

.price-list-option span {
    font-family: var(--font-body);
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* priceListModal now uses unified btn styles */

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ============ ADMIN PANEL ============ */

.admin-content {
    padding: 1.5rem;
}

.admin-section {
    background: var(--surface);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-section h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.admin-section + .admin-section {
    margin-top: 2rem;
}

.admin-section .section-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.onboarding-codes-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.inactive-row {
    opacity: 0.6;
}

.users-table-container {
    overflow-x: auto;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background: #7C3AED;
    color: white;
}

.role-sales {
    background: #3B82F6;
    color: white;
}

.role-specialist {
    background: #10B981;
    color: white;
}

/* Status Badges */
.status-active {
    background: #DEF7EC;
    color: #03543F;
}

.status-inactive {
    background: #FDE8E8;
    color: #9B1C1C;
}

/* Large Modal (for Reclamations etc.) */
.modal-content.modal-large {
    max-width: 800px;
    width: 95%;
}

.modal-content.modal-large .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
}

.modal-content.modal-large .form-group {
    margin-bottom: 0;
}

.modal-content.modal-large .form-group.full-width {
    grid-column: 1 / -1;
}

.modal-content.modal-large .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content.modal-large .form-group input,
.modal-content.modal-large .form-group select,
.modal-content.modal-large .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.modal-content.modal-large .form-group input:focus,
.modal-content.modal-large .form-group select:focus,
.modal-content.modal-large .form-group textarea:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

.modal-content.modal-large .form-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.5rem 1.5rem;
    padding: 1rem 0 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.modal-content.modal-large .form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 1.5rem 1rem 1.5rem;
}

.modal-content.modal-large .form-grid-4 .form-group {
    margin-bottom: 0;
}

.modal-content.modal-large .form-grid-4 .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content.modal-large .form-grid-4 .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.modal-content.modal-large .form-grid-4 .form-group select:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

.modal-content.modal-large > form > .form-group {
    padding: 0 1.5rem 1rem 1.5rem;
}

.modal-content.modal-large > form > .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content.modal-large > form > .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    resize: vertical;
}

.modal-content.modal-large > form > .form-group textarea:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

/* Order Status Banner in Reclamation Modal */
.order-status-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 0 1.5rem 1rem 1.5rem;
}

.order-status-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-status-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-payment-badge,
.order-fulfillment-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.order-payment-badge.paid {
    background: #d1fae5;
    color: #065f46;
}

.order-payment-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.order-payment-badge.refunded {
    background: #fee2e2;
    color: #991b1b;
}

.order-payment-badge.partially-refunded {
    background: #fce7f3;
    color: #9d174d;
}

.order-payment-badge.voided {
    background: #f3f4f6;
    color: #4b5563;
}

.order-fulfillment-badge.fulfilled {
    background: #d1fae5;
    color: #065f46;
}

.order-fulfillment-badge.unfulfilled {
    background: #fef3c7;
    color: #92400e;
}

.order-fulfillment-badge.partial {
    background: #e0e7ff;
    color: #3730a3;
}

.order-amount-display {
    margin-left: auto;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-content.modal-large .form-actions {
    padding: 14px 20px;
    background: var(--surface, #fff);
}

.modal-content.modal-large .input-with-button {
    display: flex;
    gap: 0.5rem;
}

.modal-content.modal-large .input-with-button input {
    flex: 1;
}

@media (max-width: 768px) {
    .modal-content.modal-large .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-content.modal-large .form-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .modal-content.modal-large .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Small Modal */
.modal-content.modal-sm {
    max-width: 500px;
}

.modal-content.modal-sm .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
}

.modal-content.modal-sm .form-group {
    margin-bottom: 0;
}

.modal-content.modal-sm .form-group.full-width {
    grid-column: 1 / -1;
}

.modal-content.modal-sm .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-content.modal-sm .form-group input,
.modal-content.modal-sm .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.modal-content.modal-sm .form-group input:focus,
.modal-content.modal-sm .form-group select:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

.modal-content.modal-sm .form-group input:disabled {
    background: var(--color-cream);
    color: var(--text-secondary);
}

.modal-content.modal-sm .form-actions {
    padding: 14px 20px;
    background: var(--surface, #fff);
}

/* Action buttons in table */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--color-cream);
    color: var(--text-primary);
}

.action-btn.edit:hover {
    color: #3B82F6;
}

.action-btn.delete:hover {
    color: #EF4444;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

/* Searchable Select Dropdown */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.searchable-select input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(61, 35, 20, 0.1);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.searchable-select-dropdown.visible {
    display: block;
}

.searchable-select-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.searchable-select-item:last-child {
    border-bottom: none;
}

.searchable-select-item:hover {
    background: var(--color-cream);
}

.searchable-select-item.selected {
    background: var(--primary-color);
    color: white;
}

.searchable-select-item.category {
    font-weight: 600;
    background: var(--color-cream-dark);
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.searchable-select-item.category:hover {
    background: var(--color-cream);
}

.searchable-select-item.subcategory {
    padding-left: 20px;
}

.searchable-select-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px;
}

.searchable-select-clear:hover {
    color: var(--danger-color);
}

/* Filter searchable select - smaller size */
.filter-searchable-select {
    min-width: 180px;
    display: inline-block;
}

.filter-searchable-select input[type="text"] {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* ============================================
   RECLAMATIONS VIEW
   ============================================ */

.reclamation-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reclamation-stats .stat-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.reclamation-stats .stat-card.stat-warning {
    border-left: 4px solid #f59e0b;
}

.reclamation-stats .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.reclamation-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.reclamation-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.reclamation-filters select,
.reclamation-filters input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

.reclamation-filters .search-input {
    flex: 1;
    min-width: 200px;
}

.reclamation-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.reclamation-table {
    font-size: 0.85rem;
}

.reclamation-table th {
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reclamation-table td {
    vertical-align: middle;
}

.reclamation-table tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.reclamation-table tbody tr:hover {
    background: var(--row-hover);
}

/* Reclamation Type Badges */
.rec-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.rec-type-forkert_emballage { background: #fef3c7; color: #92400e; }
.rec-type-odelagte_produkter { background: #fee2e2; color: #991b1b; }
.rec-type-ikke_modtaget { background: #fecaca; color: #b91c1c; }
.rec-type-delvis_leveret { background: #fed7aa; color: #c2410c; }
.rec-type-forkert_produkt { background: #e0e7ff; color: #3730a3; }
.rec-type-mangler_produkt { background: #fce7f3; color: #9d174d; }
.rec-type-kvalitetsproblem { background: #dbeafe; color: #1e40af; }
.rec-type-andet { background: #f3f4f6; color: #374151; }

/* Reclamation Status Badges */
.rec-status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.rec-status-ny { background: #dbeafe; color: #1e40af; }
.rec-status-under_review { background: #fef3c7; color: #92400e; }
.rec-status-tpl_kontaktet { background: #c7d2fe; color: #3730a3; }
.rec-status-afventer_svar { background: #fed7aa; color: #c2410c; }
.rec-status-case_faerdig { background: #d1fae5; color: #065f46; }
.rec-status-behover_ingen_handling { background: #e5e7eb; color: #374151; }

/* Handling Badges */
.rec-handling-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Case handling */
.rec-case-behover_ikke_case { background: #e5e7eb; color: #6b7280; }
.rec-case-case_skal_oprettes { background: #fecaca; color: #b91c1c; }
.rec-case-case_er_oprettet { background: #fef3c7; color: #92400e; }
.rec-case-case_afsluttet { background: #d1fae5; color: #065f46; }

/* Product handling */
.rec-product-behover_ingen_handling { background: #e5e7eb; color: #6b7280; }
.rec-product-ny_pakke_sendt { background: #d1fae5; color: #065f46; }
.rec-product-mangler_haandtering { background: #fecaca; color: #b91c1c; }
.rec-product-afventer { background: #fef3c7; color: #92400e; }
.rec-product-refunderet { background: #dbeafe; color: #1e40af; }

/* Return handling */
.rec-return-behover_ingen_handling { background: #e5e7eb; color: #6b7280; }
.rec-return-retur_modtaget { background: #d1fae5; color: #065f46; }
.rec-return-afventer_retur { background: #fef3c7; color: #92400e; }
.rec-return-ingen_retur_kraevet { background: #e5e7eb; color: #6b7280; }

/* Carrier badges */
.rec-carrier-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
}

/* Source badges */
.rec-source-badge {
    display: inline-block;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rec-source-b2b { background: #dbeafe; color: #1e40af; }
.rec-source-b2c { background: #fce7f3; color: #9d174d; }

/* Reclamation order number with source */
.rec-order-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rec-order-number {
    font-weight: 600;
    font-family: 'Roboto Condensed', sans-serif;
}

/* Notes truncated */
.rec-notes-cell {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Form enhancements */
.form-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

/* Assigned user display */
.rec-assigned {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.rec-assigned-initials {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-assigned-name {
    font-size: 0.8rem;
    color: var(--text-primary);
}

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

@media (max-width: 768px) {
    .reclamation-stats {
        flex-wrap: wrap;
    }

    .reclamation-filters {
        flex-direction: column;
    }

    .reclamation-filters select,
    .reclamation-filters input {
        width: 100%;
    }

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

/* ============================================
   ALL ORDERS VIEW (Specialist)
   ============================================ */

.order-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-stats .stat-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.order-stats .stat-card.stat-b2b {
    border-left: 4px solid #1e40af;
}

.order-stats .stat-card.stat-b2c {
    border-left: 4px solid #9d174d;
}

.order-stats .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.order-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.order-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.order-filters select,
.order-filters input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

.order-filters .search-input {
    flex: 1;
    min-width: 200px;
}

.allorders-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.allorders-table {
    font-size: 0.85rem;
}

.allorders-table th {
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.allorders-table td {
    vertical-align: middle;
}

.allorders-table tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.allorders-table tbody tr:hover {
    background: var(--row-hover);
}

/* Source badges for orders */
.order-source-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-source-b2b { background: #dbeafe; color: #1e40af; }
.order-source-b2c { background: #fce7f3; color: #9d174d; }

/* Order status badges */
.order-status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.order-status-paid { background: #d1fae5; color: #065f46; }
.order-status-pending { background: #fef3c7; color: #92400e; }
.order-status-refunded { background: #fee2e2; color: #991b1b; }

.order-fulfillment-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.fulfillment-fulfilled { background: #d1fae5; color: #065f46; }
.fulfillment-unfulfilled { background: #fef3c7; color: #92400e; }
.fulfillment-partial { background: #e0e7ff; color: #3730a3; }

.order-carrier {
    font-size: 0.8rem;
    color: var(--text-primary);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-amount {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 600;
}

.order-customer {
    font-weight: 500;
}

.order-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.order-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .order-stats {
        flex-wrap: wrap;
    }

    .order-filters {
        flex-direction: column;
    }

    .order-filters select,
    .order-filters input {
        width: 100%;
    }
}

/* ===========================================
   Reclamation Order Status Badges
   =========================================== */

.order-status-cell {
    text-align: center;
    min-width: 100px;
}

.shopify-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.shopify-status-badge.status-paid {
    background: #dcfce7;
    color: #166534;
}

.shopify-status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.shopify-status-badge.status-refunded {
    background: #fee2e2;
    color: #991b1b;
}

.shopify-status-badge.status-partially-refunded {
    background: #ffedd5;
    color: #9a3412;
}

.shopify-status-badge.status-voided {
    background: #f3f4f6;
    color: #4b5563;
}

.shopify-status-badge.status-authorized {
    background: #dbeafe;
    color: #1e40af;
}

.order-status-loading {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
}

.order-status-na {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.order-status-error {
    color: var(--danger-color);
    font-size: 0.75rem;
}

/* ===========================================
   Completed Cases Section
   =========================================== */

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.completed-cases-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.completed-subtitle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.completed-subtitle:hover {
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.completed-cases-table {
    opacity: 0.85;
}

.completed-cases-table tbody tr {
    background: #fafafa;
}

.completed-cases-table tbody tr:hover {
    background: #f5f5f5;
}

/* ===========================================
   Product Source Badges
   =========================================== */

.product-source-badge {
    position: absolute;
    top: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 1;
}

.product-source-badge.source-b2b {
    left: 8px;
    background: var(--color-chocolate);
    color: white;
}

.product-source-badge.source-b2c {
    left: 42px;
    background: #2563eb;
    color: white;
}

.product-source-badge-table {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-source-badge-table.source-b2b {
    background: var(--color-chocolate);
    color: white;
}

.product-source-badge-table.source-b2c {
    background: #2563eb;
    color: white;
}

.product-source-badge-table.badge-inactive,
.product-source-badge.badge-inactive {
    opacity: 0.2;
    filter: grayscale(100%);
}

.product-shops-cell {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Catalog Price Column */
.catalog-price-header {
    white-space: nowrap;
    color: var(--color-chocolate) !important;
}

.catalog-price-cell {
    font-weight: 700;
    color: var(--color-chocolate);
    font-size: 0.95rem;
    background: rgba(139, 90, 43, 0.04);
}

.catalog-price-na {
    color: var(--text-tertiary);
    font-weight: 400;
}

.product-catalog-price {
    font-size: 0.8rem;
    color: var(--color-chocolate);
    font-weight: 600;
    margin-top: 2px;
}

#productCatalogFilter {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Product Status Badges */
.stock-badge.product-status-draft {
    background: #f59e0b;
    color: white;
}

.stock-badge.product-status-archived {
    background: #6b7280;
    color: white;
}

/* Product Edit Modal - Two Column Layout */
.product-edit-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.product-edit-left,
.product-edit-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-edit-section {
    background: var(--background);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.product-edit-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.product-edit-header {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.product-edit-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: var(--background);
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-edit-image .no-image {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

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

.product-edit-info h3 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-edit-sku {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, monospace;
    margin: 0.5rem 0 0 0;
}

.product-edit-handle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
    opacity: 0.7;
}

.product-edit-info .product-source-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Status help cards */
.status-help-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.status-help-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.status-help-card .status-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-help-card.status-active .status-icon {
    background: var(--success-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.status-help-card.status-draft .status-icon {
    background: var(--warning-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.status-help-card.status-archived .status-icon {
    background: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.15);
}

.status-help-card strong {
    font-size: 0.8rem;
    color: var(--text-primary);
    display: block;
}

.status-help-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.15rem 0 0 0;
}

/* SEO Preview */
.seo-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.seo-preview-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.75rem;
}

.seo-preview-content {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.seo-preview-title {
    font-size: 1.1rem;
    color: #1a0dab;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seo-preview-url {
    font-size: 0.8rem;
    color: #006621;
    margin-bottom: 0.35rem;
}

.seo-preview-desc {
    font-size: 0.85rem;
    color: #545454;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.seo-counter {
    float: right;
    margin-top: 0.35rem;
}

/* Metadata section */
.product-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.meta-value.meta-mono {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Field help text */
.field-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.field-help strong {
    color: var(--text-primary);
}

/* Variants list in modal */
.product-edit-variants {
    background: var(--background);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.product-edit-variants h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.variants-list {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.variant-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    align-items: center;
}

.variant-item:last-child {
    border-bottom: none;
}

.variant-title {
    font-weight: 500;
    color: var(--text-primary);
}

.variant-sku {
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.8rem;
}

.variant-price {
    font-weight: 600;
    color: var(--text-primary);
}

.variant-stock {
    color: var(--text-secondary);
}

.variant-stock.out-of-stock {
    color: var(--danger);
    font-weight: 500;
}

/* Enhanced variant item with two rows */
.variant-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.variant-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.variant-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.variant-compare-price {
    color: var(--text-secondary);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.variant-barcode {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

/* Category display */
.product-category-display {
    padding: 0.5rem 0.75rem;
    background: var(--surface-elevated);
    border-radius: 6px;
    font-size: 0.9rem;
}

.category-path {
    color: var(--text-primary);
}

.no-category {
    color: var(--text-secondary);
    font-style: italic;
}

/* Collections display */
.product-collections-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collection-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-collections {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

/* Pricing section */
.product-pricing-section .pricing-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.pricing-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--surface-elevated);
    border-radius: 6px;
}

.pricing-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pricing-value.pricing-compare {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-value.pricing-barcode {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Publishing status */
.product-publishing-section .publishing-status {
    padding: 0.75rem;
    background: var(--surface-elevated);
    border-radius: 6px;
}

.publishing-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.publishing-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.publishing-indicator.publishing-active {
    background-color: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.publishing-indicator.publishing-inactive {
    background-color: var(--text-secondary);
}

.publishing-indicator.publishing-unknown {
    background-color: var(--warning);
}

/* Enhanced metadata grid */
.product-meta-grid .meta-item.full-width {
    grid-column: 1 / -1;
}

.meta-value.meta-link a {
    color: var(--primary);
    text-decoration: none;
}

.meta-value.meta-link a:hover {
    text-decoration: underline;
}

/* Small button style */
.btn.btn-small {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.btn.btn-small svg {
    vertical-align: middle;
}

.product-card .product-image {
    position: relative;
}

/* Responsive adjustments for product edit modal */
@media (max-width: 900px) {
    .product-edit-body {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SPECIALIST DASHBOARD - PACING SCORECARD
   ============================================ */

/* Dashboard Header */
#specialist-dashboard-view .view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#specialist-dashboard-view .dashboard-date {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* Channel Tabs */
.dash-channel-tabs {
    display: flex;
    gap: 0;
    padding: 0 1.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
}

.dash-tab {
    padding: 0.75rem 2rem;
    border: none;
    background: none;
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.dash-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    border-radius: 3px 3px 0 0;
    transition: background 0.2s;
}

.dash-tab:hover {
    color: var(--text-primary);
}

.dash-tab.active {
    color: var(--color-chocolate);
}

.dash-tab.active::after {
    background: var(--color-chocolate);
}

/* Loading State */
.dash-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

/* Dashboard Card Base */
.dash-card {
    background: var(--surface);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dash-card:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dash-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.dash-card-header h3 {
    margin: 0;
    font-family: var(--font-headings);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dash-card-body {
    padding: 1.25rem;
}

/* Pacing Content Container */
.dash-pacing-content {
    padding: 0 1.5rem;
}

/* Top Row: Hero + Gauge */
.dash-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Hero Card — clean, light, professional */
.dash-hero-card {
    background: var(--surface) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.dash-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dash-hero-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.dash-hero-channel {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
}

.dash-hero-amount {
    font-family: var(--font-headings);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.dash-hero-amount .dash-hero-currency {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.15rem;
}

.dash-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: auto;
}

.dash-hero-orders {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dash-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dash-hero-badge.positive {
    background: rgba(56, 161, 105, 0.08);
    color: #2F855A;
}

.dash-hero-badge.negative {
    background: rgba(229, 62, 62, 0.08);
    color: #C53030;
}

.dash-hero-badge.neutral {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.dash-hero-budget-bar {
    margin-top: 1rem;
}

.dash-hero-budget-track {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.dash-hero-budget-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.dash-hero-budget-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Gauge Card — understated */
.dash-gauge-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dash-gauge-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.dash-gauge-wrap {
    position: relative;
    width: 200px;
    margin: 0 auto;
}

.dash-gauge-svg {
    width: 200px;
    height: 120px;
    display: block;
}

/* Override gauge stroke colors to muted slate */
.dash-gauge-svg .dash-gauge-fill {
    stroke: var(--primary-color) !important;
}

.dash-gauge-value {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-headings);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.dash-gauge-legend {
    display: flex;
    justify-content: space-between;
    width: 200px;
    margin: 0.25rem auto 0;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.dash-gauge-target {
    font-weight: 600;
    color: var(--text-primary);
}

/* MTD Progress Bar Card */
.dash-progress-card {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.dash-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.dash-progress-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.dash-progress-values {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-progress-values .target {
    color: var(--text-secondary);
    font-weight: 400;
}

.dash-progress-track {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: visible;
    position: relative;
}

.dash-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
    min-width: 4px;
    background: var(--primary-color);
}

.dash-progress-day-marker {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
}

.dash-progress-day-line {
    width: 2px;
    height: 30px;
    background: var(--text-secondary);
    opacity: 0.5;
    margin: 0 auto;
}

.dash-progress-day-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: center;
    margin-top: 2px;
}

.dash-progress-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* KPI Grid */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dash-kpi-card {
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    text-align: center;
}

.dash-kpi-card:hover {
    background: var(--background);
}

.dash-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.65rem;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* All KPI icons use the same muted style */
.dash-kpi-icon.orders,
.dash-kpi-icon.aov,
.dash-kpi-icon.sessions,
.dash-kpi-icon.cr,
.dash-kpi-icon.roas,
.dash-kpi-icon.spend {
    background: var(--bg-secondary);
    color: var(--primary-light);
}

.dash-kpi-data {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dash-kpi-value {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.dash-kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.25rem;
}

.dash-kpi-target {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    display: inline-block;
}

.dash-kpi-na {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
}

.dash-kpi-vs {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-top: 0.2rem;
    display: inline-block;
}

.dash-kpi-vs.positive {
    background: rgba(47, 133, 90, 0.08);
    color: #2F855A;
}

.dash-kpi-vs.warning {
    background: rgba(214, 158, 46, 0.08);
    color: #975A16;
}

.dash-kpi-vs.negative {
    background: rgba(197, 48, 48, 0.08);
    color: #C53030;
}

/* Pacing Detail Card */
.dash-pacing-detail-card {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.dash-pacing-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.dash-pacing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.dash-pacing-item {
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.dash-pacing-item-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.35rem;
    display: block;
}

.dash-pacing-item-value {
    font-family: var(--font-headings);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.dash-pacing-item-value.positive {
    color: #2F855A;
}

.dash-pacing-item-value.negative {
    color: #C53030;
}

/* Bottom Row: Reclamation + Activity */
.dash-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding: 0 1.5rem 1.5rem;
}

.dash-reclamation-card,
.dash-activity-card {
    max-height: 380px;
    display: flex;
    flex-direction: column;
}

.dash-activity-card .dash-card-body {
    overflow-y: auto;
    flex: 1;
}

/* Reclamation Stats Grid (reused) */
.reclamation-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.reclamation-stats-grid .stat-card {
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.reclamation-stats-grid .stat-card:hover {
    background: var(--background);
}

.reclamation-stats-grid .stat-card.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    grid-column: span 4;
}

.reclamation-stats-grid .stat-card.error {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    grid-column: span 4;
}

.reclamation-stats-grid .stat-value {
    display: block;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.reclamation-stats-grid .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.reclamation-stats-grid .stat-card.stat-warning,
.reclamation-stats-grid .stat-card.stat-success,
.reclamation-stats-grid .stat-card.stat-info,
.reclamation-stats-grid .stat-card.stat-primary {
    border-bottom: 2px solid var(--border-color);
}

/* Recent Reclamations List */
.recent-reclamations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-reclamations-list .loading-text,
.recent-reclamations-list .error-text,
.recent-reclamations-list .empty-text {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

.recent-reclamation-item {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.recent-reclamation-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.reclamation-order {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reclamation-order .order-number {
    font-family: var(--font-headings);
    font-weight: 600;
    color: var(--text-primary);
}

.reclamation-order .source-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.reclamation-order .source-badge.b2b {
    background: var(--color-chocolate);
    color: white;
}

.reclamation-order .source-badge.b2c {
    background: var(--info-color);
    color: white;
}

.reclamation-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reclamation-info .reclamation-type {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.reclamation-info .reclamation-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.reclamation-status .status-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.reclamation-status .status-badge.status-ny {
    background: #dbeafe;
    color: #1d4ed8;
}

.reclamation-status .status-badge.status-under_review {
    background: #fef3c7;
    color: #b45309;
}

.reclamation-status .status-badge.status-tpl_kontaktet {
    background: #e0e7ff;
    color: #4338ca;
}

.reclamation-status .status-badge.status-afventer_svar {
    background: #fce7f3;
    color: #be185d;
}

.reclamation-status .status-badge.status-case_faerdig {
    background: #d1fae5;
    color: #047857;
}

.reclamation-status .status-badge.status-behover_ingen_handling {
    background: #f3f4f6;
    color: #4b5563;
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
    .dash-top-row {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 1024px) {
    .dash-bottom-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .dash-pacing-content {
        padding: 0 1rem;
    }

    .dash-channel-tabs {
        padding: 0 1rem;
    }

    .dash-bottom-row {
        padding: 0 1rem 1rem;
    }

    .dash-top-row {
        grid-template-columns: 1fr;
    }

    .dash-hero-amount {
        font-size: 2rem;
    }

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

    .dash-pacing-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .reclamation-stats-grid .stat-card.loading,
    .reclamation-stats-grid .stat-card.error {
        grid-column: span 2;
    }

    .recent-reclamation-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* ============================================
   ORDER DETAIL MODAL
   ============================================ */

.order-detail-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--color-cream) 0%, #fff 100%);
    border-bottom: 1px solid var(--border-color);
}

.order-detail-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-detail-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-chocolate);
}

/* Order Detail Tabs */
.order-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding: 0 20px;
    background: var(--surface, #fff);
}

.order-tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.order-tab-btn:hover {
    color: var(--text-primary);
    background: var(--hover-bg, #f8fafc);
}

.order-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* Order Tab Content */
.order-tab-content {
    display: none;
    padding: 1.5rem;
}

.order-tab-content.active {
    display: block;
}

/* Order Items Table */
.order-items-container {
    overflow-x: auto;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.order-items-table th,
.order-items-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.order-items-table th {
    background: var(--color-cream);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.order-items-table td {
    vertical-align: middle;
}

.order-items-table tr:last-child td {
    border-bottom: none;
}

.order-items-table tr:hover td {
    background: rgba(0,0,0,0.01);
}

/* Fulfillment Cards */
.fulfillment-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}

.fulfillment-card:last-child {
    margin-bottom: 0;
}

.fulfillment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.fulfillment-status {
    font-weight: 600;
    font-size: 0.95rem;
}

.fulfillment-status.fulfilled {
    color: var(--color-success);
}

.fulfillment-status.unfulfilled {
    color: var(--color-warning);
}

.fulfillment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.fulfillment-tracking {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.fulfillment-tracking-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fulfillment-tracking-number {
    display: block;
    margin-top: 0.25rem;
    color: var(--color-chocolate);
    text-decoration: none;
    font-weight: 500;
}

.fulfillment-tracking-number:hover {
    text-decoration: underline;
}

.fulfillment-carrier {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Order Source Badges */
.order-source-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-source-badge.b2b {
    background: #e3f2fd;
    color: #1565c0;
}

.order-source-badge.b2c {
    background: #fce4ec;
    color: #c2185b;
}

/* Order Status Badges (updated for detail modal) */
.order-payment-badge,
.order-fulfillment-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.order-payment-badge.paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.order-payment-badge.pending {
    background: #fff3e0;
    color: #ef6c00;
}

.order-payment-badge.refunded {
    background: #ffebee;
    color: #c62828;
}

.order-payment-badge.partially-refunded {
    background: #fff8e1;
    color: #f57f17;
}

.order-fulfillment-badge.fulfilled {
    background: #e8f5e9;
    color: #2e7d32;
}

.order-fulfillment-badge.unfulfilled {
    background: #fff3e0;
    color: #ef6c00;
}

.order-fulfillment-badge.partially-fulfilled {
    background: #e3f2fd;
    color: #1565c0;
}

/* Empty state for tabs */
.order-tab-content .empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .order-detail-banner {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .order-detail-tabs {
        overflow-x: auto;
        padding: 0 1rem;
    }

    .order-tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .order-tab-content {
        padding: 1rem;
    }

    .order-items-table th,
    .order-items-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   CHANGELOG VIEW
   ============================================ */

.changelog-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}

.changelog-content {
    padding: 2rem;
    max-width: 900px;
}

.changelog-timeline {
    position: relative;
    padding-left: 2rem;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

/* Changelog Entry */
.changelog-entry {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.changelog-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.changelog-entry::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-chocolate);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--color-chocolate);
}

.changelog-entry.minor::before {
    background: var(--text-secondary);
    box-shadow: 0 0 0 2px var(--text-secondary);
}

.changelog-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.changelog-version {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-chocolate);
}

.changelog-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.changelog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.changelog-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.changelog-tag.feature {
    background: #e8f5e9;
    color: #2e7d32;
}

.changelog-tag.fix {
    background: #fff3e0;
    color: #ef6c00;
}

.changelog-tag.improvement {
    background: #e3f2fd;
    color: #1565c0;
}

.changelog-tag.security {
    background: #fce4ec;
    color: #c2185b;
}

.changelog-tag.breaking {
    background: #ffebee;
    color: #c62828;
}

.changelog-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.changelog-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.changelog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.changelog-list li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--color-chocolate);
    font-weight: bold;
}

.changelog-list li.added::before {
    content: '+';
    color: #2e7d32;
}

.changelog-list li.fixed::before {
    content: '✓';
    color: #ef6c00;
}

.changelog-list li.changed::before {
    content: '~';
    color: #1565c0;
}

.changelog-list li.removed::before {
    content: '-';
    color: #c62828;
}

/* Empty changelog state */
.changelog-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.changelog-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .changelog-content {
        padding: 1rem;
    }

    .changelog-timeline {
        padding-left: 1.5rem;
    }

    .changelog-entry::before {
        left: -1.5rem;
        width: 10px;
        height: 10px;
    }

    .changelog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .changelog-version {
        font-size: 1.1rem;
    }
}

/* ================================
   Audience Management Styles
   ================================ */

.audiences-content {
    padding: 1.5rem;
}

.audiences-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.audiences-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.audiences-tabs .tab-btn:hover {
    color: var(--text-primary);
}

.audiences-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Segments List */
.segments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.segment-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: box-shadow 0.2s ease;
}

.segment-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.segment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.segment-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.segment-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.segment-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.segment-status.inactive {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
}

.segment-card-actions {
    display: flex;
    gap: 0.5rem;
}

.segment-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.segment-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--cream);
    border-radius: 6px;
}

.segment-stat {
    display: flex;
    flex-direction: column;
}

.segment-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.segment-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.segment-platforms {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.platform-badge.klaviyo {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.platform-badge.linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
}

.platform-badge.google {
    background: rgba(66, 133, 244, 0.1);
    color: #4285f4;
}

.platform-badge.meta {
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
}

.platform-badge .sync-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.platform-badge .sync-status.success {
    background: var(--success-color);
}

.platform-badge .sync-status.error {
    background: var(--danger-color);
}

.platform-badge .sync-status.pending {
    background: var(--warning-color);
}

.platform-badge .sync-status.syncing {
    background: #3b82f6;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Platforms Grid */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.platform-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
}

.platform-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.platform-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.platform-icon.klaviyo {
    background: rgba(0, 0, 0, 0.05);
}

.platform-icon.linkedin {
    background: rgba(0, 119, 181, 0.1);
}

.platform-icon.google {
    background: rgba(66, 133, 244, 0.1);
}

.platform-icon.meta {
    background: rgba(24, 119, 242, 0.1);
}

.platform-card-title {
    flex: 1;
}

.platform-card-title h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.platform-card-title span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.platform-connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.platform-connection-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.platform-connection-status.connected .status-dot {
    background: var(--success-color);
}

.platform-connection-status.disconnected .status-dot {
    background: var(--danger-color);
}

.platform-connection-status.not-configured .status-dot {
    background: #9ca3af;
}

.platform-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.add-platform-card {
    border: 2px dashed var(--border-color);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-platform-card:hover {
    border-color: var(--primary-color);
    background: var(--cream);
}

.add-platform-card span {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.add-platform-card p {
    color: var(--text-secondary);
}

/* Sync Log Table */
.sync-log-container {
    overflow-x: auto;
}

.sync-log-container .data-table {
    min-width: 800px;
}

/* Segment Modal */
#segmentModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

#segmentModal form {
    padding: 20px;
}

#segmentModal .form-row {
    display: flex;
    gap: 1.5rem;
}

#segmentModal .form-row .form-group {
    flex: 1;
}

.segment-rules-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--cream);
    border-radius: 10px;
}

.segment-rules-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.rules-operator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rules-operator label {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.rules-operator select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    height: 36px;
}

#rulesContainer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rule-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.rule-row select,
.rule-row input {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    color: var(--text-primary);
    height: 36px;
}

.rule-row select.rule-field {
    min-width: 180px;
    flex: 1;
}

.rule-row select.rule-field optgroup {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.rule-row select.rule-field option {
    font-weight: 400;
    color: var(--text-primary);
    padding: 4px 0;
}

.rule-row select.rule-operator {
    min-width: 130px;
}

.rule-row input.rule-value,
.rule-row select.rule-value {
    flex: 1;
    min-width: 140px;
}

.rule-row .btn-remove-rule {
    padding: 0.35rem 0.6rem;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
}

.rule-row .btn-remove-rule:hover {
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

/* Segment Preview */
.segment-preview-section {
    margin: 1.5rem 0;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.preview-header h3 {
    font-size: 1rem;
}

.segment-preview {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.preview-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.preview-count {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preview-item {
    padding: 0.35rem 0.65rem;
    background: var(--surface);
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

/* Segment Platforms Section */
.segment-platforms-section {
    margin: 1.5rem 0;
}

.segment-platforms-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

#segmentPlatformsContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.platform-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--cream);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-checkbox:hover {
    background: var(--cream-dark);
}

.platform-checkbox input {
    width: 18px;
    height: 18px;
}

.platform-checkbox label {
    cursor: pointer;
}

/* Platform Fields in Modal */
.platform-fields {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.platform-fields small {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Platform Hint */
.platform-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* OAuth Styles */
.btn-linkedin {
    background-color: #0a66c2;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-linkedin:hover {
    background-color: #004182;
}

.oauth-info {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.oauth-hint {
    display: block;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.oauth-connected {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--success-light, #d4edda);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.status-badge.status-connected {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* View Header Actions */
.view-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Empty state for segments/platforms */
.empty-state-card {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state-card svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Modal sizes */
.modal-lg {
    max-width: 800px;
}

.modal-md {
    max-width: 550px;
}

/* Platform Modal Styles */
#platformModal .modal-content {
    max-width: 500px;
}

#platformModal form {
    padding: 20px;
}

#platformModal .form-group {
    margin-bottom: 1.25rem;
}

#platformModal .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

#platformModal .form-group input,
#platformModal .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--color-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#platformModal .form-group input:focus,
#platformModal .form-group select:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.1);
}

#platformModal .form-group input::placeholder {
    color: var(--text-muted);
}

#platformModal .form-group small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

#segmentModal .form-actions,
#platformModal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

#platformModal .platform-fields {
    background: var(--color-cream);
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

#platformModal .platform-fields .form-group {
    margin-bottom: 0;
}

#platformModal #linkedinOAuthSection {
    text-align: center;
    padding: 0.5rem 0;
}

#platformModal #linkedinOAuthSection .oauth-info {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

#platformModal .btn-linkedin {
    margin: 0 auto;
    max-width: 280px;
}

/* New Customers View */
#newcustomers-view .view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#newcustomers-view .view-header h2 {
    margin: 0;
}

#newcustomers-view .view-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

#newcustomers-view .new-customers-stats {
    margin-bottom: 1.5rem;
}

#newcustomers-view .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

#newcustomers-view .stat-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

#newcustomers-view .stat-card.warning {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.05);
}

#newcustomers-view .stat-card.danger {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.05);
}

#newcustomers-view .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

#newcustomers-view .stat-card.warning .stat-value {
    color: var(--warning);
}

#newcustomers-view .stat-card.danger .stat-value {
    color: var(--danger);
}

#newcustomers-view .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

#newcustomers-view .new-customers-table-container {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#newcustomers-view .loading-cell,
#newcustomers-view .empty-cell,
#newcustomers-view .error-cell {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

#newcustomers-view .error-cell {
    color: var(--danger);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* Code input for Nye Kunder view (admin only) */
.code-input {
    width: 120px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.code-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Sync info styling */
.sync-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.sync-info .sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sync-info .sync-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.sync-info .next-sync {
    color: var(--text-tertiary);
}


/* ============ SHOPIFY IMPORT VIEW (ADMIN) ============ */

#shopifyimport-view .view-header {
    margin-bottom: 1.5rem;
}

#shopifyimport-view .view-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

#shopifyimport-view .shopify-import-stats {
    margin-bottom: 1.5rem;
}

#shopifyimport-view .stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

#shopifyimport-view .stat-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

#shopifyimport-view .stat-card.highlight {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

#shopifyimport-view .stat-card.highlight .stat-value {
    color: var(--primary);
}

#shopifyimport-view .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

#shopifyimport-view .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

#shopifyimport-view .shopify-import-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#shopifyimport-view .shopify-import-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#shopifyimport-view .shopify-import-container {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#shopifyimport-view .loading-cell,
#shopifyimport-view .empty-cell,
#shopifyimport-view .error-cell {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

#shopifyimport-view .error-cell {
    color: var(--danger);
}

#shopifyimport-view .code-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-family: monospace;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-secondary);
}

#shopifyimport-view .code-badge.catalog {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

#shopifyimport-view .import-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#shopifyimport-view th:first-child,
#shopifyimport-view td:first-child {
    width: 40px;
    text-align: center;
}



/* Status badges for Shopify Import */
#shopifyimport-view .status-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

#shopifyimport-view .status-badge.ready {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

#shopifyimport-view .status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

#shopifyimport-view .status-badge.missing {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

#shopifyimport-view .code-badge.missing {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-style: italic;
}

#shopifyimport-view tr.import-ready {
    background: rgba(34, 197, 94, 0.03);
}

#shopifyimport-view tr.import-warning {
    background: rgba(245, 158, 11, 0.03);
}

#shopifyimport-view tr.import-missing {
    background: rgba(107, 114, 128, 0.03);
}

#shopifyimport-view .stat-card.warning {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

#shopifyimport-view .stat-card.warning .stat-value {
    color: var(--warning);
}

/* ========================================
   ADMIN FEEDBACK & SPECIALIST TASKS v1.05.64
   ======================================== */

/* Feedback task items */
.feedback-task-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.feedback-task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feedback-task-item.completed {
    opacity: 0.6;
    background: var(--color-cream);
}

.feedback-task-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.feedback-task-header:hover {
    background: var(--color-cream);
}

.feedback-task-header .my-task-checkbox {
    flex-shrink: 0;
}

.feedback-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feedback-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.feedback-from {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.feedback-expand-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.feedback-task-details {
    padding: 0 1.25rem 1.25rem 3.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--color-cream);
}

.feedback-description {
    padding: 1rem 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.feedback-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-bottom: 0.75rem;
}

.feedback-meta span {
    display: flex;
    gap: 0.35rem;
}

.feedback-screenshot {
    padding-top: 0.75rem;
}

.feedback-screenshot img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-screenshot img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Screenshot modal */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.screenshot-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
}

.screenshot-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.screenshot-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.screenshot-modal-close:hover {
    transform: scale(1.2);
}

/* ========================================
   EXPANDABLE TASK ITEMS - All Tasks v1.05.66
   ======================================== */

.expandable-task-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.expandable-task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.expandable-task-item.completed {
    opacity: 0.6;
    background: var(--color-cream);
}

.expandable-task-item.seen {
    border-left: 3px solid var(--success-color);
}

.expandable-task-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.expandable-task-header:hover {
    background: var(--color-cream);
}

.expandable-task-header .my-task-checkbox {
    flex-shrink: 0;
}

.expandable-task-header .task-status-icon {
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.expandable-task-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.expandable-task-lead {
    font-size: 0.85rem;
    color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0.25rem 0.6rem;
    background: var(--color-cream);
    border-radius: 4px;
    transition: background 0.15s ease;
}

.expandable-task-lead:hover {
    background: var(--border-color);
    text-decoration: underline;
}

.task-expand-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.expandable-task-details {
    padding: 1rem 1.25rem 1.25rem 3rem;
    border-top: 1px solid var(--border-light);
    background: var(--color-cream);
}

.expandable-task-details .task-detail-row {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.expandable-task-details .task-detail-row strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.expandable-task-details .task-detail-row a {
    color: var(--primary-color);
    text-decoration: none;
}

.expandable-task-details .task-detail-row a:hover {
    text-decoration: underline;
}

/* Simplified specialist task view */
.specialist-task-simple {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.15s ease;
}

.specialist-task-simple:hover {
    background: var(--color-cream);
}

.specialist-task-simple.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.task-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-status-dot.pending {
    background: var(--warning-color);
}

.task-status-dot.done {
    background: var(--success-color);
}

.task-status-dot.overdue {
    background: var(--danger-color);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.specialist-task-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.specialist-task-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.specialist-task-customer {
    font-size: 0.8rem;
    color: var(--primary-color);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.specialist-task-customer:hover {
    text-decoration: underline;
}

.specialist-task-due {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    background: var(--color-cream);
    border-radius: 4px;
}

.specialist-task-due.overdue {
    color: var(--danger-color);
    background: var(--danger-light);
    font-weight: 600;
}

/* ========================================
   FEEDBACK ARCHIVE SECTION v1.05.65
   ======================================== */

.feedback-archive-section {
    margin-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}

.feedback-archive-section .task-section-title {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.archive-toggle {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.archive-toggle:hover {
    color: var(--text-primary);
}

.archive-count {
    font-size: 0.75rem;
    background: var(--color-cream-dark);
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.archive-expand-icon {
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.archive-content {
    margin-top: 0.75rem;
    opacity: 0.8;
}

.archive-content .feedback-task-item {
    opacity: 0.7;
}

/* ========================================
   NOTIFICATION BELL & PANEL v1.05.72
   ======================================== */

.notification-bell {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.notification-bell::after {
    content: 'Notifikationer';
    color: #ffffff;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.notification-bell svg {
    flex-shrink: 0;
}

.notification-badge {
    position: absolute;
    top: 4px;
    left: 24px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-panel {
    position: fixed;
    bottom: 80px;
    left: 260px;
    width: 360px;
    max-height: 450px;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    overflow: hidden;
}

.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color, #334155);
    background: #0f172a;
}

.notification-panel-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.btn-mark-all-read {
    background: transparent;
    border: none;
    color: #0ea5e9;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.btn-mark-all-read:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.no-notifications {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.notification-item {
    position: relative;
    display: flex;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color, #334155);
    cursor: pointer;
    transition: background 0.15s ease;
    background: var(--card-bg, #1e293b);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(14, 165, 233, 0.1);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0ea5e9;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.notification-icon.new-lead {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.notification-icon.task {
    background: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Sidebar bottom positioning for notification bell */
.sidebar-bottom {
    position: relative;
}

/* ========================================
   UPDATE NOTIFICATION v1.05.65
   Corporate/Slate design matching CRM
   ======================================== */

.update-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8vh;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.update-notification.show {
    opacity: 1;
    visibility: visible;
}

.update-notification-content {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.update-notification.show .update-notification-content {
    transform: translateY(0);
}

.update-notification-header {
    background: var(--sidebar-bg);
    color: var(--sidebar-text-active);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.update-notification-header .update-icon {
    font-size: 1.5rem;
}

.update-notification-header h3 {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.update-close-btn {
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    line-height: 1;
    padding: 0;
}

.update-close-btn:hover {
    opacity: 1;
}

.update-notification-body {
    padding: 1.25rem 1.5rem;
    max-height: 45vh;
    overflow-y: auto;
}

.update-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-light);
}

.update-item:first-child {
    padding-top: 0;
}

.update-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.update-version-badge {
    flex-shrink: 0;
    background: var(--color-chocolate);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    height: fit-content;
    letter-spacing: 0.02em;
}

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

.update-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.update-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.update-more {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0.875rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.update-notification-footer {
    display: flex;
    gap: 0.625rem;
    padding: 1rem 1.5rem 1.25rem;
    background: var(--color-cream);
    border-top: 1px solid var(--border-light);
}

.btn-update-changelog {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-update-changelog:hover {
    border-color: var(--color-chocolate);
    color: var(--color-chocolate);
    background: var(--surface);
}

.btn-update-dismiss {
    flex: 1;
    background: var(--color-chocolate);
    border: none;
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-update-dismiss:hover {
    background: var(--color-chocolate-light);
}

/* ============ SPONS DASHBOARD ============ */

/* Header Controls */
.spons-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.budget-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.budget-input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.budget-input-group input {
    width: 120px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.budget-currency {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* SPONS Stats Grid */
.spons-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.spons-stat-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.spons-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spons-stat-card .stat-icon svg {
    width: 24px;
    height: 24px;
}

.spons-stat-card .stat-icon.monthly {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.spons-stat-card .stat-icon.quarterly {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.spons-stat-card .stat-icon.yearly {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.spons-stat-card .stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.spons-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spons-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.spons-stat-card .stat-sublabel {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spons-stat-card .stat-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-chocolate);
    margin-top: 0.25rem;
}

/* Budget Progress Section */
.budget-progress-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.budget-progress-section .budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.budget-progress-section .budget-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.budget-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.budget-progress-bar {
    height: 12px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.budget-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    border-radius: 6px;
    transition: width 0.5s ease, background 0.3s ease;
}

.budget-progress-fill.warning {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.budget-progress-fill.danger {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.budget-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.budget-remaining {
    color: var(--text-secondary);
}

.budget-percent {
    font-weight: 600;
    color: var(--text-primary);
}

/* SPONS Orders Section */
.spons-orders-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.spons-orders-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.spons-orders-section .section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.discount-code {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: monospace;
}

/* Planned Sendouts Section */
.planned-sendouts-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

.planned-sendouts-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.planned-sendouts-section .section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sendouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.sendout-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.sendout-card:hover {
    border-color: var(--color-chocolate);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sendout-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.sendout-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.sendout-status {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sendout-status.status-draft {
    background: #e5e7eb;
    color: #6b7280;
}

.sendout-status.status-ready {
    background: #dbeafe;
    color: #2563eb;
}

.sendout-status.status-sent {
    background: #d1fae5;
    color: #059669;
}

.sendout-status.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.sendout-details {
    margin-bottom: 0.75rem;
}

.sendout-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--border-light);
}

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

.sendout-row .label {
    color: var(--text-muted);
}

.sendout-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.sendout-actions .btn {
    flex: 1;
}

/* Sendout Modal - matches lead modal style */
#sendoutModal .modal-content,
.sendout-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

#sendoutModal .modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.25rem;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

#sendoutModal .modal-header h2 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    border: none;
}

#sendoutModal .modal-header .close-btn {
    color: white;
    opacity: 0.9;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s;
}

#sendoutModal .modal-header .close-btn:hover {
    opacity: 1;
}

#sendoutModal form {
    padding: 1.5rem;
}

#sendoutModal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 0 -1.5rem -1.5rem -1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--background);
}

#sendoutModal .form-group {
    margin-bottom: 1rem;
}

#sendoutModal .form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#sendoutModal .form-group input,
#sendoutModal .form-group select,
#sendoutModal .form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#sendoutModal .form-group input:focus,
#sendoutModal .form-group select:focus,
#sendoutModal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#sendoutModal .form-group input::placeholder,
#sendoutModal .form-group textarea::placeholder {
    color: var(--text-muted);
}

.sendout-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sendout-form-grid .full-width {
    grid-column: 1 / -1;
}

.sendout-section {
    margin-bottom: 1.5rem;
}

.sendout-section h4 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.product-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.product-search-container input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

#sendoutProductResults {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

#sendoutProductResults:empty {
    display: none;
}

.product-result {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.product-result:hover {
    background: var(--color-cream);
}

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

.line-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.line-items-table th,
.line-items-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.line-items-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.line-items-table input[type="number"] {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.sendout-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.sendout-totals .total-row {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
}

.sendout-totals .total-row.grand-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-chocolate);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}


/* ============ SPONS DASHBOARD ============ */

#spons-view .view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spons-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.budget-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.budget-input-group label {
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.budget-input-group input {
    width: 120px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
}

.budget-currency {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* SPONS Stats Grid */
.spons-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.spons-stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.spons-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.spons-stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spons-stat-card .stat-icon svg {
    width: 28px;
    height: 28px;
}

.spons-stat-card .stat-icon.monthly {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.spons-stat-card .stat-icon.quarterly {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.spons-stat-card .stat-icon.yearly {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.spons-stat-card .stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spons-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spons-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.spons-stat-card .stat-sublabel {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.spons-stat-card .stat-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success-color);
    margin-top: 0.25rem;
}

/* Budget Progress Section */
.budget-progress-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.budget-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.budget-summary {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.budget-progress-bar {
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.budget-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.budget-progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.budget-progress-fill.over-budget {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.budget-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

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

.budget-percent {
    font-weight: 600;
    color: var(--text-primary);
}

/* SPONS Budget Card */
.spons-budget-card {
    margin-bottom: 1.5rem;
}

.spons-budget-card .budget-amounts {
    font-size: 0.95rem;
}

.spons-budget-card .budget-spent {
    font-weight: 600;
    color: var(--primary-color);
}

.spons-budget-card .budget-separator {
    color: var(--text-muted);
    margin: 0 0.25rem;
}

.spons-budget-card .budget-total {
    color: var(--text-secondary);
}

.spons-budget-bar-container {
    margin-bottom: 1.5rem;
}

.spons-budget-bar {
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.spons-budget-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4f46e5);
    border-radius: 8px 0 0 8px;
    transition: width 0.5s ease;
    position: relative;
    z-index: 1;
}

.spons-budget-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.spons-budget-bar-fill.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.spons-budget-bar-remaining {
    height: 100%;
    background: #e5e7eb;
    flex: 1;
}

.spons-budget-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.budget-label-spent {
    color: var(--primary-color);
    font-weight: 500;
}

.budget-label-remaining {
    color: var(--text-muted);
}

.spons-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.spons-summary-item {
    text-align: center;
}

.spons-summary-item .summary-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.spons-summary-item .summary-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.spons-summary-item .summary-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* SPONS Chart Card */
.spons-chart-card {
    margin-bottom: 1.5rem;
}

.spons-chart-container {
    position: relative;
}

.spons-chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    padding: 0 0.5rem;
    gap: 8px;
}

.spons-chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    max-width: 50px;
    height: 100%;
}

.spons-chart-bar-value {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
}

.spons-chart-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--primary-color), #818cf8);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    min-height: 2px;
}

.spons-chart-bar-fill:hover {
    background: linear-gradient(180deg, #4f46e5, var(--primary-color));
}

.spons-chart-bar-fill.empty {
    background: var(--bg-secondary);
}

.spons-chart-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0.5rem 0;
    border-top: 2px solid var(--border-color);
    margin-top: 0;
}

.spons-chart-labels span {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    max-width: 50px;
}

/* SPONS Orders Section */
.spons-orders-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.spons-orders-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.spons-orders-section h3 {
    margin: 0;
}

.discount-code-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Planned Sendouts Section */
.planned-sendouts-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.planned-sendouts-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.planned-sendouts-section h3 {
    margin: 0;
}

.sendouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.sendout-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--border-color);
}

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

.sendout-card.status-draft {
    border-left-color: #9ca3af;
}

.sendout-card.status-ready {
    border-left-color: #3b82f6;
}

.sendout-card.status-sent {
    border-left-color: #10b981;
}

.sendout-card.status-cancelled {
    border-left-color: #ef4444;
}

.sendout-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.sendout-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.sendout-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.sendout-status.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.sendout-status.status-ready {
    background: #dbeafe;
    color: #1d4ed8;
}

.sendout-status.status-sent {
    background: #d1fae5;
    color: #059669;
}

.sendout-status.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.sendout-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sendout-detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sendout-total {
    margin-left: auto;
    font-weight: 600;
    color: var(--success-color);
}

/* Sendout Form Section headers - matches lead modal style */
.sendout-form-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sendout-form-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 1.25rem 0 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sendout-products-section {
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sendout-products-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.product-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.product-search-results {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.product-result {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.product-result:hover {
    background: var(--bg-hover);
}

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

.product-title {
    font-weight: 500;
}

.product-sku {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.product-price {
    font-weight: 600;
    color: var(--success-color);
}

.line-items-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

.line-items-table th,
.line-items-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.line-items-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.line-items-table tbody tr:hover {
    background: var(--bg-hover);
}

.line-items-table tfoot td {
    border-bottom: none;
    padding: 0.5rem 1rem;
}

.line-items-table tfoot tr:first-child td {
    padding-top: 1rem;
}

.line-items-table .text-right {
    text-align: right;
}

.line-items-table .total-row {
    background: var(--bg-secondary);
    font-weight: 600;
}

.line-items-table .total-row td {
    padding: 0.75rem 1rem;
}

.line-items-table .empty-row td {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

.line-items-table input[type="number"] {
    width: 70px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

/* Mobile responsiveness for sendout modal */
@media (max-width: 768px) {
    .sendout-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .sendout-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
}

/* ============================================
   REKLAMATION DASHBOARD
   ============================================ */

.rekl-dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rekl-dash-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem !important;
}

.rekl-dash-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rekl-dash-stat-content {
    display: flex;
    flex-direction: column;
}

.rekl-dash-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.rekl-dash-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.rekl-dash-stat-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Breakdown cards */
.rekl-dash-breakdown-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rekl-dash-breakdown-card {
    min-height: 200px;
}

.rekl-dash-breakdown-card .card-content {
    padding: 1rem 1.25rem;
}

.rekl-dash-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rekl-dash-breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rekl-dash-breakdown-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.rekl-dash-breakdown-count {
    font-weight: 600;
    color: var(--text-secondary);
}

.rekl-dash-breakdown-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.rekl-dash-breakdown-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-type {
    background: #f59e0b;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-carrier {
    background: #3b82f6;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-status-ny {
    background: #ef4444;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-status-under_review {
    background: #f59e0b;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-status-tpl_kontaktet {
    background: #8b5cf6;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-status-afventer_svar {
    background: #3b82f6;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-status-case_faerdig {
    background: #10b981;
}

.rekl-dash-breakdown-bar-fill.rekl-bar-status-behover_ingen_handling {
    background: #6b7280;
}

/* Reklamation chart bar color (orange-red instead of SPONS blue) */
.rekl-chart-bar {
    background: linear-gradient(180deg, #ef4444 0%, #f97316 100%) !important;
}

.rekl-chart-bar:hover {
    background: linear-gradient(180deg, #dc2626 0%, #ea580c 100%) !important;
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .rekl-dash-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .rekl-dash-breakdown-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .rekl-dash-stats-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CUSTOMIZED ORDRER
   ============================================ */

.badge-neutral {
    background: var(--border-color);
    color: var(--text-secondary);
}

.badge-purple {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

.badge-blue {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

#customizedorders-view .customized-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#customizedorders-view .stat-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

#customizedorders-view .stat-card.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

#customizedorders-view .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

#customizedorders-view .stat-card.success .stat-value {
    color: var(--success);
}

#customizedorders-view .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

#customizedorders-view .table-container {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.customized-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

.customized-progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    width: 100px;
    margin-bottom: 3px;
}

.customized-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Lead modal - Customized section */
.lead-customized-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #374151);
}

.lead-customized-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Customized tab i lead modal */
.customized-tab-section {
    padding: 0.25rem 0;
}

.customized-tab-section .form-group {
    max-width: 320px;
    margin-bottom: 1.5rem;
}

.customized-status-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.status-step {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.7rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
    width: 100%;
}

.status-step:last-child {
    border-bottom: none;
}

.status-step::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    flex-shrink: 0;
    transition: background 0.12s ease;
}

.status-step:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.status-step.active {
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
}

.status-step.active::before {
    background: var(--primary-color, #6366f1);
}

.status-step.completed {
    color: var(--text-secondary);
}

.status-step.completed::before {
    background: var(--success, #10b981);
}

/* ============ KLAVIYO EMAIL MARKETING ============ */

/* Dashboard filter tabs */
.klaviyo-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.klaviyo-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.klaviyo-filter-btn:hover {
    border-color: var(--primary-color, #6366f1);
    color: var(--primary-color, #6366f1);
}

.klaviyo-filter-btn.active {
    background: var(--primary-color, #6366f1);
    color: white;
    border-color: var(--primary-color, #6366f1);
}

/* Stats cards */
.klaviyo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.klaviyo-stat-card {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.klaviyo-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.klaviyo-stat-card .stat-label {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Campaigns table */
.klaviyo-campaigns-container {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}

.klaviyo-campaigns-container .data-table tbody tr:hover {
    background: var(--bg-hover, #f1f5f9);
}

.klaviyo-campaigns-container .data-table tbody tr.klaviyo-preview-row:hover {
    background: var(--bg-secondary, #f8fafc);
}

/* Campaign status badges */
.klaviyo-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.klaviyo-status.sent {
    background: #dcfce7;
    color: #166534;
}

.klaviyo-status.draft {
    background: #fef3c7;
    color: #92400e;
}

.klaviyo-status.scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.klaviyo-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Inline email preview button in table */
.klaviyo-inline-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary, #6366f1);
    background: transparent;
    border: 1px solid var(--primary, #6366f1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.klaviyo-inline-preview-btn:hover {
    background: var(--primary, #6366f1);
    color: #fff;
}

.klaviyo-inline-preview-btn.active {
    background: var(--primary, #6366f1);
    color: #fff;
}

/* Inline preview expanded row */
.klaviyo-preview-row td {
    padding: 0 !important;
    background: var(--bg-secondary, #f8fafc) !important;
}

.klaviyo-preview-td {
    border-top: none !important;
}

.klaviyo-inline-preview {
    padding: 16px 20px;
}

.klaviyo-inline-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 0;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
}

.klaviyo-inline-preview-loading .spinner {
    width: 20px;
    height: 20px;
}

.klaviyo-inline-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.klaviyo-inline-preview-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.klaviyo-inline-preview-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-primary, #fff);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary, #64748b);
    transition: all 0.15s ease;
}

.klaviyo-inline-preview-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.klaviyo-inline-preview .klaviyo-preview-frame-wrapper {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.klaviyo-inline-preview .klaviyo-preview-frame {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

/* Email tab on lead modal */
.klaviyo-email-panel {
    padding: 0;
}

.klaviyo-email-panel .email-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.klaviyo-email-panel .email-panel-header h4 {
    margin: 0;
    font-size: 15px;
}

.klaviyo-email-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.klaviyo-email-status.subscribed {
    background: #dcfce7;
    color: #166534;
}

.klaviyo-email-status.not-found {
    background: #f1f5f9;
    color: #64748b;
}

.klaviyo-email-status.unsubscribed {
    background: #fee2e2;
    color: #991b1b;
}

/* Subscribe section */
.klaviyo-subscribe-section {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
}

.klaviyo-subscribe-section .subscribe-info {
    font-size: 13px;
    color: #92400e;
    margin: 0 0 10px 0;
}

.klaviyo-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Profile lists section */
.klaviyo-profile-lists {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.klaviyo-profile-lists .list-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

/* Email events timeline */
.klaviyo-events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.klaviyo-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    font-size: 13px;
}

.klaviyo-event-item:last-child {
    border-bottom: none;
}

.klaviyo-event-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.klaviyo-event-icon.received {
    background: #e0e7ff;
    color: #4338ca;
}

.klaviyo-event-icon.opened {
    background: #dcfce7;
    color: #166534;
}

.klaviyo-event-icon.clicked {
    background: #fef3c7;
    color: #92400e;
}

.klaviyo-event-details {
    flex: 1;
    min-width: 0;
}

.klaviyo-event-details .event-subject {
    font-weight: 500;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.klaviyo-event-details .event-campaign {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

.klaviyo-event-date {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Email activity indicator on lead table */
.email-activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

.email-activity-icon svg {
    width: 12px;
    height: 12px;
}

.email-activity-icon.opened {
    background: #dcfce7;
    color: #166534;
}

.email-activity-icon.received {
    background: #e0e7ff;
    color: #4338ca;
}

/* No-email state */
.klaviyo-no-email {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #64748b);
}

.klaviyo-no-email svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.klaviyo-no-email p {
    margin: 4px 0;
    font-size: 14px;
}

.klaviyo-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
}

/* ============================================================
   MARKETING HUB — Tabs + Social Feed Cards
   ============================================================ */

/* Channel tabs */
.marketing-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    margin-bottom: 24px;
    padding: 0 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.marketing-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    background: none;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
}

.marketing-tab-btn:hover {
    color: var(--text-primary, #1e293b);
    background: var(--bg-secondary, #f8fafc);
}

.marketing-tab-btn.active {
    color: var(--color-chocolate, #3C1A0B);
    border-bottom-color: var(--color-chocolate, #3C1A0B);
    font-weight: 600;
}

.marketing-tab-btn svg {
    flex-shrink: 0;
}

/* Tab content panels */
.marketing-tab-content {
    display: none;
}

.marketing-tab-content.active {
    display: block;
}

/* =============================================
   B2B TRACKING DASHBOARD
   ============================================= */

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

.tracking-period-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 10px;
    padding: 3px;
}

.tracking-period-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s;
}

.tracking-period-btn:hover {
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
}

.tracking-period-btn.active {
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
}

/* KPI Grid */
.tracking-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tracking-kpi-card {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.tracking-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.tracking-kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    line-height: 1;
    margin-bottom: 4px;
}

.tracking-kpi-label {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

.tracking-kpi-sparkline {
    position: absolute;
    bottom: 12px;
    right: 16px;
    opacity: 0.7;
}

/* Chart */
.tracking-chart-container {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.tracking-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tracking-bar-chart {
    width: 100%;
}

.tracking-bar-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

.tracking-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.tracking-bars-container {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 140px;
    width: 100%;
    overflow-x: auto;
}

.tracking-bar-group {
    flex: 1;
    min-width: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.tracking-bar-stack {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    justify-content: center;
}

.tracking-bar {
    width: 5px;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s;
}

.tracking-bar-group:hover .tracking-bar {
    opacity: 0.8;
}

.tracking-bar-label {
    font-size: 9px;
    color: var(--text-secondary, #94a3b8);
    margin-top: 4px;
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: center center;
}

/* Two column layout */
.tracking-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tracking-panel {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
}

.tracking-empty {
    color: var(--text-secondary, #94a3b8);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}

/* Product list */
.tracking-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tracking-product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.tracking-product-row:hover {
    background: var(--bg-secondary, #f8fafc);
}

.tracking-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.tracking-product-img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary, #f1f5f9);
}

.tracking-product-img-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg-secondary, #f1f5f9);
    flex-shrink: 0;
}

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

.tracking-product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracking-product-meta {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
}

.tracking-product-bar-wrap {
    width: 60px;
    height: 6px;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.tracking-product-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 3px;
    transition: width 0.3s;
}

/* Lead list */
.tracking-leads-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 500px;
    overflow-y: auto;
}

.tracking-lead-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.tracking-lead-row:hover {
    background: var(--bg-secondary, #f8fafc);
}

.tracking-lead-info {
    flex: 1;
    min-width: 0;
}

.tracking-lead-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracking-lead-meta {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
}

.tracking-lead-badge {
    flex-shrink: 0;
}

.tracking-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.tracking-badge.hot {
    background: #fef2f2;
    color: #dc2626;
}

.tracking-badge.warm {
    background: #fff7ed;
    color: #ea580c;
}

.tracking-badge.mild {
    background: #eff6ff;
    color: #3b82f6;
}

.tracking-badge.cool {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-secondary, #94a3b8);
}

.tracking-lead-time {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Event feed */
.tracking-event-feed {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 400px;
    overflow-y: auto;
}

.tracking-event-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.tracking-event-row:hover {
    background: var(--bg-secondary, #f8fafc);
}

.tracking-event-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tracking-event-icon.session_start {
    background: #dbeafe;
    color: #3b82f6;
}

.tracking-event-icon.page_view {
    background: #d1fae5;
    color: #10b981;
}

.tracking-event-icon.product_view {
    background: #fef3c7;
    color: #f59e0b;
}

.tracking-event-icon.collection_view {
    background: #ede9fe;
    color: #6366f1;
}

.tracking-event-info {
    flex: 1;
    font-size: 13px;
    min-width: 0;
}

.tracking-event-who {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.tracking-event-action {
    color: var(--text-secondary, #64748b);
    margin: 0 4px;
}

.tracking-event-detail {
    color: var(--text-primary, #1e293b);
    font-weight: 500;
}

.tracking-event-time {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .tracking-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tracking-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tracking-kpi-grid {
        grid-template-columns: 1fr;
    }
    .tracking-period-selector {
        flex-wrap: wrap;
    }
}

/* Social loading state */
.social-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary, #64748b);
    gap: 12px;
}

.social-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color, #e2e8f0);
    border-top-color: var(--color-chocolate, #3C1A0B);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Social feed grid */
.social-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* LinkedIn ad library + my ads grids */
.linkedin-ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* LinkedIn summary stats grid */
.linkedin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* LinkedIn ad card metrics grid */
.linkedin-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

/* Social post card */
.social-post-card {
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.social-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Post image */
.social-post-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f1f5f9;
}

.social-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.social-post-card:hover .social-post-image {
    transform: scale(1.03);
}

/* Video overlay play icon */
.social-post-video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

/* Carousel badge */
.social-post-carousel-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Post body */
.social-post-body {
    padding: 14px 16px;
}

.social-post-caption {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary, #1e293b);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    word-break: break-word;
}

/* Post metrics row */
.social-post-metrics {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    margin-bottom: 12px;
}

.social-post-metric {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.social-post-metric svg {
    width: 14px;
    height: 14px;
}

/* Post timestamp */
.social-post-time {
    font-size: 12px;
    color: var(--text-tertiary, #94a3b8);
    margin-bottom: 12px;
}

/* Post footer with action button */
.social-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
}

.social-post-account {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
}

.social-post-account-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Engage buttons */
.social-engage-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-engage-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-engage-btn.instagram:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

.social-engage-btn.linkedin {
    background: #0A66C2;
    color: white;
}

.social-engage-btn.linkedin:hover {
    background: #004182;
    transform: scale(1.03);
}

/* Social setup/connect card (when not connected) */
.social-setup-card {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 48px 32px;
    background: var(--bg-primary, #ffffff);
    border: 2px dashed var(--border-color, #e2e8f0);
    border-radius: 16px;
}

.social-setup-card .setup-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.5;
}

.social-setup-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 8px;
}

.social-setup-card p {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
    margin: 0 0 24px;
    line-height: 1.6;
}

.social-setup-card .connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-setup-card .connect-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-setup-card .connect-btn.instagram:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
}

.social-setup-card .connect-btn.linkedin {
    background: #0A66C2;
    color: white;
}

.social-setup-card .connect-btn.linkedin:hover {
    background: #004182;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
}

.social-setup-card .setup-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-tertiary, #94a3b8);
}

/* Social feed header with account info and refresh */
.social-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.social-feed-account-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1e293b);
}

.social-feed-account-info .account-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #dcfce7;
    color: #166534;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.social-feed-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-primary, #ffffff);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-refresh-btn:hover {
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #1e293b);
}

.social-disconnect-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    border-radius: 8px;
    font-size: 13px;
    color: #991b1b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-disconnect-btn:hover {
    background: #fee2e2;
}

/* LinkedIn post card (text-heavy, no image) */
.social-post-card.linkedin-post .social-post-body {
    padding: 20px;
}

.social-post-card.linkedin-post .social-post-caption {
    -webkit-line-clamp: 6;
    font-size: 14px;
    line-height: 1.6;
}

/* Empty state */
.social-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #64748b);
}

.social-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.social-empty-state p {
    margin: 4px 0;
    font-size: 14px;
}

/* ── Mobile responsive for social feeds + all marketing tabs ── */
@media (max-width: 768px) {
    .marketing-tabs {
        gap: 0;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .marketing-tabs::-webkit-scrollbar {
        display: none;
    }

    .marketing-tab-btn {
        padding: 8px 10px;
        font-size: 11px;
        gap: 4px;
        flex: 0 0 auto;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    .marketing-tab-btn svg {
        width: 14px;
        height: 14px;
    }

    /* ── Klaviyo stats cards: 2x2 grid on mobile ── */
    .klaviyo-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .klaviyo-stat-card {
        padding: 12px;
    }

    .klaviyo-stat-card .stat-value {
        font-size: 22px;
    }

    .klaviyo-stat-card .stat-label {
        font-size: 10px;
    }

    /* ── Klaviyo campaigns table → card layout on mobile ── */
    .klaviyo-campaigns-container {
        border: none;
        background: transparent;
    }

    .klaviyo-campaigns-container .data-table thead {
        display: none;
    }

    .klaviyo-campaigns-container .data-table,
    .klaviyo-campaigns-container .data-table tbody {
        display: block;
    }

    .klaviyo-campaigns-container .data-table tbody tr {
        display: block;
        background: var(--bg-primary, #fff);
        border: 1px solid var(--border-color, #e2e8f0);
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 10px;
    }

    .klaviyo-campaigns-container .data-table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border: none;
        font-size: 13px;
    }

    .klaviyo-campaigns-container .data-table tbody tr td:first-child {
        display: block;
        padding-bottom: 8px;
        margin-bottom: 6px;
        border-bottom: 1px solid var(--border-color, #e2e8f0);
        font-size: 14px;
    }

    .klaviyo-campaigns-container .data-table tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary, #64748b);
        font-size: 12px;
    }

    .klaviyo-campaigns-container .data-table tbody tr td:first-child::before {
        display: none;
    }

    /* ── Inline email preview: mobile ── */
    .klaviyo-preview-row td {
        padding: 0 !important;
    }

    .klaviyo-preview-row {
        display: block !important;
        border: none !important;
        padding: 0 !important;
        margin-top: -10px !important;
        margin-bottom: 10px !important;
    }

    .klaviyo-inline-preview {
        padding: 12px;
    }

    .klaviyo-inline-preview .klaviyo-preview-frame {
        height: 400px;
    }

    .klaviyo-preview-cell {
        justify-content: flex-end !important;
        padding-top: 8px !important;
    }

    .klaviyo-preview-cell::before {
        display: none !important;
    }

    /* ── Social / LinkedIn feeds ── */
    .social-feed-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .social-feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .social-setup-card {
        margin: 32px 16px;
        padding: 32px 20px;
    }

    .social-post-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .social-engage-btn {
        width: 100%;
        justify-content: center;
    }

    /* ── LinkedIn ad cards: full width ── */
    .social-feed-grid,
    .linkedin-ad-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── LinkedIn summary stats: 2x2 grid ── */
    .linkedin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .linkedin-stats-grid .linkedin-ads-stat {
        padding: 12px !important;
    }

    .linkedin-stats-grid .linkedin-ads-stat div:last-child {
        font-size: 16px !important;
    }

    /* ── LinkedIn ad card metrics: 2x2 grid ── */
    .linkedin-card-metrics {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   B2B ACTIVITY TRACKING PANEL
   ============================================ */

.activity-panel {
    padding: 4px 0;
}

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

.activity-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-last-seen {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted, #aaa);
    flex-shrink: 0;
}

.activity-dot.active {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* Stat cards */
.activity-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.activity-stat-card {
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
}

.activity-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.activity-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.activity-section {
    margin-bottom: 24px;
}

.activity-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

/* Product list */
.activity-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 8px;
}

.activity-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.activity-product-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--bg-tertiary, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}

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

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

.activity-product-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Collection/category progress bars */
.activity-collection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-collection-item {
    padding: 0;
}

.activity-collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.activity-collection-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-collection-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.activity-progress-bar {
    height: 6px;
    background: var(--bg-secondary, #f0f0f0);
    border-radius: 3px;
    overflow: hidden;
}

.activity-progress-fill {
    height: 100%;
    background: var(--primary, #6366f1);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
}

.activity-timeline-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    line-height: 20px;
}

.activity-timeline-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.activity-timeline-label {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-timeline-time {
    font-size: 11px;
    color: var(--text-muted, #999);
    margin-top: 2px;
}

/* Empty, loading, error states */
.activity-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.activity-empty-state svg {
    margin-bottom: 16px;
}

.activity-empty-state p {
    margin: 4px 0;
    font-size: 13px;
}

.activity-empty-state p strong {
    font-size: 15px;
    color: var(--text-primary);
}

.activity-loading {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.activity-error {
    text-align: center;
    padding: 32px 24px;
    color: var(--danger, #ef4444);
    font-size: 13px;
}

.activity-error p {
    margin: 4px 0;
}

/* Responsive */
@media (max-width: 640px) {
    .activity-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ============================================================
   LEADS FOLLOW UP VIEW
   ============================================================ */

/* Override overflow:hidden so the last column (button) is always reachable */
#leadfollowup-view .table-container {
    overflow-x: auto;
}

/* Keep columns compact so the table fits on smaller screens */
#leadfollowup-view table {
    min-width: 800px;
}

#leadfollowup-view th,
#leadfollowup-view td {
    padding: 0.75rem 0.6rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

#leadfollowup-view th:nth-child(3),
#leadfollowup-view td:nth-child(3),
#leadfollowup-view th:nth-child(5),
#leadfollowup-view td:nth-child(5) {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make the action column sticky on the right so the button is always visible */
#leadfollowup-view th:last-child,
#leadfollowup-view td:last-child {
    position: sticky;
    right: 0;
    background: var(--surface);
    z-index: 2;
    box-shadow: -2px 0 4px rgba(0,0,0,0.04);
}

#leadfollowup-view thead th:last-child {
    background: var(--background);
}

#leadfollowup-view .view-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#leadfollowup-view .view-header h2 {
    margin: 0;
}

#leadfollowup-view .view-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Stats Cards */
.followup-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.followup-stat-card {
    flex: 1;
    min-width: 140px;
    background: var(--surface);
    border-radius: 6px;
    padding: 1.2rem 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.followup-stat-card.pending,
.followup-stat-card.completed,
.followup-stat-card.missed {
    border-color: var(--border);
    background: var(--surface);
}

.followup-stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.followup-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Follow Up Table — bruger global .table-container styling */
/* Rækker klikbare som Kunder-tabellen */
#followUpTableBody tr {
    cursor: pointer;
}

#followUpTableBody tr:hover {
    background: var(--border-light);
}

.followup-row {
    transition: opacity 0.4s, transform 0.4s;
}

.followup-lead-name {
    color: var(--text-primary, #1a1a1a);
    font-weight: 600;
}

.followup-email,
.followup-phone {
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

.followup-email:hover,
.followup-phone:hover {
    text-decoration: underline;
}

.campaign-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Follow Up Done Button — synlig og tydelig */
.btn-followup-done {
    background: var(--primary-color, #2563eb);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-followup-done:hover {
    background: #1d4ed8;
}

.btn-followup-done:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-followup-done.mobile {
    width: 100%;
    padding: 10px;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

/* Heat Score Visuals */
.heat-score {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}
.heat-score-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 24px;
}
.heat-bar-bg {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.heat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.heat-hot .heat-bar-fill { background: var(--primary-color, #2563eb); }
.heat-warm .heat-bar-fill { background: #94a3b8; }
.heat-mild .heat-bar-fill { background: #cbd5e1; }
.heat-label {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-secondary);
}

/* Heat badge for mobile cards */
.heat-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    background: rgba(0,0,0,0.04);
    color: var(--text-secondary);
}

/* Cards — no colored left borders */
.followup-card.heat-hot,
.followup-card.heat-warm,
.followup-card.heat-mild {
    border-left: none;
}
.followup-card {
    border-radius: 6px;
}

.followup-seller-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    max-width: 130px;
}
.followup-seller-select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.followup-seller-select.mobile {
    font-size: 0.85rem;
    padding: 6px 10px;
    max-width: 100%;
    width: 100%;
    margin-top: 4px;
}

/* Mobile Cards (hidden on desktop) */
.followup-cards,
.mobile-new-leads-cards {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #leadfollowup-view .table-container {
        display: none;
    }

    .followup-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .followup-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 1rem;
    }

    .followup-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
    }

    .followup-card-header strong {
        font-size: 1rem;
    }

    .followup-days-badge {
        background: rgba(59, 130, 246, 0.08);
        color: #2563eb;
        font-size: 0.7rem;
        font-weight: 600;
        padding: 3px 8px;
        border-radius: 4px;
    }

    .followup-card-contact {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .followup-contact-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--primary);
        text-decoration: none;
        font-size: 0.95rem;
        padding: 6px 0;
    }

    .followup-phone-link {
        font-weight: 600;
        font-size: 1.1rem;
        color: #22c55e;
    }

    .followup-contact-link:active {
        opacity: 0.7;
    }

    .followup-card-campaign {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        color: var(--text-secondary);
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .followup-stats {
        gap: 0.5rem;
    }

    .followup-stat-card {
        min-width: 0;
        padding: 0.8rem 0.5rem;
    }

    .followup-stat-number {
        font-size: 1.5rem;
    }

    .followup-stat-label {
        font-size: 0.7rem;
    }
}

/* ── MOBILE OVERRIDES: Sub-views from dashboard ── */
@media (max-width: 768px) {

    /* ── Shared: hide duplicate view-header when back-bar exists ── */
    #newcustomers-view .view-header,
    #leadfollowup-view .view-header {
        display: none;
    }

    /* ── Shared: sub-view container ── */
    #newcustomers-view,
    #leadfollowup-view {
        padding: 0 0 6rem 0;
        background: #f5f6f8;
    }

    /* ── Shared: hide sync-info on mobile ── */
    #newcustomers-view .sync-info {
        display: none;
    }

    /* ── Shared: hide stats-header button row on mobile ── */
    #newcustomers-view .stats-header {
        display: none;
    }

    /* ═══════════════════════════════════════
       FOLLOW UP VIEW — Mobile
       ═══════════════════════════════════════ */

    #leadfollowup-view .followup-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 1rem;
        margin: 0;
    }

    #leadfollowup-view .followup-stat-card {
        background: white;
        border-radius: 10px;
        padding: 0.85rem 0.5rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        border: 1px solid #e8eaed;
        text-align: center;
    }

    #leadfollowup-view .followup-stat-number {
        font-size: 1.4rem;
        font-weight: 700;
    }

    #leadfollowup-view .followup-stat-label {
        font-size: 0.68rem;
        color: #6b7280;
    }

    /* Follow Up cards list */
    #leadfollowup-view .followup-cards {
        padding: 0 1rem 2rem;
        gap: 0.625rem;
    }

    #leadfollowup-view .followup-card {
        background: white;
        border-radius: 6px;
        padding: 1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        border: 1px solid #e8eaed;
        margin: 0;
    }

    #leadfollowup-view .followup-card-header {
        margin-bottom: 0.6rem;
    }

    #leadfollowup-view .followup-card-header strong {
        font-size: 0.95rem;
        color: #1a1a2e;
    }

    #leadfollowup-view .heat-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
        border-radius: 6px;
    }

    #leadfollowup-view .followup-card-contact {
        margin-bottom: 0.6rem;
    }

    #leadfollowup-view .followup-contact-link {
        font-size: 0.9rem;
        padding: 5px 0;
    }

    #leadfollowup-view .followup-phone-link {
        font-size: 1.05rem;
    }

    #leadfollowup-view .followup-card-campaign {
        font-size: 0.78rem;
        margin-bottom: 0.6rem;
        padding-top: 0.5rem;
        border-top: 1px solid #f3f4f6;
    }

    #leadfollowup-view .btn-followup-done.mobile {
        width: 100%;
        padding: 10px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        background: #f9fafb;
        color: #374151;
        border: 1px solid #d1d5db;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.15s ease;
    }

    #leadfollowup-view .btn-followup-done.mobile:active {
        background: #22c55e;
        color: white;
        border-color: #22c55e;
        transform: scale(0.98);
    }

    #leadfollowup-view .followup-seller-select.mobile {
        font-size: 0.85rem;
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
    }


    /* ═══════════════════════════════════════
       NYE LEADS VIEW — Mobile
       ═══════════════════════════════════════ */

    #newcustomers-view .new-customers-stats {
        padding: 1rem;
        margin: 0;
    }

    #newcustomers-view .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    #newcustomers-view .stat-card {
        background: white;
        border-radius: 10px;
        padding: 0.85rem 0.75rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        border: 1px solid #e8eaed;
        text-align: center;
    }

    #newcustomers-view .stat-value {
        font-size: 1.4rem;
        font-weight: 700;
    }

    #newcustomers-view .stat-label {
        font-size: 0.72rem;
        color: #6b7280;
    }

    /* Hide desktop table, show mobile cards */
    #newcustomers-view .new-customers-table-container {
        display: none !important;
    }

    /* Mobile cards container */
    .mobile-new-leads-cards {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        padding: 0 1rem 2rem;
    }

    .mobile-new-leads-cards .no-data {
        text-align: center;
        padding: 2rem 1rem;
        color: #9ca3af;
        font-size: 0.9rem;
    }

    /* Individual lead card */
    .new-lead-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        border: 1px solid #e8eaed;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .new-lead-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .new-lead-card-header strong {
        font-size: 0.95rem;
        color: #1a1a2e;
        line-height: 1.3;
    }

    .new-lead-card-badge {
        font-size: 0.65rem;
        font-weight: 600;
        padding: 3px 8px;
        border-radius: 4px;
        white-space: nowrap;
        flex-shrink: 0;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .new-lead-card-badge.assigned {
        background: #ecfdf5;
        color: #059669;
    }

    .new-lead-card-badge.unassigned {
        background: #fef3c7;
        color: #d97706;
    }

    /* Contact links */
    .new-lead-card-contact {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.35rem 0;
    }

    .new-lead-card-contact a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        font-size: 0.9rem;
        padding: 6px 0;
        -webkit-tap-highlight-color: transparent;
    }

    .new-lead-card-contact a:active {
        opacity: 0.7;
    }

    .new-lead-card-contact .email-link {
        color: var(--primary, #3b82f6);
    }

    .new-lead-card-contact .phone-link {
        color: #22c55e;
        font-weight: 600;
        font-size: 1.05rem;
    }

    .new-lead-card-contact svg {
        flex-shrink: 0;
    }

    /* Meta info */
    .new-lead-card-meta {
        display: flex;
        gap: 0.75rem;
        flex-wrap: wrap;
        font-size: 0.75rem;
        color: #9ca3af;
        padding-top: 0.35rem;
        border-top: 1px solid #f3f4f6;
    }

    /* Actions row */
    .new-lead-card-actions {
        padding-top: 0.25rem;
    }

    .new-lead-card-actions .btn {
        width: 100%;
        padding: 9px 16px;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 600;
        text-align: center;
        -webkit-tap-highlight-color: transparent;
    }

    .new-lead-card-actions .btn:active {
        transform: scale(0.98);
    }
}

/* ============ ONBOARDING LINKS ============ */

/* Dashboard quick actions */
.dashboard-quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dashboard-quick-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Admin section header */
.onboarding-links-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

/* ========================================
   Onboarding Link Modal
   ======================================== */

#onboardingLinkModal .modal-content {
    max-width: 480px;
    padding: 0;
    border-radius: 12px;
    height: auto !important;
    max-height: 90vh !important;
    overflow-y: auto;
}

#onboardingLinkModal .modal-header {
    background: var(--primary-color);
    padding: 1.125rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

#onboardingLinkModal form {
    padding: 1.5rem;
}

#onboardingLinkModal .form-group {
    margin-bottom: 1.125rem;
}

#onboardingLinkModal .form-group:last-of-type {
    margin-bottom: 0;
}

#onboardingLinkModal .form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

#onboardingLinkModal .form-group label span {
    font-weight: 400;
    color: var(--text-secondary);
}

#onboardingLinkModal .form-group input,
#onboardingLinkModal .form-group select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

#onboardingLinkModal .form-group input:focus,
#onboardingLinkModal .form-group select:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.08);
}

#onboardingLinkModal .form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#onboardingLinkModal .form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#onboardingLinkModal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--color-cream);
    border-radius: 0 0 12px 12px;
    margin: 1.25rem -1.5rem -1.5rem;
    /* Override mobile fixed positioning */
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
}

#generatedLinkContainer .form-actions {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
}

/* Generated link/PIN result section */
#generatedLinkContainer {
    padding: 1.5rem;
}

#generatedLinkContainer .form-group {
    margin-bottom: 1.125rem;
}

#generatedLinkContainer .form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

#generatedLinkContainer .form-group label .label-hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.generated-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.generated-link-input {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', monospace;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-primary);
    cursor: text;
    min-width: 0;
}

.generated-link-input:focus {
    outline: none;
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(61, 35, 20, 0.08);
}

.generated-link-input.pin-input {
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    text-align: center;
    font-weight: 700;
    max-width: 200px;
    flex: none;
}

.generated-link-row .btn {
    flex-shrink: 0;
}

/* Security info box */
.onboarding-security-info {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.onboarding-security-info strong {
    white-space: nowrap;
}

/* Validity help text */
#generatedLinkContainer .form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#generatedLinkContainer .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    margin: 1rem -1.5rem -1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--color-cream);
    border-radius: 0 0 12px 12px;
}

/* Btn-link and btn-xs utility classes */
.btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    transition: background 0.15s;
}

.btn-link:hover {
    background: #eff6ff;
    color: #2563eb;
    text-decoration: none;
}

.btn-xs {
    padding: 2px 8px;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Onboarding link status badges */
.onboarding-status-pending {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #FEF3C7;
    color: #92400E;
}

.onboarding-status-used {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #D1FAE5;
    color: #065F46;
}

.onboarding-status-expired {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #FEE2E2;
    color: #991B1B;
}

/* ============ COMPOSE SALES EMAIL ============ */

/* Modal override — flex layout so header/footer stay visible, only body scrolls */
.compose-modal {
    max-width: 640px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    max-height: 90vh !important;
}

@media (max-width: 768px) {
    #composeEmailModal,
    #previewEmailModal {
        padding: 0 !important;
    }

    .compose-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100dvh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
    }

    .compose-header {
        padding: 10px 16px;
    }

    .compose-field {
        padding: 0 16px;
    }

    .compose-field-input {
        padding: 10px 8px !important;
    }

    .compose-templates {
        padding: 8px 16px;
        gap: 6px;
    }

    .compose-tpl {
        padding: 5px 12px;
        font-size: 12px;
    }

    .compose-editor {
        padding: 14px;
        min-height: 100px !important;
        max-height: none;
    }

    .compose-toolbar {
        padding: 6px 12px;
    }

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

    .compose-file-list {
        padding: 0 16px 8px;
    }

    /* Preview modal mobile */
    .preview-meta {
        padding: 10px 16px;
    }

    .preview-frame-wrap {
        padding: 8px;
    }

    .preview-frame {
        min-height: 300px;
    }
}

/* Header — always visible at top */
.compose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    flex-shrink: 0;
}

.compose-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.compose-header-left svg {
    color: var(--text-secondary, #64748b);
}

.compose-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary, #64748b);
    transition: all 0.15s;
}

.compose-close:hover {
    background: var(--hover-bg, #f1f5f9);
    color: var(--text-primary, #1a1a1a);
}

/* Body — scrollable, fills remaining space between header and footer */
.compose-body {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

/* Inline fields (To, Subject) */
.compose-field {
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.compose-field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    min-width: 44px;
    flex-shrink: 0;
}

.compose-field-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 12px 8px !important;
    font-size: 14px;
    color: var(--text-primary, #1a1a1a);
    background: transparent !important;
}

.compose-field-input[readonly] {
    color: var(--text-secondary, #64748b);
}

/* Template selector */
.compose-templates {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.compose-tpl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    background: var(--surface, #fff);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.15s;
}

.compose-tpl:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.04);
}

.compose-tpl.active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.compose-tpl.active svg {
    stroke: #fff;
}

/* Editor wrapper */
.compose-editor-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

/* Editor — contenteditable area */
.compose-editor {
    flex: 1;
    min-height: 180px;
    max-height: 360px;
    overflow-y: auto;
    padding: 20px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    background: var(--surface, #fff);
    color: var(--text-primary, #1a1a1a);
}

.compose-editor:focus {
    border-color: transparent;
    box-shadow: none;
}

.compose-editor:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
}

/* Toolbar at bottom of editor */
.compose-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--hover-bg, #f8fafc);
}

.compose-toolbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    transition: all 0.15s;
}

.compose-toolbar button:hover {
    background: var(--border-color, #e5e7eb);
    color: var(--text-primary, #1a1a1a);
}

.toolbar-sep {
    width: 1px;
    height: 20px;
    background: var(--border-color, #e5e7eb);
    margin: 0 4px;
}

/* Footer — always visible at bottom */
.compose-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--surface, #fff);
    flex-shrink: 0;
}

.compose-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 24px;
    background: var(--primary-color, #2563eb);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.compose-send-btn:hover {
    background: var(--primary-hover, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.compose-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.compose-preview-btn,
.compose-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: none;
    color: var(--text-secondary, #64748b);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.compose-preview-btn:hover,
.compose-back-btn:hover {
    background: var(--hover-bg, #f1f5f9);
    color: var(--text-primary, #1a1a1a);
    border-color: var(--text-secondary, #94a3b8);
}

/* Preview modal */
.preview-meta {
    padding: 14px 20px;
    background: var(--hover-bg, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    flex-shrink: 0;
}

.preview-meta-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    line-height: 1.8;
}

.preview-meta-label {
    font-weight: 500;
    min-width: 40px;
    color: var(--text-secondary, #94a3b8);
}

.preview-meta-subject {
    color: var(--text-primary, #1a1a1a);
    font-weight: 500;
}

.preview-frame-wrap {
    padding: 20px;
    background: var(--border-color, #e5e7eb);
}

.preview-frame {
    width: 100%;
    min-height: 500px;
    border: none;
    border-radius: 8px;
    background: #fff;
}

/* File drop overlay */
.compose-drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.06);
    border: 2px dashed var(--primary-color, #2563eb);
    border-radius: 12px;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.compose-drop-overlay.drag-over {
    display: flex;
}

.compose-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--primary-color, #2563eb);
    font-size: 15px;
    font-weight: 500;
}

/* --- LEGACY template-tab kept for compat --- */
.compose-template-tabs {
    display: flex;
    gap: 6px;
}

.template-tab {
    padding: 6px 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary, #666);
}

.template-tab:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}

.template-tab.active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.compose-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    background: #f9fafb;
    border: 1px solid var(--border-color, #e5e7eb);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.compose-toolbar button {
    padding: 4px 8px;
    border: none;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.compose-toolbar button:hover {
    background: #e5e7eb;
    color: var(--text-primary, #1a1a1a);
}

.toolbar-sep {
    width: 1px;
    background: #e5e7eb;
    margin: 2px 4px;
}

.compose-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px;
    border: 2px dashed var(--border-color, #d1d5db);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: var(--text-secondary, #999);
}

.compose-drop-zone:hover,
.compose-drop-zone.drag-over {
    border-color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.03);
    color: var(--primary-color, #2563eb);
}

.compose-drop-zone small {
    font-size: 12px;
    color: #aaa;
}

.compose-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px 8px;
}

.compose-file-list:empty {
    display: none;
}

.compose-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
}

.compose-file-item .file-icon {
    font-size: 18px;
}

.compose-file-item .file-info {
    flex: 1;
}

.compose-file-item .file-name {
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
}

.compose-file-item .file-size {
    color: var(--text-secondary, #999);
    font-size: 12px;
}

.compose-file-item .file-remove {
    border: none;
    background: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.compose-file-item .file-remove:hover {
    background: #fee2e2;
}

.compose-file-item.uploading {
    opacity: 0.6;
}

/* Outbound email history in Email tab */
.outbound-emails-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.outbound-emails-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary, #1a1a1a);
}

.outbound-email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.outbound-email-item {
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.outbound-email-item .outbound-subject,
.outbound-email-item .outbound-email-subject {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 4px;
}

.outbound-email-item .outbound-meta {
    color: var(--text-secondary, #999);
    font-size: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.outbound-email-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.outbound-template-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.outbound-template-badge.template-standard {
    background: #e0f2fe;
    color: #0369a1;
}

.outbound-template-badge.template-tilbud {
    background: #fef3c7;
    color: #92400e;
}

.outbound-template-badge.template-opfoelgning {
    background: #ede9fe;
    color: #6d28d9;
}

.outbound-file-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    background: #f3f4f6;
    color: var(--text-secondary, #666);
}

.outbound-email-date {
    font-size: 11px;
    color: var(--text-secondary, #999);
    margin-left: auto;
}

.outbound-email-subject {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 2px;
}

.outbound-email-sender {
    font-size: 12px;
    color: var(--text-secondary, #999);
}

.btn-success {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}

/* ══════════════════════════════════════
   CAMPAIGN BUDGET - Sheet-like UI
   ══════════════════════════════════════ */

/* Tabs bar */
.cb-tabs {
    padding: 0 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}
.cb-tabs-list {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cb-tabs-list::-webkit-scrollbar { display: none; }
.cb-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    position: relative;
}
.cb-tab:hover { color: var(--text-primary); }
.cb-tab.dragging {
    opacity: 0.4;
    background: var(--background);
}
.cb-tab[draggable="true"] {
    cursor: grab;
}
.cb-tab[draggable="true"]:active {
    cursor: grabbing;
}
.cb-tab.active {
    color: var(--color-chocolate);
    border-bottom-color: var(--color-chocolate);
    font-weight: 600;
}

/* Tab 3-dot menu */
.cb-tab-menu {
    position: relative;
    padding: 2px 4px;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
}
.cb-tab-menu:hover { background: var(--background); }
.cb-tab-dropdown {
    display: none;
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 9999;
    min-width: 130px;
    padding: 4px 0;
}
.cb-tab-dropdown.show { display: block; }
.cb-tab-dropdown div {
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-primary);
}
.cb-tab-dropdown div:hover { background: var(--background); }
.cb-tab-dropdown div.danger { color: var(--color-red, #dc3545); }

/* Budget summary bar */
.cb-budget-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}
.cb-summary-sep { color: var(--border-color); }

/* Category sections */
.cb-category-section {
    margin: 0 1.5rem 1.25rem;
}
.cb-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--color-chocolate);
    border-radius: 8px 8px 0 0;
    margin-top: 0.5rem;
}
.cb-category-name {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}
.cb-category-header .btn-ghost {
    border: 1px dashed rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.85);
    background: transparent;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
}
.cb-category-header .btn-ghost:hover {
    border-color: rgba(255,255,255,0.7);
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.cb-subtotal {
    text-align: right;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.cb-grand-total {
    text-align: right;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 2px solid var(--border-color);
    margin: 0.5rem 1.5rem 0;
}

/* Table */
.cb-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
.cb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.cb-table thead th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: var(--background);
    border-bottom: 2px solid var(--border-color);
    border-right: 1px solid var(--border-light, #EDF2F7);
    white-space: nowrap;
}
.cb-table thead th:last-child { border-right: none; }
.cb-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-light, #EDF2F7);
    vertical-align: middle;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cb-table tbody td:last-child { border-right: none; }
.cb-table tbody tr:last-child td { border-bottom: none; }
.cb-table tbody tr:hover { background: rgba(45, 55, 72, 0.03); }

/* Inline-editable cells */
.cb-cell {
    cursor: pointer;
    transition: background 0.15s;
    min-height: 32px;
}
.cb-cell:hover {
    background: rgba(45, 55, 72, 0.06);
}
.cb-cell.editing {
    padding: 3px 4px;
    background: var(--surface);
}
.cb-inline-input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1.5px solid var(--color-chocolate);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(45, 55, 72, 0.1);
}
.cb-inline-input:focus {
    border-color: var(--color-chocolate);
    box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.15);
}
/* Select/dropdown styling */
select.cb-inline-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232D3748' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    cursor: pointer;
}
.cb-cell-number { text-align: right; }

/* Misc elements */
.cb-link {
    color: var(--color-chocolate);
    text-decoration: none;
    font-size: 0.8rem;
}
.cb-link:hover { text-decoration: underline; }
.cb-user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-chocolate);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
}
.btn-icon-sm {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}
.btn-icon-sm:hover { background: var(--background); }
.btn-icon-sm.danger:hover { color: var(--color-red, #dc3545); background: rgba(220,53,69,0.06); }
.btn-ghost {
    background: none;
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.15s;
}
.btn-ghost:hover {
    border-color: var(--color-chocolate);
    color: var(--color-chocolate);
    background: rgba(45, 55, 72, 0.04);
}

/* ============ SHOPIFY AUDIT LOG ============ */
.sal-filters {
    margin-bottom: 1rem;
}
.sal-filter-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.sal-search {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}
.sal-filter-select {
    min-width: 130px;
    max-width: 180px;
}
.sal-filter-date {
    width: 140px;
}
.sal-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.sal-table {
    font-size: 0.82rem;
}
.sal-table thead th {
    white-space: nowrap;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.6rem;
}
.sal-table tbody td {
    padding: 0.45rem 0.6rem;
    vertical-align: top;
}
.sal-row-error {
    background: rgba(220, 53, 69, 0.04);
}
.sal-col-date { white-space: nowrap; }
.sal-date { font-weight: 500; }
.sal-time { color: var(--text-muted); font-size: 0.75rem; }
.sal-action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--background);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}
.sal-store-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.sal-store-b2b { background: #EBF5FB; color: #2471A3; }
.sal-store-b2c { background: #F5EEF8; color: #7D3C98; }
.sal-entity-name { font-weight: 500; }
.sal-entity-id { color: var(--text-muted); font-size: 0.72rem; word-break: break-all; }
.sal-status-ok {
    color: var(--color-green, #2ECC71);
    font-weight: 600;
    font-size: 0.78rem;
}
.sal-status-error {
    color: var(--color-red, #dc3545);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: help;
    text-decoration: underline dotted;
}
.sal-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.5rem;
}
.sal-page-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.sal-page-btns {
    display: flex;
    gap: 0.25rem;
}
.sal-detail-row td {
    padding: 0 !important;
    background: var(--background);
}
.sal-detail-cell { padding: 0 !important; }
.sal-detail-content {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 0.5rem;
    background: var(--surface, #fff);
}
.sal-detail-header {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light, #EDF2F7);
}
.sal-detail-error {
    color: var(--color-red, #dc3545);
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(220,53,69,0.05);
    border-radius: 4px;
}
.sal-detail-endpoint, .sal-detail-ip {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.sal-detail-json {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 0.72rem;
    line-height: 1.4;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Shopify Audit Log: Tabs */
.sal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}
.sal-tab {
    padding: 0.6rem 1.2rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.sal-tab:hover { color: var(--text-primary); }
.sal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.sal-tab-content { display: none; }
.sal-tab-content.active { display: block; }

/* Shopify Timeline */
.sal-timeline-lookup { margin-bottom: 1rem; }
.sal-timeline-help {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.sal-timeline-header {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.sal-timeline-event {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color-light, #f0f0f0);
    font-size: 0.82rem;
}
.sal-timeline-event:last-child { border-bottom: none; }
.sal-timeline-date {
    min-width: 130px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.sal-timeline-msg {
    flex: 1;
    color: var(--text-primary);
}
.sal-timeline-app, .sal-timeline-author {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--background);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}
.sal-timeline-empty {
    color: var(--text-secondary);
    font-size: 0.82rem;
    padding: 1rem 0;
}
.sal-timeline-error {
    color: var(--error, #e74c3c);
    font-size: 0.82rem;
    padding: 0.5rem 0;
}
.sal-timeline-loadmore {
    padding: 0.75rem 0;
    text-align: center;
}
.sal-timeline-end {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
}
.sal-timeline-result {
    max-height: 600px;
    overflow-y: auto;
}
.sal-timeline-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: var(--background);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sal-tl-stat { white-space: nowrap; }
.sal-tl-stat-sep { color: var(--border-color); }

/* Timeline controls layout */
.sal-tl-controls { margin-bottom: 0.75rem; }
.sal-tl-period {
    margin-bottom: 0.5rem;
}
.sal-tl-period-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sal-tl-period-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.sal-tl-period-presets {
    display: flex;
    gap: 0.25rem;
}
.sal-tl-preset {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg, #fff);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.sal-tl-preset:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.sal-tl-preset.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.sal-tl-date-range {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.25rem;
}
.sal-tl-date-sep {
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.sal-tl-action-btn {
    margin-left: auto;
    font-size: 0.75rem;
}
.sal-tl-sync-btn {
    font-size: 0.75rem;
}

/* ── Timeline Table Styling ── */
.sal-tl-table-wrap { overflow-x: auto; }
.sal-tl-table {
    table-layout: fixed;
    width: 100%;
}
.sal-tl-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color-light, #f0f0f0);
}
.sal-tl-table tbody tr:hover {
    background: var(--bg-hover, #f8f9fa);
}
.sal-table-container .sal-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color);
}
.sal-tl-cell-date {
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
    width: 140px;
    min-width: 140px;
}
.sal-tl-cell-type { width: 80px; min-width: 80px; }
.sal-tl-cell-company {
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sal-tl-cell-entity {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sal-tl-cell-msg {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}
.sal-tl-cell-msg a.sal-tl-msg-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.sal-tl-cell-msg a.sal-tl-msg-link:hover {
    text-decoration: underline;
}
.sal-tl-cell-app { width: 90px; min-width: 90px; white-space: nowrap; }

/* Timeline badges */
.sal-tl-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.sal-tl-badge-company {
    background: #e8f0fe;
    color: #1a73e8;
}
.sal-tl-badge-location {
    background: #fef3e8;
    color: #e67700;
}

.sal-tl-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color-light, #f0f0f0);
}
.sal-tl-filters .sal-search {
    flex: 1;
    max-width: 300px;
}
.sal-tl-filters .sal-filter-select {
    max-width: 160px;
}

/* ── Catalog Repair Modal ── */
.cr-form-body {
    padding: 1.5rem;
}
.cr-form-body .form-group {
    margin-bottom: 1rem;
}
.cr-form-body .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0;
}
.cr-loading { padding: 16px; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }
.cr-info { padding: 10px 14px; background: var(--bg-secondary, #f8f9fa); border-radius: 6px; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 12px; }
.cr-success { padding: 10px 14px; background: #f0fdf4; border-radius: 6px; color: #166534; font-size: 0.85rem; margin-bottom: 12px; }
.cr-error { padding: 10px 14px; background: #fef2f2; border-radius: 6px; color: #991b1b; font-size: 0.85rem; margin-bottom: 12px; }
.cr-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.cr-stat {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 6px;
    padding: 10px 12px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.cr-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.cr-num.cr-ok { color: #16a34a; }
.cr-num.cr-warn { color: #ea580c; }

/* Per-catalog breakdown */
.cr-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cr-catalog-item {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 6px;
    padding: 10px 14px;
    border-left: 3px solid var(--border-color);
}
.cr-catalog-needs-repair { border-left-color: #ea580c; }
.cr-catalog-ok { border-left-color: #16a34a; }
.cr-catalog-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 3px;
}
.cr-catalog-icon { font-size: 0.9rem; }
.cr-catalog-stats {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.cr-sep { color: var(--border-color); }
.cr-text-warn { color: #ea580c; font-weight: 600; }

/* Repair section */
.cr-repair-header {
    font-weight: 600;
    font-size: 0.85rem;
    margin: 14px 0 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.cr-repair-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
}
.cr-repair-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cr-repair-info strong { font-size: 0.85rem; }
.cr-repair-count { font-size: 0.78rem; color: #ea580c; }
.cr-repair-btn { white-space: nowrap; }

/* ============ Chocolate Explorer Tag Manager ============ */
.ce-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ce-source-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #111827);
}

/* Summary cards */
.ce-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ce-summary-card {
    flex: 1;
    min-width: 120px;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-primary, #fff);
}
.ce-card-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}
.ce-card-label {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 4px;
}
.ce-card-total .ce-card-number { color: var(--text-primary, #111827); }
.ce-card-ok .ce-card-number { color: #16a34a; }
.ce-card-warn .ce-card-number { color: #ea580c; }
.ce-card-error .ce-card-number { color: #dc2626; }

/* Filter row */
.ce-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ce-filter-row select,
.ce-filter-row input {
    padding: 6px 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #111827);
}
.ce-filter-row input {
    flex: 1;
    min-width: 150px;
}
.ce-filter-count {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

/* Product list */
.ce-product-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ce-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    background: var(--bg-primary, #fff);
    transition: border-color 0.15s;
}
.ce-product-row:hover {
    border-color: var(--primary-color, #6366f1);
}
.ce-status-none {
    border-left: 4px solid #dc2626;
}
.ce-status-warn {
    border-left: 4px solid #f59e0b;
}
.ce-status-ok {
    border-left: 4px solid #16a34a;
}
.ce-product-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}
.ce-product-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary, #f3f4f6);
}
.ce-no-img {
    background: var(--bg-secondary, #f3f4f6);
}
.ce-product-info {
    flex: 1;
    min-width: 0;
}
.ce-product-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ce-product-meta {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 2px;
}
.ce-dim-badges {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.ce-dim-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}
.ce-dim-active {
    background: #dcfce7;
    color: #166534;
}
.ce-dim-missing {
    background: #fef2f2;
    color: #991b1b;
}
.ce-dim-optional {
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-secondary, #6b7280);
}
.ce-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.ce-issue {
    font-size: 0.7rem;
    color: #ea580c;
    background: #fff7ed;
    padding: 1px 6px;
    border-radius: 3px;
}
.ce-product-tags {
    flex-shrink: 0;
    max-width: 240px;
}
.ce-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: flex-end;
}
.ce-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ede9fe;
    color: #5b21b6;
    white-space: nowrap;
}
.ce-tag-other {
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-secondary, #6b7280);
}
.ce-no-tags {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    font-style: italic;
}
.ce-product-actions {
    flex-shrink: 0;
}
.ce-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary, #6b7280);
}
.ce-empty-sub {
    font-size: 0.85rem;
    margin-top: 4px;
    opacity: 0.7;
}
.ce-error {
    color: #dc2626;
    padding: 16px;
    text-align: center;
}
.ce-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary, #6b7280);
}

/* Tag Editor Modal */
.ce-editor-body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}
.ce-editor-product {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    margin-bottom: 16px;
}
.ce-editor-product img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}
.ce-editor-product-info h3 {
    margin: 0;
    font-size: 1rem;
}
.ce-editor-product-info p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
}
.ce-editor-dimensions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ce-dim-section {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 12px;
}
.ce-dim-section h4 {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ce-double-badge {
    font-size: 0.65rem;
    background: #fef3c7;
    color: #92400e;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}
.ce-optional-badge {
    font-size: 0.65rem;
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-secondary, #6b7280);
    padding: 1px 5px;
    border-radius: 3px;
}
.ce-dim-subsection {
    margin-bottom: 8px;
}
.ce-dim-sublabel {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
    display: block;
    margin-bottom: 4px;
}
.ce-dim-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ce-tag-btn {
    padding: 4px 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #111827);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.ce-tag-btn:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}
.ce-tag-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
.ce-tag-btn.suggested {
    background: #eef2ff;
    color: #4338ca;
    border: 2px dashed #818cf8;
    font-style: italic;
}
.ce-tag-btn.suggested:hover {
    background: #c7d2fe;
    border-color: #6366f1;
}
.ce-other-tags {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.ce-other-tags h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
}
.ce-other-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Confirmation dialog */
.ce-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}
.ce-confirm-dialog {
    background: var(--bg-primary, #fff);
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.ce-confirm-dialog h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}
.ce-confirm-changes {
    margin-bottom: 16px;
}
.ce-confirm-section {
    margin-bottom: 10px;
}
.ce-confirm-section strong {
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}
.ce-confirm-added {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: #dcfce7;
    color: #166534;
    margin: 2px;
}
.ce-confirm-removed {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: #fef2f2;
    color: #991b1b;
    margin: 2px;
    text-decoration: line-through;
}
.ce-confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Suggestion info bar in editor */
.ce-suggest-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #4338ca;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ce-suggest-icon {
    font-size: 1rem;
}
.ce-clear-suggestions-btn {
    margin-left: auto;
    font-size: 0.75rem !important;
    padding: 2px 8px !important;
    background: transparent;
    border: 1px solid #818cf8;
    color: #4338ca;
    cursor: pointer;
    border-radius: 4px;
}
.ce-clear-suggestions-btn:hover {
    background: #e0e7ff;
}

/* Suggestion tags in product list */
.ce-suggestions-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.ce-suggest-label {
    font-size: 0.7rem;
    color: #6366f1;
    font-weight: 600;
}
.ce-tag-suggested {
    background: #eef2ff;
    color: #4338ca;
    border: 1px dashed #818cf8;
    font-size: 0.65rem;
    padding: 1px 5px;
}
.ce-tag-more {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.65rem;
    padding: 1px 5px;
}

/* Suggestion summary card */
.ce-card-suggest {
    border-left: 3px solid #6366f1;
}
.ce-card-suggest .ce-card-number {
    color: #6366f1;
}

/* Bulk confirm dialog - wider variant */
.ce-confirm-wide {
    max-width: 600px;
}
.ce-bulk-summary {
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.ce-bulk-details {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 8px;
}
.ce-bulk-row {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    font-size: 0.8rem;
}
.ce-bulk-row:last-child {
    border-bottom: none;
}
.ce-bulk-row strong {
    display: block;
    margin-bottom: 2px;
}
.ce-bulk-added {
    color: #059669;
    font-size: 0.75rem;
}
.ce-bulk-more {
    color: var(--text-secondary, #6b7280);
    font-style: italic;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .ce-product-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .ce-product-tags {
        max-width: 100%;
    }
    .ce-tags-list {
        justify-content: flex-start;
    }
    .ce-summary {
        gap: 8px;
    }
    .ce-summary-card {
        min-width: 80px;
        padding: 10px;
    }
    .ce-card-number {
        font-size: 1.4rem;
    }
}

/* ── Infinite Scroll Status ── */
.scroll-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.scroll-status-text {
    font-weight: 500;
}

.scroll-loading-hint {
    color: var(--text-muted);
    font-style: italic;
}

.scroll-status.loading .scroll-loading-hint {
    display: none;
}

.scroll-status.loading::after {
    content: 'Indlaeser flere...';
    color: var(--text-muted);
    font-style: italic;
    animation: scrollPulse 1.2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
