/*
 * dark-mode.css
 * Warm dark palette — se aplica cuando <html data-bs-theme="dark">
 * Cubre: families.css, products.css, site.css y cualquier color hardcodeado
 */

/* ─── VARIABLES BASE ─────────────────────────────────────────────────────── */
[data-bs-theme="dark"] {
    /* Surfaces — warm charcoal, not cold GitHub gray */
    --bg-page:        #0f0f1a;
    --bg-card:        #17172a;
    --bg-card-header: #1e1e33;
    --bg-input:       #1a1a2e;
    --bg-hover:       #22223a;
    --border:         #2a2a40;

    /* Text — warm white */
    --text-primary:   #eeeef8;
    --text-secondary: #9090b8;
    --text-muted:     #606080;

    /* Accent — ML Yellow as primary interactive color in dark */
    --accent:         #FFE600;
    --accent-hover:   #f0d800;

    /* Semantic */
    --success: #4ade80;
    --danger:  #f87171;
    --warning: #fbbf24;
}

/* ─── BODY / PAGE ────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] body {
    background-color: var(--bg-page);
    color: var(--text-primary);
}

/* ─── NAVBAR ─────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .hml-navbar {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .navbar-brand {
    color: var(--accent) !important;
}

[data-bs-theme="dark"] .nav-link {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .nav-link:hover {
    color: var(--text-primary) !important;
}

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .card {
    background-color: var(--bg-card);
    border-color: var(--border);
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--bg-card-header) !important;
    border-color: var(--border);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-body {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h6,
[data-bs-theme="dark"] .card-header .mb-0 {
    color: var(--text-primary) !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .card-header.bg-warning,
[data-bs-theme="dark"] .card-header.bg-warning.bg-opacity-10 {
    background-color: rgba(251, 191, 36, 0.15) !important;
}

[data-bs-theme="dark"] .card-header.bg-warning h6,
[data-bs-theme="dark"] .card-header.bg-warning.bg-opacity-10 h6 {
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
    color: #000 !important;
}

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="search"] {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.14) !important;
    background-color: var(--bg-input) !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .form-label {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] select option {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

/* ─── FAMILIES.CSS OVERRIDES ─────────────────────────────────────────────── */

/* ML Header */
[data-bs-theme="dark"] .ml-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .ml-header h2 {
    color: var(--text-primary) !important;
}

/* Heaven product badge */
[data-bs-theme="dark"] .heaven-product-badge {
    background: var(--bg-card-header) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .heaven-product-badge h4 {
    color: var(--text-secondary) !important;
    font-size: 0.75rem !important;
}

[data-bs-theme="dark"] .idc-display {
    color: var(--text-primary) !important;
    font-size: 0.9rem !important;
}

/* Category display */
[data-bs-theme="dark"] .category-display {
    background-color: var(--bg-card) !important;
    border-color: rgba(255, 230, 0, 0.25) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .category-label {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .category-value {
    color: var(--text-primary) !important;
}

/* Product cards */
[data-bs-theme="dark"] .product-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
    border-left-color: rgba(255, 230, 0, 0.3) !important;
}

[data-bs-theme="dark"] .product-card:hover {
    border-left-color: var(--accent) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .product-header {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .product-title {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .product-meta {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .product-image-placeholder {
    background: var(--bg-card-header) !important;
    border-color: var(--border) !important;
}

/* Products section title */
[data-bs-theme="dark"] .products-section-title {
    background-color: transparent !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .products-section-title h3 {
    color: var(--text-secondary) !important;
}

/* Item count badge */
[data-bs-theme="dark"] .item-count {
    background-color: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
}

/* Attribute cards */
[data-bs-theme="dark"] .attribute-card,
[data-bs-theme="dark"] .attribute-group {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .attribute-group-title,
[data-bs-theme="dark"] .section-title {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .attribute-item {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .attribute-item label {
    color: var(--text-secondary) !important;
}

/* Btn group — Sí / No / N/A */
[data-bs-theme="dark"] .btn-group .btn-outline-success,
[data-bs-theme="dark"] .btn-group .btn-outline-danger,
[data-bs-theme="dark"] .btn-group .btn-outline-secondary {
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .btn-group .btn-outline-success.active,
[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-success {
    background-color: rgba(74, 222, 128, 0.15) !important;
    color: var(--success) !important;
    border-color: var(--success) !important;
}

[data-bs-theme="dark"] .btn-group .btn-outline-danger.active,
[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-danger {
    background-color: rgba(248, 113, 113, 0.15) !important;
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

[data-bs-theme="dark"] .btn-group .btn-outline-secondary.active,
[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-secondary {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

/* Footer actions (sticky publish bar) */
[data-bs-theme="dark"] .footer-actions {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Sync toggle */
[data-bs-theme="dark"] .sync-toggle-container {
    background-color: transparent !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .sync-toggle-label {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .sync-toggle-slider {
    background: var(--bg-hover) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .sync-toggle input:checked + .sync-toggle-slider {
    background: rgba(255, 230, 0, 0.6) !important;
}

/* Publish button — ML Yellow in dark mode */
[data-bs-theme="dark"] .btn-publish {
    background: var(--accent) !important;
    color: #0f0f1a !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(255, 230, 0, 0.28) !important;
}

[data-bs-theme="dark"] .btn-publish:hover {
    background: var(--accent-hover) !important;
    box-shadow: 0 6px 24px rgba(255, 230, 0, 0.42) !important;
}

/* Predict button — keep green semantic meaning */
[data-bs-theme="dark"] .btn-predict-category {
    background: rgba(74, 222, 128, 0.10) !important;
    color: var(--success) !important;
    border: 1px solid rgba(74, 222, 128, 0.25) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .btn-predict-category:hover {
    background: rgba(74, 222, 128, 0.18) !important;
    border-color: rgba(74, 222, 128, 0.4) !important;
}

/* Change category / select buttons */
[data-bs-theme="dark"] .btn-change-category {
    background-color: transparent !important;
    color: var(--accent) !important;
    border-color: rgba(255, 230, 0, 0.3) !important;
}

[data-bs-theme="dark"] .btn-change-category:hover {
    background-color: rgba(255, 230, 0, 0.08) !important;
    border-color: var(--accent) !important;
}

/* Edit item button */
[data-bs-theme="dark"] .btn-edit-item {
    background-color: rgba(255, 230, 0, 0.08) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(255, 230, 0, 0.2) !important;
}

[data-bs-theme="dark"] .btn-edit-item:hover {
    background-color: rgba(255, 230, 0, 0.14) !important;
    border-color: rgba(255, 230, 0, 0.38) !important;
}

/* Predicting overlay */
[data-bs-theme="dark"] .predicting-overlay {
    background-color: rgba(15, 15, 26, 0.85) !important;
}

[data-bs-theme="dark"] .predicting-content {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

/* ─── ATTRIBUTES RENDERER ────────────────────────────────────────────────── */
[data-bs-theme="dark"] #familyAttributesContainer,
[data-bs-theme="dark"] #parentAttributesContainer,
[data-bs-theme="dark"] #upidAttributesContainer,
[data-bs-theme="dark"] #saleTermsContainer {
    background-color: transparent !important;
}

[data-bs-theme="dark"] #familyAttributesContainer .card,
[data-bs-theme="dark"] #parentAttributesContainer .card,
[data-bs-theme="dark"] #upidAttributesContainer .card,
[data-bs-theme="dark"] #saleTermsContainer .card {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] #familyAttributesContainer div:not(.btn):not(.btn-group):not(.badge),
[data-bs-theme="dark"] #parentAttributesContainer div:not(.btn):not(.btn-group):not(.badge),
[data-bs-theme="dark"] #upidAttributesContainer div:not(.btn):not(.btn-group):not(.badge),
[data-bs-theme="dark"] #saleTermsContainer div:not(.btn):not(.btn-group):not(.badge) {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

/* Botones Sí/No/N/A — estado normal */
[data-bs-theme="dark"] #familyAttributesContainer .btn-group .btn,
[data-bs-theme="dark"] #parentAttributesContainer .btn-group .btn,
[data-bs-theme="dark"] #saleTermsContainer .btn-group .btn,
[data-bs-theme="dark"] #familyAttributesContainer .btn,
[data-bs-theme="dark"] #parentAttributesContainer .btn,
[data-bs-theme="dark"] #saleTermsContainer .btn {
    background-color: var(--bg-input) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}

/* Botones activos — fondo amarillo con texto oscuro */
[data-bs-theme="dark"] #familyAttributesContainer .btn-group .btn.active,
[data-bs-theme="dark"] #parentAttributesContainer .btn-group .btn.active,
[data-bs-theme="dark"] #saleTermsContainer .btn-group .btn.active,
[data-bs-theme="dark"] #familyAttributesContainer .btn-check:checked + .btn,
[data-bs-theme="dark"] #parentAttributesContainer .btn-check:checked + .btn,
[data-bs-theme="dark"] #saleTermsContainer .btn-check:checked + .btn {
    background-color: rgba(255, 230, 0, 0.18) !important;
    color: var(--accent) !important;
    border-color: rgba(255, 230, 0, 0.38) !important;
}

[data-bs-theme="dark"] #familyAttributesContainer .btn.active,
[data-bs-theme="dark"] #parentAttributesContainer .btn.active,
[data-bs-theme="dark"] #saleTermsContainer .btn.active {
    background-color: rgba(255, 230, 0, 0.14) !important;
    color: var(--accent) !important;
    border-color: rgba(255, 230, 0, 0.3) !important;
}

/* Sección títulos */
[data-bs-theme="dark"] #familyAttributesContainer h5,
[data-bs-theme="dark"] #familyAttributesContainer h6,
[data-bs-theme="dark"] #parentAttributesContainer h5,
[data-bs-theme="dark"] #parentAttributesContainer h6,
[data-bs-theme="dark"] #saleTermsContainer h5,
[data-bs-theme="dark"] #saleTermsContainer h6 {
    color: var(--text-muted) !important;
}

/* Labels */
[data-bs-theme="dark"] #familyAttributesContainer label,
[data-bs-theme="dark"] #parentAttributesContainer label,
[data-bs-theme="dark"] #upidAttributesContainer label,
[data-bs-theme="dark"] #saleTermsContainer label {
    color: var(--text-secondary) !important;
}

/* Hints */
[data-bs-theme="dark"] #familyAttributesContainer small,
[data-bs-theme="dark"] #parentAttributesContainer small,
[data-bs-theme="dark"] #upidAttributesContainer small,
[data-bs-theme="dark"] #saleTermsContainer small {
    color: var(--text-muted) !important;
}

/* Inputs */
[data-bs-theme="dark"] #familyAttributesContainer input,
[data-bs-theme="dark"] #familyAttributesContainer select,
[data-bs-theme="dark"] #familyAttributesContainer textarea,
[data-bs-theme="dark"] #parentAttributesContainer input,
[data-bs-theme="dark"] #parentAttributesContainer select,
[data-bs-theme="dark"] #parentAttributesContainer textarea,
[data-bs-theme="dark"] #upidAttributesContainer input,
[data-bs-theme="dark"] #upidAttributesContainer select,
[data-bs-theme="dark"] #saleTermsContainer input,
[data-bs-theme="dark"] #saleTermsContainer select {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

/* ─── PRODUCTS.CSS OVERRIDES ─────────────────────────────────────────────── */
[data-bs-theme="dark"] .page-title {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .breadcrumb-link {
    color: var(--accent) !important;
}

[data-bs-theme="dark"] .breadcrumb-current,
[data-bs-theme="dark"] .breadcrumb-separator {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .product-details {
    background-color: var(--bg-card-header) !important;
}

[data-bs-theme="dark"] .detail-row {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .detail-row.highlight {
    background-color: var(--bg-hover) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .detail-label {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .detail-value {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .stock-badge {
    background-color: rgba(74, 222, 128, 0.12) !important;
    color: var(--success) !important;
}

[data-bs-theme="dark"] .stock-badge.no-stock {
    background-color: rgba(248, 113, 113, 0.12) !important;
    color: var(--danger) !important;
}

[data-bs-theme="dark"] .item-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .item-card:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .item-card-price {
    color: var(--success) !important;
}

[data-bs-theme="dark"] .item-card-details {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .empty-state {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .empty-state h6 {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .editor-footer {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .no-image,
[data-bs-theme="dark"] .main-image {
    background-color: var(--bg-card-header) !important;
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .thumbnail {
    border-color: transparent !important;
}

[data-bs-theme="dark"] .thumbnail:hover {
    border-color: var(--accent) !important;
}

[data-bs-theme="dark"] .thumbnail.active {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(255, 230, 0, 0.20) !important;
}

[data-bs-theme="dark"] .catalog-selected-card {
    background-color: var(--bg-card-header) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .catalog-product-id {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .catalog-product-name {
    color: var(--text-primary) !important;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #60a5fa !important;
    border-color: #3b6fd4 !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: rgba(96, 165, 250, 0.12) !important;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

[data-bs-theme="dark"] .btn-outline-danger:hover {
    background-color: rgba(248, 113, 113, 0.12) !important;
}

/* ─── ALERTS ─────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .alert-info {
    background-color: rgba(96, 165, 250, 0.10) !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
    color: #93c5fd !important;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(74, 222, 128, 0.10) !important;
    border-color: rgba(74, 222, 128, 0.25) !important;
    color: #86efac !important;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(251, 191, 36, 0.10) !important;
    border-color: rgba(251, 191, 36, 0.25) !important;
    color: #fde68a !important;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(248, 113, 113, 0.10) !important;
    border-color: rgba(248, 113, 113, 0.25) !important;
    color: #fca5a5 !important;
}

/* ─── MODALS ─────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .modal-content {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .modal-header {
    background-color: var(--bg-card-header) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .modal-footer {
    background-color: var(--bg-card-header) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .modal-title {
    color: var(--text-primary) !important;
}

/* ─── TABLES ─────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .table {
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .table th {
    background-color: var(--bg-card-header) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .table td {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .ml-product-id {
    background-color: rgba(96, 165, 250, 0.12) !important;
    color: #93c5fd !important;
}

/* ─── MISC ───────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] hr {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .footer,
[data-bs-theme="dark"] .hml-footer {
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-page);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #2a2a40;
    border-radius: 4px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 230, 0, 0.4);
}

/* ─── CATEGORIES.CSS OVERRIDES ───────────────────────────────────────────── */
[data-bs-theme="dark"] .categories-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .categories-header h2,
[data-bs-theme="dark"] .categories-header p,
[data-bs-theme="dark"] .categories-header small {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .search-box {
    background: var(--bg-card) !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
}

[data-bs-theme="dark"] .search-input {
    background: var(--bg-input) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .search-input:focus {
    border-color: var(--accent) !important;
}

[data-bs-theme="dark"] .search-input::placeholder {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .breadcrumb-container {
    background: var(--bg-card) !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
}

[data-bs-theme="dark"] .breadcrumb-text {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .breadcrumb-text strong {
    color: var(--accent) !important;
}

[data-bs-theme="dark"] .category-card {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .category-card:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 4px 14px rgba(255, 230, 0, 0.10) !important;
}

[data-bs-theme="dark"] .category-card.selected {
    background: rgba(255, 230, 0, 0.08) !important;
    border-color: rgba(255, 230, 0, 0.35) !important;
}

[data-bs-theme="dark"] .category-card-title {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .category-card-count {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .category-card-arrow {
    color: var(--accent) !important;
}

[data-bs-theme="dark"] .category-card.leaf {
    border-left-color: var(--success) !important;
}

[data-bs-theme="dark"] .selected-category-info {
    background: rgba(74, 222, 128, 0.08) !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
}

[data-bs-theme="dark"] .selected-category-info h4 {
    color: var(--success) !important;
}

[data-bs-theme="dark"] .action-buttons {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .btn-back {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .btn-back:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .btn-select:disabled {
    background: var(--bg-hover) !important;
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .btn-back-level {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
}

[data-bs-theme="dark"] .btn-back-level:hover {
    background: var(--bg-card-header) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .loading-overlay {
    background: rgba(15, 15, 26, 0.88) !important;
}

[data-bs-theme="dark"] .spinner {
    border-color: var(--border) !important;
    border-top-color: var(--accent) !important;
}

/* ─── SIZE CHARTS OVERRIDES ──────────────────────────────────────────────── */
[data-bs-theme="dark"] .sizechart-header {
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .sizechart-header h2 {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .current-selection-bar {
    background: rgba(255, 230, 0, 0.07) !important;
    border-color: rgba(255, 230, 0, 0.25) !important;
}

[data-bs-theme="dark"] .current-selection-bar.no-selection {
    background: var(--bg-card-header) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .filters-card {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .filters-card h6 {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .filter-group label {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .results-table-wrapper {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .results-table thead th {
    background: var(--bg-card-header) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .results-table tbody tr {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .results-table tbody tr td {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .results-table tbody tr:hover {
    background: var(--bg-hover) !important;
}

[data-bs-theme="dark"] .results-table tbody tr.selected-row {
    background: rgba(255, 230, 0, 0.09) !important;
}

[data-bs-theme="dark"] .results-table tbody tr.selected-row:hover {
    background: rgba(255, 230, 0, 0.14) !important;
}

[data-bs-theme="dark"] .domain-info-badge {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
}

/* ─── ITEMS.CSS OVERRIDES ────────────────────────────────────────────────── */
[data-bs-theme="dark"] .price-display {
    background: rgba(255, 230, 0, 0.07) !important;
    border-color: rgba(255, 230, 0, 0.25) !important;
}

[data-bs-theme="dark"] .price-symbol,
[data-bs-theme="dark"] .price-value {
    color: var(--accent) !important;
}

[data-bs-theme="dark"] .listing-card-content {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .listing-type-card input[type="radio"]:checked + .listing-card-content {
    background: rgba(255, 230, 0, 0.07) !important;
    border-color: rgba(255, 230, 0, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.10) !important;
}

[data-bs-theme="dark"] .listing-description {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .listing-cost-item {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .listing-cost-item strong {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] #cuotasContainer .form-check {
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] #cuotasContainer .form-check:hover {
    background: var(--bg-hover) !important;
}

[data-bs-theme="dark"] #cuotasContainer .form-check-input:checked + .form-check-label,
[data-bs-theme="dark"] .financiacion-option input:checked ~ .financiacion-label {
    color: var(--accent) !important;
}

[data-bs-theme="dark"] .financiacion-option {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .financiacion-option:hover {
    background-color: var(--bg-hover) !important;
}

[data-bs-theme="dark"] .financial-row {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .financial-label {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .stock-info {
    background: var(--bg-card-header) !important;
}

[data-bs-theme="dark"] .stock-value {
    color: var(--success) !important;
}

/* ─── SUCCESS PUBLISH MODAL ──────────────────────────────────────────────── */

/* Light mode base */
.success-modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.success-modal-header {
    background-color: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    padding: 18px 24px;
}

.success-modal-header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.success-modal-icon {
    width: 36px;
    height: 36px;
    background: #d3f9d8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #2f9e44;
}

.success-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}

.success-modal-subtitle {
    font-size: 12.5px;
    color: #6c757d;
    margin-top: 2px;
}

.success-modal-body {
    padding: 8px 24px;
    max-height: 340px;
    overflow-y: auto;
}

.success-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e9ecef;
}

.success-modal-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e9ecef;
}

.success-modal-item:last-child {
    border-bottom: none;
}

.success-modal-item-img {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.success-modal-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e5ee;
    background: #f5f6fa;
}

.success-modal-img-fallback {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #e2e5ee;
    background: #f5f6fa;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.success-modal-item-info {
    flex: 1;
    min-width: 0;
}

.success-modal-item-id {
    font-size: 11px;
    color: #868e96;
    font-family: 'Courier New', monospace;
    margin-bottom: 2px;
    letter-spacing: 0.02em;
}

.success-modal-item-idc {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.success-modal-listing-type {
    margin-top: 5px;
}

.success-modal-listing-type .badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.success-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #3483FA;
    text-decoration: none;
    padding: 4px 10px;
    background: #eef2ff;
    border-radius: 20px;
    border: 1px solid #c5d0fa;
}

.success-modal-link:hover {
    background: #dbe4ff;
    color: #3483FA;
}

.success-modal-no-link {
    font-size: 12px;
    color: #adb5bd;
    margin-top: 4px;
    display: block;
}

.shipping-cost-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.shipping-cost-badge {
    display: inline-flex;
    align-items: center;
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-xs.shipping-add-btn {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #1976d2;
    color: #1976d2;
    background: transparent;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.btn-xs.shipping-add-btn:hover:not(:disabled) {
    background: #1976d2;
    color: #fff;
}

.shipping-cost-ok {
    font-size: 12px;
    color: #2e7d32;
    font-weight: 600;
}

[data-bs-theme="dark"] .shipping-cost-badge {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.25);
}

[data-bs-theme="dark"] .btn-xs.shipping-add-btn {
    border-color: #64b5f6;
    color: #64b5f6;
}

[data-bs-theme="dark"] .btn-xs.shipping-add-btn:hover:not(:disabled) {
    background: #1976d2;
    color: #fff;
}

[data-bs-theme="dark"] .shipping-cost-ok {
    color: #4ade80;
}

/* Dark mode */
[data-bs-theme="dark"] .success-modal-content {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .success-modal-header {
    background-color: rgba(74, 222, 128, 0.08) !important;
    border-color: rgba(74, 222, 128, 0.20) !important;
}

[data-bs-theme="dark"] .success-modal-icon {
    background: rgba(74, 222, 128, 0.14) !important;
    color: var(--success) !important;
}

[data-bs-theme="dark"] .success-modal-title {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .success-modal-subtitle {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .success-modal-body {
    background-color: var(--bg-card) !important;
}

[data-bs-theme="dark"] .success-modal-footer {
    background-color: var(--bg-card-header) !important;
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .success-modal-item {
    border-color: var(--border) !important;
}

[data-bs-theme="dark"] .success-modal-img,
[data-bs-theme="dark"] .success-modal-img-fallback {
    border-color: var(--border) !important;
    background: var(--bg-card-header) !important;
}

[data-bs-theme="dark"] .success-modal-item-id {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .success-modal-item-idc {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .success-modal-link {
    color: #93c5fd !important;
    background: rgba(96, 165, 250, 0.10) !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
}

[data-bs-theme="dark"] .success-modal-link:hover {
    background: rgba(96, 165, 250, 0.18) !important;
}

[data-bs-theme="dark"] .success-modal-no-link {
    color: var(--text-muted) !important;
}

/* ─── PARTIAL PUBLISH RESULT MODAL ──────────────────────────────────────── */
.publish-result-header-partial {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border-bottom: 1px solid #ffe082;
    padding: 1.25rem 1.5rem;
}

.publish-result-icon-partial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 160, 0, 0.15);
    color: #f57c00;
    flex-shrink: 0;
}

.publish-result-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 0 0.25rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.publish-result-section-ok {
    color: #2e7d32;
    border-top: 1px solid rgba(46, 125, 50, 0.2);
}

.publish-result-section-err {
    color: #c62828;
    border-top: 1px solid rgba(198, 40, 40, 0.2);
    margin-top: 1rem;
}

.publish-result-failed-item {
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: rgba(198, 40, 40, 0.05);
    border: 1px solid rgba(198, 40, 40, 0.15);
    margin-bottom: 0.5rem;
}

.publish-result-failed-idc {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c62828;
}

.publish-result-failed-error {
    font-size: 0.78rem;
    color: #555;
    margin-top: 0.15rem;
    word-break: break-word;
}

/* Dark overrides */
[data-bs-theme="dark"] .publish-result-header-partial {
    background: rgba(251, 191, 36, 0.08) !important;
    border-bottom-color: rgba(251, 191, 36, 0.20) !important;
}

[data-bs-theme="dark"] .publish-result-icon-partial {
    background: rgba(251, 191, 36, 0.12) !important;
    color: var(--warning) !important;
}

[data-bs-theme="dark"] .publish-result-section-ok {
    color: var(--success) !important;
    border-top-color: rgba(74, 222, 128, 0.2) !important;
}

[data-bs-theme="dark"] .publish-result-section-err {
    color: var(--danger) !important;
    border-top-color: rgba(248, 113, 113, 0.2) !important;
}

[data-bs-theme="dark"] .publish-result-failed-item {
    background: rgba(248, 113, 113, 0.07) !important;
    border-color: rgba(248, 113, 113, 0.20) !important;
}

[data-bs-theme="dark"] .publish-result-failed-idc {
    color: var(--danger) !important;
}

[data-bs-theme="dark"] .publish-result-failed-error {
    color: var(--text-muted) !important;
}
