/* ============================================================================
   reports.css — the official-documents console (/reports).
   ----------------------------------------------------------------------------
   This project serves GLOBAL stylesheets only (_Host.cshtml links css/*.css and
   there is no MindexiaBlazor.styles.css), so a scoped .razor.css would never
   load. Keep page styles here, prefixed rpt-, built on design-tokens.css.
   ============================================================================ */

.rpt-page {
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.rpt-head h2 {
    margin: 0 0 4px;
    font-size: 20px;
    color: var(--mx-text);
}

.rpt-head p { margin: 0 0 18px; font-size: 13px; }

.rpt-card {
    background: var(--mx-surface, #fff);
    border: 1px solid var(--mx-border, #e5e7eb);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.rpt-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--mx-text);
}

/* ---- status facts -------------------------------------------------------- */

.rpt-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.rpt-facts > div {
    background: var(--mx-bg-soft, #f8fafc);
    border-radius: 8px;
    padding: 10px 12px;
}

.rpt-facts span {
    display: block;
    font-size: 11px;
    color: var(--mx-text-muted, #64748b);
    margin-bottom: 2px;
}

.rpt-facts b { font-size: 14px; color: var(--mx-text); }

.rpt-ok  { color: var(--mx-success, #16a34a); }
.rpt-bad { color: var(--mx-danger, #dc2626); }

.rpt-warn {
    background: var(--mx-warn-soft, #fef3c7);
    border: 1px solid var(--mx-warn, #f59e0b);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin: 8px 0 0;
}

.rpt-folders { width: 100%; font-size: 12px; border-collapse: collapse; }
.rpt-folders td { padding: 5px 8px; border-top: 1px solid var(--mx-border, #e5e7eb); }
.rpt-folders td:first-child { width: 70%; }
.rpt-folders code { font-size: 11px; color: var(--mx-text-muted, #64748b); }

/* ---- try a layout -------------------------------------------------------- */

.rpt-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}

.rpt-row label,
.rpt-json {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--mx-text-muted, #64748b);
}

.rpt-row label { flex: 1 1 220px; }
.rpt-row button { flex: 0 0 auto; }

.rpt-row input,
.rpt-row select,
.rpt-json textarea {
    border: 1px solid var(--mx-border, #e5e7eb);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    color: var(--mx-text);
    background: var(--mx-surface, #fff);
}

.rpt-json textarea {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    resize: vertical;
}

.rpt-preview {
    margin-top: 14px;
    border: 1px solid var(--mx-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
}

.rpt-preview iframe {
    width: 100%;
    height: 70vh;
    border: 0;
    display: block;
    background: #525659;      /* the viewer's own backdrop, so it doesn't flash white */
}

.rpt-hint { font-size: 12px; }

@media (max-width: 640px) {
    .rpt-page { padding: 12px; }
    .rpt-preview iframe { height: 60vh; }
}
