:root {
    /* Colores base mejorados para contraste */
    --text-primary: #ffffff;          /* Blanco puro para texto principal */
    --text-secondary: #d1d1d1;        /* Blanco suave para texto secundario */
    --text-muted: #a8a8a8;            /* Gris medio para metadatos */
    --gold: #D4AF37;                  /* Dorado marca */
    --gold-dark: #B89B2F;
    --dark-bg: #121212;
    --darker-bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --input-bg: #222222;
    --input-border: #444444;
    --input-focus: #D4AF37;
    --suggestions-bg: #2a2a2a;
    --suggestions-hover: #333333;
}

/* Texto global con máximo contraste */
body,
.text-light,
.text-white {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted,
.small,
.text-xs {
    color: var(--text-muted) !important;
}

/* Labels mejorados */
.form-label,
.form-check-label {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

/* Placeholders visibles */
.form-control::placeholder,
.form-select::placeholder {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* Inputs con mejor contraste */
.form-control,
.form-select {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--input-border) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--input-focus) !important;
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25) !important;
    background-color: #282828 !important;
}

/* Checkboxes mejoradas */
.form-check-input:checked {
    background-color: var(--gold) !important;
    border-color: var(--gold) !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25) !important;
}

/* Sugerencias de autocompletado - VISIBILIDAD MÁXIMA */
.sugerencias-rfc,
.sugerencias-sat,
.sugerencias-desc {
    background-color: var(--suggestions-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 8px !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.sugerencias-rfc div,
.sugerencias-sat div,
.sugerencias-desc div {
    padding: 12px 16px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #3a3a3a !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
}

.sugerencias-rfc div:hover,
.sugerencias-sat div:hover,
.sugerencias-desc div:hover {
    background-color: var(--suggestions-hover) !important;
    color: var(--gold) !important;
    transform: translateX(4px) !important;
}

.sugerencias-rfc div strong,
.sugerencias-sat div strong,
.sugerencias-desc div strong {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.sugerencias-rfc div small,
.sugerencias-sat div small,
.sugerencias-desc div small {
    color: var(--text-muted) !important;
    font-size: 0.85rem !important;
}

/* Modales con texto blanco puro */
.modal-content {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--gold) !important;
}

.modal-header,
.modal-footer {
    border-color: rgba(212, 175, 55, 0.3) !important;
}

.modal-title {
    color: var(--gold) !important;
    font-weight: 700 !important;
}

/* Badges de estado - texto blanco SIEMPRE */
.badge-status {
    color: #ffffff !important; /* Blanco puro en TODOS los badges */
    font-weight: 600 !important;
    padding: 0.45em 1em !important;
    border-radius: 20px !important;
    display: inline-block !important;
    min-width: 85px !important;
    text-align: center !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important; /* Sombra para mejor legibilidad */
}

/* Tablas oscuras con texto blanco */
.table-dark {
    --bs-table-color: var(--text-primary) !important;
    --bs-table-bg: var(--card-bg) !important;
    --bs-table-striped-bg: #1f1f1f !important;
    --bs-table-striped-color: var(--text-primary) !important;
    --bs-table-hover-bg: #252525 !important;
    --bs-table-hover-color: var(--text-primary) !important;
}

.table-dark th,
.table-dark td {
    color: var(--text-primary) !important;
    border-color: #333333 !important;
}

.table-gold th {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%) !important;
    color: #000000 !important; /* Texto negro en header dorado para máximo contraste */
    font-weight: 700 !important;
}

/* Botones con texto legible */
.btn-gold {
    color: #000000 !important; /* Texto negro en botones dorados */
    font-weight: 700 !important;
}

.btn-outline-gold {
    color: var(--gold) !important;
    border-color: var(--gold) !important;
}

.btn-outline-gold:hover {
    background-color: rgba(212, 175, 55, 0.15) !important;
    color: var(--gold) !important;
}