main { padding:30px; margin-left:260px; }
.page-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.page-header h1 { font-size:24px; color:var(--hc-dark); margin:0 0 4px; }
.page-header p, .muted { font-size:13px; color:#64748b; }
.page-header p { margin:0; }
.content-section { background:#fff; border-radius:16px; border:1px solid var(--border); padding:24px; margin-bottom:24px; }
h2 { font-size:16px; color:var(--hc-dark); margin:0 0 16px; }
.export-controls { display:flex; gap:12px; align-items:center; }
.export-controls label { font-size:13px; color:#475569; }
.hc-select, .hc-button { font:inherit; font-size:13px; border-radius:8px; padding:10px 14px; }
.hc-select { min-width:0; flex:1; border:1px solid #cbd5e1; background:#f8fafc; color:#334155; }
.hc-button { background:var(--hc-blue); color:white; font-weight:500; cursor:pointer; border:0; }
.hc-button:hover { background:var(--hc-toska); }
button:disabled { opacity:.55; cursor:not-allowed; }
.hc-link-button { padding:12px 0; background:none; border:0; color:var(--hc-blue); text-decoration:underline; font:inherit; font-size:13px; cursor:pointer; }
.table-wrapper { overflow-x:auto; width:100%; border:1px solid var(--border); border-radius:12px; }
table { width:100%; border-collapse:collapse; min-width:750px; }
th,td { padding:12px 16px; text-align:left; font-size:13px; border-bottom:1px solid var(--border); }
th { background:#f8fafc; color:#64748b; font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
tr:last-child td { border-bottom:0; }
.user-name { font-weight:600; color:var(--hc-dark); }
.user-id { font-size:11px; color:#64748b; margin-top:2px; }
.tipe-badge { font-size:10px; font-weight:600; padding:2px 8px; border-radius:4px; color:white; display:inline-block; background:#475569; }
.tipe-siswa { background:var(--hc-blue); }
.tipe-guru { background:var(--hc-toska); }
.tipe-alumni { background:#b45309; }
.more-button { margin-top:16px; }
:focus-visible { outline:3px solid var(--hc-toska); outline-offset:3px; }
@media(max-width:900px) { main { margin-left:0; padding:20px 16px; } }
@media(max-width:600px) { .page-header, .export-controls { align-items:stretch; flex-direction:column; } .content-section { padding:16px; } }

/* Rekap kehadiran bulanan */
.rekap-controls input[type=month] { flex:0 1 200px; }
.hc-button-secondary { background:#fff; color:var(--hc-blue); border:1px solid var(--hc-blue); }
.hc-button-secondary:hover { background:#eff6ff; }
.rekap-option { display:flex; gap:8px; align-items:flex-start; margin-top:12px; font-size:13px; color:#475569; cursor:pointer; }
.rekap-option input { margin-top:3px; }
.rk-sheet { margin-top:12px; display:grid; gap:20px; }
.rk-page { background:#fff; border:1px solid var(--border); border-radius:12px; padding:20px; overflow-x:auto; color:#111; font-family:'Poppins',Arial,sans-serif; }
.rk-title { margin:0; text-align:center; font-size:15px; font-weight:600; }
.rk-month { margin:2px 0 14px; text-align:center; font-size:14px; font-weight:500; }
.rk-table-wrap { border:0; border-radius:0; overflow:visible; }
.rk-table { width:100%; min-width:640px; border-collapse:collapse; table-layout:fixed; }
.rk-table th, .rk-table td { border:1px solid #111; padding:3px 5px; font-size:11.5px; text-align:center; color:#111; background:#fff; text-transform:none; letter-spacing:0; vertical-align:middle; }
.rk-table tr:last-child td { border-bottom:1px solid #111; }
.rk-table th { font-weight:600; font-size:10.5px; }
.rk-table .c-no { width:34px; }
.rk-table .c-nama { width:24%; text-align:left; }
.rk-table .c-nis { width:86px; }
.rk-table .c-kelas { width:62px; }
.rk-table tbody tr { height:42px; }
.rk-date { font-weight:500; margin-top:1px; }
.rk-sig { display:block; margin:0 auto; max-width:100%; max-height:34px; object-fit:contain; }
.rk-check { font-size:15px; color:#475569; }
.rk-signs { display:flex; justify-content:space-between; gap:24px; margin-top:22px; break-inside:avoid; }
.rk-sign-box { flex:0 1 44%; text-align:center; font-size:12px; }
.rk-sign-area { height:80px; display:flex; align-items:center; justify-content:center; }
.rk-sign-area .rk-sig { max-height:76px; }
.rk-sign-title { font-weight:500; }
.rk-sign-name { font-weight:600; border-top:1px solid #111; display:inline-block; min-width:70%; padding-top:3px; min-height:1.4em; }
@media print {
  @page { size:A4 landscape; margin:10mm; }
  html, body { background:#fff !important; min-height:0; display:block; }
  body > :not(main) { display:none !important; }
  main { margin:0 !important; padding:0 !important; }
  #presensi-main > :not(#rekap-section) { display:none !important; }
  #rekap-section { border:0; padding:0; margin:0; border-radius:0; }
  #rekap-section > :not(#rekap-sheet) { display:none !important; }
  .rk-sheet { display:block; margin:0; }
  .rk-page { border:0; border-radius:0; padding:0; overflow:visible; break-after:page; page-break-after:always; break-inside:avoid; }
  .rk-page:last-child { break-after:auto; page-break-after:auto; }
  .rk-table { min-width:0; }
  .rk-table th, .rk-table td { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .rk-table tbody tr { height:11mm; }
  .rk-sig { max-height:9mm; }
  .rk-sign-area { height:24mm; }
  .rk-sign-area .rk-sig { max-height:22mm; }
}
@media(max-width:600px) { .rekap-controls input[type=month] { flex:1 1 auto; } }
