.student-card { padding: 0; overflow: hidden; }
.student-toolbar,.student-filters,.student-pagination {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; padding: 14px 18px;
}
.student-toolbar { border-bottom: 1px solid var(--line); }
.student-card-title,.student-actions,.student-pagination nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.student-card-title .tile { width: 34px; height: 34px; border-radius: 8px; }
.student-filters { align-items: end; }
.student-filters .field:first-child { flex: 0 0 105px; }
.student-filters .field:nth-child(2) { flex: 1 1 180px; max-width: 320px; }
.student-filters .field:last-child { flex: 1 1 200px; max-width: 340px; margin-left: auto; }
.btn.student-import-button { background: #197546; color: #fff; }
.student-table { font-size: 13px; }
.student-table thead th { background: #463b76; color: white; border-color: #463b76; white-space: nowrap; }
.student-table th,.student-table td { padding: 9px 16px; border-width: 0 0 1px; vertical-align: middle; }
.student-table tbody th { font-weight: 650; color: #253e34; background: transparent; }
.student-table tbody tr:nth-child(odd) { background: #f3f6f3; }
.student-table td:last-child,.student-table th:last-child { text-align: right; }
.student-table td:last-child { width: 105px; }
.student-table td .btn { min-height: 30px; padding: 4px 8px; margin: 0; }
.student-table td.student-empty { text-align: left; padding: 21px 16px; color: var(--muted); }
.student-class { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; border: 1px solid #d9e5da; background: #edf4ec; border-radius: 5px; padding: 3px 6px; white-space: nowrap; }
.student-class small { color: #4d6559; }
.student-pagination { font-size: 12px; color: var(--muted); }
.student-dialog { width: min(560px,calc(100vw - 28px)); max-height: calc(100dvh - 36px); padding: 0; color: #20352e; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 20px 75px #102d29a0; }
.student-dialog::backdrop { background: #17252186; }
.student-dialog-head,.student-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 18px; }
.student-dialog-head { border-bottom: 1px solid var(--line); }
.student-dialog-head h2 { margin: 0; font-size: 19px; }
.student-close { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 6px; color: #476257; font-size: 24px; }
.student-close:hover { background: #eef4ed; }
.student-dialog-body { display: grid; gap: 14px; padding: 17px 18px; }
.student-dialog-body p { margin: 0; font-size: 13px; line-height: 1.55; }
.student-dialog-body [data-student-fallback] .hint { margin-top: 5px; font-size: 12px; }
.student-dialog-footer { border-top: 1px solid var(--line); justify-content: flex-end; flex-wrap: wrap; }
.student-dialog-body input[type=file] { padding: 4px; }
.student-dialog-body input[type=file]::file-selector-button { border: 0; border-radius: 5px; background: #e3eee4; color: #225340; padding: 6px 8px; margin-right: 9px; font-weight: 700; cursor: pointer; }
.student-help,.student-error { border-radius: 7px; padding: 10px; font-size: 13px; }
.student-help { background: #edf4eb; color: #315847; }
.student-error { background: #fceeea; color: #8a352d; border: 1px solid #f4d6cb; }
.student-error ul { margin: 5px 0 0; padding-left: 19px; }
.teaching-card .teaching-filters { justify-content: flex-start; }
.teaching-card .teaching-filters .field { flex: 1 1 138px; max-width: 265px; margin-left: 0; }
.teaching-table { min-width: 930px; }
.teaching-table td { min-width: 52px; white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: top; }
.teaching-table td:first-child { min-width: 113px; }
.teaching-summary { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 14px; font-size: 12px; }
.teaching-summary span { padding: 7px 10px; border-radius: 7px; background: #edf3ed; color: #2d5444; }
.teaching-summary strong { margin-left: 4px; }
.teaching-empty { padding: 0 18px 15px; }
.teaching-schedule-table { margin-top: 14px; }
.teaching-dialog { width: min(690px,calc(100vw - 28px)); }
.teaching-dialog form { margin: 0; }
.teaching-dialog .student-dialog-body { gap: 11px; }
.teaching-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 11px; }
.teaching-dialog form[data-form="teaching-save"] .field { grid-template-columns: 115px minmax(0,1fr); align-items: start; gap: 10px; }
.teaching-dialog form[data-form="teaching-save"] .field > span { padding-top: 9px; }
.teaching-dialog .field textarea { min-height: 58px; }
.teaching-counts { display: grid; gap: 8px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.teaching-dialog form[data-form="teaching-save"] .teaching-counts .field { grid-template-columns: minmax(0,1fr); gap: 4px; }
.teaching-print-table,.teaching-print-heading { display: none; }
.nav.nav-daily { min-height: 0; overflow-y: auto; }
.daily-card .student-toolbar { background: #f6f8f6; }
.daily-card .student-toolbar h2 { margin: 0; }
.daily-card .student-toolbar .field { min-width: 145px; flex: 1; }
.daily-card .student-filters { align-items: center; }
.daily-card .student-filters p { margin: 0; }
.daily-message { margin: 12px 18px; }
.daily-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 18px 10px; }
.daily-feedback p { margin: 0; color: #365e4a; font-size: 13px; }
.daily-feedback p.error { color: #8a352d; }
.daily-feedback [hidden] { display: none; }
.daily-statuses { display: flex; gap: 5px; }
.daily-status { width: 40px; height: 40px; border: 1px solid #cad8d1; border-radius: 50%; background: white; color: #425c50; font-weight: 750; }
.daily-status:hover:not(:disabled) { border-color: currentColor; }
.daily-status[aria-pressed="true"] { background: var(--status-color); border-color: var(--status-color); color: white; }
.daily-status.hadir,[data-status="H"] { --status-color: #176347; }
.daily-status.izin,[data-status="I"] { --status-color: #245794; }
.daily-status.sakit,[data-status="S"] { --status-color: #8a5305; }
.daily-status.alpa,[data-status="A"] { --status-color: #a6323e; }
.daily-history :is(th,td):nth-child(n+3) { text-align: center; width: auto; }
.daily-history :is(th,td):nth-child(2) { min-width: 125px; }
.daily-history .daily-symbol { color: var(--status-color,inherit); }
.daily-history th .btn { min-height: 32px; padding: 4px 8px; white-space: nowrap; }
.daily-list :is(th,td):last-child { width: 212px; text-align: left; }
.daily-print { display: none; }
.adab-print-header { display: none; }
.adab-report-table td { white-space: pre-line; overflow-wrap: anywhere; vertical-align: top; }
.adab-report-table :is(th,td):first-child { width: 1%; }
@media (max-width: 680px) {
  .student-toolbar,.student-filters,.student-pagination { padding-inline: 12px; gap: 8px; }
  .student-actions { width: 100%; }
  .student-filters .field:last-child { flex-basis: 100%; max-width: none; margin: 0; }
  .student-table th,.student-table td { padding-inline: 8px; font-size: 12px; }
  .student-class small { display: none; }
  .teaching-dialog form[data-form="teaching-save"] .field { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .teaching-dialog form[data-form="teaching-save"] .field > span { padding-top: 0; }
  .nav.nav-daily { overflow: auto hidden; justify-content: flex-start; }
  .nav.nav-daily button { flex: 0 0 66px; }
  .daily-status { width: 35px; height: 38px; }
  .daily-statuses { gap: 3px; }
  .daily-list :is(th,td):last-child { width: auto; }
}
@media print {
  main.adab-printing > :not(.adab-print-selected) { display: none !important; }
  .adab-report .card-head { display: none; }
  .adab-print-header { display: block; text-align: center; margin-bottom: 10px; }
  .adab-print-header :is(h2,p) { margin: 4px 0; }
  .adab-report { break-before: auto; margin: 0; print-color-adjust: exact; }
  .adab-print-selected + .adab-print-selected { break-before: page; }
  .adab-report .table-scroll { overflow: visible; }
  .adab-report-table :is(th,td) { border: 1px solid #777; padding: 5px; font-size: 9pt; }
  .adab-report .sajada-figure { break-inside: avoid; }
  .adab-report .sajada-pillars { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .daily-print { display: revert; }
  .daily-card,.daily-card .table-scroll { overflow: visible; }
  .daily-history :is(th,td) { padding: 4px; font-size: 10px; }
  .teaching-card,.teaching-card .table-scroll,.teaching-card td { overflow: visible; }
  .teaching-card .teaching-screen-table { display: none; }
  .teaching-print-table { display: table; font-size: 10px; }
  .teaching-print-heading { display: block; text-align: center; }
  .teaching-print-heading p { font-size: 12px; }
}
