/* =============================================================================
   ITERA LEGADO - Integration Hub Styles
   ============================================================================= */

/* Container */
.itera-container {
    flex: 1;
    padding: 100px 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #B08C3E;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #ffb766;
}

.breadcrumb-separator {
    color: rgba(176, 140, 62, 0.5);
}

.breadcrumb-current {
    color: #F4ECE2;
}

/* Page Header */
.itera-header {
    margin-bottom: 32px;
}

.itera-header__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.itera-header h1 {
    font-size: 2rem;
    color: #ffb766;
    margin: 0;
    font-family: "Palatino Linotype", "Garamond", serif;
}

.itera-header p {
    color: #F4ECE2;
    opacity: 0.7;
    font-size: 1rem;
    margin: 0;
}

.version-badge {
    background: rgba(176, 140, 62, 0.2);
    color: #B08C3E;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* =============================================================================
   TABS
   ============================================================================= */

.tabs-container {
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    gap: 4px;
    background: rgba(15, 42, 34, 0.8);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(176, 140, 62, 0.2);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #F4ECE2;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.tab:hover {
    opacity: 1;
    background: rgba(176, 140, 62, 0.1);
}

.tab.active {
    background: rgba(176, 140, 62, 0.2);
    color: #ffb766;
    opacity: 1;
}

.tab svg {
    stroke: currentColor;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* =============================================================================
   METRICS GRID
   ============================================================================= */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #0F2A22;
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(176, 140, 62, 0.5);
    transform: translateY(-2px);
}

.metric-card h3 {
    color: #B08C3E;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.metric-card .value {
    color: #ffb766;
    font-size: 2rem;
    font-weight: 600;
    font-family: "Palatino Linotype", "Garamond", serif;
}

.metric-card .value.success {
    color: #22c55e;
}

.metric-card .value.warning {
    color: #f59e0b;
}

.metric-card .value.error {
    color: #ef4444;
}

.metric-card .subtitle {
    color: #F4ECE2;
    opacity: 0.6;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* =============================================================================
   ACTIONS BAR
   ============================================================================= */

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.actions-bar .btn-primary,
.actions-bar .btn-secondary {
    flex-shrink: 0;
    flex-grow: 0;
    width: auto;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    background: #0F2A22;
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 8px;
    color: #F4ECE2;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: #B08C3E;
}

.filter-select option {
    background: #0F2A22;
    color: #F4ECE2;
}

/* =============================================================================
   BUTTONS - Consistentes con styles.css
   ============================================================================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: var(--font-family-serif, Georgia, serif);
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--cobre, #B08C3E) 0%, var(--cobre-oscuro, #8A6A29) 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--cobre-electrico, #ffb766) 0%, var(--cobre, #B08C3E) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 140, 62, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.btn-primary.btn-large {
    padding: 12px 24px;
    font-size: 0.95rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: var(--font-family-serif, Georgia, serif);
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--cobre, #B08C3E);
    border-radius: 6px;
    color: var(--cobre, #B08C3E);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(176, 140, 62, 0.1);
    border-color: var(--cobre-electrico, #ffb766);
    color: var(--cobre-electrico, #ffb766);
}

.btn-secondary:active:not(:disabled) {
    transform: scale(0.98);
}

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

.btn-icon {
    padding: 10px;
    background: transparent;
    border: 2px solid rgba(176, 140, 62, 0.4);
    border-radius: 6px;
    color: var(--marfil, #F4ECE2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    border-color: var(--cobre, #B08C3E);
    color: var(--cobre-electrico, #ffb766);
    background: rgba(176, 140, 62, 0.1);
}

.btn-icon.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* =============================================================================
   CONTROL SECTION (Tables)
   ============================================================================= */

.control-section {
    background: #0F2A22;
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.control-section h2 {
    color: #ffb766;
    font-size: 1.2rem;
    font-family: "Palatino Linotype", "Garamond", serif;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.2);
}

.table-responsive {
    overflow-x: auto;
}

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

.integrations-table th,
.integrations-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(176, 140, 62, 0.15);
}

.integrations-table th {
    color: #B08C3E;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.integrations-table td {
    color: #F4ECE2;
    font-size: 0.9rem;
}

.integrations-table tr:hover td {
    background: rgba(176, 140, 62, 0.05);
}

.integrations-table .museum-name {
    font-weight: 500;
    color: #ffb766;
}

.integrations-table .museum-code {
    font-size: 0.75rem;
    color: #B08C3E;
    opacity: 0.8;
}

.integrations-table .actions {
    display: flex;
    gap: 8px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-testing {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-draft {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.status-paused {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Method Badges */
.method-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(176, 140, 62, 0.15);
    color: #B08C3E;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: #B08C3E;
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(176, 140, 62, 0.3);
    border-top-color: #B08C3E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-row td {
    padding: 0 !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    color: #B08C3E;
    opacity: 0.5;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #ffb766;
    font-size: 1.2rem;
    margin: 0 0 8px 0;
}

.empty-state p {
    color: #F4ECE2;
    opacity: 0.7;
    margin: 0 0 24px 0;
}

/* =============================================================================
   METHODS TAB
   ============================================================================= */

.methods-intro {
    text-align: center;
    margin-bottom: 32px;
}

.methods-intro h2 {
    color: #ffb766;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    font-family: "Palatino Linotype", "Garamond", serif;
}

.methods-intro p {
    color: #F4ECE2;
    opacity: 0.7;
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.method-card {
    background: #0F2A22;
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.method-card:hover {
    border-color: #B08C3E;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.method-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.method-card__icon {
    width: 48px;
    height: 48px;
    background: rgba(176, 140, 62, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B08C3E;
}

.method-card__title {
    color: #ffb766;
    font-size: 1.1rem;
    margin: 0;
    font-family: "Palatino Linotype", "Garamond", serif;
}

.method-card__description {
    color: #F4ECE2;
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.method-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.method-card__features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F4ECE2;
    opacity: 0.7;
    font-size: 0.85rem;
    padding: 4px 0;
}

.method-card__features li svg {
    color: #22c55e;
    flex-shrink: 0;
}

/* =============================================================================
   WIZARD
   ============================================================================= */

.wizard-container {
    background: #0F2A22;
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 12px;
    padding: 24px;
}

/* Wizard Steps */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.wizard-steps::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: rgba(176, 140, 62, 0.2);
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #0F2A22;
    border: 2px solid rgba(176, 140, 62, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B08C3E;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-step.active .step-number {
    background: #B08C3E;
    border-color: #B08C3E;
    color: white;
}

.wizard-step.completed .step-number {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.step-label {
    color: #F4ECE2;
    opacity: 0.5;
    font-size: 0.75rem;
    text-align: center;
}

.wizard-step.active .step-label {
    opacity: 1;
    color: #ffb766;
}

.wizard-step.completed .step-label {
    opacity: 0.8;
}

/* Wizard Panels */
.wizard-content {
    min-height: 400px;
}

.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Asegurar que todos los botones del wizard no se estiren */
.wizard-panel .btn-primary,
.wizard-panel .btn-secondary,
.wizard-panel .btn-outline {
    width: auto;
    flex-shrink: 0;
    flex-grow: 0;
}

.wizard-panel h2 {
    color: #ffb766;
    font-size: 1.3rem;
    margin: 0 0 8px 0;
    font-family: "Palatino Linotype", "Garamond", serif;
}

.wizard-description {
    color: #F4ECE2;
    opacity: 0.7;
    margin: 0 0 24px 0;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(176, 140, 62, 0.2);
    margin-top: 24px;
}

.wizard-nav .btn-primary,
.wizard-nav .btn-secondary,
.wizard-nav .btn-outline {
    flex-shrink: 0;
    flex-grow: 0;
    width: auto;
}

/* =============================================================================
   WIZARD FORMS
   ============================================================================= */

.wizard-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #B08C3E;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 42, 34, 0.8);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 8px;
    color: #F4ECE2;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #B08C3E;
    box-shadow: 0 0 0 3px rgba(176, 140, 62, 0.1);
}

.form-group input::placeholder {
    color: #F4ECE2;
    opacity: 0.4;
}

.form-hint {
    display: block;
    color: #F4ECE2;
    opacity: 0.5;
    font-size: 0.8rem;
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Method Selector */
.method-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.method-option {
    background: rgba(15, 42, 34, 0.8);
    border: 2px solid rgba(176, 140, 62, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.method-option:hover {
    border-color: rgba(176, 140, 62, 0.5);
}

.method-option.selected {
    border-color: #B08C3E;
    background: rgba(176, 140, 62, 0.1);
}

.method-option__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #B08C3E;
}

.method-option__name {
    color: #ffb766;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.method-option__desc {
    color: #F4ECE2;
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Connection Test */
.connection-test {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}

.connection-test .btn-primary {
    width: auto;
}

.test-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.1rem;
    color: #F4ECE2;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon.pending {
    background: rgba(176, 140, 62, 0.2);
    color: #B08C3E;
}

.status-icon.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.test-details {
    margin-top: 24px;
    text-align: left;
}

.test-details h4 {
    color: #B08C3E;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}

.test-details pre {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    color: #F4ECE2;
    font-size: 0.8rem;
    overflow-x: auto;
    max-height: 300px;
}

/* Prueba de ingesta */
.dry-run-config {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px;
    background: rgba(176, 140, 62, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(176, 140, 62, 0.15);
}

.dry-run-config .form-group {
    margin: 0;
    text-align: center;
}

.dry-run-config .form-group label {
    display: block;
    margin-bottom: 8px;
}

.dry-run-config .form-group select {
    min-width: 180px;
}

.dry-run-config .btn-primary,
.dry-run-config .btn-secondary {
    width: auto;
    min-width: 200px;
    padding: 12px 32px;
    font-size: 1rem;
}

.dry-run-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dry-run-stat {
    background: rgba(176, 140, 62, 0.1);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.dry-run-stat__value {
    color: #ffb766;
    font-size: 1.5rem;
    font-weight: 600;
}

.dry-run-stat__label {
    color: #F4ECE2;
    opacity: 0.7;
    font-size: 0.8rem;
}

.samples-preview {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.samples-preview pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.75rem;
    color: #F4ECE2;
}

/* Sample Tabs */
.samples-tabs-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.2);
}

.sample-tab {
    padding: 6px 12px;
    background: rgba(176, 140, 62, 0.1);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 4px;
    color: #F4ECE2;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sample-tab:hover {
    background: rgba(176, 140, 62, 0.2);
}

.sample-tab.active {
    background: rgba(176, 140, 62, 0.3);
    border-color: #B08C3E;
    color: #ffb766;
}

.sample-content {
    display: none;
}

.sample-content.active {
    display: block;
}

/* Sample Card */
.sample-card {
    background: rgba(15, 42, 34, 0.5);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.sample-image {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.sample-title {
    color: #ffb766;
    font-size: 1rem;
    margin: 0 0 12px 0;
}

.sample-json summary {
    color: #B08C3E;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 8px 0;
}

.sample-json summary:hover {
    color: #ffb766;
}

.sample-json[open] pre {
    margin-top: 8px;
}

.no-samples {
    color: #F4ECE2;
    opacity: 0.6;
    text-align: center;
    padding: 24px;
}

/* Fields Explorer */
.fields-explorer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.field-item {
    background: rgba(176, 140, 62, 0.1);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.field-item__name {
    color: #ffb766;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.field-item__type {
    color: #B08C3E;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.field-item__coverage {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.coverage-bar {
    flex: 1;
    height: 4px;
    background: rgba(176, 140, 62, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.coverage-fill {
    height: 100%;
    background: #22c55e;
    transition: width 0.3s ease;
}

.coverage-value {
    color: #F4ECE2;
    opacity: 0.7;
    font-size: 0.75rem;
    min-width: 36px;
    text-align: right;
}

/* =============================================================================
   MAPPING EDITOR
   ============================================================================= */

.mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.mapping-header__text h2 {
    margin-bottom: 8px;
}

.mapping-header .btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.required-marker {
    color: #e67e22;
    font-weight: bold;
}

.mapping-editor {
    background: rgba(15, 42, 34, 0.6);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.mapping-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mapping-grid__header {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(176, 140, 62, 0.15);
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #B08C3E;
}

.mapping-grid__col-arrow {
    text-align: center;
}

.mapping-row {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(15, 42, 34, 0.4);
    border-bottom: 1px solid rgba(176, 140, 62, 0.1);
    align-items: center;
    transition: background 0.2s ease;
}

.mapping-row:hover {
    background: rgba(176, 140, 62, 0.1);
}

.mapping-row:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.mapping-row--required {
    background: rgba(176, 140, 62, 0.08);
}

.mapping-row__source {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mapping-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 6px;
    color: #F4ECE2;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mapping-select:hover {
    border-color: #B08C3E;
}

.mapping-select:focus {
    outline: none;
    border-color: #B08C3E;
    box-shadow: 0 0 0 2px rgba(176, 140, 62, 0.2);
}

.mapping-select option {
    background: #0F2A22;
    color: #F4ECE2;
    padding: 8px;
}

.mapping-sample {
    font-size: 0.75rem;
    color: #8aa89e;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

.mapping-row__arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(176, 140, 62, 0.3);
    transition: color 0.2s ease;
}

.mapping-row__arrow--active {
    color: #22c55e;
}

.mapping-row__target {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mapping-target-name {
    font-weight: 500;
    color: #F4ECE2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mapping-target-desc {
    font-size: 0.75rem;
    color: #8aa89e;
}

.mapping-stats {
    background: rgba(15, 42, 34, 0.6);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
}

.mapping-stats__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.mapping-stats__row:not(:last-child) {
    border-bottom: 1px solid rgba(176, 140, 62, 0.1);
}

.mapping-stats__label {
    color: #8aa89e;
    font-size: 0.9rem;
}

.mapping-stats__value {
    font-weight: 500;
    color: #F4ECE2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mapping-stats__value small {
    font-weight: 400;
    color: #8aa89e;
    font-size: 0.8rem;
}

.mapping-stats__row--ok .mapping-stats__value {
    color: #22c55e;
}

.mapping-stats__row--warning .mapping-stats__value {
    color: #e67e22;
}

.mapping-stats__row--info .mapping-stats__value {
    color: #8aa89e;
}

/* =============================================================================
   MAPPING EDITOR ENHANCED
   ============================================================================= */

.mapping-intro {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(176, 140, 62, 0.08);
    border-radius: 8px;
    border-left: 3px solid #B08C3E;
}

.mapping-intro p {
    margin: 0;
    color: #F4ECE2;
    font-size: 0.9rem;
}

.mapping-intro__hint {
    margin-top: 8px !important;
    color: #8aa89e !important;
    font-size: 0.85rem !important;
}

.mapping-grid--enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 16px;
}

.mapping-card {
    background: rgba(15, 42, 34, 0.4);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
}

.mapping-card:hover {
    border-color: rgba(176, 140, 62, 0.4);
    background: rgba(15, 42, 34, 0.6);
}

.mapping-card--required {
    border-left: 3px solid #e67e22;
}

.mapping-card--mapped {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.mapping-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mapping-card__title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #F4ECE2;
    font-size: 1rem;
}

.mapping-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot--ok {
    background: #22c55e;
}

.status-dot--empty {
    background: rgba(138, 168, 158, 0.5);
}

.status-text {
    color: #8aa89e;
}

.mapping-card__desc {
    color: #8aa89e;
    font-size: 0.85rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.mapping-card__examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.examples-label {
    font-size: 0.75rem;
    color: #8aa89e;
    font-weight: 500;
}

.mapping-card__examples code {
    font-size: 0.75rem;
    color: #B08C3E;
    background: rgba(176, 140, 62, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.mapping-card__impact {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #8aa89e;
    margin-bottom: 14px;
    padding: 6px 0;
    border-top: 1px solid rgba(176, 140, 62, 0.1);
}

.mapping-card__impact svg {
    color: #B08C3E;
    flex-shrink: 0;
}

.mapping-card__config {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.mapping-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mapping-type-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #8aa89e;
    cursor: pointer;
    padding: 6px 10px;
    background: rgba(15, 42, 34, 0.4);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.mapping-type-option:hover {
    border-color: rgba(176, 140, 62, 0.3);
    color: #F4ECE2;
}

.mapping-type-option input[type="radio"] {
    accent-color: #B08C3E;
}

.mapping-type-option:has(input:checked) {
    background: rgba(176, 140, 62, 0.15);
    border-color: #B08C3E;
    color: #F4ECE2;
}

.mapping-value-config {
    min-height: 40px;
}

.mapping-sample-preview {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 6px;
    border-left: 2px solid #22c55e;
}

.sample-label {
    font-size: 0.75rem;
    color: #8aa89e;
    margin-right: 8px;
}

.sample-value {
    font-size: 0.85rem;
    color: #F4ECE2;
    font-style: italic;
}

.default-value-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-default-value {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 6px;
    color: #F4ECE2;
    font-size: 0.9rem;
}

.input-default-value:focus {
    outline: none;
    border-color: #B08C3E;
    box-shadow: 0 0 0 2px rgba(176, 140, 62, 0.2);
}

.btn-suggestion {
    padding: 6px 12px;
    background: rgba(176, 140, 62, 0.15);
    border: 1px dashed rgba(176, 140, 62, 0.4);
    border-radius: 6px;
    color: #B08C3E;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.btn-suggestion:hover {
    background: rgba(176, 140, 62, 0.25);
    border-color: #B08C3E;
}

.default-value-hint {
    font-size: 0.75rem;
    color: #8aa89e;
    margin: 4px 0 0 0;
    font-style: italic;
}

.empty-value-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 6px;
    border-left: 2px solid #e67e22;
}

.empty-value-notice svg {
    color: #e67e22;
    flex-shrink: 0;
    margin-top: 2px;
}

.empty-value-notice span {
    font-size: 0.85rem;
    color: #8aa89e;
    line-height: 1.4;
}

.empty-value-notice strong {
    color: #e67e22;
}

/* =============================================================================
   MAPPING EDITOR V2 - Layout con acordeones
   ============================================================================= */

/* Layout principal: dos columnas */
.mapping-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    min-height: 500px;
}

/* Panel izquierdo: Campos del museo origen */
.mapping-source-panel {
    background: rgba(15, 42, 34, 0.6);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.mapping-source-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.15);
}

.mapping-source-panel__header h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #B08C3E;
    font-weight: 600;
}

.mapping-source-panel__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-count {
    font-size: 0.75rem;
    color: #8aa89e;
    background: rgba(0, 0, 0, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
}

/* Boton re-analizar campos */
.btn-reanalyze {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(176, 140, 62, 0.15);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 6px;
    color: #B08C3E;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reanalyze:hover {
    background: rgba(176, 140, 62, 0.25);
    border-color: #B08C3E;
    color: #ffb766;
}

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

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

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

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

.mapping-source-panel__search {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.1);
}

.mapping-source-panel__search input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 6px;
    color: #F4ECE2;
    font-size: 0.85rem;
}

.mapping-source-panel__search input:focus {
    outline: none;
    border-color: #B08C3E;
}

.mapping-source-panel__search input::placeholder {
    color: #8aa89e;
}

.mapping-source-panel__list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.source-field-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: default;
    transition: background 0.15s ease;
    margin-bottom: 2px;
}

.source-field-item:hover {
    background: rgba(176, 140, 62, 0.1);
}

.source-field-name {
    font-size: 0.85rem;
    color: #F4ECE2;
    font-family: 'Consolas', 'Monaco', monospace;
    word-break: break-all;
}

.source-field-type {
    font-size: 0.7rem;
    color: #8aa89e;
    text-transform: uppercase;
}

.source-field-sample {
    font-size: 0.75rem;
    color: #B08C3E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

/* Panel derecho: Campos destino */
.mapping-target-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Categorias de campos (acordeones) */
.mapping-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mapping-category {
    background: rgba(15, 42, 34, 0.5);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 10px;
    /* Sin overflow:hidden para permitir dropdowns */
}

.mapping-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

.mapping-category__header:hover {
    background: rgba(176, 140, 62, 0.08);
}

.mapping-category__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #F4ECE2;
    font-size: 0.95rem;
}

.category-chevron {
    transition: transform 0.2s ease;
    color: #B08C3E;
}

.mapping-category--open .category-chevron {
    transform: rotate(180deg);
}

.required-badge {
    font-size: 0.7rem;
    background: rgba(230, 126, 34, 0.2);
    color: #e67e22;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.mapping-category__stats {
    font-size: 0.85rem;
    font-weight: 500;
}

.stats-complete {
    color: #22c55e;
}

.stats-partial {
    color: #e67e22;
}

.stats-empty {
    color: #8aa89e;
}

.mapping-category__content {
    display: none;
    border-top: 1px solid rgba(176, 140, 62, 0.1);
}

.mapping-category--open .mapping-category__content {
    display: block;
}

/* Filas de mapeo dentro de las categorias - anula el grid de 3 columnas */
.mapping-category__content .mapping-row {
    display: block;  /* Anula display:grid del .mapping-row global */
    border-bottom: 1px solid rgba(176, 140, 62, 0.08);
    padding: 0;  /* Anula padding del global */
}

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

.mapping-row--required {
    background: rgba(230, 126, 34, 0.03);
}

.mapping-row--mapped {
    background: rgba(34, 197, 94, 0.03);
}

.mapping-row__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mapping-row__header:hover {
    background: rgba(176, 140, 62, 0.06);
}

.mapping-row__name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.mapping-row__name strong {
    color: #F4ECE2;
    font-size: 0.9rem;
}

.mapping-row__desc-short {
    color: #8aa89e;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapping-row__status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge--ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge--empty {
    background: rgba(138, 168, 158, 0.15);
    color: #8aa89e;
}

.row-chevron {
    transition: transform 0.2s ease;
    color: #8aa89e;
}

.mapping-row--expanded .row-chevron {
    transform: rotate(180deg);
}

/* Detalles desplegables de la fila - sin padding propio, cada seccion tiene el suyo */
.mapping-row__details {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(176, 140, 62, 0.1);
    overflow: visible;  /* Permitir dropdowns */
}

/* ============================================
   DESPLEGABLE DE CAMPO - Layout 100% vertical
   ============================================ */
.mapping-row--expanded .mapping-row__details {
    display: block;
}

/* Cada seccion ocupa el ancho completo */
.detail-section {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.15);
}

.detail-section:last-child {
    border-bottom: none;
}

/* 1. HEADER - Nombre del campo */
.detail-section--header {
    background: rgba(176, 140, 62, 0.1);
}

.detail-field-name {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: #B08C3E;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
}

.detail-field-desc {
    margin: 0;
    color: #F4ECE2;
    font-size: 0.95rem;
    line-height: 1.4;
}

.badge-required {
    display: inline-block;
    background: rgba(230, 126, 34, 0.25);
    color: #e67e22;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 10px;
}

/* 2. EJEMPLOS */
.detail-label {
    display: block;
    font-size: 0.75rem;
    color: #8aa89e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 12px;
}

.detail-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-examples code {
    font-size: 0.85rem;
    color: #B08C3E;
    background: rgba(176, 140, 62, 0.15);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.detail-impact {
    margin: 0;
    color: #8aa89e;
    font-size: 0.9rem;
    line-height: 1.5;
}

.detail-impact strong {
    color: #B08C3E;
}

/* 3. CONFIGURACION */
.detail-section--config {
    background: rgba(15, 42, 34, 0.25);
    overflow: visible;  /* Permitir que dropdowns se muestren fuera */
    position: relative;
    z-index: 10;
}

/* Tabs de tipo de mapeo */
.mapping-type-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

.mapping-type-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #8aa89e;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mapping-type-tab:hover {
    color: #F4ECE2;
    background: rgba(176, 140, 62, 0.1);
}

.mapping-type-tab.active {
    background: #B08C3E;
    color: #0F2A22;
    font-weight: 500;
}

/* ============================================
   SELECTOR DE CAMPOS PERSONALIZADO
   ============================================ */
.field-selector {
    position: relative;
}

.field-selector__trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-selector__trigger:hover {
    border-color: #B08C3E;
}

.field-selector--open .field-selector__trigger {
    border-color: #B08C3E;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.field-selector__selected {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.field-selector__name {
    color: #F4ECE2;
    font-size: 0.9rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.field-selector__desc {
    color: #8aa89e;
    font-size: 0.75rem;
}

.field-selector__placeholder {
    color: #8aa89e;
    font-size: 0.9rem;
}

.field-selector__chevron {
    color: #8aa89e;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.field-selector--open .field-selector__chevron {
    transform: rotate(180deg);
}

.field-selector__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a1f18;
    border: 1px solid #B08C3E;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 1000;  /* Alto para estar sobre todo */
    max-height: 300px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.field-selector--open .field-selector__dropdown {
    display: block;
}

.field-selector__search {
    padding: 8px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.2);
}

.field-selector__search input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 4px;
    color: #F4ECE2;
    font-size: 0.85rem;
}

.field-selector__search input::placeholder {
    color: #8aa89e;
}

.field-selector__search input:focus {
    outline: none;
    border-color: #B08C3E;
}

.field-selector__options {
    max-height: 240px;
    overflow-y: auto;
}

.field-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(176, 140, 62, 0.1);
    transition: background 0.15s ease;
}

.field-option:last-child {
    border-bottom: none;
}

.field-option:hover {
    background: rgba(176, 140, 62, 0.1);
}

.field-option--selected {
    background: rgba(176, 140, 62, 0.15);
    border-left: 3px solid #B08C3E;
}

.field-option--empty {
    color: #8aa89e;
    font-style: italic;
}

.field-option__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.field-option__name {
    color: #F4ECE2;
    font-size: 0.9rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.field-option__type {
    color: #8aa89e;
    font-size: 0.7rem;
    text-transform: uppercase;
    background: rgba(138, 168, 158, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
}

.field-option__desc {
    color: #B08C3E;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.field-option__sample {
    color: #8aa89e;
    font-size: 0.75rem;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badges de compatibilidad */
.field-option__badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-option__compat,
.field-selector__compat {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.field-option__compat--high,
.field-selector__compat--high {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.field-option__compat--medium,
.field-selector__compat--medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.field-option__compat--low,
.field-selector__compat--low {
    background: rgba(138, 168, 158, 0.15);
    color: #8aa89e;
}

/* Destacar campos con alta compatibilidad */
.field-option--has-compat {
    border-left: 2px solid transparent;
}

.field-option--has-compat[data-compat^="1"],
.field-option--has-compat[data-compat^="9"],
.field-option--has-compat[data-compat^="8"] {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.field-option--has-compat[data-compat^="7"],
.field-option--has-compat[data-compat^="6"],
.field-option--has-compat[data-compat^="5"] {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.03);
}

/* Compat en el trigger */
.field-selector__compat {
    margin-left: auto;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .mapping-layout {
        grid-template-columns: 1fr;
    }

    .mapping-source-panel {
        max-height: 300px;
    }

    .mapping-row__desc-short {
        display: none;
    }

    .mapping-row__info {
        flex-direction: column;
        gap: 16px;
    }

    .mapping-row__info-section {
        min-width: auto;
    }
}

@media (max-width: 600px) {
    .mapping-type-tabs {
        flex-direction: column;
    }

    .mapping-row__name {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .mapping-row__detail-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .mapping-row__detail-header h4 {
        font-size: 0.9rem;
    }

    .mapping-row__info,
    .mapping-row__config {
        padding: 12px;
    }

    .mapping-category__header {
        padding: 12px 14px;
    }

    .mapping-row__header {
        padding: 10px 14px;
    }
}

/* Mantener estilos antiguos de mapping-card para compatibilidad */

/* Example Modal */
.example-object {
    max-height: 70vh;
    overflow-y: auto;
}

.example-intro {
    margin-bottom: 20px;
    color: #8aa89e;
    font-size: 0.9rem;
    line-height: 1.6;
}

.example-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.example-field {
    background: rgba(15, 42, 34, 0.6);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 8px;
    padding: 14px 16px;
}

.example-field__label {
    font-weight: 500;
    color: #B08C3E;
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.example-field__value {
    color: #F4ECE2;
    font-size: 0.95rem;
    margin-bottom: 4px;
    word-break: break-word;
}

.example-field__desc {
    color: #8aa89e;
    font-size: 0.75rem;
    font-style: italic;
}

/* =============================================================================
   VALIDATION
   ============================================================================= */

.validation-summary {
    background: rgba(176, 140, 62, 0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.validation-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(176, 140, 62, 0.15);
}

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

.validation-label {
    color: #B08C3E;
    font-size: 0.9rem;
}

.validation-value {
    color: #F4ECE2;
    font-weight: 500;
}

.validation-checks {
    display: grid;
    gap: 12px;
}

.validation-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(15, 42, 34, 0.8);
    border-radius: 8px;
}

.validation-check.passed {
    border-left: 3px solid #22c55e;
}

.validation-check.failed {
    border-left: 3px solid #ef4444;
}

.validation-check svg {
    flex-shrink: 0;
}

.validation-check.passed svg {
    color: #22c55e;
}

.validation-check.failed svg {
    color: #ef4444;
}

.validation-check span {
    color: #F4ECE2;
}

/* =============================================================================
   ACTIVATION OPTIONS
   ============================================================================= */

.activation-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.activation-option {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(15, 42, 34, 0.8);
    border: 2px solid rgba(176, 140, 62, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activation-option:hover {
    border-color: rgba(176, 140, 62, 0.4);
}

.activation-option:has(input:checked) {
    border-color: #B08C3E;
    background: rgba(176, 140, 62, 0.1);
}

.activation-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #B08C3E;
    margin-top: 2px;
}

.activation-option label {
    cursor: pointer;
}

.activation-option h4 {
    color: #ffb766;
    font-size: 1rem;
    margin: 0 0 4px 0;
}

.activation-option p {
    color: #F4ECE2;
    opacity: 0.7;
    font-size: 0.85rem;
    margin: 0;
}

/* =============================================================================
   MODAL
   ============================================================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: #0F2A22;
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content.modal-large {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(176, 140, 62, 0.2);
}

.modal-header h2 {
    color: #ffb766;
    font-size: 1.2rem;
    margin: 0;
    font-family: "Palatino Linotype", "Garamond", serif;
}

.modal-close {
    background: transparent;
    border: none;
    color: #F4ECE2;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    background: rgba(176, 140, 62, 0.05);
    border-bottom: 1px solid rgba(176, 140, 62, 0.2);
}

.modal-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #F4ECE2;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
}

.modal-tab:hover {
    opacity: 0.8;
    background: rgba(176, 140, 62, 0.1);
}

.modal-tab.active {
    background: rgba(176, 140, 62, 0.2);
    color: #ffb766;
    opacity: 1;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-tab-content {
    display: none;
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(176, 140, 62, 0.2);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .itera-container {
        padding: 80px 16px 40px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

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

    .actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-bar .btn-primary,
    .actions-bar .btn-secondary {
        width: fit-content;
        align-self: flex-start;
    }

    .wizard-nav .btn-primary,
    .wizard-nav .btn-secondary,
    .wizard-nav .btn-outline {
        width: fit-content;
    }

    .filter-group {
        flex-direction: column;
    }

    .wizard-steps {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .wizard-step {
        min-width: 60px;
    }

    .step-label {
        display: none;
    }

    .mapping-header {
        flex-direction: column;
        gap: 12px;
    }

    .mapping-grid__header,
    .mapping-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .mapping-row__arrow {
        display: none;
    }

    .mapping-row__target {
        padding-left: 12px;
        border-left: 2px solid rgba(176, 140, 62, 0.3);
    }

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

    .dry-run-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================================================
   DROPDOWN ITEM ACTIVE
   ============================================================================= */

.dropdown-item-active {
    background: rgba(176, 140, 62, 0.1) !important;
    border-left: 2px solid #B08C3E;
}

/* =============================================================================
   INCOMPLETE STATUS INDICATOR
   ============================================================================= */

.status-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-incomplete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px dashed rgba(245, 158, 11, 0.4);
}

.status-incomplete svg {
    flex-shrink: 0;
}

.row-incomplete {
    background: rgba(245, 158, 11, 0.03);
}

.row-incomplete:hover td {
    background: rgba(245, 158, 11, 0.06) !important;
}

/* =============================================================================
   FILTERS CONFIG (Wizard Step 4)
   ============================================================================= */

.filters-config {
    max-width: 800px;
}

.filters-config .btn-primary,
.filters-config .btn-secondary {
    width: auto;
}

.discovered-filters {
    margin-top: 24px;
}

.discovered-filters h4,
.active-filters h4 {
    color: #B08C3E;
    font-size: 0.9rem;
    margin: 0 0 16px 0;
    font-weight: 500;
}

.filters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.filter-field-item {
    background: rgba(176, 140, 62, 0.08);
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s ease;
}

.filter-field-item:hover {
    border-color: rgba(176, 140, 62, 0.4);
    background: rgba(176, 140, 62, 0.12);
}

.filter-field-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.filter-field-name {
    color: #ffb766;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-field-type {
    background: rgba(176, 140, 62, 0.2);
    color: #B08C3E;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
}

.filter-field-desc {
    color: #F4ECE2;
    opacity: 0.7;
    font-size: 0.8rem;
    margin: 0 0 8px 0;
}

.filter-field-samples {
    color: #F4ECE2;
    opacity: 0.5;
    font-size: 0.75rem;
    margin-bottom: 12px;
}

.filter-field-samples code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-add-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(176, 140, 62, 0.15);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 6px;
    color: #B08C3E;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-filter:hover {
    background: rgba(176, 140, 62, 0.25);
    border-color: #B08C3E;
    color: #ffb766;
}

.active-filters {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(176, 140, 62, 0.15);
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.no-filters {
    color: #F4ECE2;
    opacity: 0.5;
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
}

.active-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 6px 8px 6px 14px;
}

.filter-badge {
    color: #F4ECE2;
    font-size: 0.85rem;
}

.filter-badge strong {
    color: #22c55e;
}

.active-filter-item .btn-icon {
    padding: 4px;
    border: none;
    background: transparent;
    color: #F4ECE2;
    opacity: 0.6;
}

.active-filter-item .btn-icon:hover {
    opacity: 1;
    color: #ef4444;
    background: transparent;
}

.filter-query-preview {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.filter-query-preview h4 {
    color: #B08C3E;
    font-size: 0.8rem;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-query-preview code {
    display: block;
    color: #22c55e;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

/* =============================================================================
   SAVE DRAFT BUTTON
   ============================================================================= */

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-family-serif, Georgia, serif);
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(176, 140, 62, 0.4);
    border-radius: 6px;
    color: #B08C3E;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(176, 140, 62, 0.1);
    border-color: #B08C3E;
    color: #ffb766;
}

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

/* =============================================================================
   Debug Log Panel (Collapsible)
   ============================================================================= */

.debug-log-panel {
    margin-top: 16px;
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.debug-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(176, 140, 62, 0.1);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.debug-log-header:hover {
    background: rgba(176, 140, 62, 0.15);
}

.debug-log-header__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.7);
}

.debug-log-header__title svg {
    opacity: 0.6;
}

.debug-log-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.debug-log-panel.open .debug-log-header__toggle {
    transform: rotate(180deg);
}

.debug-log-content {
    display: none;
    padding: 12px 16px;
    max-height: 400px;
    overflow-y: auto;
}

.debug-log-panel.open .debug-log-content {
    display: block;
}

.debug-log-content pre {
    margin: 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    color: #a8d4a0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.debug-log-content pre .log-error {
    color: #ff6b6b;
}

.debug-log-content pre .log-warning {
    color: #ffc107;
}

.debug-log-content pre .log-info {
    color: #64b5f6;
}

.debug-log-content pre .log-success {
    color: #81c784;
}

.debug-log-section {
    margin-bottom: 12px;
}

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

.debug-log-section__title {
    font-size: 0.75rem;
    color: rgba(244, 236, 226, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Scrollbar styling for debug log */
.debug-log-content::-webkit-scrollbar {
    width: 6px;
}

.debug-log-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.debug-log-content::-webkit-scrollbar-thumb {
    background: rgba(176, 140, 62, 0.3);
    border-radius: 3px;
}

.debug-log-content::-webkit-scrollbar-thumb:hover {
    background: rgba(176, 140, 62, 0.5);
}

/* =============================================================================
   Samples Viewer (Dropdown + Pagination)
   ============================================================================= */

.samples-viewer {
    margin-top: 20px;
}

.samples-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(176, 140, 62, 0.1);
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-bottom: none;
}

.samples-viewer__selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.samples-viewer__selector label {
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.7);
    white-space: nowrap;
}

.samples-viewer__selector select {
    flex: 1;
    max-width: 400px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 6px;
    color: #F4ECE2;
    font-size: 0.9rem;
    cursor: pointer;
}

.samples-viewer__selector select:focus {
    outline: none;
    border-color: #B08C3E;
}

.samples-viewer__pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.samples-viewer__counter {
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.7);
    min-width: 60px;
    text-align: center;
}

.samples-viewer__content {
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 0 0 8px 8px;
    background: rgba(0, 0, 0, 0.15);
}

/* Sample Card */
.sample-card {
    padding: 20px;
}

.sample-card__main {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.sample-card__image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.sample-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sample-card__info {
    flex: 1;
    min-width: 0;
}

.sample-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #F4ECE2;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.sample-card__artist {
    font-size: 0.95rem;
    color: #B08C3E;
    margin: 0 0 4px 0;
}

.sample-card__date {
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.6);
    margin: 0 0 12px 0;
}

.sample-card__desc {
    font-size: 0.9rem;
    color: rgba(244, 236, 226, 0.8);
    margin: 0;
    line-height: 1.5;
}

.sample-card__json {
    margin-top: 12px;
    border-top: 1px solid rgba(176, 140, 62, 0.15);
    padding-top: 12px;
}

.sample-card__json summary {
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.5);
    cursor: pointer;
    padding: 8px 0;
}

.sample-card__json summary:hover {
    color: #B08C3E;
}

.sample-card__json pre {
    margin: 12px 0 0 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: #a8d4a0;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

/* Error state for sample cards */
.sample-card--error {
    border-color: #d35400;
    background: rgba(211, 84, 0, 0.1);
}

.sample-card__error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(211, 84, 0, 0.2);
    border-bottom: 1px solid rgba(211, 84, 0, 0.4);
    border-radius: 6px 6px 0 0;
    margin: -14px -14px 14px -14px;
}

.sample-card__error-icon {
    font-size: 1.1rem;
    color: #e67e22;
}

.sample-card__error-text {
    font-size: 0.85rem;
    color: #e67e22;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .samples-viewer__header {
        flex-direction: column;
        align-items: stretch;
    }

    .samples-viewer__selector {
        flex-direction: column;
        align-items: stretch;
    }

    .samples-viewer__selector select {
        max-width: none;
    }

    .samples-viewer__pagination {
        justify-content: center;
    }

    .sample-card__main {
        flex-direction: column;
    }

    .sample-card__image {
        width: 100%;
        height: 250px;
    }
}

/* =============================================================================
   ARCHIVO PARQUET - Estilos para el tab de archivos
   ============================================================================= */

/* Navegacion del archivo */
.archive-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--verde-profundo, #0F2A22);
    border-radius: 8px;
    border: 1px solid rgba(176, 140, 62, 0.2);
}

.archive-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.archive-breadcrumb .breadcrumb-item {
    color: rgba(244, 236, 226, 0.6);
    cursor: pointer;
    transition: color 0.2s;
}

.archive-breadcrumb .breadcrumb-item:hover {
    color: var(--cobre-electrico, #ffb766);
}

.archive-breadcrumb .breadcrumb-item.active {
    color: var(--marfil, #F4ECE2);
    font-weight: 500;
}

.archive-breadcrumb .breadcrumb-separator {
    color: rgba(244, 236, 226, 0.4);
}

/* Filtros del archivo */
.archive-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.archive-filters label {
    font-size: 0.9rem;
    color: rgba(244, 236, 226, 0.8);
}

/* Tabla de archivos */
.archive-table .file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-table .file-icon {
    color: var(--cobre, #B08C3E);
    flex-shrink: 0;
}

.archive-table .file-name {
    font-family: monospace;
    font-size: 0.85rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge de provider */
.provider-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.provider-badge.provider-met {
    background: rgba(176, 140, 62, 0.15);
    color: var(--cobre-electrico, #ffb766);
}

.provider-badge.provider-louvre {
    background: rgba(39, 174, 96, 0.15);
    color: var(--verde-exito, #27ae60);
}

/* Botones de accion */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--verde-profundo, #0F2A22);
    color: rgba(244, 236, 226, 0.7);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--cobre, #B08C3E);
    color: var(--verde-oscuro, #091A14);
}

.btn-icon.btn-inspect:hover {
    background: var(--cobre, #B08C3E);
}

.btn-icon.btn-download:hover {
    background: var(--verde-exito, #27ae60);
    color: white;
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

/* Modal de inspeccion de Parquet */
#modal-parquet-inspect .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.parquet-info {
    margin-bottom: 1.5rem;
}

.parquet-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--verde-profundo, #0F2A22);
    border-radius: 8px;
}

.parquet-meta span {
    font-size: 0.9rem;
}

.parquet-meta strong {
    color: rgba(244, 236, 226, 0.6);
}

.parquet-columns h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(244, 236, 226, 0.8);
}

.columns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.column-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--verde-profundo, #0F2A22);
    border: 1px solid rgba(176, 140, 62, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    color: rgba(244, 236, 226, 0.8);
}

.parquet-sample {
    margin-top: 1.5rem;
}

.parquet-sample h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(244, 236, 226, 0.8);
}

.sample-table-container {
    overflow-x: auto;
    border: 1px solid rgba(176, 140, 62, 0.2);
    border-radius: 8px;
}

.sample-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sample-table th,
.sample-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(176, 140, 62, 0.15);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sample-table th {
    background: var(--verde-profundo, #0F2A22);
    font-weight: 600;
    color: var(--cobre, #B08C3E);
    font-size: 0.8rem;
    text-transform: uppercase;
}

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

.sample-table .null-value {
    color: rgba(244, 236, 226, 0.4);
    font-style: italic;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(176, 140, 62, 0.2);
    background: var(--verde-profundo, #0F2A22);
}

.error-cell {
    color: var(--rojo-error, #e74c3c);
    text-align: center;
    padding: 2rem !important;
}

.loading-text {
    color: rgba(244, 236, 226, 0.5);
    font-style: italic;
}

.error-text {
    color: var(--rojo-error, #e74c3c);
}

/* =============================================================================
   MONITOR TAB - System Monitoring Styles
   ============================================================================= */

/* Section Layout */
.monitor-section {
    background: var(--verde-profundo, #0F2A22);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(176, 140, 62, 0.15);
}

.monitor-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--marfil, #F4ECE2);
    margin: 0 0 1.25rem 0;
}

.monitor-section-title svg {
    color: var(--cobre, #B08C3E);
}

.monitor-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(244, 236, 226, 0.5);
    margin-left: auto;
}

/* System Metrics Grid */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

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

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

/* Monitor Card */
.monitor-card {
    background: var(--verde-oscuro, #091A14);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(176, 140, 62, 0.1);
}

.monitor-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.monitor-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(244, 236, 226, 0.7);
}

.monitor-card-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(244, 236, 226, 0.4);
    background: rgba(176, 140, 62, 0.15);
    border-radius: 50%;
    cursor: help;
}

/* Gauge Styles */
.monitor-gauge {
    position: relative;
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
}

.gauge-svg {
    width: 100%;
    height: auto;
}

.gauge-fill {
    transition: stroke-dasharray 0.5s ease;
}

.gauge-value {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--marfil, #F4ECE2);
}

.gauge-detail {
    font-size: 0.8rem;
    color: rgba(244, 236, 226, 0.5);
    margin-top: 0.5rem;
}

/* Gauge Colors */
.gauge-fill.gauge-ok {
    stroke: #4a7c6f;
}

.gauge-fill.gauge-warning {
    stroke: #f39c12;
}

.gauge-fill.gauge-danger {
    stroke: #e74c3c;
}

/* Stat Card */
.monitor-stat .monitor-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cobre, #B08C3E);
    margin-top: 1rem;
}

/* Containers Table */
.containers-table-wrapper {
    overflow-x: auto;
}

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

.containers-table th,
.containers-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(176, 140, 62, 0.1);
}

.containers-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(244, 236, 226, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--verde-oscuro, #091A14);
}

.containers-table td {
    font-size: 0.9rem;
    color: var(--marfil, #F4ECE2);
}

.containers-table tbody tr:hover {
    background: rgba(176, 140, 62, 0.05);
}

.container-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.container-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4a7c6f;
}

.container-status.warning {
    background: #f39c12;
}

.container-status.danger {
    background: #e74c3c;
}

/* MongoDB Grid */
.mongodb-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .mongodb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.mongodb-stat {
    background: var(--verde-oscuro, #091A14);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(176, 140, 62, 0.1);
}

.mongodb-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(244, 236, 226, 0.5);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mongodb-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--marfil, #F4ECE2);
}

/* Network Stats */
.network-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.network-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--verde-oscuro, #091A14);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(176, 140, 62, 0.1);
}

.network-stat svg {
    color: var(--cobre, #B08C3E);
}

.network-label {
    color: rgba(244, 236, 226, 0.6);
    font-size: 0.9rem;
}

.network-value {
    color: var(--marfil, #F4ECE2);
    font-weight: 600;
    font-size: 1rem;
}

/* Monitor Controls */
.monitor-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(176, 140, 62, 0.1);
}

.monitor-last-update {
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.5);
}

.monitor-last-update span {
    color: rgba(244, 236, 226, 0.7);
}

.auto-refresh-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(244, 236, 226, 0.6);
    cursor: pointer;
    margin-left: auto;
}

.auto-refresh-label input[type="checkbox"] {
    accent-color: var(--cobre, #B08C3E);
    width: 16px;
    height: 16px;
}
