/* Componentes comunes de las pantallas propias (paneles, campos, tablas, totales, chips…).
 * Hoja del módulo: cada módulo tiene la suya (issue #27). */

.mdo-panel {
    background: var(--mdo-superficie);
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--mdo-linea);
}

.mdo-etiqueta {
    display: block;
    font-size: 0.8125rem;
    color: var(--mdo-texto-2);
    margin-bottom: 0.25rem;
}

.mdo-sutil {
    display: block;
    font-size: 0.8125rem;
    color: var(--mdo-texto-2);
}

.mdo-sutil-fuerte {
    color: var(--mdo-texto-2);
}

.mdo-error {
    display: block;
    font-size: 0.8125rem;
    color: rgb(var(--danger-600));
}

.mdo-tecla {
    font-family: inherit;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border: 1px solid var(--mdo-campo-borde);
    border-radius: 5px;
    color: var(--mdo-texto-2);
}

.mdo-tecla-clara {
    border-color: rgba(255, 255, 255, 0.5);
    color: inherit;
    margin-inline-start: 0.5rem;
}

/* Líneas */
.mdo-tabla-scroll {
    overflow-x: auto;
}

.mdo-campo {
    height: 2.25rem;
    padding: 0 0.5rem;
    border: 1px solid var(--mdo-campo-borde);
    border-radius: 8px;
    background: transparent;
    font: inherit;
    color: inherit;
    width: 100%;
}

.mdo-campo:focus {
    outline: 2px solid var(--mdo-cian);
    outline-offset: 1px;
}

.mdo-num {
    text-align: end;
    width: 5.5rem;
    max-width: none;
}

.mdo-corto {
    width: 3.5rem;
}

/* Selector nativo: sin los iconos de fondo que Filament pone a los <select>. */
select.mdo-campo {
    width: auto;
    min-width: 5rem;
    padding-inline-end: 0.25rem;
    appearance: auto;
    background-image: none !important;
}

.mdo-vacio {
    margin: 0;
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--mdo-texto-2);
}

.mdo-desglose {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mdo-desglose > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.mdo-desglose dt {
    color: var(--mdo-texto-2);
}

.mdo-desglose dd {
    margin: 0;
}

.mdo-total {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 1rem 0;
    border-block: 1px solid var(--mdo-linea);
    color: var(--mdo-texto-2);
}

.mdo-total strong {
    font-family: var(--mdo-display);
    font-weight: 300;
    font-size: clamp(2.5rem, 4vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: rgb(var(--gray-950));
}

.dark .mdo-total strong {
    color: #ffffff;
}

/* El gesto anaglifo en la cifra que más importa. */
.mdo-anaglifo {
    text-shadow: -3px 0 rgba(229, 2, 30, 0.45), 3px 0 rgba(3, 161, 226, 0.55);
}

.mdo-nowrap {
    white-space: nowrap;
}

.mdo-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.mdo-chip--info { background: #e7f4fb; color: #01527a; }

.mdo-chip--danger { background: #fde8e7; color: #b42318; }

.mdo-chip--success { background: #e3f1e8; color: #1e6b3a; }

.mdo-chip--warning { background: #fdf1dc; color: #8a4b05; }

.mdo-chip--gray { background: #eef2f5; color: #3d4f5e; }

.dark .mdo-chip--info { background: rgba(3, 161, 226, 0.18); color: #7cd0f3; }

.dark .mdo-chip--danger { background: rgba(240, 68, 56, 0.18); color: #fda29b; }

.dark .mdo-chip--success { background: rgba(50, 160, 90, 0.18); color: #86d9a3; }

.dark .mdo-chip--warning { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }

.dark .mdo-chip--gray { background: rgba(255, 255, 255, 0.08); color: rgb(var(--gray-300)); }

.mdo-tabla {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.mdo-tabla th {
    padding: 0.75rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mdo-texto-2);
}

.mdo-tabla td {
    padding: 0.625rem 0.75rem;
    border-top: 1px solid var(--mdo-linea-suave);
}

.mdo-tabla :is(th, td):first-child { padding-inline-start: 1.25rem; }

.mdo-tabla :is(th, td):last-child { padding-inline-end: 1.25rem; }

.mdo-tabla .izq { text-align: start; }

.mdo-tabla .der { text-align: end; white-space: nowrap; }

.mdo-debe {
    color: rgb(var(--danger-600));
}

.mdo-enlace {
    color: rgb(var(--primary-600));
    font-weight: 600;
}

.mdo-enlace:hover {
    text-decoration: underline;
}

.mdo-segmentado {
    display: inline-flex;
    padding: 3px;
    border-radius: 10px;
    background: var(--mdo-linea-suave);
    box-shadow: inset 0 0 0 1px var(--mdo-linea);
}

.mdo-segmentado button {
    min-height: 2.25rem;
    padding: 0 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--mdo-texto-2);
}

.mdo-segmentado button.is-on {
    background: var(--mdo-superficie);
    color: inherit;
    box-shadow: 0 0 0 1px var(--mdo-linea), 0 1px 2px rgba(19, 33, 46, 0.08);
}

.mdo-boton-icono,
.mdo-boton-texto {
    min-height: 2.25rem;
    border-radius: 8px;
    border: 1px solid var(--mdo-campo-borde);
    background: var(--mdo-superficie);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mdo-boton-icono {
    width: 2.25rem;
}

.mdo-boton-texto {
    padding: 0 0.75rem;
    font-weight: 600;
}
