/* Shared interface treatment for staff, parent, applicant, and sign-in pages. */
html[data-design], body.ui-portal, body.ui-auth {
  --ui-radius: 14px;
  --ui-shadow: 0 8px 28px rgba(24, 38, 74, .07);
  --ui-shadow-hover: 0 14px 34px rgba(24, 38, 74, .11);
  --ui-focus: var(--ring, var(--indigo, #4059ad));
}
html[data-theme="dark"][data-design] { --ui-shadow: 0 8px 28px rgba(0, 0, 0, .2); --ui-shadow-hover: 0 14px 34px rgba(0, 0, 0, .27); }
html[data-design] :focus-visible, body.ui-portal :focus-visible, body.ui-auth :focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}
.ui-skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 200;
  padding: 9px 14px; border-radius: 9px; background: #fff; color: #172033;
  box-shadow: 0 8px 24px rgba(24, 38, 74, .18); font-weight: 700; text-decoration: none;
}
.ui-skip-link:focus { top: 12px; }
html[data-design] .content, html[data-design] .d2-main { min-width: 0; }
html[data-design] .card,
html[data-design] .dt,
body.ui-portal .card,
body.ui-auth .auth-page-content .card {
  border: 1px solid var(--line, var(--border, #e6e9f0));
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  min-width: 0;
}
html[data-design] .card-header,
body.ui-portal .card-header { font-weight: 750; letter-spacing: -.01em; }
html[data-design] .card-footer, body.ui-portal .card-footer { border-color: var(--line, var(--border, #e6e9f0)); }
html[data-design] .page-head,
html[data-design] .d2-page-head,
body.ui-portal .page-title-box { min-width: 0; }
html[data-design] .page-head h1,
html[data-design] .d2-page-head h1,
body.ui-portal .page-title-box h4 { letter-spacing: -.025em; line-height: 1.2; }
html[data-design] .table-responsive,
html[data-design] .table-wrap,
html[data-design] .dt-table-wrap,
body.ui-portal .table-responsive,
.ui-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.ui-table-scroll > table { min-width: max-content; width: 100%; }
html[data-design] .table > :not(caption) > * > *,
body.ui-portal .table > :not(caption) > * > * { vertical-align: middle; }
html[data-design] .table tbody tr,
body.ui-portal .table tbody tr { transition: background-color .15s ease; }
html[data-design] .form-control,
html[data-design] .form-select,
body.ui-portal .form-control,
body.ui-portal .form-select,
body.ui-auth .form-control,
body.ui-auth .form-select {
  min-width: 0;
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
html[data-design] textarea.form-control,
body.ui-portal textarea.form-control,
body.ui-auth textarea.form-control { min-height: 100px; }
html[data-design] .form-control:focus,
html[data-design] .form-select:focus,
body.ui-portal .form-control:focus,
body.ui-portal .form-select:focus,
body.ui-auth .form-control:focus,
body.ui-auth .form-select:focus {
  border-color: var(--ui-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-focus) 18%, transparent);
}
html[data-design] .btn,
body.ui-portal .btn,
body.ui-auth .btn { border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
html[data-design] .btn:not(:disabled):hover,
body.ui-portal .btn:not(:disabled):hover,
body.ui-auth .btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(24, 38, 74, .12); }
html[data-design] .btn:disabled,
body.ui-portal .btn:disabled,
body.ui-auth .btn:disabled { cursor: not-allowed; }
html[data-design] .badge,
body.ui-portal .badge { line-height: 1.4; white-space: normal; }
html[data-design] .alert,
body.ui-portal .alert,
body.ui-auth .alert { border-radius: 12px; }
body.ui-portal .page-content { padding-bottom: 40px; background: #f6f8fc; }
.ui-nav-label { display: none; }
.ui-theme-trigger { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: #0ab39c; color: #fff; cursor: pointer; }
.ui-theme-trigger:focus-visible { outline: 3px solid #4059ad; outline-offset: 3px; }
body.ui-portal .page-title-box { padding: 16px 0 20px; margin-bottom: 12px; }
body.ui-portal .page-title-box .breadcrumb-item:empty { display: none; }
.ui-portal-account-avatar { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; background: #e9eeff; color: #34457f; font-weight: 800; }
body.ui-auth .auth-page-wrapper { background: radial-gradient(circle at 80% 0%, #e9efff 0, #f6f8fc 42%, #eef3f8 100%); }
body.ui-auth .auth-page-content { width: 100%; }
body.ui-auth .auth-page-content > .container { max-width: 1120px; }
body.ui-auth .auth-page-content .card { overflow: hidden; border-radius: 18px; box-shadow: 0 20px 50px rgba(24, 38, 74, .13); }
.ui-mobile-search-toggle { display: none !important; }
@media (max-width: 1120px) {
  html[data-design="design1"] .ui-mobile-search-toggle { display: inline-flex !important; }
  html[data-design="design1"].ui-search-open .topbar .search-wrap {
    display: block; position: absolute; left: 10px; right: 10px; top: calc(100% + 6px);
    padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
    box-shadow: var(--ui-shadow-hover);
  }
  html[data-design="design1"].ui-search-open .topbar .global-search { display: block; width: 100%; }
}
@media (max-width: 768px) {
  body.ui-portal .ui-nav-label { display: inline; margin-left: 6px; font-size: .78rem; font-weight: 700; }
  html[data-design] .content, html[data-design] .d2-main { padding-inline: 16px; }
  html[data-design] .card-body, body.ui-portal .card-body { padding: 16px; }
  html[data-design] .page-head h1, html[data-design] .d2-page-head h1 { font-size: 1.5rem; }
  html[data-design] .actions, html[data-design] .d2-page-actions { max-width: 100%; }
  body.ui-portal .page-title-box { display: block !important; }
  body.ui-portal .page-title-right { margin-top: 8px; }
  body.ui-auth .auth-page-content { padding-top: 0 !important; }
  .ui-mobile-search-toggle { display: inline-flex !important; }
  html[data-design="design1"] .topbar,
  html[data-design="design2"] .d2-header { position: sticky; }
  html[data-design="design2"].ui-search-open .d2-header .d2-search {
    display: flex; position: absolute; left: 10px; right: 10px; top: calc(100% + 6px);
    min-width: 0; width: auto; margin: 0; background: var(--surface); box-shadow: var(--ui-shadow-hover);
  }
  html[data-design="design2"].ui-search-open .d2-header .d2-search input { min-width: 0; }
  html[data-design] .table-responsive::-webkit-scrollbar,
  body.ui-portal .table-responsive::-webkit-scrollbar { height: 8px; }
  html[data-design] .table-responsive::-webkit-scrollbar-thumb,
  body.ui-portal .table-responsive::-webkit-scrollbar-thumb { border-radius: 10px; background: #aeb8cb; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-design] .btn, body.ui-portal .btn, body.ui-auth .btn,
  html[data-design] .table tbody tr, body.ui-portal .table tbody tr { transition: none; }
  html[data-design] .btn:not(:disabled):hover,
  body.ui-portal .btn:not(:disabled):hover,
  body.ui-auth .btn:not(:disabled):hover { transform: none; }
}
@media print {
  html[data-design] .card, html[data-design] .dt, body.ui-portal .card { box-shadow: none; }
  .ui-mobile-search-toggle { display: none !important; }
}

/* "N SMS waiting · Send" on the pages that create them */
.sms-wait { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--lg-line, #e6e9f0);
  border-radius: 8px; background: var(--lg-surface, #fff); font-size: 13.5px; }
.sms-wait i { color: var(--lg-muted, #5a6479); }
.sms-wait span { flex: 1; min-width: 200px; }
