/* Al Bayraq Portal — unified readable typography for every current path. */
:root{
  --absp-portal-font:"Segoe UI",Tahoma,Arial,sans-serif;
  --absp-text-base:15px;
  --absp-text-control:15px;
  --absp-text-button:14px;
  --absp-text-small:12.5px;
  --absp-title-1:clamp(24px,2vw,28px);
  --absp-title-2:clamp(21px,1.65vw,24px);
  --absp-title-3:18px;
}

[data-absp-login],
[data-teacher-portal],
[data-head-portal],
[data-social-portal],
.absp-gd-admin{
  font-family:var(--absp-portal-font)!important;
  font-size:var(--absp-text-base)!important;
  line-height:1.55;
  font-synthesis:none;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

[data-absp-login] *,
[data-teacher-portal] *,
[data-head-portal] *,
[data-social-portal] *,
.absp-gd-admin *{
  font-family:inherit!important;
}

[data-absp-login] h1,[data-teacher-portal] h1,[data-head-portal] h1,[data-social-portal] h1,.absp-gd-admin h1{
  font-size:var(--absp-title-1)!important;line-height:1.25!important;font-weight:750!important;letter-spacing:-.2px;
}
[data-absp-login] h2,[data-teacher-portal] h2,[data-head-portal] h2,[data-social-portal] h2,.absp-gd-admin h2{
  font-size:var(--absp-title-2)!important;line-height:1.3!important;font-weight:750!important;letter-spacing:-.15px;
}
[data-absp-login] h3,[data-teacher-portal] h3,[data-head-portal] h3,[data-social-portal] h3,.absp-gd-admin h3{
  font-size:var(--absp-title-3)!important;line-height:1.4!important;font-weight:750!important;
}
[data-absp-login] h4,[data-teacher-portal] h4,[data-head-portal] h4,[data-social-portal] h4,.absp-gd-admin h4{
  font-size:16px!important;line-height:1.45!important;font-weight:700!important;
}

[data-absp-login] p,[data-absp-login] li,[data-absp-login] blockquote,[data-absp-login] dd,
[data-teacher-portal] p,[data-teacher-portal] li,[data-teacher-portal] blockquote,[data-teacher-portal] dd,
[data-head-portal] p,[data-head-portal] li,[data-head-portal] blockquote,[data-head-portal] dd,
[data-social-portal] p,[data-social-portal] li,[data-social-portal] blockquote,[data-social-portal] dd,
.absp-gd-admin p,.absp-gd-admin li,.absp-gd-admin blockquote,.absp-gd-admin dd{
  font-size:14px!important;line-height:1.7!important;
}

[data-absp-login] label,[data-teacher-portal] label,[data-head-portal] label,[data-social-portal] label,.absp-gd-admin label{
  font-size:14px!important;line-height:1.5!important;font-weight:650!important;
}
[data-absp-login] small,[data-teacher-portal] small,[data-head-portal] small,[data-social-portal] small,.absp-gd-admin small{
  font-size:var(--absp-text-small)!important;line-height:1.5!important;
}
[data-absp-login] b,[data-absp-login] strong,
[data-teacher-portal] b,[data-teacher-portal] strong,
[data-head-portal] b,[data-head-portal] strong,
[data-social-portal] b,[data-social-portal] strong,
.absp-gd-admin b,.absp-gd-admin strong{
  font-weight:700!important;
}

[data-absp-login] button,[data-teacher-portal] button,[data-head-portal] button,[data-social-portal] button,.absp-gd-admin button,
[data-absp-login] .button,[data-teacher-portal] .button,[data-head-portal] .button,[data-social-portal] .button,.absp-gd-admin .button{
  font-family:var(--absp-portal-font)!important;
  font-size:var(--absp-text-button)!important;
  line-height:1.35!important;
  font-weight:700!important;
  white-space:nowrap;
}
[data-absp-login] input,[data-absp-login] select,[data-absp-login] textarea,
[data-teacher-portal] input,[data-teacher-portal] select,[data-teacher-portal] textarea,
[data-head-portal] input,[data-head-portal] select,[data-head-portal] textarea,
[data-social-portal] input,[data-social-portal] select,[data-social-portal] textarea,
.absp-gd-admin input,.absp-gd-admin select,.absp-gd-admin textarea{
  font-family:var(--absp-portal-font)!important;
  font-size:var(--absp-text-control)!important;
  line-height:1.5!important;
  font-weight:500!important;
}
/* Override the previously approved per-path readable rules with the new shared scale. */
[data-teacher-portal].absp-teacher-page input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]),
[data-teacher-portal].absp-teacher-page select,[data-teacher-portal].absp-teacher-page textarea,
[data-head-portal].absp-head-page input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]),
[data-head-portal].absp-head-page select,[data-head-portal].absp-head-page textarea{
  font-size:var(--absp-text-control)!important;
  line-height:1.5!important;
}
[data-absp-login] input::placeholder,[data-absp-login] textarea::placeholder,
[data-teacher-portal] input::placeholder,[data-teacher-portal] textarea::placeholder,
[data-head-portal] input::placeholder,[data-head-portal] textarea::placeholder,
[data-social-portal] input::placeholder,[data-social-portal] textarea::placeholder,
.absp-gd-admin input::placeholder,.absp-gd-admin textarea::placeholder{
  font-size:14px!important;font-weight:400!important;
}

[data-absp-login] th,[data-teacher-portal] th,[data-head-portal] th,[data-social-portal] th,.absp-gd-admin th{
  font-size:13px!important;line-height:1.45!important;font-weight:700!important;
}
[data-absp-login] td,[data-teacher-portal] td,[data-head-portal] td,[data-social-portal] td,.absp-gd-admin td{
  font-size:14px!important;line-height:1.55!important;font-weight:500;
}

/* One card scale across all portal paths. */
:is(
  .absp-mini-card,.absp-task-card,.absp-weekly-task-card,.absp-file-card,.absp-notification-card,
  .absp-policy-card,.absp-official-schedule-card,.absp-profile-card,.absp-profile-actions-card,
  .absp-intervention-card,.absp-da-card,.absp-da-report-card,.absp-fa-followup-card,
  .absp-social-panel,.absp-social-case,.absp-social-referral,.absp-student-profile-card,
  .absp-parent-minute-card,.absp-swr-card,.absp-gdc-table-card,.absp-dev-card,.absp-module-row,
  .absp-members-panel,.absp-directive-card
){
  font-size:14px!important;line-height:1.6!important;
}
:is(
  .absp-mini-card,.absp-task-card,.absp-weekly-task-card,.absp-file-card,.absp-notification-card,
  .absp-policy-card,.absp-official-schedule-card,.absp-profile-card,.absp-profile-actions-card,
  .absp-intervention-card,.absp-da-card,.absp-da-report-card,.absp-fa-followup-card,
  .absp-social-panel,.absp-social-case,.absp-social-referral,.absp-student-profile-card,
  .absp-parent-minute-card,.absp-swr-card,.absp-gdc-table-card,.absp-dev-card,.absp-module-row,
  .absp-members-panel,.absp-directive-card
) h2{font-size:19px!important;line-height:1.35!important;font-weight:750!important}
:is(
  .absp-mini-card,.absp-task-card,.absp-weekly-task-card,.absp-file-card,.absp-notification-card,
  .absp-policy-card,.absp-official-schedule-card,.absp-profile-card,.absp-profile-actions-card,
  .absp-intervention-card,.absp-da-card,.absp-da-report-card,.absp-fa-followup-card,
  .absp-social-panel,.absp-social-case,.absp-social-referral,.absp-student-profile-card,
  .absp-parent-minute-card,.absp-swr-card,.absp-gdc-table-card,.absp-dev-card,.absp-module-row,
  .absp-members-panel,.absp-directive-card
) h3{font-size:17px!important;line-height:1.4!important;font-weight:750!important}
:is(
  .absp-mini-card,.absp-task-card,.absp-weekly-task-card,.absp-file-card,.absp-notification-card,
  .absp-policy-card,.absp-official-schedule-card,.absp-profile-card,.absp-profile-actions-card,
  .absp-intervention-card,.absp-da-card,.absp-da-report-card,.absp-fa-followup-card,
  .absp-social-panel,.absp-social-case,.absp-social-referral,.absp-student-profile-card,
  .absp-parent-minute-card,.absp-swr-card,.absp-gdc-table-card,.absp-dev-card,.absp-module-row,
  .absp-members-panel,.absp-directive-card
) strong{font-size:15.5px!important;line-height:1.45!important;font-weight:700!important}
:is(
  .absp-mini-card,.absp-task-card,.absp-weekly-task-card,.absp-file-card,.absp-notification-card,
  .absp-policy-card,.absp-official-schedule-card,.absp-profile-card,.absp-profile-actions-card,
  .absp-intervention-card,.absp-da-card,.absp-da-report-card,.absp-fa-followup-card,
  .absp-social-panel,.absp-social-case,.absp-social-referral,.absp-student-profile-card,
  .absp-parent-minute-card,.absp-swr-card,.absp-gdc-table-card,.absp-dev-card,.absp-module-row,
  .absp-members-panel,.absp-directive-card
) small{font-size:12.5px!important;line-height:1.5!important;font-weight:600!important}

/* Card labels use one readable size instead of legacy 7–10px values. */
.absp-kpi-grid article>span,.absp-head-kpis article>span,.absp-act-kpis article>span,
.absp-formative-kpis article>span,.absp-intervention-kpis article>span,.absp-da-kpis article>span,
.absp-da-report-kpis article>span,.absp-social-attendance-kpis article>span,.absp-social-report-grid article>span,
.absp-intervention-registry-kpis article>span{
  font-size:13px!important;line-height:1.4!important;font-weight:650!important;
}
.absp-task-card span,.absp-file-card span,.absp-notice-meta span,.absp-dev-card header span,
.absp-social-record-actions span,.absp-social-priority,.absp-student-badge,.absp-gdc-status{
  font-size:12.5px!important;line-height:1.35!important;font-weight:700!important;
}

/* Numeric metrics only: status text is handled separately below. */
.absp-kpi-grid article>strong,.absp-head-kpis article>strong,.absp-social-kpis article>strong,
.absp-social-task-kpis article>strong,.absp-social-attendance-kpis article>strong,.absp-social-report-grid article>strong,
.absp-gdc-kpis article>strong,.absp-swr-kpis article>strong,.absp-swr-mini-grid article>strong,
.absp-act-kpis article>strong,.absp-formative-kpis article>strong,.absp-intervention-kpis article>strong,
.absp-intervention-registry-kpis article>strong,.absp-da-kpis article>strong,.absp-da-report-kpis article>strong,
.absp-ir-kpis button>strong,[data-teacher-portal] [data-da-kpi],[data-teacher-portal] [data-intervention-kpi]{
  font-size:26px!important;line-height:1.1!important;font-weight:750!important;letter-spacing:-.2px;
}
.absp-formative-mini-summaries article strong{font-size:18px!important;line-height:1.2!important}
.absp-formative-mini-summaries article span{font-size:12px!important;line-height:1.35!important;font-weight:650!important}
.absp-formative-mini-summaries article small{font-size:11px!important;line-height:1.3!important}

/* Textual KPI values never inherit the numeric display size. */
.absp-kpi-grid article.is-textual-kpi>strong{
  max-width:100%;font-size:15px!important;line-height:1.45!important;font-weight:700!important;
  letter-spacing:0;overflow-wrap:anywhere;word-break:normal;
}
.absp-da-kpis [data-da-kpi="judgement"]{
  max-width:100%;font-size:15px!important;line-height:1.45!important;font-weight:700!important;
  letter-spacing:0;overflow-wrap:anywhere;word-break:normal;
}

/* Secondary cards and generated history records follow the same semantic scale. */
:is(
  .absp-act-history,.absp-act-editor,.absp-act-participants,.absp-act-evidence,
  .absp-da-history,.absp-intervention-history,.absp-intervention-registry-table-card,
  .absp-ir-table-card,.absp-formative-history,.absp-formative-history-list,
  .absp-table-card,.absp-report-panel,.absp-followup-action-card,
  .absp-directive-composer,.absp-directive-teachers,.absp-directive-history,
  .absp-directive-record,.absp-profile-modal-card,.absp-parent-minute-card
){
  min-width:0;font-size:14px!important;line-height:1.6!important;
}
:is(
  .absp-act-history,.absp-act-editor,.absp-act-participants,.absp-act-evidence,
  .absp-da-history,.absp-intervention-history,.absp-intervention-registry-table-card,
  .absp-ir-table-card,.absp-formative-history,.absp-formative-history-list,
  .absp-table-card,.absp-report-panel,.absp-followup-action-card,
  .absp-directive-composer,.absp-directive-teachers,.absp-directive-history,
  .absp-directive-record,.absp-profile-modal-card,.absp-parent-minute-card
) :is(h2,h3,h4,p,strong,span,small,em){
  overflow-wrap:break-word;word-break:normal;
}

/* Activity and saved-record cards previously contained legacy 7–10px text. */
[data-act-history]>article>div:nth-child(2)>strong{
  font-size:15.5px!important;line-height:1.4!important;font-weight:700!important;
}
[data-act-history]>article :is(span,small,em,i),
.absp-act-editor>header>span,
.absp-act-fields label>span,
[data-act-existing-evidence] a,
[data-act-file-preview] span{
  font-size:12.5px!important;line-height:1.45!important;font-weight:650!important;
}
.absp-act-history>header p,.absp-act-participants>header p,.absp-act-evidence>header p{
  font-size:14px!important;line-height:1.65!important;font-weight:500!important;
}

/* Generated insight/summary blocks are body copy, not micro labels. */
:is(
  .absp-da-admin-summary,.absp-social-insight,.absp-swr-insight,
  .absp-social-report-summary,.absp-intervention-help,.absp-formative-note,
  .absp-attention-summary-strip,.absp-status-students-summary
){
  font-size:14px!important;line-height:1.7!important;font-weight:600!important;
}

/* Prevent long English or Arabic status text from escaping compact cards. */
.absp-kpi-grid article,.absp-head-kpis article,.absp-social-kpis article,
.absp-act-kpis article,.absp-formative-kpis article,.absp-intervention-kpis article,
.absp-da-kpis article,.absp-da-report-kpis article{
  min-width:0;
}
.absp-kpi-grid article>strong,.absp-da-kpis article>strong{
  max-width:100%;
}

.absp-empty-state,.absp-social-empty,.absp-head-empty,.absp-da-empty,.absp-intervention-empty,
.absp-formative-empty,.absp-swr-empty{
  font-size:14px!important;line-height:1.65!important;font-weight:600!important;
}

/* WordPress administration screens use the same portal typography. */
.absp-admin-wrap,.absp-admin-wrap *{
  font-family:var(--absp-portal-font)!important;
}
.absp-admin-wrap{
  font-size:var(--absp-text-base)!important;line-height:1.55!important;
}
.absp-admin-wrap :is(input,select,textarea){
  font-size:var(--absp-text-control)!important;line-height:1.5!important;
}
.absp-admin-wrap :is(button,.button){
  font-size:var(--absp-text-button)!important;line-height:1.35!important;font-weight:700!important;
}
.absp-admin-wrap .absp-admin-card{
  min-width:0;font-size:14px!important;line-height:1.6!important;
}
.absp-admin-wrap .absp-admin-card>strong{
  display:block;font-size:18px!important;line-height:1.35!important;overflow-wrap:anywhere;
}
.absp-admin-wrap .absp-admin-card>span{
  display:block;font-size:13px!important;line-height:1.5!important;font-weight:600!important;
}

/* Unified, single-line sidebars with complete labels and preserved manual collapse. */
.absp-teacher-nav button,.absp-head-sidebar nav button,.absp-social-sidebar nav button{
  font-size:13.5px!important;line-height:1.25!important;font-weight:700!important;
}
.absp-teacher-nav .absp-nav-label,
.absp-head-sidebar nav button>span,
.absp-social-sidebar nav button>span{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;
}
.absp-teacher-nav button,.absp-head-sidebar nav button,.absp-social-sidebar nav button{
  min-width:0;
}

/* Close controls keep their clear icon size. */
.absp-dev-dialog>header>button,.absp-social-dialog>header>button,.absp-lesson-review-dialog>header>button,
[data-close-lesson-plan],[data-close-social-modal],[data-pm-close],[data-act-close]{font-size:22px!important;line-height:1!important}

@media(min-width:901px){
  .absp-teacher-page:not(.is-sidebar-collapsed) .absp-teacher-layout{grid-template-columns:278px minmax(0,1fr)!important}
  .absp-head-page:not(.is-sidebar-collapsed):not(.sidebar-collapsed){grid-template-columns:278px minmax(0,1fr)!important}
  .absp-teacher-page.is-sidebar-collapsed .absp-teacher-layout{grid-template-columns:76px minmax(0,1fr)!important}
  .absp-head-page.is-sidebar-collapsed,.absp-head-page.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)!important}
}
@media(min-width:761px){
  .absp-social-page:not(.sidebar-collapsed){grid-template-columns:278px minmax(0,1fr)!important}
  .absp-social-page.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)!important}
}
@media(max-width:760px){
  [data-absp-login] button:not(.absp-group-tab):not(.absp-role-option),
  [data-teacher-portal] button:not(.absp-teacher-nav button),
  [data-head-portal] button:not(.absp-head-sidebar nav button),
  [data-social-portal] button:not(.absp-social-sidebar nav button){white-space:normal}
  .absp-social-sidebar nav button>span{white-space:nowrap!important}
}

@media print{
  [data-absp-login],[data-teacher-portal],[data-head-portal],[data-social-portal],.absp-gd-admin,.absp-admin-wrap{font-family:Arial,Tahoma,sans-serif!important;font-size:11pt!important}
}
