/* توزيع القاعات والجدول الامتحاني — نفس أسلوب نظام الشيتات */
.hs-note {
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.75;
  margin: 0 0 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-weight: 600;
}
.hs-note.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.hs-note.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.hs-note.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.hs-lead { color: #6b7280; line-height: 1.75; margin: 0 0 14px; font-weight: 600; }

.hs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hs-chip {
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  transition: all 0.2s;
}
.hs-chip:hover { border-color: var(--app-primary-300); color: var(--app-primary-800); background: var(--app-primary-50); }
.hs-chip.on {
  background: var(--app-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(var(--app-primary-rgb), 0.28);
}

.hs-scroll { overflow: auto; }
.hs-table th, .hs-table td { padding: 8px 10px !important; font-size: 13px; vertical-align: top !important; }
.hs-sheet th, .hs-sheet td { text-align: center; vertical-align: middle !important; }
.hs-sheet thead th { position: sticky; top: 0; z-index: 4; }
.hs-dayhead { background: #0f172a; color: #fff; font-weight: 800; min-width: 78px; }
.hs-daycell { color: #fff; font-weight: 800; min-width: 78px; font-size: 15px; }
.hs-timecell { font-weight: 800; white-space: nowrap; }
.hs-stagehead { font-weight: 800; color: #1f2937; }
.hs-stagehead.s1 { background: #facc15; }
.hs-stagehead.s2 { background: #22d3ee; }
.hs-stagehead.s3 { background: #a78bfa; }
.hs-stagehead.s4 { background: #fb7185; }
.hs-subhead { font-size: 12px !important; font-weight: 800; color: #1f2937; }
.hs-subhead.s1 { background: #fef08a; }
.hs-subhead.s2 { background: #a5f3fc; }
.hs-subhead.s3 { background: #ddd6fe; }
.hs-subhead.s4 { background: #fecdd3; }
.hs-day.sun .hs-daycell { background: #c2410c; }
.hs-day.sun .hs-timecell, .hs-day.sun td { background: #fff7ed; color: #9a3412; }
.hs-day.mon .hs-daycell { background: #1d4ed8; }
.hs-day.mon .hs-timecell, .hs-day.mon td { background: #eff6ff; color: #1e3a8a; }
.hs-day.tue .hs-daycell { background: #0f766e; }
.hs-day.tue .hs-timecell, .hs-day.tue td { background: #f0fdfa; color: #115e59; }
.hs-day.wed .hs-daycell { background: #6d28d9; }
.hs-day.wed .hs-timecell, .hs-day.wed td { background: #f5f3ff; color: #5b21b6; }
.hs-day.thu .hs-daycell { background: #be123c; }
.hs-day.thu .hs-timecell, .hs-day.thu td { background: #fff1f2; color: #9f1239; }
.hs-day.sat .hs-daycell { background: #334155; }
.hs-day.sat .hs-timecell, .hs-day.sat td { background: #f8fafc; color: #334155; }
.hs-day-start > th, .hs-day-start > td { box-shadow: inset 0 3px 0 rgba(15, 23, 42, 0.55); }
.hs-day .hs-cell { background: #fff; color: #64748b; }
.hs-day .hs-occ, .hs-day .hs-rest { color: inherit; }
.hs-table thead th { white-space: nowrap; }
.hs-sticky { position: sticky; right: 0; background: #fff; z-index: 1; min-width: 92px; }
.hs-total td { font-weight: 800; background: var(--app-primary-50); color: var(--app-primary-900); }
.hs-floor td {
  background: var(--app-primary-50);
  font-weight: 800;
  color: var(--app-primary-900);
  border-bottom: 1px solid var(--app-primary-200);
}

.hs-room {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  padding: 2px 8px;
  font-size: 13px;
  margin: 0 2px 2px 0;
}
.hs-room.A { background: #059669; }
.hs-room.B { background: #2563eb; }
.hs-room.C { background: #d97706; }
.hs-sci { font-size: 12px; color: #b45309; font-weight: 800; }

.hs-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--app-primary-50);
  color: var(--app-primary-800);
}
.hs-tag.lab { background: #fffbeb; color: #b45309; }
.hs-tag.break { background: #ecfdf5; color: #047857; }
.hs-tag.bad { background: #fef2f2; color: #b91c1c; }
.hs-tag.muted { background: #f3f4f6; color: #6b7280; }

.hs-grid { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .hs-grid { grid-template-columns: 1fr; } }
.hs-dept-list { display: flex; flex-direction: column; gap: 8px; }
.hs-dept-btn {
  text-align: right;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  color: #1f2937;
  transition: all 0.2s;
}
.hs-dept-btn small { display: block; color: #6b7280; font-weight: 600; margin-top: 2px; }
.hs-dept-btn:hover { border-color: var(--app-primary-300); background: var(--app-primary-50); }
.hs-dept-btn.on { border-color: var(--app-primary); background: var(--app-primary-50); color: var(--app-primary-900); }

.hs-cell {
  width: 100%;
  text-align: right;
  border: 1px dashed #cbd5e1;
  background: #fff;
  border-radius: 12px;
  min-height: 58px;
  padding: 8px 10px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  color: #64748b;
  font-weight: 700;
}
.hs-cell strong { display: block; color: #1f2937; }
.hs-cell span { color: #6b7280; font-size: 12px; font-weight: 600; }
.hs-cell.theory { border-style: solid; border-color: var(--app-primary); background: var(--app-primary-50); }
.hs-cell.lab { border-style: solid; border-color: #d97706; background: #fffbeb; }
.hs-cell:hover { transform: translateY(-1px); }

.hs-rest {
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
}
.hs-day-line {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}
.hs-day-name { font-weight: 800; color: var(--app-primary-900, #134e4a); padding-top: 6px; }
.hs-period-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.hs-period-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 148px;
}
.hs-period-box label { display: block; font-size: 12px; font-weight: 800; color: #334155; margin-bottom: 4px; }
.hs-offer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
}
.hs-teacher-menu {
  position: fixed;
  z-index: 80;
  min-width: 230px;
  max-width: 300px;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--app-primary-200, #99f6e4);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.18);
  padding: 6px;
}
.hs-teacher-menu-title {
  padding: 8px 10px 4px;
  color: var(--app-primary, #0f766e);
  font-size: 12px;
  font-weight: 800;
}
.hs-teacher-menu button {
  display: block;
  width: 100%;
  text-align: right;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  color: #1f2937;
  cursor: pointer;
}
.hs-teacher-menu button:hover { background: var(--app-primary-50, #f0fdfa); }
.hs-teacher-menu button span { display: block; margin-top: 2px; color: #64748b; font-size: 11px; font-weight: 700; }
.hs-teacher-menu button:disabled { color: #94a3b8; cursor: default; }
.hs-teacher-menu .hs-teacher-del { color: #b91c1c; }
.hs-offer strong { display: block; color: #1f2937; }
.hs-offer span { color: #64748b; font-size: 12px; font-weight: 700; }

.hs-occ {
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 52px;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.hs-occ b { display: block; }
.hs-occ small { color: #6b7280; font-weight: 600; }
.hs-occ.theory { background: var(--app-primary-50); border-color: var(--app-primary-200); }
.hs-occ.lab { background: #fffbeb; border-color: #fde68a; }
.hs-occ.moved { background: #f8fafc; }
.hs-occ.bad { background: #fef2f2; border-color: #fecaca; }

.hs-draft {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.7fr));
  gap: 10px;
  align-items: end;
}
@media (max-width: 900px) { .hs-draft { grid-template-columns: 1fr 1fr; } }
.hs-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #6b7280; font-weight: 700; }
.hs-field .form-control, .hs-field .form-select { font-weight: 700; color: #1f2937; }

.hs-details { margin-top: 14px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; }
.hs-details summary { cursor: pointer; font-weight: 800; color: var(--app-primary-800); }
.hs-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hs-tools .doc-btn-primary,
.hs-tools .doc-btn-outline,
.hs-tools .doc-btn-danger { padding: 8px 14px; font-size: 13px; }

.dep-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dep-tabs button {
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #475569;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dep-tabs button.on {
  background: var(--app-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(var(--app-primary-rgb), 0.28);
}
