.mud-list-item-dense .mud-list-item-avatar,
.mud-list-item-dense .mud-list-item-icon {
   min-width: 36px !important;
}

/* Estilo para agrupadores en selector de Tipo de Empresa */
.mud-list-item.tipo-empresa-agrupador {
   font-weight: 600 !important;
   color: #594AE2 !important;
   background-color: rgba(89, 74, 226, 0.08) !important;
   cursor: default !important
}
.mud-list-item.tipo-empresa-agrupador:hover {
   background-color: rgba(89, 74, 226, 0.12) !important;
}

/* Secciones de formulario - Mejor contraste */

.form-section-header {
   height: 48px;
   display: flex !important;
   align-items: center !important;
   padding-top: 0 !important;
   padding-bottom: 0 !important;
   background-color: rgba(22, 109, 214, 0.06);
   border-radius: 6px 6px 0 0;
   border-bottom: 1px solid rgba(22, 109, 214, 0.25);
}

.form-section-title {
   letter-spacing: 0.2px;
   color: var(--mud-palette-primary) !important;
   line-height: 1.2;
}

.form-section-content {
   border: 1px solid var(--mud-palette-lines-default);
   border-top: none;
   border-radius: 0 0 4px 4px;
   background-color: white;
}

.form-section-header .mud-icon-root {
    color: var(--mud-palette-primary) !important;
    opacity: 0.85;
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}


/* ===== STEPPER SCROLLABLE ===== */

.stepper-container {
   position: relative;
   overflow: hidden;
   margin-bottom: 16px;
}

.stepper-scroll-wrapper {
   overflow-x: auto;
   overflow-y: hidden;
   scrollbar-width: thin;
   scrollbar-color: var(--mud-palette-primary) transparent;
   padding-bottom: 8px;
}

.stepper-scroll-wrapper::-webkit-scrollbar {
   height: 6px;
}

.stepper-scroll-wrapper::-webkit-scrollbar-track {
   background: rgba(0, 0, 0, 0.05);
   border-radius: 3px;
}

.stepper-scroll-wrapper::-webkit-scrollbar-thumb {
   background: var(--mud-palette-primary);
   border-radius: 3px;
}

/* Indicador de scroll (gradiente en los bordes) */
.stepper-container::before,
.stepper-container::after {
   content: '';
   position: absolute;
   top: 0;
   bottom: 8px;
   width: 40px;
   pointer-events: none;
   z-index: 1;
   opacity: 0;
   transition: opacity 0.3s ease;
}

.stepper-container::before {
   left: 0;
   background: linear-gradient(to right, white 0%, transparent 100%);
}

.stepper-container::after {
   right: 0;
   background: linear-gradient(to left, white 0%, transparent 100%);
}

/* Más aire cuando el stepper tiene scroll */
.stepper-container.has-scroll-left,
.stepper-container.has-scroll-right {
   margin-bottom: 20px;
}


/* Stepper base - asegurar que los pasos no se compriman */
.empresa-stepper .mud-stepper-header {
   min-width: max-content;
}

.empresa-stepper .mud-step {
   min-width: 120px;
   flex-shrink: 0;
}

/* Stepper responsivo */
@media (max-width: 1200px) {
   .empresa-stepper .mud-step-label-content-title {
       font-size: 0.8rem;
       max-width: 100px;
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
   }

   .empresa-stepper .mud-step {
       min-width: 100px;
   }
}

@media (max-width: 960px) {
   .empresa-stepper .mud-step-label-content-title {
       font-size: 0.7rem;
       max-width: 80px;
   }

   .empresa-stepper .mud-step-label-icon {
       width: 28px;
       height: 28px;
       font-size: 0.75rem;
   }

   .empresa-stepper .mud-step {
       min-width: 90px;
   }
}

@media (max-width: 600px) {
   .empresa-stepper .mud-step-label-content-title {
       display: none;
   }

   .empresa-stepper .mud-step-label-icon {
       width: 32px;
       height: 32px;
   }

   .empresa-stepper .mud-step {
       min-width: 50px;
   }
}

/* ===== DOCUMENTOS – TARJETAS ===== */

.documento-card {
   border: 1px solid var(--mud-palette-lines-default);
   border-radius: 6px;
   background-color: #fff;
   transition: all 0.2s ease;
}

.documento-card:hover {
   border-color: var(--mud-palette-primary);
}

.documento-card .mud-button-filled {
   margin-top: 4px;
   box-shadow: none;
}

.documento-cargado {
   border-left: 4px solid var(--mud-palette-success) !important;
   background-color: rgba(76, 175, 80, 0.04);
}

.documento-pendiente {
   border-left: 4px solid var(--mud-palette-warning) !important;
}



/* ===== CARD PRINCIPAL REGISTRO ===== */

.registro-card {
   border-radius: 8px;
   border: 1px solid var(--mud-palette-lines-default);
   box-shadow: none;
}

.registro-progreso {
   padding-bottom: 8px;
   border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* ===== INPUTS – ESTADOS VISUALES ===== */

.mud-input.mud-input-focused {
   background-color: rgba(22, 109, 214, 0.04);
}


/* Ajuste del título en Regimen Fiscal*/
.regimen-title {
  font-size: 0.75rem;
  line-height: 1;
}

/* ===== Margen en formularios ===== */
.mud-form {
   margin-top: 8px;
}

/* ===== Margen en contenedores que no ocupan mud-form pero están dentro del registro ===== */
.form-wrapper {
   margin-top: 8px;
}

.mud-input-root-text::placeholder {
    font-size: 0.75rem;
}

/* ===== OPENLAYERS – TOOLTIPS DE MEDICIÓN ===== */

.ol-measure-tooltip {
    position: relative;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}

.ol-measure-tooltip-static {
    background: #ffcc33;
    color: #333;
    border: 1px solid #e6b800;
    font-weight: 600;
}

.ol-measure-tooltip-static::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #e6b800 transparent transparent;
}

/* ===== OPENLAYERS – FEATURE IDENTIFY POPUP ===== */

.ol-feature-popup {
    position: relative;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    min-width: 200px;
    max-width: 320px;
    max-height: 300px;
    overflow: hidden;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.ol-feature-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.97) transparent transparent;
}

.ol-feature-popup-closer {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #999;
    line-height: 1;
    padding: 0 2px;
    z-index: 1;
    transition: color 0.15s ease;
}

.ol-feature-popup-closer:hover {
    color: #333;
}

.ol-feature-popup-content {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
}

.ol-feature-popup-layer {
    margin-bottom: 6px;
}

.ol-feature-popup-layer:last-child {
    margin-bottom: 0;
}

.ol-feature-popup-layer-title {
    font-weight: 600;
    color: #1565c0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-bottom: 3px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
}

.ol-feature-popup-table {
    width: 100%;
    border-collapse: collapse;
}

.ol-feature-popup-table tr:hover {
    background: rgba(21, 101, 192, 0.04);
}

.ol-feature-popup-key {
    color: #666;
    font-weight: 500;
    padding: 2px 8px 2px 0;
    white-space: nowrap;
    vertical-align: top;
    font-size: 11px;
}

.ol-feature-popup-val {
    color: #333;
    padding: 2px 0;
    word-break: break-word;
    font-size: 11px;
}

.ol-feature-popup-layer + .ol-feature-popup-layer {
    padding-top: 6px;
    border-top: 1px dashed #e0e0e0;
}

/* ===== OPENLAYERS – TOOLBAR DE HERRAMIENTAS ===== */

.mapa-toolbar {
    position: absolute;
    top: 80px;
    left: 9px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    padding: 4px;
    gap: 2px;
    backdrop-filter: blur(4px);
}

.mapa-toolbar .toolbar-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 4px !important;
    color: #555 !important;
    padding: 0 !important;
    transition: all 0.15s ease;
}

.mapa-toolbar .toolbar-btn .mud-icon-root {
    font-size: 1.15rem !important;
}

.mapa-toolbar .toolbar-btn:hover {
    background: #e8eaf6 !important;
    color: #1a237e !important;
}

.mapa-toolbar .toolbar-btn.tool-active {
    background: #1565c0 !important;
    color: white !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.mapa-toolbar .toolbar-btn.tool-active:hover {
    background: #1976d2 !important;
}

.mapa-toolbar .toolbar-btn.tool-cancel {
    color: #c62828 !important;
}

.mapa-toolbar .toolbar-btn.tool-cancel:hover {
    background: #ffebee !important;
    color: #b71c1c !important;
}

.mapa-toolbar .toolbar-separator {
    width: 20px;
    height: 1px;
    background: #e0e0e0;
    margin: 1px 0;
}

/* ===== VERIFICACIÓN – RESUMEN DE PROYECTO ===== */

.verificacion-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.verificacion-header {
    background: linear-gradient(135deg, rgba(22, 109, 214, 0.07) 0%, rgba(22, 109, 214, 0.02) 100%);
    border: 1px solid rgba(22, 109, 214, 0.15);
    border-radius: 8px;
    padding: 16px 20px;
}

.verificacion-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.verificacion-header-content .mud-icon-root {
    color: var(--mud-palette-primary);
}

/* Campos label/valor del Director */
.verificacion-field-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.verificacion-field {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.verificacion-field-label {
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}

.verificacion-field-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-align: right;
}

.verificacion-mono {
    font-family: 'Roboto Mono', 'Consolas', monospace;
    letter-spacing: 0.5px;
}

/* Declaratorias agrupadas */
.verificacion-declaratorias {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verificacion-declaratoria-grupo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Panel de revisión sticky */
.revision-panel-sticky {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* ExpansionPanels con estilo FormSection */
.revision-expansion .mud-expand-panel {
    border: 1px solid rgba(22, 109, 214, 0.25);
    border-radius: 6px !important;
    margin-bottom: 8px;
    overflow: hidden;
}

.revision-expansion .mud-expand-panel::before {
    display: none;
}

.revision-expansion .mud-expand-panel-header {
    background-color: rgba(22, 109, 214, 0.06);
    min-height: 48px;
    padding: 0 16px;
}

.revision-expansion .mud-expand-panel-header .mud-icon-root {
    color: var(--mud-palette-primary) !important;
    opacity: 0.85;
    font-size: 1.25rem;
}

.revision-expansion .mud-expand-panel-content {
    border-top: 1px solid rgba(22, 109, 214, 0.25);
}

/* Panel de revisión derecho */
.revision-panel {
    border: 1px solid rgba(22, 109, 214, 0.25);
    border-radius: 8px;
    overflow: hidden;
}

.revision-panel-header {
    background: linear-gradient(135deg, rgba(22, 109, 214, 0.1) 0%, rgba(22, 109, 214, 0.03) 100%);
    border-bottom: 1px solid rgba(22, 109, 214, 0.2);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mud-palette-primary);
}