.df-shell{display:block}
.df-controls{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.df-controls h3{margin:0 0 4px}
.df-controls p{margin:0;color:var(--muted,#7b8aa0)}
.df-controls label{display:grid;gap:6px;font-size:13px;color:#dbe7ff}
.df-controls select,.df-controls input{min-width:180px}
.df-buttons{display:flex;gap:8px;flex-wrap:wrap}
#dfNotice{margin:8px 0 14px;color:#c9f5b0;min-height:22px}
.df-print-area{background:#f4efe6;padding:18px;border-radius:16px;overflow:auto}
.df-four{display:grid;grid-template-columns:1fr;gap:22px}
.df-panel{background:#fcf9f0;color:#251d19;border:1px solid #d9cec0;border-radius:8px;padding:16px 18px 18px;box-shadow:0 1px 2px rgba(0,0,0,.04);font-family:Georgia,'Times New Roman',serif;font-size:11px;line-height:1.12;max-width:100%}
.df-copy-tag{font:600 12px/1.2 Arial,sans-serif;color:#6e4a37;margin-bottom:8px}
.df-panel h2{width:max-content;max-width:100%;margin:0 auto 14px;padding:6px 18px;background:#7a3f2b;color:#fff7ef;font-size:22px;line-height:1.05;border-radius:0;white-space:nowrap}
.df-panel h3{margin:10px 0 4px;font-size:13px}
.df-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px;font-size:12px}
.df-meta label{display:flex;align-items:center;gap:4px}
.df-meta-groups{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.df-meta-groups label{display:inline-flex;align-items:center;gap:2px}
.df-panel table{width:100%;border-collapse:collapse;table-layout:fixed;background:#fdfbf5}
.df-panel th,.df-panel td{border:1px solid #7f7771;padding:3px 4px;vertical-align:middle}
.df-panel thead th{background:#e0cfc2;font-weight:700;text-align:center}
.df-panel tbody th{text-align:left;font-weight:700}
.df-panel input[type=text],.df-panel input[type=date],.df-panel textarea,.df-panel select{width:100%;min-height:24px;padding:2px 4px;border:1px dotted #9b938c;background:transparent;color:#251d19;font:inherit;border-radius:0;box-sizing:border-box}
.df-panel textarea{min-height:52px;resize:vertical}
.df-panel input[type=checkbox],.df-panel input[type=radio]{width:12px;height:12px;accent-color:#7a3f2b;margin:0 2px}
.df-hifz tbody tr{height:30px}
.df-hifz tbody tr:last-child th{font-size:10px}
.df-classes tbody tr{height:30px}
.df-vocab,.df-messages{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}
.df-vocab label,.df-messages label{display:flex;border:1px solid #7f7771;background:#fdfbf5}
.df-vocab b,.df-messages b{background:#e0cfc2;border-right:1px solid #7f7771;text-align:center;display:grid;place-content:center;flex:0 0 92px;padding:6px}
.df-messages b{font-size:16px;line-height:1.06}
.df-vocab textarea,.df-messages textarea{border:0;min-height:54px}
.df-behaviour{display:grid;grid-template-columns:1.05fr 1.4fr 1.8fr .9fr;gap:0;margin-top:6px}
.df-behaviour>label{display:flex;align-items:center;justify-content:center;gap:4px;border:1px solid #7f7771;padding:5px;text-align:center;font-size:10px;background:#fdfbf5}
.df-checks{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.df-checks label{display:flex;align-items:center;gap:2px}
.df-self-box{display:flex;align-items:center;gap:2px}
.df-prayers{margin-top:6px}
.df-prayers th,.df-prayers td{text-align:center}
.df-prayers input{text-align:center}
.df-messages{margin-top:8px}
.df-bottom{display:grid;grid-template-columns:88px 1fr 124px 100px;margin-top:12px;background:#e0cfc2;border:1px solid #7f7771;min-height:120px;font:10px/1.2 Arial,sans-serif}
.df-bottom>div{padding:6px;border-right:1px solid #7f7771}
.df-bottom>div:last-child{border-right:0}
.df-stamp{text-align:center}
.df-stamp span{display:block;font-size:58px;line-height:1;color:#fff8f1;margin-top:8px}
.df-weekly{background:#fcf8f2;padding:0 !important}
.df-week-label{padding:5px 6px}
.df-weekly table{height:90px;font-size:9px}
.df-weekly th,.df-weekly td{border:1px dashed #887d73 !important;background:transparent !important;padding:2px !important}
.df-correction{display:flex;flex-direction:column;justify-content:flex-start;text-align:center}
.df-correction small{display:block;margin-top:10px;line-height:1.75}
.df-homework{display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.df-history{margin-top:18px}
.df-hrow{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.12);gap:10px}

@media (max-width:900px){
  .df-controls{align-items:stretch}
  .df-controls select,.df-controls input{min-width:100%}
  .df-vocab,.df-messages{grid-template-columns:1fr}
  .df-behaviour{grid-template-columns:1fr}
  .df-bottom{grid-template-columns:1fr}
  .df-bottom>div{border-right:0;border-bottom:1px solid #7f7771}
  .df-bottom>div:last-child{border-bottom:0}
  .df-panel h2{font-size:17px;white-space:normal;text-align:center}
}

@media print{
  @page{size:A4 portrait;margin:8mm}
  body *{visibility:hidden !important}
  #dfPaper,#dfPaper *{visibility:visible !important}
  #dfPaper{position:absolute;left:0;top:0;width:100%;padding:0 !important;background:#fff !important;overflow:visible !important}
  .df-print-area{background:#fff !important;border-radius:0;padding:0 !important}
  .df-four{display:block !important}
  .df-panel{page-break-after:always;break-after:page;box-shadow:none;border:0;border-radius:0;padding:0 0 6mm;margin:0 0 6mm;background:#fff;font-size:10px}
  .df-panel:last-child{page-break-after:auto;break-after:auto;margin-bottom:0}
  .df-panel h2{font-size:20px;margin:0 auto 12px;padding:5px 16px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .df-copy-tag{display:none}
  .df-meta{font-size:11px}
  .df-panel input[type=text],.df-panel input[type=date],.df-panel textarea,.df-panel select{border:1px dotted #999 !important;min-height:22px;padding:2px 3px}
  .df-panel textarea{min-height:50px}
  .df-panel thead th,.df-vocab b,.df-messages b,.df-bottom{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

.df-nav-arrow{margin-left:auto;font-weight:bold}
.df-subnav{margin:1px 0 5px 14px;padding:3px 0 3px 6px;border-left:1px solid #36506b}
.nav .df-subnav button{font-size:10.6px;padding:8px 6px;line-height:1.3}
.df-panel[hidden]{display:none!important}
@media print{.df-panel[hidden]{display:none!important}.df-panel:not([hidden]){break-after:auto!important;page-break-after:auto!important}}

/* Student identity is linked to existing admission records on all four forms. */
.df-linked-identity{display:flex;align-items:center;gap:10px;margin:0 0 8px;padding:6px 9px;border:1px solid #d4c4b5;background:#f3e9df;color:#30231e;font:600 12px/1.35 Arial,sans-serif}
.df-linked-image{display:inline-flex;align-items:center;justify-content:center;width:54px;height:54px;flex:none;border:1px solid #bfa899;background:#fff6ed;border-radius:5px;overflow:hidden;font-size:28px}
.df-linked-image img,.df-linked-image .person-photo{width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:cover;border-radius:0!important}
.df-linked-text{overflow-wrap:anywhere}
.df-hifz-panel input[name="studentName"]{background:#eee0d4!important;color:#30231e!important}
@media print{.df-linked-identity{-webkit-print-color-adjust:exact;print-color-adjust:exact}.df-linked-image{width:48px;height:48px}}

/* Compact report header: bring the selected form directly beneath its controls. */
@media screen {
  .df-shell{padding:10px 12px!important}
  .df-controls{display:grid;grid-template-columns:minmax(160px,1fr) minmax(175px,220px) minmax(155px,195px) auto;align-items:end;column-gap:10px;row-gap:6px;margin:0 0 5px!important}
  .df-controls h3{font-size:14px;margin:0!important;line-height:1.2}
  .df-controls p{font-size:10px;margin:1px 0 0!important;line-height:1.2}
  .df-controls label{min-width:0;gap:2px;font-size:11px}
  .df-controls select,.df-controls input{min-width:0;width:100%;height:30px;box-sizing:border-box}
  .df-buttons{gap:5px;align-self:end}
  .df-buttons .btn{padding:6px 9px;min-height:30px}
  #dfNotice:empty{display:none!important}
  #dfNotice{min-height:0;margin:0 0 3px!important;font-size:11px}
  .df-print-area{padding:8px!important}
  .df-panel{padding:10px 12px 12px!important}
  .df-copy-tag{margin-bottom:3px}
  .df-panel h2{margin:0 auto 7px}
}
@media screen and (max-width:1100px){
  .df-controls{grid-template-columns:1fr 1fr;}
  .df-buttons{justify-content:flex-start}
}
@media screen and (max-width:570px){
  .df-controls{grid-template-columns:1fr;}
  .df-buttons{flex-wrap:wrap}
}

/* Keep the document's printed table grid in a stable LTR order in all languages. */
html[lang="ar"] .df-shell,html[lang="ar"] .df-panel,html[lang="ar"] .df-panel table,html[lang="ar"] .df-meta,html[lang="ar"] .df-controls,html[lang="ar"] .df-bottom{direction:ltr!important;}
html[lang="ar"] .df-panel td,html[lang="ar"] .df-panel th{unicode-bidi:plaintext;}
html[lang="ar"] .df-panel input,html[lang="ar"] .df-panel textarea{direction:auto;}
.df-panel{min-width:0!important;max-width:100%!important;}
.df-shell,.df-print-area,.df-four{min-width:0!important;}
.df-panel table{min-width:0!important;}
.df-controls{position:relative;z-index:1;}
