/* ADAMEHR_SCHOOL_PROFILE_UI_0111 */
.school-profile-nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 11px 12px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: start;
}
.school-profile-nav:hover,
.school-profile-nav.is-active { background: rgba(24,139,123,.12); color: #116f63; }
.school-profile-nav .sp-nav-icon { width: 24px; text-align: center; }

.content:has(.sp-page) {
  box-sizing: border-box;
  min-width: 0;
  overflow-x: hidden;
  padding: 16px clamp(12px, 2vw, 24px) 28px;
}
.sp-page {
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.sp-page *, .sp-page *::before, .sp-page *::after { box-sizing: border-box; }

.sp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid #e4ebe9;
  border-radius: 18px;
  background: #fff;
}
.sp-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
.sp-hero-main > div:last-child { min-width: 0; }
.sp-logo,
.sp-logo-fallback {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1px solid #dfe8e5;
  background: #f3f9f7;
  flex: 0 0 68px;
}
.sp-logo { object-fit: contain; padding: 6px; }
.sp-logo-fallback { display: grid; place-items: center; color: #0f766e; font-size: 1.45rem; font-weight: 900; }
.sp-hero h3 { margin: 0 0 5px; font-size: 1.08rem; overflow-wrap: anywhere; }
.sp-hero p { margin: 0; color: #75827f; font-size: .81rem; overflow-wrap: anywhere; }
.sp-logo-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }

.sp-tabs {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.sp-tab {
  border: 1px solid #dfe8e5;
  background: #fff;
  padding: 8px 13px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  font-size: .84rem;
  font-weight: 800;
  min-height: 40px;
}
.sp-tab.is-active { background: #0f766e; color: #fff; border-color: #0f766e; }
.sp-panel { display: none; min-width: 0; }
.sp-panel.is-active { display: block; }
.sp-card {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #e4ebe9;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}
.sp-section-head { margin-bottom: 14px; }
.sp-section-head h3 { margin: 0; font-size: .98rem; }
.sp-section-head p { margin: 4px 0 0; color: #7a8784; font-size: .78rem; }
.sp-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.sp-grid { display: grid; gap: 12px; min-width: 0; }
.sp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sp-field.sp-wide { grid-column: 1 / -1; }
.sp-field > span { font-size: .78rem; font-weight: 800; color: #33413e; }
.sp-field input,
.sp-field select,
.sp-field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #d9e3e0;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  min-height: 42px;
  font: inherit;
  font-size: .86rem;
  color: #17211f;
  outline: none;
}
.sp-field textarea { min-height: 74px; resize: vertical; }
.sp-field input:focus,
.sp-field select:focus,
.sp-field textarea:focus { border-color: #179382; box-shadow: 0 0 0 3px rgba(23,147,130,.09); }

.sp-more { margin-top: 13px; border-top: 1px solid #edf1f0; padding-top: 12px; }
.sp-more summary { cursor: pointer; color: #0f766e; font-size: .82rem; font-weight: 800; margin-bottom: 12px; }
.sp-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.sp-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 13px;
  min-height: 40px;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.sp-btn:disabled { opacity: .55; cursor: wait; }
.sp-btn-primary { background: #0f766e; color: #fff; }
.sp-btn-secondary { background: #eef5f3; color: #205e55; }
.sp-btn-quiet { background: #f5f7f7; color: #66736f; }
.sp-note { padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: .82rem; display: none; }
.sp-note.is-visible { display: block; }
.sp-note-success { background: #ecfdf5; color: #047857; }
.sp-note-error { background: #fff1f2; color: #be123c; }
.sp-loading { text-align: center; padding: 32px; color: #73807d; }

.sp-branch-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.sp-branch { min-width: 0; border: 1px solid #e1e9e7; border-radius: 12px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-branch > div:first-child { min-width: 0; }
.sp-branch h4 { margin: 0 0 4px; font-size: .9rem; overflow-wrap: anywhere; }
.sp-branch p { margin: 0; color: #788480; font-size: .76rem; overflow-wrap: anywhere; }
.sp-branch-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-badge { display: inline-block; padding: 3px 7px; border-radius: 999px; background: #edf7f4; color: #0f766e; font-size: .68rem; }
.sp-empty { grid-column: 1 / -1; text-align: center; padding: 24px; color: #788480; border: 1px dashed #d4dfdc; border-radius: 12px; }

.sp-modal { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(15,23,42,.42); }
.sp-modal.is-open { display: flex; }
.sp-modal-box { width: min(680px, 100%); max-height: calc(100dvh - 36px); overflow: auto; background: #fff; border-radius: 16px; padding: 18px; }
.sp-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sp-modal-head h3 { margin: 0; font-size: 1rem; }
.sp-modal-close { width: 40px; height: 40px; border: 0; border-radius: 9px; background: #f1f5f4; cursor: pointer; font-size: 1.1rem; }
.sp-check { display: flex; align-items: center; gap: 7px; min-height: 42px; font-size: .84rem; }
.sp-check input { width: 18px; height: 18px; }

@media (max-width: 1100px) {
  .sp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-branch-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .content:has(.sp-page) { padding: 10px 10px 88px; }
  .sp-page { max-width: none; }
  .sp-hero { align-items: stretch; flex-direction: column; gap: 12px; padding: 13px; border-radius: 14px; }
  .sp-hero-main { width: 100%; }
  .sp-logo,
  .sp-logo-fallback { width: 58px; height: 58px; flex-basis: 58px; border-radius: 14px; }
  .sp-logo-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sp-logo-actions .sp-btn:only-of-type { grid-column: 1 / -1; }
  .sp-logo-actions .sp-btn { width: 100%; }
  .sp-tabs { margin-inline: -2px; padding-inline: 2px; }
  .sp-grid-3,
  .sp-grid-2 { grid-template-columns: 1fr; }
  .sp-field.sp-wide { grid-column: auto; }
  .sp-card { padding: 13px; border-radius: 14px; }
  .sp-head-row { align-items: stretch; flex-direction: column; }
  .sp-head-row > .sp-btn { width: 100%; }
  .sp-actions { position: sticky; bottom: 8px; z-index: 8; padding-top: 8px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 34%); }
  .sp-actions .sp-btn { flex: 1 1 100%; width: 100%; }
  .sp-branch { align-items: stretch; flex-direction: column; }
  .sp-branch-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sp-branch-actions .sp-btn { width: 100%; }
  .sp-modal { padding: 10px; align-items: flex-end; }
  .sp-modal-box { width: 100%; max-height: 88dvh; border-radius: 18px 18px 0 0; padding: 14px; }
}

@media (max-width: 420px) {
  .sp-hero-main { align-items: flex-start; }
  .sp-logo-actions { grid-template-columns: 1fr; }
  .sp-logo-actions .sp-btn:only-of-type { grid-column: auto; }
  .sp-tab { padding-inline: 11px; font-size: .8rem; }
  .sp-card { padding: 12px; }
  .sp-field input,
  .sp-field select,
  .sp-field textarea { font-size: 16px; }
}
