/* =============================================================
   REPORTES — reportes.css
   Stylesheet propio del módulo Reportería (prefijo rep-), mismo
   patrón que proam.css / inventario.css. No toca masterdata.css.
   Tipografía: Inter (Google Fonts, importada en App.razor).
   ============================================================= */

.rep-page {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

    .rep-page button,
    .rep-page input,
    .rep-page select {
        font-family: inherit;
    }

/* ── Encabezado de sección ───────────────────────────────────── */
.rep-intro {
    margin-bottom: 1.75rem;
}

.rep-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.3rem 0;
    letter-spacing: -0.6px;
}

.rep-sub {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* ── Grid de cards (landing de Reportes.razor) ──────────────────── */
.rep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.25rem;
}

.rep-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: box-shadow .15s ease;
}

    .rep-card:hover {
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    }

.rep-card-header {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #3730a3;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid #e0e7ff;
    letter-spacing: -0.2px;
}

.rep-list {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
}

.rep-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    font-size: 0.86rem;
}

    .rep-item:hover {
        background: #f8fafc;
    }

.rep-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

    .rep-link:hover {
        text-decoration: underline;
    }

    .rep-link .sub-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: currentColor;
        flex-shrink: 0;
    }

.rep-link-disabled {
    color: #94a3b8;
    cursor: default;
    font-weight: 500;
}

    .rep-link-disabled:hover {
        text-decoration: none;
    }

.rep-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Card de filtros (IPRESS + Buscar) ───────────────────────────── */
.proam-filtros-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.proam-filtros {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

    .proam-filtros .md-field {
        min-width: 260px;
    }

.rep-lbl {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rep-select,
.rep-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f172a;
    background: #fff;
    transition: border-color .15s ease;
}

    .rep-select:focus,
    .rep-input:focus {
        outline: none;
        border-color: #2563eb;
    }

/* ── Botones ──────────────────────────────────────────────────────── */
.rep-btn-primary,
.rep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.65rem 1.25rem;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
}

    .rep-btn-primary svg,
    .rep-btn svg {
        width: 17px;
        height: 17px;
        flex-shrink: 0;
    }

.rep-btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

    .rep-btn-primary:hover:not(:disabled) {
        background: #1d4ed8;
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    }

.rep-btn {
    background: #fff;
    color: #334155;
    border: 1.5px solid #e2e8f0;
}

    .rep-btn:hover:not(:disabled) {
        border-color: #2563eb;
        color: #2563eb;
        background: #f5f8ff;
    }

.rep-btn-primary:disabled,
.rep-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Resultado de búsqueda + acciones de exportación ─────────────── */
.rep-resultado-card {
    margin-top: 1.1rem;
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.rep-resumen {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.rep-resumen-ipress {
    font-size: 0.86rem;
    color: #475569;
    font-weight: 700;
}

/* Tiles de exportación: icono arriba, texto abajo — reemplaza los
   botones planos que se veían genéricos */
.rep-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rep-export-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 108px;
    padding: 1rem 0.5rem;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

    .rep-export-tile svg {
        width: 22px;
        height: 22px;
        color: #2563eb;
        flex-shrink: 0;
    }

    .rep-export-tile span {
        font-size: 0.78rem;
        font-weight: 700;
        color: #334155;
        line-height: 1.15;
    }

    .rep-export-tile:hover:not(:disabled) {
        border-color: #2563eb;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
        transform: translateY(-1px);
    }

    .rep-export-tile:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    .rep-export-tile.rep-tile-active {
        border-color: #2563eb;
        background: #f5f8ff;
    }

/* ── Variantes de color por tipo — Excel=verde, PDF=rojo, Correo=azul ──── */
.rep-export-tile.rep-tile-excel svg { color: #16a34a; }
    .rep-export-tile.rep-tile-excel:hover:not(:disabled) {
        border-color: #16a34a;
        box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
    }

.rep-export-tile.rep-tile-pdf svg { color: #dc2626; }
    .rep-export-tile.rep-tile-pdf:hover:not(:disabled) {
        border-color: #dc2626;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
    }

.rep-export-tile.rep-tile-mail svg { color: #2563eb; }
    .rep-export-tile.rep-tile-mail:hover:not(:disabled) {
        border-color: #2563eb;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
    }
    .rep-export-tile.rep-tile-mail.rep-tile-active {
        border-color: #2563eb;
        background: #eff6ff;
    }

/* ── Formulario inline de envío por correo ───────────────────────── */
.rep-correo-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    max-width: 440px;
}

    .rep-correo-form .rep-input {
        flex: 1;
    }

/* ── Mensajes de estado ───────────────────────────────────────────── */
.rep-msg-ok {
    font-size: 0.8rem;
    color: #16a34a;
    font-weight: 600;
    margin-top: 0.5rem;
}

.rep-msg-err {
    font-size: 0.8rem;
    color: #dc2626;
    font-weight: 600;
    margin-top: 0.5rem;
}

.rep-muted {
    color: #94a3b8;
    font-size: 0.86rem;
}
