/* ==========================================================================
   Brands Tracker — page styles (aligned with Explore Shops design system)
   ========================================================================== */

/* --- Page shell (full-width within app-shell content area; global sidebar handles offset) --- */
.brands-page-wrapper {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    box-sizing: border-box;
    min-width: 0;
}

.page-content .brands-section-dashboard > .padding-global {
    padding-left: 0 !important;
}

.brands-page-wrapper .container-large,
.brands-page-wrapper .container-medium,
.brands-page-wrapper .container-small {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
}

.brands-page-wrapper .margin-bottom.margin-xlarge,
.brands-page-wrapper .margin-xlarge {
    margin-bottom: 0 !important;
}

.brands-content-padding.padding-section-medium {
    /* page-content already clears the fixed navbar */
    padding-top: 0 !important;
    padding-bottom: 24px !important;
}

.brands-page-wrapper hr {
    display: none !important;
}

/* --- Header band (flat like explore topbar; keep brands-only context/search below) --- */
.brands-hero {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    overflow: visible;
}

.brands-page-wrapper .brands-hero .explore-shops-topbar,
.brands-page-wrapper .explore-shops-topbar {
    background: var(--es2-surface-alt, #f8fafc);
    border: none;
    border-radius: var(--es2-radius-lg, 12px);
    padding: 10px 14px !important;
    margin-bottom: 10px !important;
    min-height: 48px;
    box-shadow: none;
    align-items: flex-start !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.brands-page-wrapper .explore-shops-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brands-page-wrapper .explore-shops-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.brands-page-wrapper .explore-shops-main-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--es2-text, #0f172a);
    line-height: 1.15;
}

.brands-page-wrapper .explore-shops-subtitle {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--es2-text-mute, #64748b);
    line-height: 1.45;
    max-width: 52ch;
}

.brands-page-wrapper .explore-shops-subtitle-prefix {
    font-weight: 500;
    color: var(--es2-text-mute, #94a3b8);
}

.brands-subtitle-detail {
    color: var(--es2-text-2, #475569);
    font-weight: 500;
}

.brands-title-icon {
    width: 22px !important;
    height: 22px !important;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    flex: 0 0 auto;
    flex-shrink: 0;
}

/* Stat chips — match topbar control chrome (filters / follow buttons) */
.brands-stat-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--es2-radius, 10px);
    border: 1px solid var(--es2-border, #e2e8f0);
    background: var(--es2-surface, #fff);
    box-sizing: border-box;
    flex-shrink: 0;
    cursor: default;
}

.brands-stat-chip__tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    bottom: auto;
    right: auto;
    transform: translateX(-50%);
    z-index: 1020;
    width: max-content;
    max-width: 280px;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 12px;
    border-radius: 8px;
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brands-stat-chip__tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    top: auto;
    margin-left: -5px;
    border: 5px solid transparent;
    border-bottom-color: #1e293b;
    border-top-color: transparent;
}

.brands-stat-chip:hover .brands-stat-chip__tooltip,
.brands-stat-chip:focus-within .brands-stat-chip__tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
}

.brands-stat-chip__body {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    line-height: 1.2;
}

.brands-stat-chip__label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--es2-text-mute, #64748b);
    white-space: nowrap;
}

.brands-stat-chip__label::after {
    content: none;
}

.brands-stat-chip__value {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--es2-text, #0f172a);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
    white-space: nowrap;
}

.brands-hero-follow-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.brands-hero-follow-wrap .wh-btn-primary.wh-btn--compact,
.brands-hero-follow-wrap .btn-follow-brand-upgrade {
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--es2-radius, 10px);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Soft primary twin of Follow — same shape, lighter blue so it stays secondary */
.brands-hero-follow-wrap .brands-hero-import-btn.wh-btn-primary {
    background: #eff6ff;
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.28);
    box-shadow: none;
}

.brands-hero-follow-wrap .brands-hero-import-btn.wh-btn-primary:hover {
    background: #dbeafe;
    background-color: #dbeafe;
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.4);
}

.brands-hero-follow-wrap .brands-hero-import-btn.wh-btn-primary:active {
    transform: translateY(1px);
}

.brands-hero-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- Auto-import Sales Tracker (background chip) --- */
.brands-st-auto-import-chip {
    position: fixed;
    left: 20px;
    right: auto;
    bottom: 20px;
    z-index: 100070;
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    width: min(320px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--es2-surface, #fff);
    color: var(--es2-text, #0E121B);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
    pointer-events: none;
    box-sizing: border-box;
}

.brands-st-auto-import-chip[hidden] {
    display: none !important;
}

.brands-st-auto-import-chip.is-done .brands-st-auto-import-chip-spinner {
    display: none;
}

.brands-st-auto-import-chip.is-done .brands-st-auto-import-chip-bar {
    display: none;
}

.brands-st-auto-import-chip-spinner {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 2px solid rgba(34, 90, 234, 0.2);
    border-top-color: var(--es2-primary, #225AEA);
    animation: brands-st-auto-spin 0.75s linear infinite;
}

@keyframes brands-st-auto-spin {
    to { transform: rotate(360deg); }
}

.brands-st-auto-import-chip-body {
    min-width: 0;
    flex: 1 1 auto;
}

.brands-st-auto-import-chip-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--es2-text, #0E121B);
    margin: 0 0 2px;
}

.brands-st-auto-import-chip-text {
    min-width: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--es2-text-2, #475569);
    font-variant-numeric: tabular-nums;
}

.brands-st-auto-import-chip-bar {
    margin-top: 8px;
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.brands-st-auto-import-chip-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--es2-primary, #225AEA);
    transition: width 0.3s ease;
}

html[data-theme="dark"] .brands-st-auto-import-chip {
    background: var(--es2-surface, #1e293b);
    color: var(--es2-text, #f1f5f9);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .brands-st-auto-import-chip-title {
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-st-auto-import-chip-text {
    color: var(--es2-text-2, #cbd5e1);
}

html[data-theme="dark"] .brands-st-auto-import-chip-bar {
    background: rgba(148, 163, 184, 0.16);
}

/* --- Import from Sales Tracker modal (aligned with follow-brand modal) --- */
.brands-st-import-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.brands-st-import-modal[hidden] {
    display: none !important;
}

.brands-st-import-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.brands-st-import-box {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(80vh, 720px);
    background: var(--es2-surface, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brands-st-import-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--es2-border, #F2F2F2);
}

.brands-st-import-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--es2-text, #0E121B);
    letter-spacing: -0.01em;
}

.brands-st-import-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--es2-text-mute, #64748b);
    max-width: 420px;
}

.brands-st-import-x {
    border: none;
    background: #F5F5F5;
    width: 28px;
    height: 28px;
    border-radius: 100px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--es2-text-2, #525866);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.brands-st-import-x:hover {
    background: var(--es2-surface-hov, #f1f5f9);
    color: var(--es2-text, #0E121B);
}

.brands-st-import-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--es2-border, #F2F2F2);
}

.brands-st-import-search {
    flex: 1;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    font-size: 12px;
    background: var(--es2-filter-surface, #fff);
    color: var(--es2-text, #0E121B);
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box;
}

.brands-st-import-search:focus {
    border-color: var(--es2-border, #F2F2F2) !important;
    box-shadow: none !important;
    outline: none !important;
}

.brands-st-import-search::placeholder {
    color: var(--es2-text-mute, #94a3b8);
}

.brands-st-import-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--es2-text-mute, #64748b);
    white-space: nowrap;
}

.brands-st-import-list {
    overflow-y: auto;
    padding: 8px 12px 16px;
    min-height: 180px;
    max-height: 48vh;
}

.brands-st-import-empty {
    text-align: center;
    padding: 28px 16px;
    font-size: 12px;
    color: var(--es2-text-mute, #64748b);
}

.brands-st-import-sentinel {
    text-align: center;
    padding: 12px 8px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--es2-text-mute, #64748b);
    min-height: 20px;
}

.brands-st-import-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--es2-border, #e2e8f0);
    margin-bottom: 4px;
    background: var(--es2-surface, #fff);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.brands-st-import-row:hover {
    border-color: var(--es2-border-hov, #cbd5e1);
    background: var(--es2-surface-alt, #f8fafc);
}

.brands-st-import-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brands-st-import-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--es2-text, #0E121B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brands-st-import-domain {
    font-size: 10px;
    line-height: 1.25;
    color: var(--es2-text-mute, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brands-st-import-status {
    font-size: 10px;
    font-weight: 600;
    color: var(--es2-text-mute, #64748b);
    min-width: 56px;
    text-align: right;
    flex-shrink: 0;
}

.brands-st-import-status.is-ok {
    color: #047857;
}

.brands-st-import-status.is-warn {
    color: #b45309;
}

.brands-st-import-status.is-err {
    color: #dc2626;
}

.brands-st-import-row .wh-btn-primary.wh-btn--compact {
    min-height: 28px;
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

.brands-st-import-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
    cursor: default;
    white-space: nowrap;
    flex-shrink: 0;
}

.brands-st-import-done.is-requested {
    background: var(--es2-surface-alt, #f8fafc);
    border-color: var(--es2-border, #e2e8f0);
    color: var(--es2-text-2, #525866);
}

.brands-st-import-request {
    padding: 16px 16px 20px;
}

.brands-st-import-request-msg {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--es2-text, #0E121B);
}

.brands-st-import-request-help {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--es2-text-mute, #64748b);
}

.brands-st-import-request-help a {
    color: var(--es2-primary, #225AEA);
    font-weight: 600;
}

.brands-st-import-request-input {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    font-size: 12px;
    background: var(--es2-filter-surface, #fff);
    color: var(--es2-text, #0E121B);
    box-shadow: none !important;
    outline: none !important;
}

.brands-st-import-request-input:focus {
    border-color: var(--es2-border, #F2F2F2) !important;
    box-shadow: none !important;
    outline: none !important;
}

.brands-st-import-request-error {
    margin: 8px 0 0;
    font-size: 12px;
    color: #dc2626;
}

.brands-st-import-request-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.brands-st-import-cancel {
    flex: 1;
    min-height: 36px;
    background: var(--es2-surface, #fff);
    border: 1px solid #E1E4EA;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #525866;
    cursor: pointer;
}

.brands-st-import-cancel:hover {
    background: var(--es2-surface-alt, #f8fafc);
    border-color: var(--es2-border-hov, #cbd5e1);
    color: var(--es2-text, #0E121B);
}

.brands-st-import-request-actions .wh-btn-primary.wh-btn--compact {
    flex: 1;
    min-height: 36px;
}

/* Hero workspace — location + folders (same chrome as filters bar) */
.brands-hero-footer.brands-workspace,
.brands-workspace {
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: var(--es2-radius-lg, 12px);
    background: var(--es2-surface, #fff);
    padding: 8px 10px;
    margin: 0 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.brands-workspace .brands-breadcrumb-bar[hidden] {
    display: none !important;
}

.brands-workspace .brands-breadcrumb-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 28px;
}

.brands-workspace .brands-breadcrumb-bar .breadcrumbs {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.brands-workspace .breadcrumb-wrapper {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 2px 6px;
    margin: 0;
    border-radius: 6px;
    color: var(--es2-text-mute, #64748b);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.brands-workspace .breadcrumb-wrapper:hover {
    background: var(--es2-surface-hov, #f8fafc);
    color: var(--es2-text, #0f172a);
}

.brands-workspace .breadcrumb-wrapper.is-current,
.brands-workspace .breadcrumb-wrapper.active {
    color: var(--es2-text, #0f172a);
    cursor: default;
}

.brands-workspace .breadcrumb-wrapper.is-current:hover,
.brands-workspace .breadcrumb-wrapper.active:hover {
    background: transparent;
}

.brands-workspace .breadcrumb-item,
.brands-workspace .breadcrumb-wrapper .folder-name,
.brands-workspace .breadcrumb-wrapper .board-name {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: inherit;
    text-decoration: none;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brands-workspace .breadcrumb-wrapper.is-current .breadcrumb-item,
.brands-workspace .breadcrumb-wrapper.is-current .folder-name,
.brands-workspace .breadcrumb-wrapper.is-current .board-name,
.brands-workspace .breadcrumb-wrapper.active .breadcrumb-item {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--es2-text, #0f172a);
}

.brands-workspace .breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    color: var(--es2-text-mute, #94a3b8);
    opacity: 0.7;
    user-select: none;
}

.brands-workspace .breadcrumb-separator[hidden],
.brands-workspace .breadcrumb-wrapper[hidden],
.brands-workspace .folder-dropdown[hidden],
.brands-workspace .more-dropdown[hidden],
.brands-workspace .share-board-btn[hidden],
.brands-workspace .edit-board-btn[hidden],
.brands-workspace .delete-board-btn[hidden],
.brands-workspace .brands-workspace__count[hidden] {
    display: none !important;
}

.brands-workspace .action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.brands-workspace .folder-btn,
.brands-workspace .more-btn,
.brands-workspace .share-board-btn,
.brands-workspace .edit-board-btn,
.brands-workspace .delete-board-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: var(--es2-radius-sm, 7px);
    background: var(--es2-filter-surface, #fff);
    box-shadow: none;
    color: var(--es2-text-2, #334155);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.brands-workspace .folder-btn:hover,
.brands-workspace .more-btn:hover,
.brands-workspace .share-board-btn:hover,
.brands-workspace .edit-board-btn:hover {
    background: var(--es2-surface-hov, #f8fafc);
    border-color: var(--es2-border-strong, #cbd5e1);
    color: var(--es2-text, #0f172a);
}

.brands-workspace .folder-dropdown-arrow,
.brands-workspace .dropdown-arrow {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    opacity: 0.7;
}

.brands-workspace__row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.brands-workspace__scopes {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.brands-workspace__scopes > #all-brands {
    flex: 0 0 auto;
}

.brands-workspace__scopes > .brands-ws-add-folder {
    flex: 0 0 auto;
}

.brands-ws-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 30px;
    max-width: 220px;
    padding: 0 10px;
    margin: 0;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 8px;
    background: var(--es2-filter-surface, #fff);
    color: var(--es2-text-2, #334155);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.brands-ws-chip:hover {
    background: var(--es2-surface-hov, #f8fafc);
    border-color: var(--es2-border-strong, #cbd5e1);
    color: var(--es2-text, #0f172a);
}

.brands-ws-chip.active,
.brands-ws-chip.all-saved-ads.active,
.brands-ws-chip.active-board {
    background: var(--es2-primary-soft, #eef3ff);
    border-color: rgba(34, 90, 234, 0.22);
    color: var(--es2-primary, #225AEA);
    font-weight: 600;
}

.brands-ws-chip__folder {
    color: var(--es2-text-mute, #94a3b8);
    font-weight: 500;
    font-size: 11.5px;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brands-ws-chip.active-board .brands-ws-chip__folder,
.brands-ws-chip.active .brands-ws-chip__folder {
    color: rgba(34, 90, 234, 0.72);
}

.brands-ws-chip__sep {
    color: var(--es2-text-mute, #cbd5e1);
    font-weight: 400;
    flex-shrink: 0;
}

.brands-ws-chip__board,
.brands-ws-chip .board-name {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.brands-ws-chip__count,
.brands-ws-chip .board-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--es2-text-mute, #94a3b8);
    flex-shrink: 0;
}

.brands-ws-chip.active-board .brands-ws-chip__count {
    color: rgba(34, 90, 234, 0.7);
}

.brands-ws-folder-empty {
    border-style: dashed;
    color: var(--es2-text-mute, #64748b);
}

.brands-ws-chip__hint {
    font-size: 11px;
    font-weight: 500;
    color: var(--es2-text-mute, #94a3b8);
}

.brands-workspace__chips.sidebar-folders-list,
.brands-workspace .brands-workspace__chips {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 0 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--es2-border-strong, #cbd5e1) transparent;
}

.brands-workspace__chips::-webkit-scrollbar {
    height: 4px;
}

.brands-workspace__chips::-webkit-scrollbar-thumb {
    background: var(--es2-border-strong, #cbd5e1);
    border-radius: 8px;
}

.brands-workspace__chips .brands-ws-chip[hidden] {
    display: none !important;
}

.brands-ws-add-folder.add-folder-btn,
.brands-workspace .brands-ws-add-folder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 11px;
    margin: 0;
    border: 1px dashed var(--es2-border-strong, #cbd5e1);
    border-radius: 8px;
    background: transparent;
    color: var(--es2-text-mute, #64748b);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.brands-ws-add-folder.add-folder-btn:hover,
.brands-workspace .brands-ws-add-folder:hover {
    background: var(--es2-surface-hov, #f8fafc);
    border-color: var(--es2-text-mute, #94a3b8);
    color: var(--es2-text, #0f172a);
}

.brands-ws-add-folder svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.brands-workspace__empty {
    padding: 4px 2px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--es2-text-mute, #64748b);
    white-space: nowrap;
}

.brands-ws-chip__caret {
    flex-shrink: 0;
    opacity: 0.45;
    margin-left: 1px;
}

.brands-ws-chip.active-board .brands-ws-chip__caret,
.brands-ws-chip[aria-expanded="true"] .brands-ws-chip__caret {
    opacity: 0.85;
}

.brands-ws-menu {
    position: absolute;
    z-index: 50;
    min-width: 220px;
    max-width: min(280px, calc(100% - 16px));
    padding: 0;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 10px;
    background: var(--es2-surface, #fff);
    box-sizing: border-box;
    overflow: hidden;
}

.brands-ws-menu[hidden] {
    display: none !important;
}

.brands-ws-menu__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 8px 12px;
}

.brands-ws-menu__title {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--es2-text-mute, #64748b);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-ws-menu__head-actions {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
}

.brands-ws-menu__boards {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 6px 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--es2-border-strong, #cbd5e1) transparent;
}

.brands-ws-menu__empty {
    padding: 12px 8px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--es2-text-mute, #94a3b8);
    line-height: 1.4;
}

.brands-ws-menu__board {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 32px;
    padding: 0 2px;
    border-radius: 7px;
    position: relative;
}

.brands-ws-menu__board.is-active .brands-ws-menu__board-main {
    color: var(--es2-primary, #225AEA);
    font-weight: 600;
}

.brands-ws-menu__board:hover {
    background: var(--es2-surface-hov, #f8fafc);
}

.brands-ws-menu__board.is-active {
    background: var(--es2-primary-soft, #f3f6ff);
}

.brands-ws-menu__board-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--es2-text, #0f172a);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.015em;
    text-align: left;
    cursor: pointer;
}

.brands-ws-menu__board-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-ws-menu__board-count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--es2-text-mute, #94a3b8);
    font-variant-numeric: tabular-nums;
}

.brands-ws-menu__board-actions {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
    margin-right: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.brands-ws-menu__board:hover .brands-ws-menu__board-actions,
.brands-ws-menu__board:focus-within .brands-ws-menu__board-actions {
    opacity: 1;
    pointer-events: auto;
}

.brands-ws-menu__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--es2-text-mute, #64748b);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.brands-ws-menu__icon-btn svg {
    display: block;
    flex-shrink: 0;
}

.brands-ws-menu__icon-btn:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--es2-text, #0f172a);
}

.brands-ws-menu__icon-btn--danger:hover {
    background: rgba(225, 29, 72, 0.08);
    color: #e11d48;
}

.brands-ws-menu__foot {
    padding: 6px 8px 8px;
    border-top: 1px solid var(--es2-border, #eef2f7);
}

.brands-ws-menu__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 7px;
    background: var(--es2-filter-surface, #fff);
    color: var(--es2-text, #0f172a);
    font: inherit;
    font-size: 12.5px;
    font-weight: 550;
    letter-spacing: -0.015em;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.brands-ws-menu__item--primary:hover {
    background: var(--es2-surface-hov, #f8fafc);
    border-color: var(--es2-border-strong, #cbd5e1);
}

.brands-workspace .action-buttons[hidden] {
    display: none !important;
}

@media (hover: none) {
    .brands-ws-menu__board-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Legacy sidebar folder chrome (kept for any leftover pages using mode=folders) */
.nav-sidebar.nav-sidebar--folders,
.nav-sidebar.brands-folders-sidebar {
    width: 280px;
    padding: 48px 0.5rem 0 !important;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--es2-border-strong, #E1E4EA) transparent;
}

.nav-sidebar.nav-sidebar--folders::-webkit-scrollbar,
.brands-folders-sidebar::-webkit-scrollbar {
    width: 6px;
}

.nav-sidebar.nav-sidebar--folders::-webkit-scrollbar-thumb,
.brands-folders-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--es2-border-strong, #E1E4EA);
    border-radius: 10px;
}

.nav-sidebar--folders > .tracker-shell-nav {
    padding: 0;
    margin-bottom: 4px;
}

.nav-sidebar--folders > .tracker-shell-nav + .brands-folders-sidebar__inner {
    border-top: 1px solid var(--es2-border, #eaeaea);
    margin-top: 6px;
}

.brands-folders-sidebar__inner {
    padding: 12px 0 20px;
}

.brands-folders-search-wrap:not(.brands-workspace__search) {
    position: relative;
    margin-bottom: 16px;
    margin-top: 16px;
}

.brands-folders-search-icon {
    color: var(--es2-text-mute, #888);
}

.nav-sidebar--folders #search-folders {
    width: 100%;
    height: 36px;
    padding: 10px 12px 10px 35px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    font-size: 12px;
    color: var(--es2-text, #333);
    background: var(--es2-filter-surface, #fff);
    box-sizing: border-box;
}

.nav-sidebar--folders #search-folders::placeholder {
    color: #717c92;
    font-size: 12px;
}

.nav-sidebar--folders #search-folders:focus {
    border-color: var(--es2-primary, #225AEA);
    outline: none;
}

.nav-sidebar--folders .all-saved-ads {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-sidebar--folders .all-saved-ads:hover {
    background-color: var(--es2-surface-hov, #f8f9fa);
}

.nav-sidebar--folders .all-saved-ads.active {
    background-color: var(--es2-primary-soft, #f0f4ff);
}

.nav-sidebar--folders .folders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-left: 12px;
    padding-right: 12px;
}

.nav-sidebar--folders .add-folder-btn {
    background: #525866;
    border: none;
    cursor: pointer;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-sidebar--folders .sidebar-folders-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.folder-header:hover {
    background-color: var(--es2-surface-hov, #f8f9fa);
}

.folder-item.active-folder .folder-header {
    background-color: var(--es2-primary-soft, #f0f4ff);
}

.folder-item.active-folder .folder-name {
    color: var(--es2-primary, #225AEA) !important;
    font-weight: 600;
}

.board-item:hover {
    background-color: var(--es2-surface-hov, #f8f9fa);
}

.board-item.active-board {
    background-color: var(--es2-primary-soft, #f0f4ff);
}

.board-item.active-board span {
    color: var(--es2-primary, #225AEA) !important;
    font-weight: 600;
}

.dropdown-item:hover {
    background-color: var(--es2-surface-hov, #f8f9fa);
}

/* Dropdown / option buttons */
.folder-dropdown,
.more-dropdown {
    position: relative;
}

.folder-btn,
.more-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--es2-filter-surface, #fff);
    border: 1px solid var(--es2-border-strong, #E1E4EA);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    font-size: 12px;
    font-weight: 500;
    color: var(--es2-text, #000);
}

.folder-dropdown-arrow,
.dropdown-arrow {
    transition: transform 0.2s ease;
}

/* Brands meta search (in results toolbar) */
.brands-page-wrapper .brands-meta-search.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    width: auto;
    min-width: 160px;
    max-width: 320px;
    min-height: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--es-border, #e2e8f0);
    border-radius: var(--es-radius-control, 8px);
    background-color: var(--es-filter-surface, #fff);
    box-shadow: var(--es-control-shadow, 0 1px 2px rgba(15, 23, 42, 0.04));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.brands-page-wrapper .brands-meta-search.search-wrapper:focus-within {
    border-color: var(--es-border-focus, #225aea);
    box-shadow: var(--es-control-focus-ring, 0 0 0 3px rgba(34, 90, 234, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06));
}

.brands-page-wrapper .brands-meta-search > svg {
    position: static;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--es2-text-mute, #94a3b8);
    pointer-events: none;
}

.brands-page-wrapper .brands-meta-search #brands-search,
.brands-page-wrapper .brands-meta-search #brands-search.search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 0;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--es2-text, #0f172a);
    box-sizing: border-box;
}

.brands-page-wrapper .brands-meta-search #brands-search:focus,
.brands-page-wrapper .brands-meta-search #brands-search.search-input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.brands-page-wrapper .brands-meta-search #brands-toolbar-search-results {
    min-width: 280px;
    width: max(100%, 280px);
}

/* Filters trigger — sits beside the brands search bar */
.brands-page-wrapper .brands-filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    min-height: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--es-border, #e4e4e7);
    border-radius: var(--es-radius-control, 8px);
    background: var(--es-filter-surface, #fff);
    box-shadow: none;
    color: var(--es2-text-mute, #71717b);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.brands-page-wrapper .brands-filters-toggle svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke-width: 1.75;
    color: currentColor;
    opacity: 0.85;
}

.brands-page-wrapper .brands-filters-toggle__label {
    font-weight: 500;
}

.brands-page-wrapper .brands-filters-toggle:hover {
    border-color: #d4d4d8;
    background: #fafafa;
    color: var(--es2-text, #3f3f46);
}

.brands-page-wrapper .brands-filters-toggle.is-active {
    border-color: #d4d4d8;
    background: #f4f4f5;
    box-shadow: none;
    color: var(--es2-text, #3f3f46);
}

.brands-page-wrapper .brands-filters-toggle.is-active svg {
    color: currentColor;
    opacity: 1;
}

.brands-page-wrapper .brands-filters-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #52525b;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 0;
    letter-spacing: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.brands-page-wrapper .brands-filters-row {
    width: 100%;
    padding: 8px 16px 18px;
    margin: 0 0 4px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--es2-border, #eef2f7);
    background: var(--es2-surface, #fff);
}

.brands-page-wrapper .brands-filters-row[hidden] {
    display: none !important;
}

.brands-page-wrapper .brands-filters-row.is-open + .table-wrapper.explore-shops-results-wrap,
.brands-page-wrapper .brands-filters-row:not([hidden]) + .table-wrapper.explore-shops-results-wrap {
    padding-top: 10px;
}

.brands-page-wrapper .brands-filters-row__inner {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: var(--es2-h-control, 32px);
}

.brands-page-wrapper .brands-filters-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    position: relative;
    z-index: 50;
}

/* Native <select> must not steal clicks — wrapper opens the custom panel. */
.brands-page-wrapper #brands-filter-active-ads,
.brands-page-wrapper #brands-filter-traffic,
.brands-page-wrapper #brands-filter-revenue {
    pointer-events: none !important;
}

.brands-page-wrapper .brands-filters-group > .filter-item {
    display: flex;
    align-items: center;
}

.brands-page-wrapper .brands-filters-group > .filter-item > .select-wrapper {
    display: flex !important;
    align-items: center !important;
    min-height: var(--es2-h-control, 32px);
    height: var(--es2-h-control, 32px);
}

.brands-page-wrapper .brands-filters-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-height: var(--es2-h-control, 32px);
    height: var(--es2-h-control, 32px);
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--es-radius-control, 8px);
    background: transparent;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.brands-page-wrapper .brands-filters-clear:hover {
    background: rgba(220, 38, 38, 0.06);
}

.brands-page-wrapper .brands-filters-clear[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .brands-page-wrapper .explore-shops-results-meta__count-wrap {
        flex-wrap: wrap !important;
    }

    .brands-page-wrapper .brands-meta-search.search-wrapper {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
        order: 2;
    }

    .brands-page-wrapper .brands-filters-toggle {
        flex: 0 0 auto;
    }

    .brands-page-wrapper .brands-filters-row {
        padding: 6px 12px 16px;
    }
}

.brands-page-wrapper .explore-shops-topbar-actions {
    flex: 0 0 auto;
    margin-left: auto;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    overflow: visible;
}

.brands-page-wrapper .explore-shops-topbar-actions .watch-tutorial-btn {
    height: 36px;
    min-height: 36px;
    margin: 0 !important;
    padding: 0 12px;
    align-self: center;
    box-sizing: border-box;
}

.brands-page-wrapper .explore-shops-topbar {
    overflow: visible !important;
}

/* Legacy quota labels (fallback) */
.brands-page-wrapper .brands-quota-label {
    font-size: 12px;
    color: var(--es2-text-2, #334155);
    white-space: nowrap;
}

.brands-page-wrapper .brands-quota-label--muted {
    color: var(--es2-text-mute, #94a3b8);
}

/* --- Context bar (breadcrumbs) — styles live under .brands-hero-footer --- */
.brands-context-bar {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* --- Results card bridge --- */
.brands-page-wrapper .explore-shops-results-card {
    margin-top: 14px;
    width: 100%;
    min-width: 0;
}

.brands-page-wrapper .explore-shops-results-card.is-layout-table {
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.brands-page-wrapper .explore-shops-results-card.is-layout-table #brands-results-meta {
    margin-top: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: linear-gradient(180deg, var(--es2-surface, #ffffff) 0%, var(--es2-surface-alt, #f8fafc) 100%) !important;
    border-bottom: 1px solid var(--es2-border, #e2e8f0) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    box-sizing: border-box;
    position: relative !important;
}

.brands-page-wrapper .explore-shops-results-card.is-layout-table .explore-shops-results-wrap,
.brands-page-wrapper .explore-shops-results-card.is-layout-table .table-wrapper.explore-shops-results-wrap {
    margin-top: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--es2-surface, #fff) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.brands-page-wrapper .explore-shops-results-meta__count-wrap {
    display: inline-flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
}

.brands-page-wrapper .explore-shops-results-meta__pill {
    display: inline-flex !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 5px 10px !important;
    border-radius: 10px;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-height: 32px !important;
    box-sizing: border-box;
    margin: 0 !important;
    white-space: nowrap !important;
}

.brands-page-wrapper .explore-shops-results-meta__pill.is-empty {
    background: var(--es2-surface-alt, #f8fafc);
    border-color: var(--es2-border, #e8edf3);
    gap: 6px !important;
    min-height: 26px !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
}

.brands-page-wrapper .explore-shops-results-meta__icon {
    display: none !important;
}

.brands-page-wrapper .explore-shops-results-meta__pill.is-empty .explore-shops-results-meta__icon {
    display: none !important;
}

.brands-page-wrapper .explore-shops-results-meta__count-text {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 3px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    font-size: 13px;
    line-height: 1;
    color: var(--es2-text-2, #334155);
}

.brands-page-wrapper .explore-shops-results-meta__total {
    display: inline !important;
    font-weight: 700;
    font-size: 14px !important;
    line-height: 1 !important;
    color: var(--es2-text, #0f172a);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.brands-page-wrapper .explore-shops-results-meta__pill.is-empty .explore-shops-results-meta__total {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--es2-text-3, #64748b);
    letter-spacing: 0;
}

.brands-page-wrapper .explore-shops-results-meta__suffix {
    display: inline !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

.brands-page-wrapper .explore-shops-results-meta__actions {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-left: 0 !important;
}

/* --- Layout shell (shared page-content + fixed nav-sidebar) --- */
.page-content .brands-section-dashboard {
    margin-top: 0;
}

.folder-dropdown-menu,
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background-color: var(--es2-surface, #fff);
    border-radius: 8px;
    box-shadow: var(--es2-shadow-sm, 0 2px 10px rgba(0, 0, 0, 0.15));
    width: 160px;
    z-index: 10;
    overflow: hidden;
    border: 1px solid var(--es2-border-strong, #E1E4EA);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 12px;
    font-weight: 500;
    color: var(--es2-text, #000);
}

.dropdown-item--danger {
    border-top: 1px solid var(--es2-border, #F2F2F2);
    color: #F93448;
}

/* --- Follow brand button --- */
.btn-follow-brand-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--es2-surface-alt, #f8fafc);
    color: var(--es2-text, #000);
    border: 1px solid var(--es2-border, #e2e8f0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
}

.btn-follow-brand-upgrade:hover {
    background: var(--es2-surface-hov, #f1f5f9);
    border-color: var(--es2-border-hov, #cbd5e1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.btn-follow-brand-upgrade:active {
    transform: scale(0.98);
}

.btn-follow-brand-upgrade .btn-follow-brand-tooltip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    background: #1e293b;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-follow-brand-upgrade .btn-follow-brand-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    margin-left: -4px;
    border: 4px solid transparent;
    border-top-color: #1e293b;
}

.btn-follow-brand-upgrade:hover .btn-follow-brand-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.btn-follow-brand-upgrade .btn-follow-brand-lock {
    flex-shrink: 0;
}

.follow-brand-url-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 9999px;
    font-size: 0.875rem;
    outline: none;
    background: var(--es2-filter-surface, #fff);
    color: var(--es2-text, #0f172a);
}

.follow-brand-url-input:focus {
    border-color: var(--es2-primary, #225AEA);
    box-shadow: 0 0 0 2px rgba(34, 90, 234, 0.2);
}

.follow-brand-url-input::placeholder {
    color: var(--es2-text-mute, #94a3b8);
}

/* --- Toolbar --- */
.brands-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    margin-top: 4px;
}

.brands-toolbar-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.brands-toolbar-search-shell {
    position: relative;
}

.search-wrapper-brands-inner {
    position: relative;
    width: 100%;
}

.brands-toolbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#brands-toolbar-search-results {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: var(--es2-shadow-sm, 0 4px 14px rgba(0, 0, 0, 0.08));
    z-index: 60;
    box-sizing: border-box;
    width: 100%;
}

#brands-toolbar-search-results .brands-toolbar-search-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--es2-border, #f1f5f9);
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s;
    background: transparent;
}

#brands-toolbar-search-results .brands-toolbar-search-result:hover {
    background: var(--es2-surface-hov, #F7F8FA);
}

#brands-toolbar-search-results .brands-toolbar-search-result__main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

#brands-toolbar-search-results .brands-toolbar-search-result__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--es2-surface-alt, #f8fafc);
}

#brands-toolbar-search-results .brands-toolbar-search-result__meta {
    flex: 1;
    min-width: 0;
}

#brands-toolbar-search-results .brands-toolbar-search-result__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--es2-text, #0E121B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#brands-toolbar-search-results .brands-toolbar-search-result__domain {
    font-size: 11px;
    color: var(--es2-text-2, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#brands-toolbar-search-results .brands-toolbar-search-result__action {
    flex-shrink: 0;
}

#brands-toolbar-search-results .brands-toolbar-search-status {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--es2-text-2, #64748b);
}

#brands-toolbar-search-results .brands-toolbar-search-status.is-error {
    color: #dc2626;
}

.brands-toolbar-suggest-follow {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.brands-toolbar-suggest-upgrade {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--es2-primary, #225AEA);
    text-decoration: none;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--es2-border, #e2e8f0);
}

.brands-toolbar-suggest-upgrade:hover {
    background: var(--es2-surface-hov, #f8fafc);
}

/* Columns picker button — keep styled before JS injectStyles() runs */
.brands-page-wrapper #brands-columns-btn.tts-cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--es2-filter-surface, #fff);
    border: 1px solid var(--es2-border, #e4e4e7);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--es2-text-2, #71717b);
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    line-height: 1;
    margin: 0;
    box-sizing: border-box;
}

.brands-page-wrapper #brands-columns-btn.tts-cp-btn:hover {
    background: var(--es2-filter-surface-hov, #f4f4f5);
    border-color: var(--es2-border-hov, #d1d5db);
    color: var(--es2-text, #374151);
}

.brands-page-wrapper #brands-columns-btn.tts-cp-btn--active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2b7fff;
}

.brands-page-wrapper #brands-columns-btn.tts-cp-btn svg {
    flex-shrink: 0;
    display: block;
    width: 15px;
    height: 15px;
}

.brands-page-wrapper #brands-columns-btn .tts-cp-label {
    line-height: 1;
}

/* --- Sort dropdown --- */
.sort-dropdown-wrap {
    position: relative;
}

.brands-page-wrapper .sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--es2-border, #e4e4e7);
    background: var(--es2-filter-surface, #fff);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--es2-text-2, #71717b);
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.brands-page-wrapper .sort-trigger svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.75;
}

.brands-page-wrapper .sort-trigger:hover {
    background: var(--es2-filter-surface-hov, #f4f4f5);
    border-color: var(--es2-border-hov, #d1d5db);
    color: var(--es2-text, #374151);
}

.brands-page-wrapper .sort-trigger[aria-expanded="true"] {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2b7fff;
    box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.12);
}

.brands-page-wrapper .sort-trigger[aria-expanded="true"] svg {
    opacity: 1;
    color: #2b7fff;
}

.brands-page-wrapper .sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 196px;
    min-width: 196px;
    padding: 6px;
    background: var(--es2-surface, #fff);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px rgba(15, 23, 42, 0.12);
    z-index: 80;
    display: none;
    box-sizing: border-box;
}

.brands-page-wrapper .sort-dropdown.show {
    display: block;
    animation: brands-sort-pop 0.14s ease-out;
}

@keyframes brands-sort-pop {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brands-page-wrapper .sort-dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brands-page-wrapper .sort-dropdown-label {
    padding: 4px 8px 6px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--es2-text-3, #94a3b8);
    line-height: 1;
}

.brands-page-wrapper .sort-dropdown-divider {
    height: 1px;
    margin: 6px 4px;
    background: rgba(15, 23, 42, 0.08);
}

.brands-page-wrapper .sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--es2-text-2, #475569);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.brands-page-wrapper .sort-option-text {
    min-width: 0;
}

.brands-page-wrapper .sort-option-check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0;
    color: #2b7fff;
}

.brands-page-wrapper .sort-option:hover {
    background: var(--es2-surface-hov, #f8fafc);
    color: var(--es2-text, #0f172a);
}

.brands-page-wrapper .sort-option.active {
    background: rgba(43, 127, 255, 0.08);
    color: #1d4ed8;
    font-weight: 600;
}

.brands-page-wrapper .sort-option.active .sort-option-check {
    opacity: 1;
}

.brands-page-wrapper .sort-dir-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brands-page-wrapper .sort-dir-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 32px;
    margin: 0;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--es2-text-2, #475569);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
    box-sizing: border-box;
}

.brands-page-wrapper .sort-dir-btn .sort-option-check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0;
    color: #2b7fff;
}

.brands-page-wrapper .sort-dir-btn:hover {
    background: var(--es2-surface-hov, #f8fafc);
    color: var(--es2-text, #0f172a);
}

.brands-page-wrapper .sort-dir-btn.is-active {
    background: rgba(43, 127, 255, 0.08);
    color: #1d4ed8;
    font-weight: 600;
}

.brands-page-wrapper .sort-dir-btn.is-active .sort-option-check {
    opacity: 1;
}

/* --- Table --- */
.brands-table-loading {
    text-align: center;
    padding: 48px 24px;
    color: var(--es2-text, #0f172a);
    font-size: 0.875rem;
}

.brands-page-wrapper .brands-empty-state-row > td {
    padding: 0 !important;
    border-bottom: none !important;
    background: transparent !important;
}

.brands-page-wrapper .brands-empty-state-wrap {
    min-height: 300px;
}

.brands-page-wrapper .explore-shops-tiles-grid .brands-empty-state-wrap {
    grid-column: 1 / -1;
    min-height: 320px;
}

.brands-page-wrapper .brands-empty-state__btn--primary {
    border-color: rgba(34, 90, 234, 0.22);
    background: var(--es2-primary, #225AEA);
    color: #fff;
    box-shadow: none;
}

.brands-page-wrapper .brands-empty-state__btn--primary:hover {
    background: #1b4ed4;
    border-color: #1b4ed4;
    color: #fff;
    box-shadow: none;
}

.brands-page-wrapper .brands-empty-state__btn--primary:focus-visible {
    outline: none;
    border-color: rgba(34, 90, 234, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 90, 234, 0.16);
}

/* Brands table - extending shops-table with sticky first column */
.brands-page-wrapper .shops-table.brands-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    text-align: left;
    display: table;
    margin: 0;
    background: var(--es2-surface, #fff);
}

.brands-page-wrapper .shops-table.brands-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--es2-surface-alt, #f8fafc);
    border-bottom: 1px solid var(--es2-border, #e2e8f0);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.brands-page-wrapper .shops-table.brands-table thead th {
    background: var(--es2-surface-alt, #f8fafc);
    height: 42px;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--es2-text-2, #475569);
    font-size: 11px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border-bottom: 1px solid var(--es2-border, #e2e8f0);
    vertical-align: middle;
}

/* Match explore-shops header chrome (period badge, help icons, meta Ads icon) */
.brands-page-wrapper .shops-table.brands-table thead th {
    vertical-align: middle;
}
.brands-page-wrapper .shops-table.brands-table thead th .header-icon-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
    line-height: 1.25;
    box-sizing: border-box;
}

.brands-page-wrapper .shops-table.brands-table thead th .header-icon-text > span {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    line-height: 1.25;
}

.brands-page-wrapper .shops-table.brands-table thead th .header-icon-text .explore-period-badge {
    display: inline-flex;
    align-items: center;
    background: var(--es2-primary-soft, #e0f2fe);
    color: var(--es2-primary-text, #0369a1);
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 9.5px;
    margin-left: 0;
    text-transform: lowercase;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
    position: static;
    top: auto;
    line-height: 1.2;
}

.brands-page-wrapper .shops-table.brands-table thead th .header-icon-text .tooltip-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    line-height: 0;
}

.brands-page-wrapper .shops-table.brands-table thead th .header-icon-text .tooltip-wrapper svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
    display: block;
    flex-shrink: 0;
}

.brands-page-wrapper .shops-table.brands-table thead th .header-icon-text .explore-wlads-col-meta-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
    margin: 0 2px 0 0;
}

.brands-page-wrapper .tooltip-wrapper.has-popup .tooltip-popup {
    display: none;
    position: fixed;
    margin: 0;
    transform: none;
    z-index: 10100;
    max-width: min(300px, 94vw);
    width: max-content;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #f8fafc;
    background: #1e293b;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
    pointer-events: none;
    white-space: normal;
    line-height: 1.4;
}

.brands-page-wrapper .tooltip-wrapper.has-popup .tooltip-popup:not(.hidden) {
    display: block;
}

.brands-page-wrapper .shops-table.brands-table tbody td {
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--es2-border, #e2e8f0);
    color: var(--es2-text, #0f172a);
    background: var(--es2-surface, #fff);
    font-weight: 500;
    font-size: 12px !important;
    vertical-align: middle;
    transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.brands-page-wrapper .shops-table.brands-table tbody td.brands-brand-cell {
    font-weight: 600;
}

.brands-page-wrapper .shops-table.brands-table tbody tr {
    cursor: pointer;
}

.brands-page-wrapper .shops-table.brands-table tbody tr:nth-child(even) td {
    background: var(--es2-surface-alt, #fcfcfd);
}

.brands-page-wrapper .shops-table.brands-table tbody tr:nth-child(even) td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table tbody tr:nth-child(even) td.brands-brand-cell {
    background: var(--es2-surface-alt, #fcfcfd);
}

.brands-page-wrapper .shops-table.brands-table tbody tr:hover td {
    background: var(--es2-row-hover, #f5f8ff) !important;
    cursor: pointer !important;
}

.brands-page-wrapper .shops-table.brands-table tbody tr:hover td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table tbody tr:hover td.brands-brand-cell {
    background: var(--es2-row-hover, #f5f8ff) !important;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.is-selected:hover td,
.brands-page-wrapper .shops-table.brands-table tbody tr.is-selected:hover td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table tbody tr.is-selected:hover td.brands-brand-cell {
    background: #e8efff !important;
}

.brands-page-wrapper .shops-table.brands-table thead th.brands-brand-cell,
.brands-page-wrapper .shops-table.brands-table thead th[data-brands-col="brand"] {
    box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.08);
}

/* Sticky select + brand columns */
.brands-page-wrapper .shops-table.brands-table tbody td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table thead th.brands-select-col,
.brands-page-wrapper .shops-table.brands-table tbody td.brands-brand-cell,
.brands-page-wrapper .shops-table.brands-table thead th[data-brands-col="brand"] {
    position: sticky;
    background: var(--es2-surface, #fff);
}

.brands-page-wrapper .shops-table.brands-table tbody td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table thead th.brands-select-col {
    left: 0;
    z-index: 5;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding-left: 12px;
    padding-right: 4px;
    text-align: center;
    vertical-align: middle;
}

.brands-page-wrapper .shops-table.brands-table thead th.brands-select-col {
    z-index: 14;
}

.brands-page-wrapper .shops-table.brands-table tbody td.brands-brand-cell,
.brands-page-wrapper .shops-table.brands-table thead th[data-brands-col="brand"] {
    left: 44px;
    z-index: 4;
    max-width: none !important;
    min-width: 340px;
    overflow: visible !important;
}

.brands-page-wrapper .shops-table.brands-table thead th[data-brands-col="brand"] {
    z-index: 13;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.is-selected td,
.brands-page-wrapper .shops-table.brands-table tbody tr.is-selected td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table tbody tr.is-selected td.brands-brand-cell {
    background: #f0f5ff;
}

/* Custom select boxes (unchecked / checked / indeterminate) — no native checkbox / Select2 */
.brands-select-box {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
    vertical-align: middle;
    transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.brands-select-box:hover:not(.is-disabled):not(.is-checked):not(.is-indeterminate) {
    border-color: #94a3b8;
    background: #fff;
}

.brands-select-box:focus {
    outline: none;
}

.brands-select-box:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}

.brands-select-box__mark {
    display: none;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.brands-select-box.is-checked,
.brands-select-box.is-indeterminate {
    background: #225aea;
    border-color: #225aea;
}

.brands-select-box.is-checked:hover,
.brands-select-box.is-indeterminate:hover {
    background: #1a4ad4;
    border-color: #1a4ad4;
}

.brands-select-box.is-checked .brands-select-box__mark {
    display: block;
    background: center / 10px 10px no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2 5.25L4 7.25L8 3.25' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.brands-select-box.is-indeterminate .brands-select-box__mark {
    display: block;
    background: center / 8px 2px no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='2' viewBox='0 0 8 2' fill='none'%3E%3Crect width='8' height='2' rx='1' fill='%23ffffff'/%3E%3C/svg%3E");
}

.brands-select-box.is-disabled,
.brands-select-box:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.brands-skel-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin: 0 auto;
}

.brands-bulk-bar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    max-width: calc(100vw - 24px);
}

.brands-bulk-bar[hidden] {
    display: none !important;
}

.brands-bulk-bar__count {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.brands-bulk-bar__btn {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.brands-bulk-bar__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.brands-bulk-bar__btn--secondary {
    background: #f1f5f9;
    color: #334155;
}

.brands-bulk-bar__btn--secondary:hover {
    background: #e2e8f0;
}

.brands-bulk-bar__btn--danger {
    background: #225aea;
    color: #fff;
}

.brands-bulk-bar__btn--danger:hover {
    background: #1a4ad4;
}

.brands-bulk-bar__btn--danger-outline {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.brands-bulk-bar__btn--danger-outline:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.brands-bulk-bar__btn--danger-outline[hidden] {
    display: none !important;
}

.brands-tile__select.brands-select-box {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.brands-tile__select.brands-select-box:not(.is-checked):not(.is-indeterminate) {
    background: rgba(255, 255, 255, 0.95);
}

.brands-tile.is-selected {
    outline: 2px solid #225aea;
    outline-offset: 1px;
}

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

.brands-table th:not(:last-child),
.brands-table td:not(:last-child) {
    border-right: 1px solid var(--es2-border-subtle, #f1f3f6);
}

/* Column widths: Select | Brand | Active Ads | Media Mix | Ads | Revenue | Traffic | Reach/Spend | Similar | Actions */
.brands-table th:nth-child(1),
.brands-table td:nth-child(1) {
    min-width: 44px;
    width: 44px;
}

.brands-table th:nth-child(2),
.brands-table td:nth-child(2) {
    min-width: 340px;
}

.brands-table th:nth-child(3),
.brands-table td:nth-child(3) {
    min-width: 132px;
    width: 132px;
}

.brands-table th:nth-child(4),
.brands-table td:nth-child(4) {
    min-width: 148px;
    width: 148px;
}

.brands-table th:nth-child(5),
.brands-table td:nth-child(5) {
    min-width: 172px;
}

.brands-table th:nth-child(6),
.brands-table td:nth-child(6) {
    min-width: 160px;
}

.brands-table th:nth-child(7),
.brands-table td:nth-child(7) {
    min-width: 170px;
}

.brands-table th:nth-child(8),
.brands-table td:nth-child(8) {
    min-width: 132px;
    width: 132px;
}

.brands-table th:nth-child(9),
.brands-table td:nth-child(9) {
    min-width: 260px;
}

.brands-table th:nth-child(10),
.brands-table td:nth-child(10) {
    min-width: 96px;
    width: 96px;
}

.brands-page-wrapper .shops-table.brands-table [data-brands-col="reach-spend"] {
    min-width: 148px;
    width: 148px;
}

.brands-table td[data-brands-col="active-ads"],
.brands-active-ads-cell-col {
    vertical-align: middle;
}

.brands-table td[data-brands-col="ads"],
.brands-ads-cell {
    vertical-align: middle;
    overflow: visible;
}

.brands-table td[data-brands-col="revenue"],
.brands-table td[data-brands-col="traffic"],
.brands-table td[data-brands-col="reach-spend"],
.brands-table td[data-brands-col="similar"],
.brands-table td.brands-similar-cell {
    overflow: visible;
}

/* Est. Revenue — explore-shops metric cell styling */
.brands-page-wrapper .brands-table td.explore-metric-cell,
.brands-page-wrapper .brands-table td.explore-revenue-cell {
    vertical-align: top !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.brands-page-wrapper .explore-metric-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

/* Match /explore-shops: hardcode track #eef2f7 — --es2-surface-alt is #fff globally */
.brands-page-wrapper .explore-metric-period-toggle.explore-segmented {
    display: inline-flex;
    align-self: flex-start;
    flex-direction: row;
    padding: 2px;
    gap: 0;
    background: #eef2f7;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 8px;
    box-sizing: border-box;
}

.brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--es2-text-3, #64748b);
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
}

.brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn:hover:not(.active) {
    color: var(--es2-text-2, #475569);
    background: rgba(255, 255, 255, 0.55);
}

.brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn.active {
    background: #fff;
    color: var(--es2-text, #0f172a);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.brands-page-wrapper .explore-metric-data-card {
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: var(--es2-radius-sm, 8px);
    box-shadow: var(--es2-shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.05));
    padding: 8px 10px;
    min-height: 52px;
    box-sizing: border-box;
}

.brands-page-wrapper .explore-metric-data-card--revenue {
    width: 100%;
    align-self: stretch;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
}

.brands-page-wrapper .explore-revenue-range {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    line-height: 1.2;
}

.brands-page-wrapper .explore-revenue-range .explore-revenue-value {
    font-weight: 600;
    font-size: 12px;
    color: var(--es2-text, #0f172a);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.brands-page-wrapper .explore-revenue-sep {
    color: var(--es2-text-3, #64748b);
    font-weight: 500;
    font-size: 11px;
    flex-shrink: 0;
    padding: 0 1px;
}

.brands-page-wrapper .explore-revenue-empty {
    font-size: 10px;
    color: var(--es2-text-3, #64748b);
    font-weight: 500;
    text-align: center;
    padding: 6px 4px;
}

html[data-theme="dark"] .brands-page-wrapper .explore-metric-period-toggle.explore-segmented {
    background: var(--dk-surface-deep, #0f172a);
    border-color: var(--dk-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn:not(.active) {
    background: transparent;
    color: var(--dk-text-3, #94a3b8);
    box-shadow: none;
}

html[data-theme="dark"] .brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn.active {
    background: var(--dk-surface-3, #334155);
    color: var(--dk-text, #f1f5f9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--dk-border-strong, #475569);
}

html[data-theme="dark"] .brands-page-wrapper .explore-metric-data-card {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .explore-revenue-range .explore-revenue-value {
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper .explore-revenue-empty {
    color: var(--es2-text-3, #94a3b8);
}

/* --- Similar stores (ES-style bordered cards) --- */
.st-similar-empty {
    color: var(--es2-text-mute, #64748b);
    font-size: 12px;
    width: 100%;
    text-align: center;
}
.st-similar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto;
    overflow: visible;
    padding: 2px 0;
}
.st-similar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: auto;
    min-width: 0;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 6px;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    padding: 5px;
}
.st-similar-card:hover {
    border-color: var(--es2-border-hov, #cbd5e1);
    background: var(--es2-surface-hov, #fafbfc);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.st-similar-card:hover .st-similar-name { color: var(--es2-primary-text, #2563eb); }
.st-similar-logo {
    width: 56px;
    height: 56px;
    border-radius: 5px;
    object-fit: contain;
    padding: 2px;
    flex-shrink: 0;
    background: var(--es2-surface-alt, #f8fafc);
    box-sizing: border-box;
    cursor: pointer;
}
.st-similar-logo--ph {
    width: 56px;
    height: 56px;
    border-radius: 5px;
    background: var(--es2-surface-alt, #f1f5f9);
    box-sizing: border-box;
}
.st-similar-meta { min-width: 0; text-align: center; }
.st-similar-name {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--es2-text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    transition: color 0.15s ease;
}
.st-similar-domain {
    display: none !important;
}
.st-similar-domain {
    font-size: 0.6rem;
    color: var(--es2-text-3, #475569);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}
.st-similar-tp {
    font-size: 0.6rem;
    color: var(--es2-text-2, #64748b);
    font-weight: 600;
}

/* --- Brand cell (explore-shops store layout) --- */
/* Shop infos - using explore-shops CSS, keeping only brand-specific elements */

.brand-fb-page-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--es2-text-3, #64748b);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Attached Meta pages dropdown (brand column) */
.brands-attached-pages {
    position: relative;
    display: block;
    margin-top: 4px;
    min-width: 0;
    max-width: 100%;
}

.brands-attached-pages-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    min-width: 0;
    padding: 3px 8px 3px 6px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 7px;
    background: var(--es2-surface, #fff);
    color: var(--es2-text-2, #334155);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brands-attached-pages-trigger:hover {
    border-color: var(--es2-border-hov, #cbd5e1);
}

.brands-attached-pages-trigger.is-open,
.brands-attached-pages-trigger:focus-visible {
    border-color: var(--es2-border-strong, #94a3b8);
    box-shadow: none;
    outline: none;
}

.brands-attached-pages__meta-icon {
    flex-shrink: 0;
    display: block;
    opacity: 0.85;
}

.brands-attached-pages-trigger__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.brands-attached-pages-trigger__count {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 600;
    color: var(--es2-text-3, #64748b);
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--es2-surface-hov, #f1f5f9);
}

.brands-attached-pages-trigger__chevron {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    color: var(--es2-text-3, #64748b);
    transition: transform 0.15s ease;
}

.brands-attached-pages-trigger.is-open .brands-attached-pages-trigger__chevron {
    transform: rotate(180deg);
}

.brands-attached-pages-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 120;
    min-width: 240px;
    max-width: min(92vw, 300px);
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 10px;
    background: var(--es2-surface, #fff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.brands-attached-pages-menu.is-portal,
body > .brands-attached-pages-menu.is-portal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1006000;
    display: block;
    min-width: 240px;
    max-width: min(92vw, 300px);
}

.brands-page-wrapper .shops-table .store-link.explore-shop-infos-wrap.brands-shop-infos-wrap,
.brands-page-wrapper .shops-table .store-link.explore-shop-infos-wrap.brands-shop-infos-wrap .explore-shop-infos-meta {
    overflow: visible !important;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.is-attached-pages-open {
    position: relative;
    z-index: 50;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.is-attached-pages-open td.brands-brand-cell {
    z-index: 51;
}

.brands-attached-pages-menu[hidden] {
    display: none !important;
}

.brands-attached-pages-menu__empty {
    padding: 10px 8px;
    font-size: 11px;
    color: var(--es2-text-3, #64748b);
    text-align: center;
}

.brands-attached-pages-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px;
    border-radius: 8px;
}

.brands-attached-pages-option:hover {
    background: var(--es2-surface-hov, #f8fafc);
}

.brands-attached-pages-option.is-current {
    background: var(--es2-primary-soft, rgba(34, 90, 234, 0.08));
}

.brands-attached-pages-option__link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    color: inherit;
    text-decoration: none;
}

.brands-attached-pages-option__link:hover {
    color: inherit;
}

.brands-attached-pages__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--es2-surface-hov, #f1f5f9);
}

.brands-attached-pages-option__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.brands-attached-pages-option__name {
    font-size: 11px;
    font-weight: 600;
    color: var(--es2-text, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-attached-pages-option__meta {
    font-size: 9.5px;
    font-weight: 500;
    color: var(--es2-text-3, #64748b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-attached-pages-adlibrary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 7px;
    background: var(--es2-surface, #fff);
    color: var(--es2-primary, #225aea);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.brands-attached-pages-adlibrary:hover {
    background: var(--es2-primary-soft, rgba(34, 90, 234, 0.08));
    border-color: var(--dk-accent-border, rgba(34, 90, 234, 0.25));
}

.brands-page-wrapper .brands-brand-cell {
    overflow: visible;
}

.brands-page-wrapper .brands-table tbody tr {
    position: relative;
}

.brand-see-details-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    min-width: 0;
    flex-wrap: wrap;
}

.brand-see-details {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    padding: 0 7px 0 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--es2-text-3, #64748b);
    background: var(--es2-surface-alt, #f1f5f9);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.brand-see-details:hover {
    color: var(--es2-primary-text, #1d4ed8);
    border-color: var(--es2-primary, #225AEA);
    background: var(--es2-primary-soft, rgba(34, 90, 234, 0.08));
    text-decoration: none;
}

.brand-see-details:focus-visible {
    outline: 2px solid var(--es2-primary, #225AEA);
    outline-offset: 1px;
}

.brand-see-details-text {
    line-height: 1;
}

.brand-see-details svg {
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    color: currentColor;
    flex-shrink: 0;
}

.brand-see-details--pending {
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.brand-adlibrary-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 18px;
    padding: 0 7px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--es2-primary-text, #1d4ed8);
    background: var(--es2-primary-soft, rgba(34, 90, 234, 0.08));
    border: 1px solid rgba(34, 90, 234, 0.16);
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.brand-adlibrary-link:hover {
    color: var(--es2-primary-text, #1d4ed8);
    border-color: var(--es2-primary, #225AEA);
    background: var(--es2-primary-soft, #e0e9ff);
    text-decoration: none;
}

.brand-adlibrary-link:focus-visible {
    outline: 2px solid var(--es2-primary, #225AEA);
    outline-offset: 1px;
}

.brand-adlibrary-link img {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.brand-adlibrary-link-text {
    line-height: 1;
}

.brand-adlibrary-link--action {
    height: auto;
    min-height: 0;
    padding: 5px 6px;
    font-size: 10px;
}

.brand-adlibrary-link--action img {
    width: 13px;
    height: 13px;
}

.brands-tile__adlibrary-row {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.brand-added-at {
    font-size: 10px;
    font-weight: 500;
    color: var(--es2-text-3, #64748b);
    line-height: 1.3;
}

.brands-active-ads-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    width: 100%;
    padding: 2px 0 1px;
}

.brands-active-ads-top {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
}

.brands-reach-spend-cell-col {
    min-width: 148px;
    vertical-align: middle;
}

.brands-reach-spend-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    width: 100%;
    padding: 2px 0 1px;
}

.brands-reach-spend-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 32px;
    width: 100%;
}

.brands-reach-spend-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.brands-reach-spend-metric--spend {
    flex-shrink: 0;
}

.brands-reach-spend-value {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--es2-text, #0f172a);
}

.brands-reach-spend-metric--spend .brands-reach-spend-value {
    color: var(--es2-success, #16a34a);
}

.brands-reach-spend-meta {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--es2-text-mute, #94a3b8);
    line-height: 1.2;
}

.brands-page-wrapper .brands-reach-spend-cell .brand-reach-spend-sparkline,
.brands-page-wrapper .brands-reach-spend-cell .monthly-visits-sparkline {
    display: block;
    margin-top: 1px;
    overflow: visible;
    max-width: 100%;
    width: 108px;
    height: 28px;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.brands-reach-spend-cell--empty,
.brands-reach-spend-cell--skeleton {
    min-height: 46px;
}

.brands-reach-spend-col-icon {
    vertical-align: -2px;
    margin-right: 2px;
    opacity: 0.85;
}

.brands-page-wrapper .brands-active-ads-number,
.brands-page-wrapper .brands-active-ads-cell .monthly-visits-number,
.brands-page-wrapper .monthly-visits-number {
    font-weight: 700;
    font-size: 13px;
    color: var(--es2-text, #0f172a);
    line-height: 1.1;
}

.brands-page-wrapper .monthly-visits-icon {
    color: var(--es2-text, #0f172a);
    stroke: currentColor;
    flex-shrink: 0;
}

.brands-page-wrapper .monthly-visits-na {
    opacity: 0.7;
    font-size: 11px;
    color: var(--es2-text-2, #334155);
}

.brands-active-ads-flags {
    margin-top: 8px;
}

.brands-page-wrapper .brands-active-ads-cell .monthly-visits-sparkline,
.brands-page-wrapper .brands-active-ads-cell .brand-live-ads-sparkline {
    display: block;
    margin-top: 1px;
    overflow: visible;
    max-width: 100%;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.brands-page-wrapper .brands-active-ads-cell .sparkline-hit-rect {
    pointer-events: all !important;
}

.brands-active-ads-cell--skeleton {
    gap: 6px;
}

.brands-page-wrapper .brands-active-ads-cell--skeleton .brands-skel-active-ads-count {
    display: inline-block;
    width: 36px;
    height: 14px;
    border-radius: 4px;
}

.brands-page-wrapper .brand-active-ads-spark-skel {
    width: 108px;
    height: 28px;
    border-radius: 4px;
}

.brands-screenshot-skeleton {
    background: var(--es2-surface-alt, #f8fafc) !important;
}

.brands-screenshot-skel-inner {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Brand-specific wrapper for ads preview - minimal styling */
.brand-info-new-ads {
    margin-top: 2px;
}

.save-brand-cannot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--es2-text-mute, #94a3b8);
    text-decoration: none;
}

.save-brand-cannot-link .save-icon-with-lock {
    position: relative;
    display: inline-flex;
}

.save-brand-cannot-link .save-icon-lock-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    background: var(--es2-surface, #fff);
    border: 1.5px solid var(--es2-border-hov, #cbd5e1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    color: var(--es2-text, #0f172a);
}

.save-brand-cannot-link .save-icon-lock-badge svg {
    width: 7px;
    height: 7px;
}

.untrack-brand-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Actions column — match /store-tracker st-action buttons */
.brands-page-wrapper .brands-actions-cell.st-actions-cell {
    text-align: center;
    vertical-align: middle;
    min-width: 96px;
}

.brands-page-wrapper .st-actions-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 4px 2px;
}

.brands-page-wrapper .st-action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    width: 100%;
    padding: 5px 6px;
    border-radius: 6px;
    border: 1px solid var(--es2-border, #e2e8f0);
    background: var(--es2-surface, #fff);
    cursor: pointer;
    color: var(--es2-text-3, #64748b);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.brands-page-wrapper .st-action-btn:hover {
    border-color: var(--es2-border-hov, #cbd5e1);
    color: var(--es2-text, #0f172a);
    background: var(--es2-surface-hov, #f8fafc);
}

.brands-page-wrapper .st-action-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.brands-page-wrapper .st-action-view:hover {
    color: var(--es2-primary, #1d4ed8);
    border-color: rgba(29, 78, 216, 0.3);
    background: var(--es2-primary-soft, #eff6ff);
}

.brands-page-wrapper .st-action-save:hover {
    color: var(--es2-primary, #4f46e5);
    border-color: var(--es2-primary-border, #c7d2fe);
    background: var(--es2-primary-soft, #eef2ff);
}

.brands-page-wrapper .st-action-delete:hover {
    color: var(--es2-danger, #dc2626);
    border-color: var(--es2-danger-border, #fecaca);
    background: var(--es2-danger-soft, #fef2f2);
}

.brands-page-wrapper .st-action-btn.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.brands-page-wrapper .st-action-btn.save-brand-cannot-link .save-icon-lock-badge {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--es2-surface, #fff);
    border: 1.5px solid var(--es2-border-hov, #cbd5e1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    color: var(--es2-text, #0f172a);
}

.brands-page-wrapper .st-action-btn.save-brand-cannot-link .save-icon-lock-badge svg {
    width: 7px;
    height: 7px;
}

.ads-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

/* Old ads-dot classes removed */

/* Ads preview — mirror explore-wlads under brands wrapper (explore CSS scopes to .new-page-wrapper) */
.brands-page-wrapper .explore-wlads-cell {
    vertical-align: middle !important;
    position: relative;
    overflow: visible !important;
}

.brands-page-wrapper .brands-ads-cell,
.brands-page-wrapper td[data-brands-col="ads"],
.brands-page-wrapper .brands-table,
.brands-page-wrapper .table-wrapper,
.brands-page-wrapper .explore-shops-results-wrap {
    overflow: visible !important;
}

.brands-page-wrapper .brands-ads-cell,
.brands-page-wrapper td[data-brands-col="ads"] {
    white-space: nowrap !important;
}

.brands-page-wrapper .explore-wlads-stack {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 2px;
}

.brands-page-wrapper .explore-wlads-item {
    position: relative;
    flex-shrink: 0;
}

.brands-page-wrapper .explore-wlads-thumb-ring {
    position: relative !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    background: var(--es2-surface-alt, #f1f5f9);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.brands-page-wrapper .explore-wlads-item:hover .explore-wlads-thumb-ring,
.brands-page-wrapper .explore-wlads-item.explore-wlads-hover-stick .explore-wlads-thumb-ring {
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 12px rgba(15, 23, 42, 0.12);
    z-index: 2;
    position: relative;
}

.brands-page-wrapper .explore-wlads-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brands-page-wrapper .explore-wlads-hovercard {
    position: fixed;
    left: -99999px;
    top: -99999px;
    transform: none;
    width: 244px;
    padding: 6px;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 80;
    pointer-events: none;
}

.brands-page-wrapper .explore-wlads-hovercard.explore-wlads-hovercard--fixed {
    position: fixed;
    transform: none;
    z-index: 10050;
}

.brands-page-wrapper .explore-wlads-item.explore-wlads-hover-stick {
    z-index: 81;
}

.brands-page-wrapper .explore-wlads-item.explore-wlads-hover-stick .explore-wlads-hovercard.explore-wlads-hovercard--fixed {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.brands-page-wrapper .explore-wlads-hover-media {
    position: relative;
    width: 100%;
    height: 172px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--es2-surface-alt, #e2e8f0);
}

.brands-page-wrapper .explore-wlads-hover-img-poster {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 0;
    border-radius: 8px;
    background: var(--es2-surface-alt, #e2e8f0);
}

.brands-page-wrapper .explore-wlads-hover-video {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    opacity: 0;
    z-index: 1;
    border-radius: 8px;
    background: #0f172a;
}

.brands-page-wrapper .explore-wlads-hover-media.explore-wlads-hover-video-playing .explore-wlads-hover-video {
    opacity: 1;
}

.brands-page-wrapper .explore-wlads-hover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    background: var(--es2-surface-alt, #e2e8f0);
    display: block;
}

.brands-page-wrapper .explore-wlads-hover-media-static .explore-wlads-hover-img {
    height: 172px;
}

.brands-page-wrapper .explore-wlads-hover-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.brands-page-wrapper .explore-wlads-btn-row {
    display: flex;
    gap: 6px;
}

.brands-page-wrapper .explore-wlads-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
    color: var(--es2-text, #0f172a);
    background: var(--es2-surface, #fff);
}

.brands-page-wrapper .explore-wlads-btn svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.brands-page-wrapper .explore-wlads-btn-magic {
    width: 100%;
    background: var(--es2-primary-soft, #eef2ff);
    border-color: var(--es2-primary-border, #c7d2fe);
    color: var(--es2-primary-text, #4338ca);
}

.brands-page-wrapper .explore-wlads-btn-magic:hover {
    background: var(--es2-surface-hov, #e0e7ff);
}

.brands-page-wrapper .explore-wlads-btn-transcribe {
    width: 100%;
    background: var(--es2-surface-alt, #f8fafc);
    border-color: var(--es2-border, #e2e8f0);
}

.brands-page-wrapper .explore-wlads-btn-transcribe:hover {
    background: var(--es2-surface-hov, #f1f5f9);
}

.brands-page-wrapper .explore-wlads-btn-row .explore-wlads-btn {
    flex: 1;
    min-width: 0;
}

.brands-page-wrapper .explore-wlads-btn-download {
    background: var(--es2-surface-alt, #f8fafc);
    border-color: var(--es2-border, #e2e8f0);
}

.brands-page-wrapper .explore-wlads-btn-download:hover {
    background: var(--es2-surface-hov, #f1f5f9);
}

.brands-page-wrapper .explore-wlads-btn-details {
    background: var(--es2-primary, #1d4ed8);
    border-color: var(--es2-primary, #1d4ed8);
    color: #fff;
}

.brands-page-wrapper .explore-wlads-btn-details:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.brands-page-wrapper .explore-wlads-btn.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.brands-page-wrapper .explore-wlads-skel {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    flex-shrink: 0;
}

.brands-page-wrapper .explore-wlads-skel--shimmer {
    background: linear-gradient(90deg, #f1f5f9 0%, #e8edf3 45%, #f8fafc 55%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: brands-skel-shimmer 1.35s ease-in-out infinite;
}

.formats-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--es2-text, #0f172a);
}

.format-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.format-item svg {
    width: 16px;
    height: 16px;
    color: var(--es2-text, #0f172a);
    flex-shrink: 0;
}

.brands-media-mix {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 148px;
    max-width: 168px;
    width: 100%;
    padding: 1px 0;
}

.brands-media-mix-cell {
    vertical-align: middle;
    width: 1%;
}

.bmm-empty {
    color: var(--es2-text-3, #94a3b8);
    font-size: 11px;
}

.bmm-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.bmm-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: var(--es2-text-2, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmm-row.bmm-video .bmm-label { color: #3b82f6; }
.bmm-row.bmm-image .bmm-label { color: #8b5cf6; }
.bmm-row.bmm-dco .bmm-label { color: #047857; }
.bmm-row.bmm-carousel .bmm-label { color: #b45309; }

.bmm-meter {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--es2-surface-alt, #f1f5f9);
    overflow: hidden;
    min-width: 0;
}

.bmm-meter-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    min-width: 3px;
}

.bmm-row.bmm-video .bmm-meter-fill { background: #60a5fa; }
.bmm-row.bmm-image .bmm-meter-fill { background: #a78bfa; }
.bmm-row.bmm-dco .bmm-meter-fill { background: #34d399; }
.bmm-row.bmm-carousel .bmm-meter-fill { background: #fbbf24; }

.bmm-pct {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--es2-text-2, #64748b);
}

.brands-media-mix--skeleton .bmm-skel-row {
    height: 10px;
    border-radius: 4px;
    width: 100%;
}

.new-ads-cell,
.growth-cell {
    font-size: 12px;
    font-weight: 500;
    vertical-align: middle;
}

.new-ads-cell .cell-inner,
.growth-cell .cell-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.new-ads-cell .cell-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

/* Ads preview - now using explore-wlads-* classes from explore-shops CSS */

.brands-page-wrapper .brands-active-ads-cell .brand-live-ads-sparkline {
    display: block;
    width: 108px;
    height: 28px;
    pointer-events: auto;
    overflow: visible;
}

.brands-page-wrapper .monthly-visits-flags {
    display: grid;
    grid-template-columns: repeat(3, 14px);
    grid-auto-rows: 10px;
    gap: 3px;
    flex-shrink: 0;
    position: relative;
    cursor: default;
}

/* Keep flags + "+N" on one line (active ads + traffic) */
.brands-page-wrapper .brands-active-ads-flags .monthly-visits-flags.landers-active-ad-countries,
.brands-page-wrapper .landers-store-countries-cell .monthly-visits-flags,
.brands-page-wrapper .monthly-visits-flags.st-monthly-visits-flags {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    grid-template-columns: unset;
    grid-auto-rows: unset;
}

.brands-page-wrapper .monthly-visits-flag {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    background: var(--es2-surface, #fff);
    flex-shrink: 0;
}

.brands-page-wrapper .monthly-visits-more-flags {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    margin-left: 1px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.brands-page-wrapper .monthly-visits-flags-tooltip {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: var(--es2-shadow-sm, 0 4px 12px rgba(15, 23, 42, 0.08));
    z-index: 1200;
    width: 260px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    pointer-events: none;
}

.brands-page-wrapper .monthly-visits-flags.is-tooltip-open .monthly-visits-flags-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.brands-page-wrapper .monthly-visits-tt-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.brands-page-wrapper .monthly-visits-tt-flag {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
    flex-shrink: 0;
}

.brands-page-wrapper .monthly-visits-tt-code {
    font-size: 11px;
    color: var(--es2-text-2, #64748b);
    font-weight: 600;
    line-height: 1;
}

.brands-page-wrapper .monthly-visits-tt-share {
    margin-left: auto;
    font-size: 11px;
    color: var(--es2-text-2, #334155);
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.adscore-ping {
    width: 12px;
    height: 6px;
    background-color: var(--es2-border, #e2e8f0);
    border-radius: 2px;
    flex-shrink: 0;
}

.growth-pings-wrap {
    display: flex;
    gap: 3px;
    align-items: center;
}

.brands-new-growth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    line-height: 1.2;
}

.bng-pills {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    height: 16px;
}

.bng-pill {
    display: block;
    width: 4px;
    height: 100%;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
}

.bng-pill.is-on {
    background: currentColor;
}

.bng-copy {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.bng-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: inherit;
}

.bng-pct {
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--es2-text-3, #94a3b8);
}

.brands-new-growth--hyper,
.brands-new-growth--high {
    color: #047857;
}
.brands-new-growth--up {
    color: #15803d;
}
.brands-new-growth--stable {
    color: #64748b;
}
.brands-new-growth--down {
    color: #b91c1c;
}

.brands-new-growth--hyper .bng-pct,
.brands-new-growth--high .bng-pct,
.brands-new-growth--up .bng-pct,
.brands-new-growth--down .bng-pct {
    color: inherit;
    opacity: 0.72;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--es2-radius-sm, 4px);
    font-size: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--es2-text-mute, #94a3b8); /* Explore muted text color */
}

.trend-indicator svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.trend-up {
    color: var(--es2-success, #059669);
    background-color: #ECFDF5;
}

.trend-down {
    color: var(--es2-danger, #DC2626);
    background-color: #FEF2F2;
}

.trend-neutral {
    color: var(--es2-text-3, #6B7280);
    background-color: #F3F4F6;
}

.trend-value {
    font-size: 0.625rem;
    font-weight: 600;
}

/* --- Pagination --- */
.brands-page-wrapper .pagination-wrapper {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--es2-surface, #fff);
    border-top: 1px solid var(--es2-border, #e2e8f0);
    font-size: 0.75rem;
    color: var(--es2-text-3, #6b7280);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.brands-page-wrapper .explore-shops-results-card.is-layout-table .pagination-wrapper {
    border-radius: 0 0 12px 12px;
}

.brands-page-wrapper .pagination-info {
    color: var(--es2-text-mute, #9ca3af);
    font-size: 0.7rem;
}

.brands-page-wrapper .pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.brands-page-wrapper .pagination-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--es2-border, #e5e7eb);
    border-radius: 6px;
    background: var(--es2-filter-surface, #fff);
    color: var(--es2-text-3, #6b7280);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.brands-page-wrapper .pagination-button:hover:not(:disabled) {
    background: var(--es2-surface-hov, #f9fafb);
    border-color: var(--es2-border-hov, #d1d5db);
}

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

.brands-page-wrapper .pagination-icon {
    width: 14px;
    height: 14px;
}

.brands-page-wrapper .pagination-pages {
    display: flex;
    align-items: center;
    gap: 2px;
}

.brands-page-wrapper .page-number {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.7rem;
}

.brands-page-wrapper .page-number:hover:not(.active) {
    background: var(--es2-surface-hov, #f3f4f6);
}

.brands-page-wrapper .page-number.active {
    background: var(--es2-primary, #225aea);
    color: #fff;
}

.brands-page-wrapper .page-ellipsis {
    padding: 0 4px;
    font-size: 0.7rem;
}

/* --- Focus states --- */
.brands-page-wrapper :focus-visible {
    outline: 2px solid var(--es2-primary, #225AEA);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Mobile --- */
@media screen and (max-width: 767px) {
    .brands-page-wrapper,
.brands-page-wrapper {
        padding-left: 0;
        box-sizing: border-box;
        max-width: 100%;
    }

    .nav-sidebar.nav-sidebar--folders,
    .nav-sidebar.brands-folders-sidebar {
        width: 280px;
    }

    .action-buttons {
        width: 100%;
        margin-top: 12px;
        justify-content: flex-start;
    }

    .breadcrumbs {
        width: 100%;
    }

    .brands-page-wrapper .explore-shops-topbar-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .brands-stat-chip {
        flex: 1 1 auto;
        min-width: 0;
    }

    .brands-hero-follow-wrap {
        width: 100%;
        gap: 8px;
    }

    .brands-hero-follow-wrap .wh-btn-primary.wh-btn--compact,
    .brands-hero-follow-wrap .btn-follow-brand-upgrade {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
}

@media (max-width: 991px) {
    .brands-page-wrapper {
        padding: 0 12px;
        box-sizing: border-box;
    }

    .brands-page-wrapper .explore-shops-topbar {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 14px !important;
        gap: 10px !important;
    }

    .brands-page-wrapper .explore-shops-main-title {
        font-size: 1.2rem;
    }

    .brands-page-wrapper .explore-shops-subtitle {
        font-size: 11.5px;
        max-width: none;
    }

    .brands-page-wrapper .explore-shops-topbar-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .brands-hero-footer.brands-workspace {
        padding: 8px 10px;
    }

    .brands-ws-chip {
        max-width: 160px;
    }

    .brands-ws-add-folder span {
        display: none;
    }

    .brands-ws-add-folder.add-folder-btn {
        width: 30px;
        padding: 0;
    }
}

@media (max-width: 1024px) {
    .brands-table th,
    .brands-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .brands-table th {
        font-size: 10px;
    }

    .formats-cell {
        gap: 10px;
    }

    .format-item svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 768px) {
    .brands-content-padding.padding-section-medium {
        padding-top: 76px !important;
        padding-bottom: 1.5rem !important;
    }

    .brands-breadcrumb-bar .breadcrumbs {
        flex-basis: 100%;
    }

    .brands-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .brands-toolbar-left {
        width: 100%;
    }

    .brands-toolbar-search-shell {
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .brands-page-wrapper .explore-shops-results-meta__actions .sort-dropdown-wrap {
        width: 100%;
    }

    .brands-page-wrapper .sort-trigger {
        width: 100%;
        justify-content: center;
    }

    .brands-page-wrapper .sort-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .brands-table {
        min-width: 1000px;
    }

    .brands-table th,
    .brands-table td {
        padding: 10px 12px;
    }

    .brands-page-wrapper .brands-table .explore-shop-infos-preview-col,
    .brands-page-wrapper .brands-table .explore-shop-preview,
    .brands-page-wrapper .brands-table .explore-shop-screenshot-wrap {
        width: calc(var(--wh-screenshot-thumb-w, 168px) * 0.5952) !important;
    }

    .brands-page-wrapper .brands-table .explore-shop-screenshot-wrap {
        height: calc(var(--wh-screenshot-thumb-h, 112px) * 0.6071) !important;
    }

    .brands-page-wrapper .brands-table .explore-shop-infos-name {
        font-size: 0.8125rem;
        max-width: 140px;
    }

    .new-ads-cell .cell-inner,
    .traffic-cell .cell-inner {
        gap: 6px;
    }

    .brands-page-wrapper .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        text-align: center;
    }

    .brands-page-wrapper .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    #follow-brand-modal .follow-brand-modal-box {
        width: calc(100vw - 24px) !important;
        max-width: 600px;
    }
}

@media (max-width: 480px) {
    .brands-page-wrapper {
        padding-left: 0;
    }

    #folder-breadcrumb .folder-name,
    #board-breadcrumb .board-name {
        max-width: min(42vw, 180px) !important;
    }

    .brands-table {
        min-width: 1000px;
    }

    .brands-table th,
    .brands-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .brands-page-wrapper .brands-table .explore-shop-infos-name {
        max-width: 100px;
    }

    .trend-indicator {
        padding: 2px 5px;
    }

    .trend-value {
        font-size: 0.6rem;
    }
}

/* --- Dark mode --- */
html[data-theme="dark"] .brands-hero {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    box-shadow: none;
}

html[data-theme="dark"] .brands-hero-footer,
html[data-theme="dark"] .brands-workspace {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-workspace .breadcrumb-wrapper:hover {
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .brands-workspace .folder-btn,
html[data-theme="dark"] .brands-workspace .more-btn,
html[data-theme="dark"] .brands-workspace .share-board-btn,
html[data-theme="dark"] .brands-workspace .edit-board-btn,
html[data-theme="dark"] .brands-workspace .delete-board-btn {
    background: var(--es2-filter-surface, #0f172a);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text-2, #cbd5e1);
}

html[data-theme="dark"] .brands-ws-chip {
    background: var(--es2-filter-surface, #0f172a);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text-2, #cbd5e1);
}

html[data-theme="dark"] .brands-ws-chip:hover {
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .brands-ws-chip.active,
html[data-theme="dark"] .brands-ws-chip.all-saved-ads.active,
html[data-theme="dark"] .brands-ws-chip.active-board {
    background: rgba(34, 90, 234, 0.18);
    border-color: rgba(34, 90, 234, 0.35);
    color: #93b4ff;
}

html[data-theme="dark"] .brands-ws-chip__folder,
html[data-theme="dark"] .brands-ws-chip__sep,
html[data-theme="dark"] .brands-ws-chip__count,
html[data-theme="dark"] .brands-ws-chip__hint {
    color: #ffffff;
}

html[data-theme="dark"] .brands-ws-add-folder.add-folder-btn,
html[data-theme="dark"] .brands-workspace .brands-ws-add-folder {
    border-color: var(--es2-border, #334155);
    color: #ffffff;
    background: transparent;
}

html[data-theme="dark"] .brands-ws-add-folder.add-folder-btn:hover,
html[data-theme="dark"] .brands-workspace .brands-ws-add-folder:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: #94a3b8;
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-ws-menu {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-ws-menu__title {
    color: #ffffff;
}

html[data-theme="dark"] .brands-ws-menu__board:hover {
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .brands-ws-menu__board.is-active {
    background: rgba(34, 90, 234, 0.16);
}

html[data-theme="dark"] .brands-ws-menu__board-main {
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-ws-menu__icon-btn:hover {
    background: rgba(148, 163, 184, 0.12);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-ws-menu__foot {
    border-top-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-ws-menu__item {
    background: var(--es2-filter-surface, #0f172a);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-ws-menu__item--primary:hover {
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .brands-ws-menu__sep {
    background: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-workspace .folder-item.active-folder .folder-header,
html[data-theme="dark"] .brands-workspace .board-item.active-board {
    background-color: rgba(34, 90, 234, 0.18);
}

html[data-theme="dark"] .brands-stat-chip {
    background: var(--es2-filter-surface, #0f172a);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-stat-chip__tooltip {
    background: #0f172a;
    border: 1px solid var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-stat-chip__tooltip::after {
    border-bottom-color: #0f172a;
    border-top-color: transparent;
}

html[data-theme="dark"] .brands-stat-chip__label {
    color: var(--es2-text-mute, #94a3b8);
}

html[data-theme="dark"] .brands-stat-chip__value {
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-title-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(37, 99, 235, 0.12) 100%);
    color: #93c5fd;
}

html[data-theme="dark"] .brands-subtitle-detail {
    color: var(--es2-text-2, #cbd5e1);
}

/* Must use !important: explore-shops-page.css loads before this file and sets
   .search-wrapper { background: var(--es2-surface) !important } plus
   .search-wrapper:focus-within { background: #fff !important }. */
html[data-theme="dark"] .brands-page-wrapper .brands-meta-search.search-wrapper,
html[data-theme="dark"] .brands-page-wrapper #brands-search-wrapper.search-wrapper {
    background: var(--dk-surface-2, #1b1f27) !important;
    border-color: var(--dk-border-strong, #3a4252) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-meta-search.search-wrapper:focus-within,
html[data-theme="dark"] .brands-page-wrapper #brands-search-wrapper.search-wrapper:focus-within {
    background: var(--dk-surface-3, #232936) !important;
    border-color: rgba(34, 90, 234, 0.45) !important;
    box-shadow: 0 0 0 2px rgba(34, 90, 234, 0.2) !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-meta-search > svg,
html[data-theme="dark"] .brands-page-wrapper #brands-search-wrapper > svg {
    color: var(--dk-text-3, #bcc5d4) !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-meta-search #brands-search,
html[data-theme="dark"] .brands-page-wrapper .brands-meta-search #brands-search.search-input,
html[data-theme="dark"] .brands-page-wrapper #brands-search {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-meta-search #brands-search::placeholder,
html[data-theme="dark"] .brands-page-wrapper #brands-search::placeholder {
    color: var(--dk-text-3, #bcc5d4) !important;
    -webkit-text-fill-color: var(--dk-text-3, #bcc5d4) !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-meta-search.search-wrapper.is-loading,
html[data-theme="dark"] .brands-page-wrapper #brands-search-wrapper.search-wrapper.is-loading {
    background: var(--dk-surface-2, #1b1f27) !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-toggle {
    background: transparent;
    border-color: var(--es2-border, #334155);
    color: var(--es2-text-mute, #94a3b8);
    box-shadow: none;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-toggle svg {
    color: currentColor;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-toggle:hover {
    border-color: #475569;
    background: rgba(148, 163, 184, 0.08);
    color: var(--es2-text, #e2e8f0);
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-toggle.is-active {
    background: rgba(148, 163, 184, 0.12);
    border-color: #475569;
    color: var(--es2-text, #e2e8f0);
    box-shadow: none;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-toggle.is-active svg {
    color: currentColor;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-toggle__count {
    background: #64748b;
    color: #fff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-row {
    background: var(--es2-surface, #0b1220);
    border-bottom-color: var(--es2-border, #1e293b);
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-clear {
    color: #f87171;
}

html[data-theme="dark"] .brands-page-wrapper .brands-filters-clear:hover {
    background: rgba(248, 113, 113, 0.12);
}

html[data-theme="dark"] .brands-folders-sidebar,
html[data-theme="dark"] .nav-sidebar.nav-sidebar--folders {
    background-color: var(--es2-surface, #1e293b);
    border-right-color: var(--es2-border, #334155);
}

html[data-theme="dark"] #search-folders {
    background: var(--es2-filter-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper .explore-shops-results-card.is-layout-table {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .explore-shops-results-card.is-layout-table #brands-results-meta {
    background: linear-gradient(180deg, var(--es2-surface, #1e293b) 0%, #0f172a 100%) !important;
    border-bottom-color: var(--es2-border, #334155) !important;
}

html[data-theme="dark"] .brands-table thead,
html[data-theme="dark"] .brands-table thead th {
    background: #0f172a !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table thead th .header-icon-text .explore-period-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

html[data-theme="dark"] .brands-table tbody td {
    background: var(--es2-surface, #1e293b) !important;
    border-color: var(--es2-border, #334155) !important;
    color: var(--es2-text, #f1f5f9) !important;
}

html[data-theme="dark"] .brands-table tbody tr:nth-child(even) td {
    background: #172033 !important;
}

html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:hover td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:hover td:first-child,
html[data-theme="dark"] .brands-table tbody tr:hover td {
    background: var(--es2-row-hover) !important;
}

html[data-theme="dark"] .brands-page-wrapper .pagination-wrapper {
    background: var(--es2-surface, #1e293b);
    border-top-color: var(--es2-border, #334155);
}

html[data-theme="dark"] #brands-toolbar-search-results {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .sort-dropdown,
html[data-theme="dark"] .sort-trigger {
    background: var(--es2-filter-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper .sort-trigger[aria-expanded="true"] {
    background: rgba(43, 127, 255, 0.16);
    border-color: rgba(96, 165, 250, 0.45);
    color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

html[data-theme="dark"] .brands-page-wrapper .sort-dropdown {
    background: var(--es2-surface, #1e293b);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 12px 28px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .brands-page-wrapper .sort-dropdown-label {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .sort-dropdown-divider {
    background: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .brands-page-wrapper .sort-option {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .sort-option:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #f8fafc;
}

html[data-theme="dark"] .brands-page-wrapper .sort-option.active {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .brands-page-wrapper .sort-option-check {
    color: #60a5fa;
}

html[data-theme="dark"] .brands-page-wrapper .sort-dir-btn {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .sort-dir-btn:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #f8fafc;
}

html[data-theme="dark"] .brands-page-wrapper .sort-dir-btn.is-active {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .brands-page-wrapper .sort-dir-btn .sort-option-check {
    color: #60a5fa;
}

html[data-theme="dark"] .brands-page-wrapper #brands-columns-btn.tts-cp-btn {
    background: var(--es2-filter-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text-2, #94a3b8);
    box-shadow: none;
}

html[data-theme="dark"] .brands-page-wrapper #brands-columns-btn.tts-cp-btn:hover {
    background: var(--es2-surface-hov, #334155);
    border-color: var(--es2-border-hov, #475569);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper #brands-columns-btn.tts-cp-btn--active {
    background: rgba(34, 90, 234, 0.15);
    border-color: rgba(34, 90, 234, 0.45);
    color: #60a5fa;
}

html[data-theme="dark"] .folder-btn,
html[data-theme="dark"] .more-btn {
    background: var(--es2-filter-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .folder-dropdown-menu,
html[data-theme="dark"] .dropdown-menu {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .all-saved-ads.active {
    background-color: rgba(34, 90, 234, 0.15);
}

html[data-theme="dark"] .folder-item.active-folder .folder-header,
html[data-theme="dark"] .board-item.active-board {
    background-color: rgba(34, 90, 234, 0.15);
}

/* --- Brands tile view --- */
.brands-page-wrapper .explore-shops-results-meta__actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}

.brands-page-wrapper .explore-shops-results-card.is-layout-tiles {
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.brands-page-wrapper .explore-shops-results-card.is-layout-tiles #brands-results-meta {
    margin-top: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: linear-gradient(180deg, var(--es2-surface, #ffffff) 0%, var(--es2-surface-alt, #f8fafc) 100%) !important;
    border-bottom: 1px solid var(--es2-border, #e2e8f0) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    box-sizing: border-box;
}

.brands-page-wrapper .brands-tiles-wrap {
    padding: 10px;
    box-sizing: border-box;
}

.brands-page-wrapper .explore-shops-tiles-grid.brands-tiles-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 2px 0 8px;
}

.brands-page-wrapper .brands-tile {
    display: flex;
    flex-direction: column;
    container-type: inline-size;
    container-name: brands-tile;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brands-page-wrapper .brands-tile--navigable {
    cursor: pointer;
}

.brands-page-wrapper .brands-tile:hover,
.brands-page-wrapper .brands-tile--navigable:hover {
    border-color: var(--es2-primary, #225aea);
    box-shadow: 0 2px 10px rgba(34, 90, 234, 0.08);
}

.brands-page-wrapper .brands-tile__preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--es2-surface-alt, #f1f5f9);
    overflow: hidden;
}

/* Override fixed 168×112 table screenshot sizes so previews fill the tile */
.brands-page-wrapper .brands-tile__preview .explore-shop-preview,
.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-link,
.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-wrap {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 0 !important;
}

.brands-page-wrapper .brands-tile__preview .explore-shop-preview {
    position: relative !important;
    display: block !important;
}

.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-wrap--icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(10px, 6cqi, 18px) !important;
    height: 100% !important;
}

.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-wrap--icon .store-icon,
.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-icon-fallback .store-icon {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
}

.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-wrap:not(.explore-shop-screenshot-wrap--icon) .explore-shop-screenshot-img,
.brands-page-wrapper .brands-tile__preview .explore-shop-screenshot-img,
.brands-page-wrapper .brands-tile__preview img:not(.explore-shop-preview-flag) {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    transform: scale(var(--wh-screenshot-thumb-zoom, 1.12)) !important;
    transform-origin: top center !important;
    display: block !important;
}

.brands-page-wrapper .brands-tile__preview .explore-shop-preview-flag {
    width: clamp(14px, 6cqi, 18px) !important;
    height: clamp(10px, 4.5cqi, 14px) !important;
    right: 6px !important;
    bottom: 6px !important;
}

.brands-page-wrapper .brands-tile__preview .brands-screenshot-skeleton,
.brands-page-wrapper .brands-tile__preview .brands-screenshot-skel-inner {
    width: 100% !important;
    height: 100% !important;
}

.brands-page-wrapper .brands-tile__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px 10px;
    min-width: 0;
}

.brands-page-wrapper .brands-tile__body--fetching {
    padding: 16px 12px;
    align-items: center;
    text-align: center;
}

.brands-page-wrapper .brands-tile__fetching-msg {
    margin: 0;
    color: #5b6b82;
    font-style: italic;
    font-size: 0.75rem;
    line-height: 1.4;
}

.brands-page-wrapper .brands-fetching-note {
    display: inline-block;
    margin-top: 4px;
    color: #5b6b82;
    font-size: 11px;
    font-style: italic;
    line-height: 1.35;
}

.brands-page-wrapper .brands-fetching-cell {
    color: #5b6b82;
    font-size: 13px;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching {
    cursor: default;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:hover td,
.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:hover td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:hover td.brands-brand-cell {
    background: var(--es2-surface, #fff) !important;
    cursor: default !important;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) td,
.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) td.brands-select-cell,
.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) td.brands-brand-cell {
    background: var(--es2-surface-alt, #fcfcfd);
}

.brands-page-wrapper tr.brands-row--fetching > td.brands-fetching-row-cell {
    padding: 10px 12px !important;
    vertical-align: middle;
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: var(--es2-surface, #fff) !important;
    border-right: none !important;
}

.brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) > td.brands-fetching-row-cell {
    background: var(--es2-surface-alt, #fcfcfd) !important;
}

.brands-page-wrapper .brands-fetching-row {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(96px, 112px);
    align-items: center;
    gap: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    min-height: 56px;
}

.brands-page-wrapper .brands-fetching-row__brand {
    min-width: 0;
    padding-right: 4px;
}

.brands-page-wrapper .brands-fetching-row__mid {
    min-width: 0;
    align-self: stretch;
    display: flex;
}

.brands-page-wrapper .brands-fetching-row__actions {
    justify-self: stretch;
    min-width: 0;
}

.brands-page-wrapper .brands-fetching-row__actions .st-actions-wrap {
    width: 100%;
}

.brands-page-wrapper .brands-shop-infos-wrap--fetching .explore-shop-infos-name {
    color: var(--es2-text, #0f172a);
    font-weight: 650;
}

.brands-page-wrapper .brands-shop-infos-wrap--fetching a.explore-shop-infos-name {
    text-decoration: none;
}

.brands-page-wrapper .brands-shop-infos-wrap--fetching a.explore-shop-infos-name:hover {
    color: #225AEA;
    text-decoration: underline;
}

.brands-page-wrapper .brands-fetching-mid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #e8edf3;
    background: #f7f9fc;
}

.brands-page-wrapper .brands-fetching-mid__spinner {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid #dbe3ee;
    border-top-color: #64748b;
    animation: brands-fetching-spin 0.7s linear infinite;
}

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

.brands-page-wrapper .brands-fetching-mid__title {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.brands-page-wrapper .brands-fetching-mid__sub {
    color: #5b6b82;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
}

.brands-page-wrapper .brands-fetching-mid__sub::before {
    content: "·";
    margin-right: 10px;
    color: #cbd5e1;
}

.brands-page-wrapper .brands-tile--fetching .brands-fetching-mid {
    margin-top: 10px;
}

.brands-page-wrapper .brands-tile--fetching .brands-fetching-mid__sub::before {
    display: none;
}

.brands-page-wrapper .brands-tile--fetching .brands-fetching-mid__sub {
    flex: 1 1 100%;
    padding-left: 22px;
}

@media (max-width: 900px) {
    .brands-page-wrapper .brands-fetching-row {
        grid-template-columns: minmax(0, 1fr) minmax(88px, 104px);
        grid-template-areas:
            "brand actions"
            "mid mid";
        gap: 10px 12px;
        min-height: 0;
    }

    .brands-page-wrapper .brands-fetching-row__brand { grid-area: brand; }
    .brands-page-wrapper .brands-fetching-row__mid { grid-area: mid; }
    .brands-page-wrapper .brands-fetching-row__actions { grid-area: actions; }

    .brands-page-wrapper .brands-fetching-mid__sub::before {
        display: none;
    }

    .brands-page-wrapper .brands-fetching-mid__sub {
        flex: 1 1 100%;
        padding-left: 22px;
    }
}

.brands-page-wrapper .brands-tile__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.brands-page-wrapper .brands-tile__identity {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brands-page-wrapper .brands-tile__title {
    min-width: 0;
    font-size: clamp(11px, 5.2cqi, 13px);
    font-weight: 650;
    line-height: 1.25;
    color: var(--es2-text, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-page-wrapper .brands-tile__url {
    min-width: 0;
    font-size: clamp(10px, 4.4cqi, 11px);
    line-height: 1.2;
}

.brands-page-wrapper .brands-tile__domain {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--es2-text-mute, #64748b);
    text-decoration: none;
}

.brands-page-wrapper .brands-tile__domain:hover {
    color: var(--es2-primary, #225aea);
    text-decoration: underline;
}

.brands-page-wrapper .brands-tile__actions {
    flex: 0 0 auto;
}

.brands-page-wrapper .brands-tile__actions-wrap {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 4px;
    padding: 0 !important;
    width: auto;
}

.brands-page-wrapper .brands-tile__icon-btn.st-action-btn {
    width: auto;
    min-width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 7px;
}

.brands-page-wrapper .brands-tile__icon-btn.st-action-btn span:not(.save-icon-lock-badge) {
    display: none;
}

.brands-page-wrapper .brands-tile__icon-btn.st-action-btn svg {
    width: 13px;
    height: 13px;
}

.brands-page-wrapper .brands-tile__visit-page {
    padding: 4px 10px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--es2-surface, #fff);
    border: 1px solid var(--es2-border, #e2e8f0);
    color: var(--es2-text, #1e293b);
    white-space: nowrap;
    border-radius: 8px;
    text-decoration: none;
}

.brands-page-wrapper .brands-tile__metrics-carousel {
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px solid var(--es2-border, #e2e8f0);
}

.brands-page-wrapper .brands-tile__metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.brands-page-wrapper .brands-tile__metric-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-size: clamp(9px, 3.8cqi, 10px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--es2-text-mute, #64748b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-page-wrapper .brands-tile__metric-nav {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--es2-border, #e2e8f0);
    border-radius: 6px;
    background: transparent;
    color: var(--es2-text-2, #475569);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.brands-page-wrapper .brands-tile__metric-nav:hover {
    background: var(--es2-surface-hov, #f8fafc);
    border-color: var(--es2-primary, #225aea);
    color: var(--es2-primary, #225aea);
}

.brands-page-wrapper .brands-tile__metric-nav svg {
    width: 12px;
    height: 12px;
}

.brands-page-wrapper .brands-tile__metric-viewport {
    position: relative;
    min-height: clamp(56px, 28cqi, 88px);
    overflow: hidden;
}

.brands-page-wrapper .brands-tile__metric-slide {
    display: none;
    min-width: 0;
    width: 100%;
    font-size: clamp(10px, 4.2cqi, 12px);
    overflow: hidden;
}

.brands-page-wrapper .brands-tile__metric-slide.is-active {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-height: inherit;
}

.brands-page-wrapper .brands-tile__empty {
    color: var(--es2-text-mute, #94a3b8);
}

/* Metric content scales to tile width */
.brands-page-wrapper .brands-tile__metric-slide .brands-active-ads-cell,
.brands-page-wrapper .brands-tile__metric-slide .brands-media-mix,
.brands-page-wrapper .brands-tile__metric-slide .brand-info-new-ads,
.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-cell,
.brands-page-wrapper .brands-tile__metric-slide .explore-revenue-cell,
.brands-page-wrapper .brands-tile__metric-slide .monthly-visits-cell,
.brands-page-wrapper .brands-tile__metric-slide .st-similar-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brands-page-wrapper .brands-tile__metric-slide .brands-active-ads-number,
.brands-page-wrapper .brands-tile__metric-slide .monthly-visits-number,
.brands-page-wrapper .brands-tile__metric-slide .explore-revenue-value {
    font-size: clamp(12px, 5.5cqi, 15px) !important;
    line-height: 1.15;
}

.brands-page-wrapper .brands-tile__metric-slide .brands-active-ads-cell .monthly-visits-sparkline,
.brands-page-wrapper .brands-tile__metric-slide .brands-active-ads-cell .brand-live-ads-sparkline,
.brands-page-wrapper .brands-tile__metric-slide .monthly-visits-sparkline,
.brands-page-wrapper .brands-tile__metric-slide svg.monthly-visits-sparkline,
.brands-page-wrapper .brands-tile__metric-slide svg.brand-live-ads-sparkline {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    min-height: 28px;
}

.brands-page-wrapper .brands-tile__metric-slide .brands-media-mix {
    gap: 3px;
}

.brands-page-wrapper .brands-tile__metric-slide .bmm-row {
    gap: 4px;
    font-size: clamp(9px, 3.8cqi, 11px);
}

.brands-page-wrapper .brands-tile__metric-slide .bmm-label {
    min-width: 0;
    flex: 0 1 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-page-wrapper .brands-tile__metric-slide .bmm-meter {
    flex: 1 1 auto;
    min-width: 0;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-stack,
.brands-page-wrapper .brands-tile__metric-slide .brand-info-new-ads .explore-wlads-stack {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: clamp(4px, 2cqi, 8px) !important;
    width: 100% !important;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-item,
.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-skel {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-thumb-ring,
.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-skel {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    max-width: none !important;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-wlads-thumb-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.brands-page-wrapper .brands-tile__metric-slide .st-similar-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(4px, 2cqi, 8px);
    width: 100%;
}

.brands-page-wrapper .brands-tile__metric-slide .st-similar-card {
    min-width: 0;
    width: 100%;
}

.brands-page-wrapper .brands-tile__metric-slide .st-similar-name,
.brands-page-wrapper .brands-tile__metric-slide .st-similar-domain {
    font-size: clamp(8px, 3.4cqi, 10px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-metric-period-toggle.explore-segmented {
    display: flex;
    width: 100%;
    max-width: 100%;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-metric-period-toggle.explore-segmented .explore-period-btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: clamp(9px, 3.6cqi, 11px);
    padding-left: 4px;
    padding-right: 4px;
}

.brands-page-wrapper .brands-tile__metric-slide .explore-revenue-range,
.brands-page-wrapper .brands-tile__metric-slide .monthly-visits-cell {
    width: 100%;
}

.brands-page-wrapper .brands-tiles-empty,
.brands-page-wrapper .brands-tiles-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: #64748b;
    font-size: 0.875rem;
}

html[data-theme="dark"] .brands-page-wrapper .brands-empty-state__btn--primary {
    background: var(--es2-primary, #3b82f6);
    border-color: rgba(59, 130, 246, 0.35);
    color: #fff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-empty-state__btn--primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

@container brands-tile (max-width: 240px) {
    .brands-tile__body {
        padding: 7px 8px 8px;
        gap: 5px;
    }

    .brands-tile__icon-btn.st-action-btn {
        min-width: 26px;
        height: 26px;
    }

    .brands-tile__metric-slide .st-similar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brands-tile__metric-slide .st-similar-card:nth-child(n + 3) {
        display: none;
    }
}

@media (max-width: 1400px) {
    .brands-page-wrapper .explore-shops-tiles-grid.brands-tiles-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .brands-page-wrapper .explore-shops-tiles-grid.brands-tiles-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .brands-page-wrapper .explore-shops-tiles-grid.brands-tiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .brands-page-wrapper .explore-shops-tiles-grid.brands-tiles-grid {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .brands-page-wrapper .explore-shops-results-card.is-layout-tiles {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .explore-shops-results-card.is-layout-tiles #brands-results-meta {
    background: linear-gradient(180deg, var(--es2-surface, #1e293b) 0%, #0f172a 100%) !important;
    border-bottom-color: var(--es2-border, #334155) !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile {
    background: var(--es2-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile:hover {
    border-color: rgba(34, 90, 234, 0.45);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__preview {
    background: #0f172a;
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__title {
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__domain,
html[data-theme="dark"] .brands-page-wrapper .brands-tile__metric-label {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__metrics-carousel {
    border-top-color: var(--es2-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__metric-nav {
    background: transparent;
    border-color: var(--es2-border, #334155);
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__metric-nav:hover {
    background: #172033;
    border-color: rgba(34, 90, 234, 0.45);
    color: #e2e8f0;
}

html[data-theme="dark"] .brands-page-wrapper .brands-tile__visit-page {
    background: #0f172a;
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper #brands-view-toggle.explore-shops-view-toggle-btn {
    background: var(--es2-filter-surface, #1e293b);
    border-color: var(--es2-border, #334155);
    color: var(--es2-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper #brands-view-toggle.explore-shops-view-toggle-btn[aria-pressed="true"] {
    border-color: rgba(34, 90, 234, 0.45);
    background: rgba(34, 90, 234, 0.15);
    color: #93c5fd;
}

/* --- Dark mode sweep: remaining Brand Tracker gaps --- */
html[data-theme="dark"] .brands-page-wrapper .explore-metric-period-toggle.explore-segmented {
    background: var(--dk-surface-deep, #0f172a) !important;
    border-color: var(--dk-border, #334155) !important;
}

/* Keep inactive period label muted — brands white-text sweep sets --dk-text-3 to #fff */
html[data-theme="dark"] .brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn:not(.active) {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .brands-page-wrapper .explore-metric-period-toggle.explore-segmented .explore-period-btn.active {
    background: var(--dk-surface-3, #334155) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--dk-border-strong, #475569) !important;
}

html[data-theme="dark"] .brands-page-wrapper .explore-revenue-sep {
    color: #ffffff !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-table th:not(:last-child),
html[data-theme="dark"] .brands-page-wrapper .brands-table td:not(:last-child) {
    border-right-color: var(--dk-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .st-similar-card {
    background: var(--dk-surface-2, #1e293b);
    border-color: var(--dk-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .st-similar-card:hover {
    background: var(--dk-surface-3, #334155);
    border-color: var(--dk-border-strong, #475569);
}

html[data-theme="dark"] .brands-page-wrapper .st-similar-logo,
html[data-theme="dark"] .brands-page-wrapper .st-similar-logo--ph {
    background: var(--dk-surface-deep, #0f172a);
}

html[data-theme="dark"] .brands-page-wrapper .st-similar-card:hover .st-similar-name {
    color: var(--dk-accent, #60a5fa);
}

html[data-theme="dark"] .brands-page-wrapper .st-similar-name {
    color: var(--dk-text, #f1f5f9);
}

html[data-theme="dark"] .brands-page-wrapper .pagination-wrapper,
html[data-theme="dark"] .brands-page-wrapper .page-number:not(.active),
html[data-theme="dark"] .brands-page-wrapper .page-ellipsis {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .pagination-button {
    color: #ffffff;
    background: var(--dk-surface-2, #1e293b);
    border-color: var(--dk-border, #334155);
}

html[data-theme="dark"] .brands-page-wrapper .pagination-button:hover:not(:disabled) {
    background: var(--dk-surface-3, #334155);
    color: #ffffff;
    border-color: var(--dk-border-strong, #475569);
}

html[data-theme="dark"] .brands-page-wrapper .brands-tiles-empty,
html[data-theme="dark"] .brands-page-wrapper .brands-tiles-loading,
html[data-theme="dark"] .brands-page-wrapper .brands-tile__fetching-msg {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-fetching-note,
html[data-theme="dark"] .brands-page-wrapper .brands-fetching-cell {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-shop-infos-wrap--fetching .explore-shop-infos-name {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:hover td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:hover td:first-child,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) td:first-child,
html[data-theme="dark"] .brands-page-wrapper tr.brands-row--fetching > td.brands-fetching-row-cell,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.brands-row--fetching:nth-child(even) > td.brands-fetching-row-cell {
    background: var(--es2-surface, #1e293b) !important;
}

html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid__spinner {
    border-color: #475569;
    border-top-color: #94a3b8;
}

html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid__title {
    color: var(--dk-text-2, #cbd5e1);
}

html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid__sub {
    color: var(--dk-text-3, #94a3b8);
}

html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid__sub::before {
    color: #475569;
}

html[data-theme="dark"] .brands-page-wrapper .brands-skel-shimmer,
html[data-theme="dark"] .brands-page-wrapper .brands-skel-text {
    background: linear-gradient(
        90deg,
        rgba(148, 163, 184, 0.12) 0%,
        rgba(148, 163, 184, 0.22) 50%,
        rgba(148, 163, 184, 0.12) 100%
    ) !important;
}

html[data-theme="dark"] #create-folder-btn[style*="background-color: #cccccc"],
html[data-theme="dark"] #create-board-btn[style*="background-color: #cccccc"],
html[data-theme="dark"] #create-folder-btn[style*="background-color:#cccccc"],
html[data-theme="dark"] #create-board-btn[style*="background-color:#cccccc"] {
    background-color: var(--dk-surface-3, #334155) !important;
    color: var(--dk-text-3, #94a3b8) !important;
    border-color: var(--dk-border, #475569) !important;
}

html[data-theme="dark"] .brands-page-wrapper .explore-shop-infos-name {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .explore-shop-infos-domain,
html[data-theme="dark"] .brands-page-wrapper .explore-store-domain-link {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .explore-store-domain-link:hover {
    color: var(--dk-accent, #60a5fa);
}

html[data-theme="dark"] .brands-page-wrapper .brand-added-at {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .bmm-meter {
    background: var(--dk-surface-deep, #0f172a);
}

html[data-theme="dark"] .brands-page-wrapper .bmm-pct {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-active-ads-cell,
html[data-theme="dark"] .brands-page-wrapper .brands-active-ads-value {
    color: #ffffff;
}

html[data-theme="dark"] .brands-page-wrapper .brands-reach-spend-cell,
html[data-theme="dark"] .brands-page-wrapper .brands-reach-spend-value {
    color: #e2e8f0;
}

html[data-theme="dark"] .brands-page-wrapper .brands-reach-spend-metric--spend .brands-reach-spend-value {
    color: #4ade80;
}

html[data-theme="dark"] .brands-page-wrapper .brands-reach-spend-meta {
    color: var(--dk-text-3, #94a3b8);
}

/* Tracker shell sidebar icons — explore-shops hardcodes light pastels with !important */
html[data-theme="dark"] .nav-sidebar .nav-icon-explore {
    background-color: var(--es2-success-soft, rgba(34, 197, 94, 0.12)) !important;
    color: var(--es2-success, #4ade80) !important;
}
html[data-theme="dark"] .nav-sidebar .nav-icon-brands {
    background-color: var(--es2-primary-soft, rgba(34, 90, 234, 0.12)) !important;
    color: var(--es2-primary, #5b8cff) !important;
}
html[data-theme="dark"] .nav-sidebar .nav-link-brands-active {
    color: var(--es2-primary-text, #5b8cff) !important;
    background: var(--es2-primary-soft, rgba(34, 90, 234, 0.12)) !important;
    border-color: rgba(91, 140, 255, 0.35) !important;
}

/* Cell chrome that still used light-only hex after theme remap */
html[data-theme="dark"] .brands-page-wrapper .explore-wlads-btn-transcribe,
html[data-theme="dark"] .brands-page-wrapper .explore-wlads-btn-download {
    background: var(--dk-surface-2) !important;
    border-color: var(--dk-border) !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .brands-page-wrapper .explore-wlads-btn-transcribe:hover,
html[data-theme="dark"] .brands-page-wrapper .explore-wlads-btn-download:hover {
    background: var(--dk-surface-3) !important;
}
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-number,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-icon,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell .monthly-visits-top > svg,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell > div > svg:first-of-type,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-na,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-more-flags,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-tt-code,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-tt-share,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-number,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-icon,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell .monthly-visits-top > svg,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell > div > svg:first-of-type,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-na,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-more-flags,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-tt-code,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-tt-share {
    color: #ffffff !important;
}
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-icon,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell .monthly-visits-top > svg,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell > div > svg:first-of-type,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-icon,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell .monthly-visits-top > svg,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-cell > div > svg:first-of-type {
    stroke: #ffffff !important;
}
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-flags-tooltip,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-flags-tooltip {
    background: var(--dk-surface-2, #1e293b) !important;
    border-color: var(--dk-border-strong, #334155) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-sparkline .spark-guide,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-sparkline .spark-guide {
    stroke: #64748b !important;
}
html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid__title {
    color: #ffffff !important;
}
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table thead,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table thead th,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table thead th.brands-select-col,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table thead th[data-brands-col="brand"] {
    background: var(--dk-surface-deep, #0f172a) !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody td.brands-select-cell,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody td.brands-brand-cell {
    background: var(--dk-surface, #1e293b) !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:nth-child(even) td.brands-select-cell,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:nth-child(even) td.brands-brand-cell {
    background: var(--dk-surface-deep, #0f172a) !important;
}
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:hover td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:hover td.brands-select-cell,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr:hover td.brands-brand-cell {
    background: var(--es2-row-hover) !important;
}
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.is-selected td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.is-selected td.brands-select-cell,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.is-selected td.brands-brand-cell {
    background: var(--es2-row-selected) !important;
}
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.is-selected:hover td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.is-selected:hover td.brands-select-cell,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table tbody tr.is-selected:hover td.brands-brand-cell {
    background: var(--es2-row-selected-hover) !important;
}
html[data-theme="dark"] .brands-bulk-bar {
    background: var(--dk-surface, #1e293b);
    border-color: rgba(148, 163, 184, 0.25);
}
html[data-theme="dark"] .brands-bulk-bar__count {
    color: #f8fafc;
}
html[data-theme="dark"] .brands-bulk-bar__btn--secondary {
    background: rgba(148, 163, 184, 0.16);
    color: #f8fafc;
}
html[data-theme="dark"] .brands-bulk-bar__btn--danger-outline {
    background: transparent;
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.45);
}
html[data-theme="dark"] .brands-bulk-bar__btn--danger-outline:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.65);
}
html[data-theme="dark"] .brands-select-box {
    background: #0f172a;
    border-color: #475569;
}

html[data-theme="dark"] .brands-select-box:hover:not(.is-disabled):not(.is-checked):not(.is-indeterminate) {
    border-color: #94a3b8;
    background: #0f172a;
}

html[data-theme="dark"] .brands-select-box.is-checked,
html[data-theme="dark"] .brands-select-box.is-indeterminate {
    background: #225aea;
    border-color: #225aea;
}

html[data-theme="dark"] .brands-select-box.is-disabled,
html[data-theme="dark"] .brands-select-box:disabled {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .brands-tile__select.brands-select-box:not(.is-checked):not(.is-indeterminate) {
    background: rgba(15, 23, 42, 0.92);
}

/* Brands + sidebar: prefer white text over muted grays in dark mode */
html[data-theme="dark"] .brands-page-wrapper,
html[data-theme="dark"] .brands-page-wrapper {
    --dk-text-2: #ffffff;
    --dk-text-3: #ffffff;
    --es2-text: #ffffff;
    --es2-text-2: #ffffff;
    --es2-text-3: #ffffff;
    --es2-text-mute: #ffffff;
    color: #ffffff;
}
html[data-theme="dark"] .brands-page-wrapper,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table td,
html[data-theme="dark"] .brands-page-wrapper .shops-table.brands-table th,
html[data-theme="dark"] .brands-page-wrapper .explore-shop-infos-name,
html[data-theme="dark"] .brands-page-wrapper .explore-shop-infos-domain,
html[data-theme="dark"] .brands-page-wrapper .explore-store-domain-link,
html[data-theme="dark"] .brands-page-wrapper .explore-revenue-range .explore-revenue-value,
html[data-theme="dark"] .brands-page-wrapper .explore-revenue-empty,
html[data-theme="dark"] .brands-page-wrapper .explore-revenue-sep,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-number,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-icon,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-na,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-tt-code,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-tt-share,
html[data-theme="dark"] .brands-page-wrapper .monthly-visits-more-flags,
html[data-theme="dark"] .brands-page-wrapper .brand-added-at,
html[data-theme="dark"] .brands-page-wrapper .bmm-pct,
html[data-theme="dark"] .brands-page-wrapper .bmm-label,
html[data-theme="dark"] .brands-page-wrapper .st-similar-name,
html[data-theme="dark"] .brands-page-wrapper .st-similar-domain,
html[data-theme="dark"] .brands-page-wrapper .st-similar-empty,
html[data-theme="dark"] .brands-page-wrapper .brands-tile__title,
html[data-theme="dark"] .brands-page-wrapper .brands-tile__domain,
html[data-theme="dark"] .brands-page-wrapper .brands-tile__metric-label,
html[data-theme="dark"] .brands-page-wrapper .brands-ws-chip__folder,
html[data-theme="dark"] .brands-page-wrapper .brands-ws-chip__sep,
html[data-theme="dark"] .brands-page-wrapper .brands-ws-chip__count,
html[data-theme="dark"] .brands-page-wrapper .brands-ws-chip__hint,
html[data-theme="dark"] .brands-page-wrapper .brands-stat-chip__label,
html[data-theme="dark"] .brands-page-wrapper .brands-subtitle-detail,
html[data-theme="dark"] .brands-page-wrapper .brands-fetching-note,
html[data-theme="dark"] .brands-page-wrapper .brands-fetching-cell,
html[data-theme="dark"] .brands-page-wrapper .brands-fetching-mid__sub,
html[data-theme="dark"] .brands-page-wrapper .sort-dropdown-label,
html[data-theme="dark"] .brands-page-wrapper .sort-option,
html[data-theme="dark"] .brands-page-wrapper .st-action-btn,
html[data-theme="dark"] .brands-page-wrapper .pagination-wrapper,
html[data-theme="dark"] .brands-page-wrapper .page-number:not(.active),
html[data-theme="dark"] .brands-page-wrapper .page-ellipsis {
    color: #ffffff !important;
}
html[data-theme="dark"] .nav-sidebar {
    --es2-text: #ffffff;
    --es2-text-2: #ffffff;
    --es2-text-3: #ffffff;
}
html[data-theme="dark"] .nav-sidebar .nav-link,
html[data-theme="dark"] .nav-sidebar .nav-link:hover,
html[data-theme="dark"] .nav-sidebar .nav-sidebar-mobile-title {
    color: #ffffff !important;
}

/* --- Brand Tracker notifications modal (WH brands chrome) --- */
.brands-notifications-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--es2-radius, 10px);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.28);
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    box-shadow: none;
}
.brands-notifications-btn:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.4);
}
.brands-notifications-btn:active {
    transform: translateY(1px);
}
.brand-notif-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.brand-notif-modal.is-open {
    display: flex;
}
.brand-notif-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.brand-notif-modal__panel {
    position: relative;
    width: min(600px, 100%);
    max-height: min(90vh, 820px);
    background: var(--es2-surface, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.brand-notif-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--es2-border, #F2F2F2);
}
.brand-notif-modal__header-text {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}
.brand-notif-modal__header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--es2-text, #0E121B);
}
.brand-notif-modal__header-sub {
    font-size: 12px;
    color: var(--es2-text-mute, #64748b);
    white-space: nowrap;
}
.brand-notif-modal__close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 100px;
    background: #F5F5F5;
    color: #525866;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px;
}
.brand-notif-modal__close:hover {
    background: #ececec;
}
.brand-notif-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 12px 16px 0;
    padding: 3px;
    width: fit-content;
    max-width: calc(100% - 32px);
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}
.brand-notif-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.brand-notif-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.55);
}
.brand-notif-tab.is-active {
    color: #0f172a;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.brand-notif-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px 16px;
    overflow: auto;
    min-height: 0;
    flex: 1;
}
.brand-notif-panel.is-active {
    display: flex;
}
.brand-notif-panel__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.brand-notif-panel__sub {
    font-size: 12px;
    color: var(--es2-text-mute, #64748b);
    line-height: 1.4;
}
.brand-notif-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--es2-text-2, #525866);
    cursor: pointer;
    user-select: none;
}
.brand-notif-switch--row {
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.brand-notif-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.brand-notif-switch__track {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 100px;
    background: #E1E4EA;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.brand-notif-switch__track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(14, 18, 27, 0.12);
    transition: transform 0.15s ease;
}
.brand-notif-switch input:checked + .brand-notif-switch__track {
    background: var(--es2-primary, #225AEA);
}
.brand-notif-switch input:checked + .brand-notif-switch__track::after {
    transform: translateX(16px);
}
.brand-notif-switch--compact {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
    color: #5b6b82;
    font-weight: 500;
}
.brand-notif-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.brand-notif-search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}
.brand-notif-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.brand-notif-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 35px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    font-size: 12px;
    color: var(--es2-text, #0E121B);
    background: var(--es2-surface, #fff);
    box-sizing: border-box;
    outline: none !important;
    box-shadow: none !important;
}
.brand-notif-search input:focus {
    border-color: rgba(34, 90, 234, 0.45);
}
.brand-notif-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--es2-radius, 10px);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--es2-border, #E1E4EA);
    background: var(--es2-surface, #fff);
    color: var(--es2-text-2, #525866);
    white-space: nowrap;
    box-sizing: border-box;
}
.brand-notif-btn:hover {
    background: #f8fafc;
    color: var(--es2-text, #0E121B);
}
.brand-notif-btn--soft {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
}
.brand-notif-btn--soft:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.4);
}
.brand-notif-btn--primary {
    background: var(--es2-primary, #225AEA);
    border-color: var(--es2-primary, #225AEA);
    color: #fff;
}
.brand-notif-btn--primary:hover {
    filter: brightness(0.96);
    color: #fff;
}
.brand-notif-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.brand-notif-brand-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    padding: 4px;
    background: var(--es2-surface, #fff);
}
.brand-notif-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
}
.brand-notif-brand-row:hover {
    background: #f8fafc;
}
.brand-notif-brand-row img,
.brand-notif-brand-row__placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #F2F2F2;
}
.brand-notif-brand-row__name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--es2-text, #0E121B);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 220px;
    color: #5b6b82;
    text-align: center;
    padding: 24px;
}
.brand-notif-empty__title {
    font-size: 13px;
    font-weight: 600;
    color: #525866;
}
.brand-notif-empty__sub {
    font-size: 12px;
    color: #5b6b82;
    max-width: 280px;
    line-height: 1.4;
}
.brand-notif-event-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    overflow: hidden;
}
.brand-notif-event {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 14px;
    border-bottom: 1px solid var(--es2-border, #F2F2F2);
    background: var(--es2-surface, #fff);
}
.brand-notif-event:last-child {
    border-bottom: none;
}
.brand-notif-event__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--es2-text, #0E121B);
}
.brand-notif-event__desc {
    margin-top: 2px;
    font-size: 12px;
    color: var(--es2-text-mute, #64748b);
    line-height: 1.4;
}
.brand-notif-event__hint {
    margin-top: 4px;
    font-size: 11px;
    color: #5b6b82;
}
.brand-notif-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--es2-text-2, #525866);
}
.brand-notif-field input,
.brand-notif-field select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    font-size: 12px;
    color: var(--es2-text, #0E121B);
    background: var(--es2-surface, #fff);
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
}
.brand-notif-field input:focus,
.brand-notif-field select:focus {
    border-color: rgba(34, 90, 234, 0.45);
}
.brand-notif-field__input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.brand-notif-field__input-wrap input {
    width: 88px;
}
.brand-notif-info {
    padding: 10px 12px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.18);
    color: #1e40af;
    font-size: 12px;
    line-height: 1.45;
}
.brand-notif-digest-intro {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-notif-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
}
.brand-notif-channels .brand-notif-switch--compact {
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
}
.brand-notif-channel__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--es2-text-1, #0E121B);
}
.brand-notif-channel__desc {
    margin: 6px 0 0;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--es2-text-3, #6b7280);
}
.brand-notif-field--timezone {
    margin-top: 0;
}
.brand-notif-dd {
    position: relative;
    width: 100%;
}
.brand-notif-dd__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #0E121B;
    background: #fff;
    background-color: #fff;
    box-sizing: border-box;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.brand-notif-dd__trigger:hover {
    border-color: #d1d5db;
}
.brand-notif-dd__trigger:focus-visible,
.brand-notif-dd.is-open .brand-notif-dd__trigger {
    outline: none;
    border-color: rgba(34, 90, 234, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.brand-notif-dd__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-notif-dd__value.is-placeholder {
    color: #717c92;
    font-weight: 450;
}
.brand-notif-dd__chevron {
    flex-shrink: 0;
    color: #5b6b82;
    transition: transform 0.15s ease;
}
.brand-notif-dd.is-open .brand-notif-dd__chevron {
    transform: rotate(180deg);
    color: #2563eb;
}
.brand-notif-dd__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    max-height: 280px;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
    background-color: #fff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}
.brand-notif-schedule .brand-notif-dd__panel {
    z-index: 50;
    max-height: 180px;
}
.brand-notif-dd__panel[hidden] {
    display: none !important;
}
.brand-notif-dd__search-wrap {
    flex-shrink: 0;
    margin-bottom: 6px;
}
.brand-notif-dd__search {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 10px;
    font-size: 12px;
    font-family: inherit;
    color: var(--es2-text, #0E121B);
    background: #f8fafc;
    box-sizing: border-box;
}
.brand-notif-dd__search::placeholder {
    color: #717c92;
}
.brand-notif-dd__search:focus {
    outline: none;
    border-color: rgba(34, 90, 234, 0.45);
    background: #fff;
}
.brand-notif-dd__list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-notif-dd__option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    width: 100%;
    border: none;
    background: #fff;
    background-color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    color: #0E121B;
    text-align: left;
    cursor: pointer;
}
.brand-notif-dd__option-main {
    display: block;
    width: 100%;
}
.brand-notif-dd__option-sub {
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 450;
    color: #5b6b82;
}
.brand-notif-dd__option:hover,
.brand-notif-dd__option.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}
.brand-notif-dd__option.is-selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 650;
}
.brand-notif-dd__empty {
    padding: 16px 10px;
    font-size: 12px;
    color: #5b6b82;
    text-align: center;
}
.brand-notif-schedule {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 12px;
    border: 1px solid var(--es2-border, #F2F2F2);
    border-radius: 12px;
    background: var(--es2-surface, #fff);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.brand-notif-schedule.is-enabled {
    border-color: #bfdbfe;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.brand-notif-schedule.is-disabled .brand-notif-schedule__desc::after {
    content: ' · Off';
    font-weight: 550;
}
.brand-notif-schedule:not(.is-collapsed) {
    padding-bottom: 12px;
}
.brand-notif-schedule__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.brand-notif-schedule__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 4px 0;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: inherit;
}
.brand-notif-schedule__toggle:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
    border-radius: 8px;
}
.brand-notif-schedule__chevron {
    flex-shrink: 0;
    color: #5b6b82;
    transition: transform 0.15s ease;
}
.brand-notif-schedule:not(.is-collapsed) .brand-notif-schedule__chevron {
    transform: rotate(180deg);
    color: #2563eb;
}
.brand-notif-schedule__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.brand-notif-schedule__title {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: var(--es2-text, #0E121B);
}
.brand-notif-schedule__desc {
    display: block;
    font-size: 12px;
    color: var(--es2-text-mute, #64748b);
}
.brand-notif-schedule__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--es2-border, #F2F2F2);
}
.brand-notif-schedule__body[hidden] {
    display: none !important;
}
.brand-notif-schedule__body .brand-notif-digest-actions {
    grid-column: 1 / -1;
}
@media (max-width: 520px) {
    .brand-notif-schedule__body {
        grid-template-columns: 1fr;
    }
}
.brand-notif-digest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
@media (max-width: 640px) {
    .brand-notif-digest-fields {
        grid-template-columns: 1fr;
    }
    .brand-notif-event {
        flex-direction: column;
    }
    .brand-notif-switch--compact {
        align-items: flex-start;
        text-align: left;
    }
    .brand-notif-tabs {
        width: calc(100% - 32px);
    }
    .brand-notif-tab {
        flex: 1;
    }
}

/* Dark mode — match brands page / follow-brand modal (--dk-* palette) */
html[data-theme="dark"] .brands-notifications-btn {
    background: rgba(34, 90, 234, 0.15);
    border-color: var(--dk-filter-accent-border, rgba(34, 90, 234, 0.5));
    color: #93c5fd;
}
html[data-theme="dark"] .brands-notifications-btn:hover {
    background: rgba(34, 90, 234, 0.24);
    border-color: var(--dk-filter-accent-border-hover, rgba(34, 90, 234, 0.72));
    color: #bfdbfe;
}
html[data-theme="dark"] .brand-notif-modal__backdrop {
    background: rgba(0, 0, 0, 0.65);
}
html[data-theme="dark"] .brand-notif-modal__panel {
    background: var(--dk-surface, #15181e);
    border: 1px solid var(--dk-border, #2c323d);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-modal__header {
    border-bottom-color: var(--dk-border, #2c323d);
}
html[data-theme="dark"] .brand-notif-modal__header h3,
html[data-theme="dark"] .brand-notif-event__title,
html[data-theme="dark"] .brand-notif-brand-row__name,
html[data-theme="dark"] .brand-notif-schedule__title,
html[data-theme="dark"] .brand-notif-digest-intro .brand-notif-event__title,
html[data-theme="dark"] .brand-notif-empty__title,
html[data-theme="dark"] .brand-notif-tab.is-active {
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-modal__header-sub,
html[data-theme="dark"] .brand-notif-panel__sub,
html[data-theme="dark"] .brand-notif-event__desc,
html[data-theme="dark"] .brand-notif-event__hint,
html[data-theme="dark"] .brand-notif-schedule__desc,
html[data-theme="dark"] .brand-notif-digest-intro .brand-notif-event__desc,
html[data-theme="dark"] .brand-notif-empty__sub,
html[data-theme="dark"] .brand-notif-field,
html[data-theme="dark"] .brand-notif-switch,
html[data-theme="dark"] .brand-notif-switch--compact {
    color: var(--dk-text-3, #bcc5d4);
}
html[data-theme="dark"] .brand-notif-channel__label {
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-channel__desc {
    color: var(--dk-text-3, #94a3b8);
}
html[data-theme="dark"] .brand-notif-modal__close {
    background: var(--dk-surface-3, #232936);
    color: var(--dk-text-2, #e4e8f0);
}
html[data-theme="dark"] .brand-notif-modal__close:hover {
    background: var(--dk-filter-surface-hover, #2d3544);
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-tabs {
    background: var(--dk-surface-deep, #0b0d11);
    border-color: var(--dk-border, #2c323d);
}
html[data-theme="dark"] .brand-notif-tab {
    color: var(--dk-text-3, #bcc5d4);
}
html[data-theme="dark"] .brand-notif-tab:hover {
    color: var(--dk-text, #fff);
    background: rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .brand-notif-tab.is-active {
    background: var(--dk-surface-3, #232936);
    color: var(--dk-text, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--dk-border-strong, #3a4252);
}
html[data-theme="dark"] .brand-notif-info {
    background: rgba(34, 90, 234, 0.12);
    border-color: rgba(34, 90, 234, 0.35);
    color: #bfdbfe;
}
html[data-theme="dark"] .brand-notif-search input,
html[data-theme="dark"] .brand-notif-field input,
html[data-theme="dark"] .brand-notif-field select,
html[data-theme="dark"] .brand-notif-btn,
html[data-theme="dark"] .brand-notif-brand-list,
html[data-theme="dark"] .brand-notif-event,
html[data-theme="dark"] .brand-notif-event-list,
html[data-theme="dark"] .brand-notif-digest-row,
html[data-theme="dark"] .brand-notif-digest-settings,
html[data-theme="dark"] .brand-notif-schedule {
    background: var(--dk-surface-2, #1b1f27);
    border-color: var(--dk-border, #2c323d);
    color: var(--dk-text-2, #e4e8f0);
}
html[data-theme="dark"] .brand-notif-schedule.is-enabled {
    border-color: var(--dk-filter-accent-border, rgba(34, 90, 234, 0.5));
    box-shadow: 0 0 0 1px rgba(34, 90, 234, 0.18);
}
html[data-theme="dark"] .brand-notif-schedule__body {
    border-top-color: var(--dk-border, #2c323d);
}
html[data-theme="dark"] .brand-notif-schedule:not(.is-collapsed) .brand-notif-schedule__chevron,
html[data-theme="dark"] .brand-notif-dd.is-open .brand-notif-dd__chevron {
    color: #93c5fd;
}
html[data-theme="dark"] .brand-notif-schedule__chevron {
    color: var(--dk-text-3, #bcc5d4);
}
html[data-theme="dark"] .brand-notif-search input:focus,
html[data-theme="dark"] .brand-notif-field input:focus,
html[data-theme="dark"] .brand-notif-field select:focus,
html[data-theme="dark"] .brand-notif-dd__trigger:focus-visible,
html[data-theme="dark"] .brand-notif-dd.is-open .brand-notif-dd__trigger {
    border-color: var(--dk-filter-accent-border, rgba(34, 90, 234, 0.58));
    box-shadow: 0 0 0 3px rgba(34, 90, 234, 0.18);
}
html[data-theme="dark"] .brand-notif-dd__trigger,
html[data-theme="dark"] .brand-notif-dd__panel {
    background: var(--dk-filter-surface, #232936);
    background-color: var(--dk-filter-surface, #232936);
    border-color: var(--dk-border, #2c323d);
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-dd__panel {
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 12px 28px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .brand-notif-dd__value.is-placeholder,
html[data-theme="dark"] .brand-notif-dd__option-sub,
html[data-theme="dark"] .brand-notif-dd__empty,
html[data-theme="dark"] .brand-notif-dd__chevron {
    color: var(--dk-text-3, #bcc5d4);
}
html[data-theme="dark"] .brand-notif-dd__search {
    background: var(--dk-surface-2, #1b1f27);
    background-color: var(--dk-surface-2, #1b1f27);
    border-color: var(--dk-border, #2c323d);
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-dd__search::placeholder {
    color: var(--dk-text-3, #bcc5d4);
}
html[data-theme="dark"] .brand-notif-dd__search:focus {
    background: var(--dk-surface-deep, #0b0d11);
    background-color: var(--dk-surface-deep, #0b0d11);
    border-color: var(--dk-filter-accent-border, rgba(34, 90, 234, 0.58));
}
html[data-theme="dark"] .brand-notif-dd__option {
    background: transparent;
    background-color: transparent;
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-dd__option:hover,
html[data-theme="dark"] .brand-notif-dd__option.is-active {
    background: rgba(148, 163, 184, 0.1);
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-dd__option.is-selected {
    background: rgba(34, 90, 234, 0.18);
    background-color: rgba(34, 90, 234, 0.18);
    color: #93c5fd;
}
html[data-theme="dark"] .brand-notif-brand-row:hover {
    background: var(--dk-surface-3, #232936);
}
html[data-theme="dark"] .brand-notif-btn:hover {
    background: var(--dk-surface-3, #232936);
    border-color: var(--dk-border-strong, #3a4252);
    color: var(--dk-text, #fff);
}
html[data-theme="dark"] .brand-notif-btn--soft {
    background: rgba(34, 90, 234, 0.15);
    border-color: var(--dk-filter-accent-border, rgba(34, 90, 234, 0.5));
    color: #93c5fd;
}
html[data-theme="dark"] .brand-notif-btn--soft:hover {
    background: rgba(34, 90, 234, 0.24);
    color: #bfdbfe;
}
html[data-theme="dark"] .brand-notif-btn--primary {
    background: var(--dk-accent, #225aea);
    border-color: var(--dk-accent, #225aea);
    color: #fff;
}
html[data-theme="dark"] .brand-notif-btn--primary:hover {
    background: var(--dk-accent-hover, #1d4ed8);
    border-color: var(--dk-accent-hover, #1d4ed8);
}
html[data-theme="dark"] .brand-notif-switch__track {
    background: var(--dk-border-strong, #3a4252);
}
html[data-theme="dark"] .brand-notif-switch input:checked + .brand-notif-switch__track {
    background: var(--dk-accent, #225aea);
}
html[data-theme="dark"] .brand-notif-brand-row__placeholder {
    background: var(--dk-surface-3, #232936);
}
html[data-theme="dark"] .brand-notif-empty {
    color: var(--dk-text-3, #bcc5d4);
}

