/*
 * One look for every report page (resources/views/components/report/*):
 * filter bar, summary tiles, sections with readable tables, and the A4 printout.
 */

.report { padding-bottom: 1.5rem; }

/* Filter bar */
.report-filters { border-top: 3px solid #0d6efd; margin-bottom: 1rem; }
.report-filters .card-body { padding: .75rem 1rem .1rem; }
.report-filters .form-group { margin-bottom: .65rem; }
.report-filters label { font-size: .78rem; font-weight: 600; color: #475569; margin-bottom: .2rem; }
.report-presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.report-presets .btn { border-radius: 999px; padding: .15rem .7rem; font-size: .78rem; }
.report-filter-buttons .btn { margin-right: .2rem; }

/* Summary tiles */
.report-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.report-tile {
    position: relative;
    display: block;
    padding: .7rem .9rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #94a3b8;
    border-radius: .4rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    color: #1f2937;
}
a.report-tile:hover, a.report-tile:focus { color: #1f2937; text-decoration: none; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.report-tile-label { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #64748b; padding-right: 1.6rem; }
.report-tile-value { font-size: 1.35rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-tile-note { font-size: .78rem; color: #64748b; }
.report-tile-icon { position: absolute; top: .7rem; right: .8rem; font-size: 1rem; opacity: .55; }
.report-tile-primary { border-left-color: #0d6efd; }
.report-tile-primary .report-tile-icon { color: #0d6efd; }
.report-tile-success { border-left-color: #198754; }
.report-tile-success .report-tile-icon { color: #198754; }
.report-tile-info { border-left-color: #0dcaf0; }
.report-tile-info .report-tile-icon { color: #0aa2c0; }
.report-tile-warning { border-left-color: #f59e0b; }
.report-tile-warning .report-tile-icon { color: #d97706; }
.report-tile-danger { border-left-color: #dc3545; }
.report-tile-danger .report-tile-icon { color: #dc3545; }
.report-tile-danger .report-tile-value { color: #b02a37; }

/* Sections and tables */
.report-section { border-radius: .4rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); margin-bottom: 1rem; }
.report-section-head { display: flex; align-items: center; justify-content: space-between; padding: .55rem .9rem; border-bottom: 1px solid #e5e7eb; }
.report-section-title { margin: 0; font-size: 1rem; font-weight: 700; color: #1f2937; }
.report-section-title .badge { font-size: .72rem; vertical-align: middle; margin-left: .25rem; }
.report-section-warning { border-top: 3px solid #f59e0b; }
.report-section-danger { border-top: 3px solid #dc3545; }
.report-section-foot { padding: .5rem .9rem; border-top: 1px solid #e5e7eb; font-size: .85rem; background: #f8fafc; }
.report-section .report-body { padding: .75rem .9rem; }
.report-section .report-body > :last-child { margin-bottom: 0; }
.report-scroll { overflow: auto; max-height: 70vh; }

.report-table { margin: 0; font-size: .875rem; }
.report-table th, .report-table td { padding: .4rem .65rem; vertical-align: middle; border-top: 1px solid #eef2f7; }
.report-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
    color: #334155;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-top: 0;
    border-bottom: 1px solid #cbd5e1;
    white-space: nowrap;
}
.report-table tbody tr:nth-of-type(even) { background: #fafbfc; }
.report-table tbody tr:hover { background: #eef6ff; }
.report-table .text-right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table tfoot td, .report-table tfoot th {
    position: sticky;
    bottom: 0;
    background: #e2e8f0;
    font-weight: 700;
    border-top: 2px solid #94a3b8;
}
.report-table tr.report-muted td { color: #94a3b8; }
.report-table .report-empty { text-align: center; color: #64748b; padding: 1.25rem; }
.report-table .dash { color: #cbd5e1; }

/* Only on paper */
.report-print-head, .report-print-signatures { display: none; }

@media print {
    @page {
        margin: 12mm 10mm 14mm;
        @bottom-right { content: "Page " counter(page) " of " counter(pages); font-size: 8pt; color: #555; }
        @bottom-left { font-size: 8pt; color: #555; }
    }

    html, body { background: #fff !important; font-size: 10pt; }
    .main-header, .main-sidebar, .main-footer, .d-print-none, .report .btn, .report form { display: none !important; }
    .wrapper, .content-wrapper { margin: 0 !important; padding: 0 !important; min-height: 0 !important; background: #fff !important; }
    .report.container-fluid { padding: 0; }
    .report a { color: inherit !important; text-decoration: none !important; }
    .report .row { display: block; margin: 0; }
    .report .row > [class*="col-"] { max-width: 100%; flex: none; width: 100%; padding: 0; }

    .report-print-head { display: block; margin-bottom: 4mm; }
    .report-print-brand { display: flex; align-items: center; gap: 4mm; padding-bottom: 2mm; border-bottom: 2px solid #bd3029; }
    .report-print-brand img { max-height: 14mm; max-width: 35mm; }
    .report-print-college { font-size: 15pt; font-weight: 700; color: #000; }
    .report-print-contact { font-size: 8pt; color: #444; }
    .report-print-title { font-size: 12.5pt; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .06em; margin: 3mm 0 1.5mm; }
    .report-print-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1mm 6mm; font-size: 8.5pt; color: #333; }

    .report-tiles { grid-template-columns: repeat(auto-fit, minmax(30mm, 1fr)); gap: 2mm; margin-bottom: 4mm; }
    .report-tile { padding: 1.5mm 2.5mm; box-shadow: none; border: 1px solid #999; border-left-width: 3px; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-tile-icon { display: none; }
    .report-tile-label { font-size: 7pt; padding: 0; }
    .report-tile-value { font-size: 11.5pt; }
    .report-tile-note { font-size: 7.5pt; }

    .report-section { box-shadow: none; border: 0; border-radius: 0; margin-bottom: 5mm; }
    .report-section-head { padding: 0 0 1mm; border-bottom: 0; break-after: avoid; }
    .report-section-title { font-size: 10.5pt; }
    .report-section-title .badge { border: 0; padding: 0; margin: 0; font-size: inherit; font-weight: 400; background: none; color: #555; }
    .report-section-title .badge::before { content: "("; }
    .report-section-title .badge::after { content: ")"; }
    .report-section-warning, .report-section-danger { border-top: 0; }
    .report-section-foot { background: none; border: 0; padding: 1mm 0 0; font-size: 8.5pt; }
    .report-section .report-body { padding: 0; }
    .report-scroll { overflow: visible !important; max-height: none !important; }

    .report-table { font-size: 8.5pt; width: 100%; border-collapse: collapse; }
    .report-table th, .report-table td { padding: .8mm 1.5mm; line-height: 1.3; border: 1px solid #bbb !important; }
    .report-table thead { display: table-header-group; }
    .report-table thead th { position: static; background: #e9ecef !important; color: #000; font-size: 7.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-table tfoot { display: table-row-group; }
    .report-table tfoot td, .report-table tfoot th { position: static; background: #f1f1f1 !important; border-top: 1.5px solid #555 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-table tbody tr:nth-of-type(even), .report-table tbody tr:hover { background: none; }
    .report-table tr { break-inside: avoid; }
    .report-table .badge { border: 0; padding: 0; font-weight: 600; color: #000; background: none; }

    .report-print-signatures { display: flex; justify-content: space-around; gap: 10mm; margin-top: 16mm; break-inside: avoid; font-size: 9pt; }
    .report-print-signatures span { flex: 0 1 55mm; border-top: 1px solid #333; padding-top: 1mm; text-align: center; }
}
