/* == CONDUCTOR: MIS NÚMEROS ============================= */

.mcn-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.mcn-header {
    margin-bottom: 0.25rem;
}

.mcn-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rinvic-text);
    margin: 0;
}

.mcn-subtitle {
    font-size: 0.85rem;
    color: var(--rinvic-muted);
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

.mcn-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mcn-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rinvic-text);
    cursor: pointer;
    transition: background 0.15s;
}

.mcn-btn-outline:hover {
    background: #f3f4f6;
}

.mcn-filtros {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
}

.mcn-filtro-principal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rinvic-text);
    cursor: pointer;
}

.mcn-filtro-principal i:last-child {
    color: var(--rinvic-muted);
    font-size: 0.75rem;
}

.mcn-selector-periodo {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 200;
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
}

.mcn-selector-columna {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 150px;
    border-right: 1px solid var(--rinvic-border);
    padding-right: 0.75rem;
}

.mcn-selector-opcion {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--rinvic-text);
    cursor: pointer;
}

.mcn-selector-opcion:hover {
    background: #f3f4f6;
}

.mcn-selector-opcion.mcn-selector-activa {
    background: #fef2f2;
    color: var(--rinvic-rojo);
    font-weight: 700;
}

.mcn-calendario {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 260px;
}

.mcn-calendario-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rinvic-text);
}

.mcn-calendario-flecha {
    background: none;
    border: none;
    color: var(--rinvic-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcn-calendario-flecha:hover {
    color: var(--rinvic-text);
}

.mcn-calendario-dias-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rinvic-muted);
    text-transform: lowercase;
}

.mcn-calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.mcn-calendario-dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rinvic-text);
    cursor: pointer;
    padding: 0;
}

.mcn-calendario-dia:hover:not(.mcn-dia-seleccionado) {
    background: #e5e7eb;
}

.mcn-calendario-dia.mcn-dia-fuera-mes {
    color: var(--rinvic-muted);
    background: transparent;
}

.mcn-calendario-dia.mcn-dia-seleccionado {
    background: var(--rinvic-rojo);
    color: #fff;
    font-weight: 700;
}

.mcn-calendario-dia.mcn-dia-rango {
    background: #fee2e2;
    color: var(--rinvic-rojo);
    border-radius: 0;
}

.mcn-calendario-acciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rinvic-border);
}

.mcn-calendario-limpiar {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--rinvic-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.mcn-calendario-limpiar:hover {
    color: var(--rinvic-text);
}

.mcn-calendario-aplicar {
    background: var(--rinvic-rojo);
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.mcn-calendario-aplicar:hover {
    background: var(--rinvic-rojo-hover);
}

.mcn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.mcn-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.mcn-card-link {
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.mcn-card-link:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.mcn-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mcn-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rinvic-muted);
}

.mcn-card-icon {
    font-size: 1rem;
    color: var(--rinvic-muted);
}

.mcn-card-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--rinvic-text);
}

.mcn-card-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--rinvic-muted);
}

.mcn-card-var {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.mcn-var-positiva {
    color: #16a34a;
}

.mcn-var-negativa {
    color: #dc2626;
}

.mcn-badge-roja {
    display: inline-flex;
    align-items: center;
    background: #dc2626;
    color: #fff;
    border-radius: 9999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mcn-btn-registrar {
    align-self: flex-start;
    margin-top: 0.25rem;
    background: var(--rinvic-rojo);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.mcn-btn-registrar:hover {
    background: var(--rinvic-rojo-hover);
}

@media (max-width: 576px) {
    .mcn-grid {
        grid-template-columns: 1fr;
    }

    .mcn-actions {
        flex-direction: column;
    }

    .mcn-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .mcn-selector-periodo {
        flex-direction: column;
        left: 0;
        right: 0;
        min-width: auto;
        max-width: 100%;
    }

    .mcn-selector-columna {
        border-right: none;
        border-bottom: 1px solid var(--rinvic-border);
        padding-right: 0;
        padding-bottom: 0.5rem;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mcn-selector-opcion {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .mcn-calendario {
        min-width: auto;
    }
}

/* == MODAL REPOSTAJE ==================================== */

.ngc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    padding: 1rem;
    box-sizing: border-box;
}

.ngc-modal {
    background: #faf9f7;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem 1.4rem 1.4rem;
    box-sizing: border-box;
}

.ngc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ngc-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
}

.ngc-modal-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.35;
}

.ngc-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.15rem;
    flex-shrink: 0;
}

.ngc-modal-close:hover {
    color: #1a1a1a;
}

.ngc-field {
    margin-bottom: 1rem;
}

.ngc-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.ngc-input {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f7f7f5;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    color: #1f2937;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}

.ngc-input:disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.ngc-input:focus {
    border-color: #9ca3af;
    background: #fff;
}

.ngc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ngc-input-wrapper .ngc-input {
    padding-right: 2.25rem;
}

.ngc-input-icon {
    position: absolute;
    right: 0.85rem;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
}

.ngc-textarea {
    min-height: 80px;
    resize: vertical;
}

.ngc-upload {
    width: 100%;
    border: 1.5px dashed #e5e7eb;
    border-radius: 12px;
    background: #faf9f7;
    padding: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    box-sizing: border-box;
}

.ngc-upload::file-selector-button {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    margin-right: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
}

.ngc-error {
    font-size: 0.78rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.ngc-error-global {
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.ngc-success-global {
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.ngc-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.ngc-btn-cancel {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ngc-btn-cancel:hover {
    background: #f3f4f6;
}

.ngc-btn-save {
    background: #e02020;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ngc-btn-save:hover:not(:disabled) {
    background: #c01a1a;
}

.ngc-btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .ngc-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 14px 14px 0 0;
        max-height: 85vh;
        align-self: flex-end;
    }

    .ngc-actions {
        flex-direction: column-reverse;
    }

    .ngc-actions .ngc-btn-cancel,
    .ngc-actions .ngc-btn-save {
        width: 100%;
        justify-content: center;
    }
}
