/* MadreseSoft UI polish round 2 */

/* Attendance: semantic colors, with a softer inactive state and strong active state. */
#attendance-form [data-choice-value="حاضر"]{background:#eefbf4!important;color:#087a4b!important;border-color:#b8e8cf!important}
#attendance-form [data-choice-value="غایب"]{background:#fff1f2!important;color:#b42335!important;border-color:#fecdd3!important}
#attendance-form [data-choice-value="تأخیر"]{background:#fff8e6!important;color:#9a6700!important;border-color:#f6d48f!important}
#attendance-form [data-choice-value="مرخصی"]{background:#eef6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
#attendance-form [data-choice-value="حاضر"].active{background:#15a66d!important;color:#fff!important;border-color:#15a66d!important;box-shadow:0 0 0 3px rgba(21,166,109,.14)}
#attendance-form [data-choice-value="غایب"].active{background:#e15463!important;color:#fff!important;border-color:#e15463!important;box-shadow:0 0 0 3px rgba(225,84,99,.14)}
#attendance-form [data-choice-value="تأخیر"].active{background:#e5a62d!important;color:#332300!important;border-color:#e5a62d!important;box-shadow:0 0 0 3px rgba(229,166,45,.18)}
#attendance-form [data-choice-value="مرخصی"].active{background:#3778d5!important;color:#fff!important;border-color:#3778d5!important;box-shadow:0 0 0 3px rgba(55,120,213,.14)}
#attendance-form .choice-button-group{gap:8px}
#attendance-form .choice-button-group button{min-width:64px;font-weight:800;transition:.16s ease}

/* Assignment clarity and live subject capacity. */
.assignment-filter-group{flex-wrap:wrap;justify-content:flex-start}
.assignment-filter-group button{min-width:112px}
.subject-capacity-card{border:1px solid #d7e7f5;background:linear-gradient(180deg,#f8fcff,#f3f8fd);border-radius:14px;padding:15px 16px;margin-top:4px}
.subject-capacity-card.capacity-complete{border-color:#b7e3cd;background:#f3fbf7}
.subject-capacity-card.capacity-danger{border-color:#f0bbc1;background:#fff7f8}
.subject-capacity-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.subject-capacity-title strong{font-size:13px;color:#0b2345}
.subject-capacity-title small{font-size:10px;color:#6c7890;font-weight:400}
.subject-capacity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.subject-capacity-grid>span{background:#fff;border:1px solid #e5ebf2;border-radius:11px;padding:11px 12px;display:flex;flex-direction:column;gap:6px;min-height:70px}
.subject-capacity-grid small{color:#6c7890;font-size:10px;font-weight:500}
.subject-capacity-grid strong{color:#0b2345;font-size:14px}
.subject-capacity-grid .complete{background:#eaf9f1;border-color:#b7e3cd}
.subject-capacity-grid .complete strong{color:#087a4b}
.subject-capacity-grid .danger{background:#fff0f2;border-color:#f0bbc1}
.subject-capacity-grid .danger strong{color:#b42335}
#assignment-coverage th,#assignment-coverage td{vertical-align:middle}
#assignment-coverage td strong{font-weight:800}

/* Staff work profile: consistent alignment and Persian, 24-hour time controls. */
.staff-profile-grid>label{align-self:start;margin-top:10px;margin-bottom:10px}
.staff-profile-grid .staff-field-label{display:flex;align-items:flex-end;min-height:32px;line-height:1.8}
.ms-native-time,.ms-native-number{display:none!important}
.ms-persian-time-picker{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:end;direction:ltr;width:100%}
.ms-persian-time-picker>span{padding-bottom:14px;font-size:18px;font-weight:900;color:#6c7890}
.ms-persian-time-picker label{margin:0!important;display:flex!important;flex-direction:column;gap:5px!important}
.ms-persian-time-picker small{font-size:9px;color:#6c7890;text-align:center}
.ms-persian-time-picker select,.ms-persian-number{width:100%;min-height:48px;border:1px solid #e2e8f0;background:#fbfdff;border-radius:11px;padding:10px 12px;color:#172238;outline:none;text-align:center;font-weight:800}
.ms-persian-time-picker select:focus,.ms-persian-number:focus{border-color:#18b9cd;box-shadow:0 0 0 3px rgba(24,185,205,.08)}
.staff-profile-grid .staff-work-days{margin-top:10px}

@media(max-width:760px){
  #attendance-form .choice-button-group{display:grid;grid-template-columns:1fr 1fr;width:100%}
  #attendance-form .choice-button-group button{min-width:0}
  .subject-capacity-title{align-items:flex-start;flex-direction:column}
  .subject-capacity-grid{grid-template-columns:1fr 1fr}
}
