:root {
    --bg-main: #f4f7fa;
    --primary: #002A63;
    /* Mantendo o azul marinho original solicitado */
    --primary-dark: #001a3d;
    --primary-light: #e7effb;
    --secondary: #0f172a;
    /* Navy muito escuro para secundário profissional */
    --accent: #3b82f6;
    /* Azul moderado para destaques técnicos */
    --text-dark: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-lg: 12px;
    /* Reduzi um pouco para ficar mais sóbrio */
    --radius-md: 8px;

    /* Marketplace Colors - Deixando mais sóbrias */
    --color-netshoes: #8200FF;
    --color-dafiti: #000000;
    --color-meli: #FFE600;
    --color-amazon: #FF6200;
    --color-leroy-merlin: #72BF44;
}

/* Lucide Icon Standard Styling */
.lucide {
    stroke-width: 2px;
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header & Layout --- */

/* --- HEADER REDESIGN --- */
.app-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.header-left .brand {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.header-left h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.status-group {
    display: flex;
    gap: 0.4rem;
}

.icon-link {
    color: var(--text-muted);
    transition: color 0.2s;
}

.icon-link:hover {
    color: var(--primary);
}

.seller-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Central Search Spotlight */
.header-center {
    display: flex;
    justify-content: center;
}

.search-trigger {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    width: 320px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-trigger:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-trigger kbd {
    margin-left: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
}

/* Right Actions Group */
.header-right {
    display: flex;
    justify-content: flex-end;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: var(--primary);
}

.icon-btn.danger:hover {
    background: #fff1f2;
    color: #ef4444;
    border-color: #ef4444;
}

.batch-trigger {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.batch-trigger:hover {
    background: #f0f9ff;
    border-color: var(--primary);
}

.batch-trigger .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 4px;
}

.btn-save {
    padding: 0.6rem 1.25rem !important;
    font-weight: 600 !important;
    gap: 8px !important;
}

.more-actions {
    position: relative;
}

.dropdown-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 240px;
    padding: 0.5rem;
    display: none;
    z-index: 2000;
    animation: slideUp 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- Modal Base Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-card {
    background: var(--white);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.loading-spinner {
    padding: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.16rem;
    text-decoration: none;
}

.app-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.seller-badge {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.seller-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.8;
}

/* --- Buttons (Premium Design) --- */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: #fff;
    color: #ef4444;
    border: 1px solid #fee2e2;
    box-shadow: none;
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.hidden {
    display: none !important;
}

.btn-link {
    text-decoration: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.btn-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* --- Forms & Inputs --- */

.custom-select,
.custom-input {
    appearance: none;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 320px;
}

.custom-select:hover,
.custom-input:hover {
    border-color: #cbd5e1;
}

.custom-select:focus,
.custom-input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

textarea.custom-input {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    padding: 1rem;
    font-family: inherit;
    width: 100%;
}

/* --- Progress Bar --- */

.sticky-progress {
    position: sticky;
    top: 73px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    z-index: 900;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.progress-info span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-dark);
}

.progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Main Content --- */

.app-main {
    padding: 2rem 0;
}

.category-info-card {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

/* --- Per-Color SKU Base Styles --- */
.sku-color-group {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.color-group-header {
    background: #fcfdfe;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Alinha pela base dos textos */
    gap: 2rem;
}

.color-group-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    /* Ajuste fino para alinhar com o input */
}

.color-base-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 300px;
}

.label-xs {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.07em;
}

.color-base-input {
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    height: auto !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.color-base-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-light) !important;
    background: white !important;
}

.sku-items-container {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    background: white;
}

.cat-details small {
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.cat-details h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 800;
}

.search-input {
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    width: 280px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    width: 350px;
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-header {
    margin: 3rem 0 1.5rem 0;
}

.section-header h3 {
    font-weight: 800;
    color: var(--text-dark);
}

.header-with-search {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .header-with-search {
        flex-direction: column;
        align-items: flex-start;
    }
}

.section-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Basic Info Grid --- */
.basic-info-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.basic-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-main);
}

.basic-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--primary-dark);
}

.section-icon {
    font-size: 1rem;
}

.section-title-sm {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.basic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.basic-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.2rem;
    /* Garante que os inputs comecem na mesma linha */
}

.basic-group .label-sm {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    line-height: 1.2;
}

.char-counter {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    background: var(--bg-main);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.basic-input {
    width: 100% !important;
    max-width: none !important;
}

.mandatory-badge {
    display: inline-block;
    color: #ef4444;
    margin-left: 2px;
    vertical-align: top;
    font-weight: 900;
    font-size: .8rem;
    line-height: 1;
}

.mandatory-badge::after {
    content: '*';
}

/* --- Mandatory Field Highlighting --- */
.mandatory-missing {
    border-color: #f87171 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.mandatory-missing+.label-container .mandatory-badge,
.mandatory-missing:focus {
    animation: error-pulse 0.5s ease-in-out 2;
}

.error-pulse {
    animation: error-pulse 0.5s ease-in-out 3;
}

@keyframes error-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
        border-color: #ef4444;
    }
}

.mandatory-missing+.label-container .mandatory-badge,
.label-container:has(+ .mandatory-missing) .mandatory-badge {
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {

    0%,
    100% {
        color: #ef4444;
        transform: scale(1);
    }

    50% {
        color: #b91c1c;
        transform: scale(1.4);
    }
}

@media (max-width: 1400px) {
    .basic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .basic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .basic-group[style*="grid-column: span"] {
        grid-column: span 2 !important;
    }
}

@media (max-width: 480px) {
    .basic-grid {
        grid-template-columns: 1fr;
    }

    .basic-group[style*="grid-column: span"] {
        grid-column: span 1 !important;
    }
}

.char-counter {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-main);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* --- Didactic Grid & Cards --- */

.didactic-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.attr-row {
    display: grid;
    grid-template-columns: 380px 1fr;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.attr-row:hover {
    transform: scale(1.005);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.input-panel {
    padding: 2rem;
    background: #fcfdfe;
    border-right: 1px solid var(--border);
}

.input-panel h3 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    font-weight: 700;
}

.output-panel {
    padding: 2.5rem;
    background: var(--white);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.m-preview-card {
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    padding-top: 1.75rem;
    background: #fff;
    transition: all 0.2s ease;
}

.m-preview-card:hover {
    border-color: var(--border);
    background: #fcfdfe;
}

.m-preview-card.empty {
    border: 1px dashed var(--border);
    background: #f8fafc;
    opacity: 0.6;
}

.m-preview-card.empty .preview-translation {
    background: #f1f5f9;
    color: #94a3b8;
}

.m-tag {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 4px;
    text-transform: uppercase;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.m-tag.netshoes {
    background: var(--color-netshoes);
    color: white;
}

.m-tag.dafiti {
    background: var(--color-dafiti);
    color: white;
}

.m-tag.mercado-livre {
    background: var(--color-meli);
    color: #000;
}

.m-tag.amazon {
    background: var(--color-amazon);
    color: white;
}

.m-tag.leroy-merlin {
    background: var(--color-leroy-merlin);
    color: white;
}

.m-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.preview-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
}

.preview-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-translation {
    margin-top: 0.75rem;
    background: var(--primary-light);
    padding: 0.4rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 700;
    text-align: center;
}

.m-override-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    padding: 0.4rem;
    border-radius: 8px;
    outline: none;
    transition: background 0.2s;
}

.m-override-input:hover,
.m-override-input:focus {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 0 0 1px var(--primary-light);
}

.m-override-input::placeholder {
    font-weight: 400;
    color: #94a3b8;
    font-style: italic;
}

.null-preview {
    color: #cbd5e1;
    font-style: italic;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem 0;
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .attr-row {
        grid-template-columns: 1fr;
    }

    .input-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .custom-select,
    .custom-input {
        width: 100%;
    }
}

/* --- Variation Grade Styles --- */

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.full-width {
    width: 100% !important;
}

.grade-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grade-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.variation-selection-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.variation-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.placeholder-text {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2rem 0;
}


/* --- Custom Checkbox/Tag Style --- */
.variation-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.variation-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.opt-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0.4rem 0.2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s ease;
    text-align: center;
}


.opt-label code {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: inherit;
    font-weight: 400;
}

.variation-option:hover .opt-label {
    border-color: var(--primary-light);
    background: #fcfdfe;
}

.variation-option input:checked+.opt-label {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.variation-option input:checked+.opt-label code {
    color: var(--primary-dark);
    opacity: 0.8;
}

@media (max-width: 768px) {

    .grade-selectors,
    .variation-selection-container {
        grid-template-columns: 1fr;
    }
}

.sub-grade-group {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sub-grade-group:first-child {
    margin-top: 0;
}

.sub-grade-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-grade-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sub-grade-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

#sizes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: hidden;
}

#colors-container {
    display: none;
}

/* --- Color Dropdown & Pills --- */
.variation-search-container {
    position: relative;
    margin-bottom: 0.75rem;
}

.dropdown-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

.dropdown-results.hidden {
    display: none;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item.selected {
    background: #f0f9ff;
    color: var(--primary-dark);
    font-weight: 700;
}

.dropdown-item.selected::after {
    content: '✓';
    color: var(--primary);
    font-weight: 900;
}

.selected-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 20px;
    margin-top: 0.5rem;
}

.color-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.color-pill .remove-btn {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    color: #94a3b8;
    line-height: 1;
}

.color-pill .remove-btn:hover {
    color: #ef4444;
}

/* Quando houver sub-grades, o grupo ocupa a linha toda */
.sub-grade-group {
    grid-column: 1 / -1;
}

/* Image Upload Styles */
#all-upload-zones-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Variation SKU Grid */
.sku-mapping-card {
    padding: 1.5rem !important;
    background: #f8fafc !important;
    border: none !important;
    box-shadow: none !important;
}

.sku-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}


.color-group-title::before {
    content: '🎨';
    font-size: 1.1rem;
}

.sku-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sku-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.85rem;
    background: #fcfdfe;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sku-item:hover {
    border-color: var(--primary-light);
    background: var(--white);
    transform: translateX(4px);
}

.sku-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.sku-item-header span {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.sku-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.field-group label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.sku-input,
.ean-variation-input {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.625rem !important;
    background: #fff !important;
}

.sku-inputs-row {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .sku-inputs-row {
        flex-direction: column;
    }
}

#dynamic-upload-zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.image-upload-card {
    margin-bottom: 0;
}

.card-title-sm {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background-color: #f0f9ff;
}

.upload-message .upload-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.2rem;
}

.upload-message p {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.upload-message small {
    color: var(--text-light);
}

.hidden-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: grab;
}

.image-preview-item:active {
    cursor: grabbing;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-preview-item .remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-preview-item .remove-image-btn:hover {
    background: #dc2626;
}

.image-preview-item .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* =====================================================
   SLIM & FIT — Overrides para uso prolongado
   Torna a tela de cadastro mais densa e confortável.
   Não altera lógica, apenas espaçamento e tipografia.
   ===================================================== */

/* --- Layout geral --- */
.app-main {
    padding: 0.75rem 0;
}

.section-header {
    margin: 1.25rem 0 0.625rem 0;
}

.section-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- Category info card --- */
.category-info-card {
    padding: 0.625rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 10px;
}

.cat-details h2 {
    font-size: 1.05rem;
}

/* --- Informações Básicas --- */
.basic-grid {
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.basic-group {
    gap: 0.2rem;
}

.custom-select,
.custom-input {
    padding: 0.45rem 0.875rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border-width: 1.5px;
}

/* --- Botões --- */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* --- Card base --- */
.card {
    padding: 1rem 1.25rem;
    border-radius: 10px;
}

/* --- Grade de variações --- */
.grade-grid {
    gap: 0.875rem;
}

.grade-selectors {
    gap: 0.875rem;
}

.variation-selection-container {
    gap: 1rem;
    padding-top: 0.75rem;
}

.variation-column {
    gap: 0.4rem;
}

.options-container {
    max-height: 200px;
    padding: 0.625rem;
    gap: 0.3rem;
    border-radius: 8px;
}

.opt-label {
    min-height: 32px;
    padding: 0.25rem 0.15rem;
    font-size: 0.72rem;
    border-radius: 5px;
}

.opt-label code {
    font-size: 0.62rem;
}

.placeholder-text {
    padding: 1rem 0;
    font-size: 0.75rem;
}

/* Sub-grade */
.sub-grade-group {
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    border-radius: 8px;
}

.sub-grade-title {
    font-size: 0.7rem;
    margin-bottom: 0.625rem;
}

.sub-grade-inner {
    gap: 0.3rem;
}

/* --- SKU grid --- */
.sku-mapping-card {
    padding: 0.875rem !important;
}

.sku-grid {
    gap: 0.875rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}


.sku-item:hover {
    transform: translateX(2px);
}

.sku-input {
    padding: 0.35rem 0.625rem !important;
    font-size: 0.75rem !important;
}

/* --- Upload zones --- */
#all-upload-zones-container {
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.card-title-sm {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
}

.secondary-uploader {
    background: #f8fafc !important;
    border: 1px dashed var(--border) !important;
    box-shadow: none !important;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.secondary-uploader:hover {
    opacity: 1;
}

.secondary-uploader .card-title-sm {
    color: var(--text-muted);
}

.upload-zone {
    padding: 0.625rem;
    border-radius: 6px;
}

.upload-message .upload-icon {
    font-size: 1.1rem;
}

.upload-message p {
    font-size: 0.78rem;
}

.upload-message small {
    font-size: 0.68rem;
}

.image-preview-grid {
    gap: 0.35rem;
    margin-top: 0.625rem;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
}

/* --- Atributos Mapeados (didatic-grid) --- */
.didactic-grid {
    gap: 0.625rem;
}

.attr-row {
    grid-template-columns: 280px 1fr;
    border-radius: 10px;
}

.attr-row:hover {
    transform: scale(1.002);
}

.input-panel {
    padding: 0.875rem 1rem;
}

.input-panel h3 {
    font-size: 0.85rem;
    margin-bottom: 0.625rem;
    font-weight: 700;
}

.output-panel {
    padding: 0.875rem 1rem;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.m-preview-card {
    padding: 0.5rem 0.625rem;
    padding-top: 1.4rem;
    border-radius: 8px;
}

.m-tag {
    font-size: 0.55rem;
    padding: 3px;
    border-radius: 8px 8px 0 0;
}

.preview-label {
    font-size: 0.6rem;
}

.preview-val {
    font-size: 0.78rem;
}

.preview-translation {
    margin-top: 0.4rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.72rem;
    border-radius: 5px;
}

/* --- Pills de cores e search --- */
.search-input {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    width: 220px;
}

.search-input:focus {
    width: 280px;
}

.color-pill {
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
    gap: 0.3rem;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* --- Progress bar --- */
.sticky-progress {
    padding: 0.4rem 0;
    top: 46px;
}

.progress-info span {
    font-size: 0.68rem;
}

.progress-track {
    height: 4px;
}

/* --- Header --- */
.logo h1 {
    font-size: 1.1rem;
}

/* --- Variation SKU section header --- */
#variation-skus-section .section-header {
    margin-top: 0.75rem;
}

/* --- Scrollbars slim --- */
.options-container::-webkit-scrollbar {
    width: 4px;
}

.options-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.didactic-grid::-webkit-scrollbar,
#attributes-grid::-webkit-scrollbar {
    width: 4px;
}

/* --- Empty state --- */
.empty-state {
    padding: 3rem 1.5rem;
}

.empty-icon-wrapper {
    width: 100px;
    height: 100px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.empty-state h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.6;
}

/* --- Wizard de Categorias --- */
.wizard-breadcrumb {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.wizard-breadcrumb span {
    cursor: pointer;
    transition: color 0.2s;
}

.wizard-breadcrumb span:hover {
    color: var(--primary);
}

.wizard-breadcrumb span.active {
    color: var(--primary-dark);
}

.wizard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 400px;
}

.wizard-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--primary-light);
}

.wizard-card .wizard-icon {
    font-size: 2rem;
}

.wizard-card span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    background: #fcfcfc;
    border-radius: 0 0 15px 15px;
}

/* --- Tooltips and Info Icons --- */
.label-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: help;
    transition: all 0.2s ease;
    opacity: 0.4;
}

.info-tooltip:hover {
    color: var(--primary);
    opacity: 0.9;
}

.info-tooltip i {
    width: 11px;
    height: 11px;
}

/* --- Batch Item Editing State --- */
.batch-thumb.editing {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
    transform: scale(1.1);
}

.batch-thumb.editing::after {
    content: '✏️';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Batch Manager View --- */
.batch-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.batch-manager-header .bm-title-group h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.batch-manager-header .bm-title-group h3 .bm-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    color: white;
}

.batch-manager-header .bm-title-group p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0.3rem 0 0 0;
}

.batch-manager-header .bm-count-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4338ca;
    border-radius: 20px;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
}

.batch-manager-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0;
}

/* --- Batch Item Card (Premium Redesign) --- */
.batch-item-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.batch-item-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.batch-item-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366f1, #a78bfa);
    border-radius: 14px 0 0 14px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.batch-item-card:hover::before {
    opacity: 1;
}

.batch-item-index {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    background: #f8fafc;
    border-right: 1px solid #f1f5f9;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.batch-item-card:hover .batch-item-index {
    background: #eef2ff;
    color: #6366f1;
}

.batch-item-body {
    flex: 1;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: 0;
}

.batch-item-main-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.batch-item-info h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-item-sku {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.03em;
}

.batch-item-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.batch-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    line-height: 1.4;
}

.batch-meta-tag.tag-rows {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.batch-meta-tag.tag-category {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0 1.25rem 0 0;
    flex-shrink: 0;
}

.batch-item-actions .batch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.batch-btn.btn-edit {
    background: #f8fafc;
    color: #334155;
    border-color: #e2e8f0;
}

.batch-btn.btn-edit:hover {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.batch-btn.btn-clone {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

.batch-btn.btn-clone:hover {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.batch-btn.btn-remove {
    background: transparent;
    color: #94a3b8;
    border-color: transparent;
    padding: 0.45rem;
}

.batch-btn.btn-remove:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* --- Batch Empty State --- */
.batch-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #fafafe 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    text-align: center;
}

.batch-empty-state .empty-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.batch-empty-state .empty-icon-wrapper i {
    color: #6366f1;
}

.batch-empty-state h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 0.4rem 0;
}

.batch-empty-state p {
    font-size: 0.82rem;
    color: #94a3b8;
    max-width: 360px;
    line-height: 1.5;
}

/* --- Batch Manager Footer --- */
.batch-manager-footer-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.15rem 1.75rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 14px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    bottom: 1.5rem;
}

.batch-manager-footer-actions .btn-text-danger {
    font-size: 0.78rem;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.batch-manager-footer-actions .btn-text-danger:hover {
    color: #ef4444;
    background: #fef2f2;
}

.batch-manager-footer-actions .btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem !important;
    font-size: 0.82rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.batch-manager-footer-actions .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
}

/* --- Batch Card Animation --- */
@keyframes batchCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.batch-item-card {
    animation: batchCardIn 0.3s ease forwards;
}

/* =================================== */
/* --- Ticket Management --- */
.mini-icon-btn:hover {
    opacity: 1 !important;
    background: rgba(146, 64, 14, 0.1) !important;
    border-radius: 4px;
}

.tickets-management-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.ticket-row:hover {
    border-color: var(--accent);
    background: var(--primary-light);
}

.ticket-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ticket-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

.ticket-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ticket-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-count-badge {
    background: var(--border);
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ticket-open-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.ticket-delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.ticket-delete-btn:hover {
    opacity: 1;
}

/* --- AI Comparison Modal Styles --- */
.ai-comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comparison-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.comparison-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.comparison-item {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    position: relative;
    background: #fcfdfe;
}

.comparison-item.suggestion {
    background: #f0f7ff;
    border-color: #bfdbfe;
}

.badge-status {
    position: absolute;
    top: -10px;
    right: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: uppercase;
}

.current .badge-status {
    background: #e2e8f0;
    color: #475569;
}

.suggestion .badge-status {
    background: #3b82f6;
    color: white;
}

.comparison-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

.comparison-text.highlight {
    font-weight: 500;
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .comparison-split {
        grid-template-columns: 1fr;
    }
}

/* --- AI Skeleton Loading Effect --- */
@keyframes skeleton-shimmer {
    0% {
        background-position: -150% 0;
    }

    100% {
        background-position: 150% 0;
    }
}

.skeleton-loading {
    background-color: #e2e8f0 !important;
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%) !important;
    background-size: 200% 100% !important;
    background-repeat: no-repeat !important;
    animation: skeleton-shimmer 1.5s infinite linear !important;
    color: transparent !important;
    border-color: #cbd5e1 !important;
    pointer-events: none !important;
    user-select: none !important;
}




.skeleton-loading::placeholder {
    color: transparent !important;
}


/* --- Premium Toast System --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 3000;
}

.toast {
    min-width: 320px;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 5px solid #cbd5e1;
    animation: toastIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: all 0.2s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.removing {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

.toast-close {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Success Toast */
.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

/* Error Toast */
.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

/* Warning Toast */
.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

/* Info Toast */
.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* --- AI Attribute List in Revision Modal --- */
.ai-attr-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ai-attr-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.6rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.72rem;
}

.ai-attr-pill .attr-name {
    font-weight: 700;
    color: var(--text-muted);
}

.ai-attr-pill .attr-val {
    font-weight: 600;
    color: var(--text-dark);
}

.highlight .ai-attr-pill {
    border-color: #bfdbfe;
}

.highlight .ai-attr-pill .attr-val {
    color: var(--primary);
}

/* --- AI Filled Highlight Effect --- */
@keyframes ai-pulse-highlight {
    0% {
        background-color: #dcfce7;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        background-color: #f0fdf4;
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.ai-filled-highlight {
    animation: ai-pulse-highlight 2s ease-out;
}