/* =====================================================================
   Sistem Absensi — Typography Cleanup v1.4.18
   Scope: seluruh UI aplikasi. Tidak mengubah layout, data, permission,
   endpoint, atau business rule.
   ===================================================================== */

:root {
    --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --type-page-title: 24px;
    --type-section-title: 18px;
    --type-subtitle: 15px;
    --type-body: 14px;
    --type-table: 14px;
    --type-table-head: 13px;
    --type-label: 13px;
    --type-helper: 12.5px;
    --type-status: 12.5px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea,
table {
    font-family: var(--font-body) !important;
}

body {
    font-size: var(--type-body) !important;
    line-height: 1.45;
    font-weight: 400 !important;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.brand,
[class*="title"] {
    font-family: var(--font-display) !important;
}

h1 { font-size: var(--type-page-title); line-height: 1.2; font-weight: 700; }
h2 { font-size: var(--type-section-title); line-height: 1.28; font-weight: 700; }
h3 { font-size: var(--type-subtitle); line-height: 1.32; font-weight: 650; }
h4, h5, h6 { font-weight: 650; }

p, li, dd, dt { line-height: 1.5; }
small { font-size: var(--type-helper) !important; line-height: 1.4; }

label,
.field label {
    font-size: var(--type-label) !important;
    line-height: 1.35;
    font-weight: 600 !important;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    font-size: 14px !important;
    line-height: 1.4;
    font-weight: 400 !important;
}

.btn,
.btn-outline,
.la-btn,
.rk17-btn,
.sv-action,
.access14-import-btn,
.delete14-submit,
.delete14-danger-btn,
.secretary14-focus {
    font-size: 14px !important;
    line-height: 1.3;
    font-weight: 600 !important;
}

/* Tabel: satu skala yang konsisten untuk seluruh halaman operasional. */
table,
.la-table,
.rk17-table,
.sv-table,
.individual-table,
.secretary-postfinal-table,
.attendance-table,
.hl-table {
    font-size: var(--type-table) !important;
    line-height: 1.4;
}

th,
.la-table th,
.rk17-table th,
.sv-table th,
.individual-table th,
.secretary-postfinal-table th,
.attendance-table th,
.hl-table th {
    font-size: var(--type-table-head) !important;
    line-height: 1.3;
    font-weight: 600 !important;
}

td,
.la-table td,
.rk17-table td,
.sv-table td,
.individual-table td,
.secretary-postfinal-table td,
.attendance-table td,
.hl-table td {
    font-size: var(--type-table) !important;
    font-weight: 400;
}

.badge,
.final-badge,
.la-badge,
.la-trigger,
.la-pattern-badge,
.sv-status,
.sv-trigger-list span,
.hl-badge,
[class*="status-badge"] {
    font-size: var(--type-status) !important;
    line-height: 1.25;
    font-weight: 600 !important;
}

/* Navigation */
.sidebar .brand {
    font-size: 14px !important;
    line-height: 1.4;
    font-weight: 650 !important;
}
.sidebar nav a,
.sidebar .nav-group-toggle,
.sidebar .nav-submenu a {
    font-size: 14px !important;
    line-height: 1.35;
    font-weight: 500 !important;
}
.sidebar nav a.active,
.sidebar .nav-group-toggle[aria-expanded="true"] {
    font-weight: 600 !important;
}
.topbar h1 {
    font-size: 22px !important;
    line-height: 1.2;
    font-weight: 700 !important;
}
.topbar .who { font-size: var(--type-helper) !important; }

/* Landing utama */
.guardrail-landing .landing-header h1,
.guardrail-landing .landing-brand-title,
.landing-header h1 {
    font-size: clamp(30px, 3vw, 36px) !important;
    line-height: 1.16;
    font-weight: 700 !important;
}
.guardrail-landing .landing-header p,
.guardrail-landing .landing-brand-subtitle,
.landing-header p {
    font-size: 15px !important;
    line-height: 1.5;
    font-weight: 400 !important;
}
.guardrail-landing .modern-role-title,
.role-card h3 {
    font-size: 18px !important;
    line-height: 1.3;
    font-weight: 650 !important;
}
.guardrail-landing .modern-role-description,
.role-card p {
    font-size: 14px !important;
    line-height: 1.5;
    font-weight: 400 !important;
}
.landing-header .status-badge { font-size: 13px !important; font-weight: 600 !important; }

/* Login */
.guardrail-auth .auth-card h2,
.auth-card h2 {
    font-size: 22px !important;
    line-height: 1.25;
    font-weight: 700 !important;
}
.guardrail-auth .auth-card .sub,
.auth-card .sub,
.guardrail-auth .field-help,
.guardrail-auth .field-error,
.auth-secondary-link {
    font-size: 13px !important;
    line-height: 1.45;
}
.guardrail-auth .field-error { font-weight: 500 !important; }
.guardrail-auth .btn { font-weight: 600 !important; }

/* Dashboard Admin & Staff */
.guardrail-dashboard .db14-filterbar label {
    font-size: 13px !important;
    font-weight: 600 !important;
}
.guardrail-dashboard .db14-class-head {
    font-size: 12.5px !important;
    line-height: 1.3;
    font-weight: 600 !important;
}
.guardrail-dashboard .db14-class-name strong {
    font-size: 14px !important;
    line-height: 1.3;
    font-weight: 600 !important;
}
.guardrail-dashboard .db14-class-name small {
    font-size: 12.5px !important;
    font-weight: 400 !important;
}
.guardrail-dashboard .db14-status {
    font-size: 12.5px !important;
    font-weight: 600 !important;
}
.guardrail-dashboard .db14-metric {
    font-size: 14px !important;
    font-weight: 600 !important;
}
.guardrail-dashboard .db14-metric.is-muted { font-weight: 400 !important; }
.guardrail-dashboard .db21-analysis-card strong { font-weight: 650 !important; }
.guardrail-dashboard .db21-analysis-card small { font-size: 12.5px !important; }

/* Manajemen Akses */
.guardrail-access .access14-page-head h1 { font-size: 24px !important; font-weight: 700 !important; }
.guardrail-access .access14-page-head p,
.guardrail-access .access14-import-steps,
.guardrail-access .access14-import-note { font-size: 13px !important; line-height: 1.5; }
.guardrail-access .ma-tabs a,
.guardrail-access .ma-tabs button { font-size: 14px !important; font-weight: 600 !important; }
.guardrail-access .access14-drawer-head h2 { font-size: 18px !important; font-weight: 700 !important; }

/* QR Permanen & Token Hari Ini */
.guardrail-qr-token .qr14-section-head h2 { font-size: 18px !important; font-weight: 700 !important; }
.guardrail-qr-token .qr14-section-head p,
.guardrail-qr-token .qr14-timeitem small,
.guardrail-qr-token .op-warning { font-size: 13px !important; line-height: 1.45; }
.guardrail-qr-token .qr14-timeitem strong { font-size: 15px !important; font-weight: 650 !important; }

/* Rekap Kehadiran */
.guardrail-rekap .rk17,
.rk17 {
    font-size: 14px !important;
    line-height: 1.45 !important;
}
.rk17-head h1 { font-size: 24px !important; font-weight: 700 !important; }
.rk17-head p { font-size: 13px !important; line-height: 1.5; }
.rk17-tab { font-size: 14px !important; font-weight: 600 !important; }
.rk17-filter label { font-size: 13px !important; font-weight: 600 !important; }
.rk17-filter input,
.rk17-filter select { font-size: 14px !important; font-weight: 400 !important; }
.guardrail-rekap .op-filter-group-title {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    letter-spacing: .04em;
}
.rk17-card span { font-size: 12.5px !important; font-weight: 600 !important; }
.rk17-card strong { font-size: 26px !important; font-weight: 700 !important; }
.rk17-card small { font-size: 12.5px !important; font-weight: 400 !important; }
.rk58-card-btn::after { font-size: 12.5px !important; font-weight: 500 !important; }
.rk58-modal-head h3 { font-size: 17px !important; font-weight: 700 !important; }
.rk58-modal-head p,
.rk58-meta,
.rk58-extra,
.rk59-period-note,
.rk60-detail-note,
.rk43-global-note,
.rk49-search-note,
.rk17-period-global-note,
.rk17-legend span,
.rk17-timeline-item .meta,
.rk68-search-help,
.rk68-suggestion small,
.rk68-suggestion-class,
.rk68-selected {
    font-size: 12.5px !important;
    line-height: 1.45;
}
.rk58-name,
.rk58-count,
.rk17-timeline-item .date,
.rk62-student-link,
.rk62-count,
.late-min,
.current-state { font-weight: 600 !important; }
.rk62-class-head h2 { font-size: 17px !important; font-weight: 700 !important; }
.rk62-class-head small,
.rk62-student-link small { font-size: 12.5px !important; font-weight: 400 !important; }

/* Laporan & Analisis */
.guardrail-report .la-head h1,
.la-head h1 { font-size: 24px !important; line-height: 1.2; font-weight: 700 !important; }
.la-head p,
.la-sub,
.la-legend,
.la-data-quality-note,
.la-pattern-detail,
.la-pattern-absence-details,
.la-note {
    font-size: 13px !important;
    line-height: 1.5;
    font-weight: 400 !important;
}
.la-filter label,
.la-individual-controls label { font-size: 13px !important; font-weight: 600 !important; }
.la-filter input,
.la-filter select,
.la-individual-controls input,
.la-individual-controls select { font-size: 14px !important; font-weight: 400 !important; }
.la-tab { font-size: 14px !important; font-weight: 600 !important; }
.la-panel h2,
.la-section-title h2 { font-size: 18px !important; font-weight: 700 !important; }
.la-panel h3 { font-size: 15px !important; font-weight: 650 !important; }
.la-card span { font-size: 12.5px !important; font-weight: 600 !important; }
.la-card strong { font-size: 26px !important; font-weight: 700 !important; }
.la-card small { font-size: 12.5px !important; font-weight: 400 !important; }
.la-attention-summary span,
.la-trigger,
.la-pattern-badge { font-size: 12.5px !important; font-weight: 600 !important; }
.individual-school { font-weight: 700 !important; }
.individual-summary span { font-size: 12.5px !important; font-weight: 600 !important; }
.individual-summary strong { font-size: 18px !important; font-weight: 700 !important; }
.individual-footer { font-size: 12.5px !important; }
.la-role-pill { font-size: 13px !important; font-weight: 600 !important; }

/* Student View */
.report-tab-individu .sv-person h2 {
    font-size: 20px !important;
    line-height: 1.25;
    font-weight: 700 !important;
}
.report-tab-individu .sv-meta,
.report-tab-individu .sv-period span,
.report-tab-individu .sv-period small,
.report-tab-individu .sv-copy,
.report-tab-individu .sv-section-head p,
.report-tab-individu .sv-insight,
.report-tab-individu .sv-pattern-list span {
    font-size: 13px !important;
    line-height: 1.45;
    font-weight: 400 !important;
}
.report-tab-individu .sv-context-label,
.report-tab-individu .sv-trigger-list span,
.report-tab-individu .sv-status {
    font-size: 12.5px !important;
    font-weight: 600 !important;
}
.report-tab-individu .sv-period strong { font-size: 14px !important; font-weight: 600 !important; }
.report-tab-individu .sv-stat-strip span,
.report-tab-individu .sv-stat-strip small {
    font-size: 12.5px !important;
    font-weight: 500 !important;
    letter-spacing: .025em;
}
.report-tab-individu .sv-stat-strip strong { font-size: 20px !important; font-weight: 700 !important; }
.report-tab-individu .sv-section-head h3 { font-size: 17px !important; font-weight: 700 !important; }
.report-tab-individu .sv-insight strong,
.report-tab-individu .sv-pattern-list strong { font-size: 13px !important; font-weight: 600 !important; }
.report-tab-individu .sv-more > summary { font-size: 13px !important; font-weight: 600 !important; }
.report-tab-individu .sv-action { font-size: 14px !important; font-weight: 600 !important; }
.report-tab-individu .sv-table td::before {
    font-size: 12.5px !important;
    font-weight: 600 !important;
}

/* Kontrol Data */
.guardrail-control .control14-head h2 { font-size: 18px !important; font-weight: 700 !important; }
.guardrail-control .control14-head p,
.guardrail-control .control14-problem small { font-size: 13px !important; line-height: 1.45; }
.guardrail-control .control14-problem strong { font-size: 14px !important; font-weight: 600 !important; }
.guardrail-control .control14-severity { font-size: 12.5px !important; font-weight: 600 !important; }
.guardrail-control .control14-count { font-size: 20px !important; font-weight: 700 !important; }
.guardrail-control .control14-action { font-size: 13px !important; font-weight: 600 !important; }

/* Backup & Hapus Semua Data */
.guardrail-backup .backup14-recommended h2,
.guardrail-delete .delete14-card h2 { font-size: 18px !important; font-weight: 700 !important; }
.guardrail-backup .backup14-recommended p,
.guardrail-backup .backup14-alt p,
.guardrail-backup .backup14-sensitive,
.guardrail-delete .delete14-warning,
.guardrail-delete .delete14-check,
.guardrail-delete .delete14-phrase,
.guardrail-delete .delete14-backup-status small {
    font-size: 13px !important;
    line-height: 1.5;
}
.guardrail-delete .delete14-impact { font-size: 14px !important; font-weight: 600 !important; }

/* Mau Apa Sekarang? */
.guardrail-tasks .mq-question { font-size: 14px !important; font-weight: 600 !important; }
.guardrail-tasks .mq-description,
.guardrail-tasks .mq-section-head span { font-size: 13px !important; line-height: 1.45; font-weight: 400 !important; }

/* Sekretaris */
.guardrail-secretary .secretary14-context strong { font-size: 14px !important; font-weight: 600 !important; }
.guardrail-secretary .secretary14-context span,
.guardrail-secretary .secretary14-unresolved small,
.sk47-date-help { font-size: 13px !important; line-height: 1.45; font-weight: 400 !important; }
.guardrail-secretary .secretary14-unresolved strong { font-size: 14px !important; font-weight: 600 !important; }
.guardrail-secretary .secretary-postfinal-table td strong { font-weight: 600 !important; }
.sk47-historical-banner strong { font-weight: 650 !important; }

/* Hari Libur dan halaman operasional lama yang belum memakai guardrail penuh. */
.hl-card h2 { font-size: 18px !important; font-weight: 700 !important; }
.hl-card p,
.hl-note { font-size: 13px !important; line-height: 1.5; }
.hl-form label { font-size: 13px !important; font-weight: 600 !important; }
.hl-date strong { font-weight: 600 !important; }

/* Hindari bobot ekstrem dari patch lama. */
strong { font-weight: 650 !important; }


/* Normalisasi komponen lama yang masih memakai teks 10–12 px. */
.import-divider,
.backup-guide .backup-small-note,
.schedule-status,
.crud-cancel-link,
.crud-button,
.status-badge,
.ios-compat-heading span,
.ios-compat-badge,
.ios-browser-warning,
.report-quick-range a,
.problem-group,
.problem-status,
.report-pagination a,
.report-pagination span,
.report-message-box span,
.report-detail-grid small,
.report-log-table td > small,
.operational-universe-heading small,
.operational-leaf small,
.operational-recap-card small,
.operational-recap-heading p,
.operational-definition,
.attendance-filter label,
.attendance-print-heading p,
.attendance-summary-card span,
.attendance-legend,
.attendance-toolbar,
.attendance-footnote,
.student-suggestion-message {
    font-size: 12.5px !important;
    line-height: 1.45;
}
.schedule-status,
.crud-cancel-link,
.crud-button,
.status-badge,
.ios-compat-badge,
.ios-browser-warning,
.report-quick-range a,
.problem-group,
.problem-status,
.report-pagination a,
.report-pagination span,
.attendance-filter label,
.attendance-summary-card span { font-weight: 600 !important; }
.student-suggestion-item small { font-size: 12.5px !important; }
.attendance-code,
.attendance-status { font-size: 12.5px !important; font-weight: 600 !important; }

/* Mobile: input 16 px untuk mencegah browser zoom; informasi tetap terbaca. */
@media (max-width: 720px) {
    body { font-size: 14px !important; }
    h1 { font-size: 22px; }
    h2 { font-size: 17px; }
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea { font-size: 16px !important; }
    .topbar h1 { font-size: 21px !important; }
    .guardrail-dashboard .db14-metric::before { font-size: 12.5px !important; font-weight: 600 !important; }
    .guardrail-secretary .secretary-postfinal-table,
    .report-tab-individu .sv-table { font-size: 14px !important; }
}

/* Cetak/PDF browser: tingkatkan bagian yang sebelumnya terlalu kecil tanpa
   mengubah ukuran halaman F4 atau struktur pagination. */
@media print {
    html, body { font-family: Arial, Helvetica, sans-serif !important; font-size: 10pt !important; }
    table, .la-table, .rk17-table, .attendance-table, .individual-table { font-size: 8pt !important; line-height: 1.2 !important; }
    th, .la-table th, .rk17-table th, .attendance-table th, .individual-table th { font-size: 7.5pt !important; }
    td, .la-table td, .rk17-table td, .attendance-table td, .individual-table td { font-size: 8pt !important; }
    body.report-tab-individu .individual-print-stamp { font-size: 7.5pt !important; }
    body.report-tab-individu .individual-summary span { font-size: 7.5pt !important; }
    body.report-tab-individu .individual-table { font-size: 8pt !important; line-height: 1.2 !important; }
    .la-print-meta { font-size: 8.5pt !important; }
}
