/* KYDSAFE / Pathshala School ERP theme — blends with school-app-chrome.css */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --kyd-navy: #162447;
  --kyd-navy-soft: #1e3260;
  --kyd-yellow: #E8C21A;
  --kyd-yellow-soft: rgba(232, 194, 26, 0.14);
  --kyd-gray: #5C5C5C;
  --kyd-orange: #C67C00;
  --kyd-red: #B3261E;
  --kyd-green: #5DC162;
  --kyd-paper: #eef3fb;
  --kyd-surface: #ffffff;
  --kyd-line: rgba(22, 36, 71, 0.1);
  --sch-sidebar-width: 272px;
  --ad-sans: "Manrope", system-ui, sans-serif;
  --brand-primary: var(--kyd-navy);
  --brand-accent: var(--kyd-yellow);
  --brand-ink: var(--kyd-navy);
  --brand-paper: var(--kyd-paper);
  --ad-primary: var(--kyd-navy);
  --ad-ink: var(--kyd-navy);
  --ad-paper: var(--kyd-paper);
  --ad-gold: var(--kyd-yellow);
  --ad-gold-deep: var(--kyd-navy);
}

body.school-erp {
  background: var(--kyd-paper) !important;
  font-family: var(--ad-sans) !important;
}

body.school-erp .sidebar {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--kyd-navy) 88%, #000000) 0%,
    var(--kyd-navy) 45%,
    color-mix(in srgb, var(--kyd-navy) 85%, #ffffff) 100%
  ) !important;
  color: #e8edf7 !important;
  border-right: none !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

body.school-erp .sidebar::-webkit-scrollbar {
  width: 6px;
}

body.school-erp .sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

body.school-erp .sidebar-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  padding: 1rem 1.1rem !important;
  position: sticky;
  top: 0;
  z-index: 2;
  background: inherit;
}

body.school-erp .sidebar-header h4 {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: -0.01em;
}

body.school-erp .sidebar-header .kyd-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--kyd-yellow);
  color: var(--kyd-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(232, 194, 26, 0.35);
}

body.school-erp .sidebar-school-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.65rem 0.85rem 0.35rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #eef3ff;
  position: sticky;
  top: 4.25rem;
  z-index: 2;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

body.school-erp .sidebar-school-card i {
  color: var(--kyd-yellow);
  font-size: 1rem;
  flex-shrink: 0;
}

body.school-erp .sidebar-school-card__text {
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.school-erp .sidebar-menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0.35rem 0.55rem 1.25rem !important;
}

body.school-erp .sidebar-menu li {
  list-style: none !important;
}

body.school-erp .sidebar-section-title {
  color: rgba(255, 255, 255, 0.42) !important;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 0.65rem 0.4rem;
  font-weight: 700;
  list-style: none !important;
}

body.school-erp .sidebar-menu a {
  color: rgba(255, 255, 255, 0.78) !important;
  text-decoration: none !important;
  border-radius: 10px !important;
  margin: 0.1rem 0 !important;
  padding: 0.5rem 0.55rem !important;
  font-weight: 500;
  font-size: 0.84rem;
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  border-left: none !important;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

body.school-erp .sch-nav-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

body.school-erp .sch-nav-icon i {
  font-size: 0.95rem !important;
  color: inherit !important;
  width: auto !important;
}

body.school-erp .sch-nav-label {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

body.school-erp .sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  text-decoration: none !important;
  transform: none !important;
  box-shadow: none !important;
}

body.school-erp .sidebar-menu a:hover .sch-nav-icon {
  background: rgba(232, 194, 26, 0.16);
  color: var(--kyd-yellow);
}

body.school-erp .sidebar-menu a.is-active,
body.school-erp .sidebar-menu a.active {
  background: rgba(232, 194, 26, 0.14) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: inset 3px 0 0 var(--kyd-yellow) !important;
  border-left: none !important;
}

body.school-erp .sidebar-menu a.is-active .sch-nav-icon,
body.school-erp .sidebar-menu a.active .sch-nav-icon {
  background: rgba(232, 194, 26, 0.22);
  color: var(--kyd-yellow);
}

/* Collapsible nav groups */
body.school-erp .sch-nav-group {
  list-style: none !important;
  margin: 0.15rem 0;
}

body.school-erp .sch-nav-details {
  border: none;
  margin: 0;
}

body.school-erp .sch-nav-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  margin: 0.2rem 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

body.school-erp .sch-nav-group__title::-webkit-details-marker,
body.school-erp .sch-nav-group__title::marker {
  display: none;
  content: '';
}

body.school-erp .sch-nav-group__title:hover {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
}

body.school-erp .sch-nav-group__title:focus-visible {
  outline: 2px solid rgba(232, 194, 26, 0.55);
  outline-offset: 1px;
}

body.school-erp .sch-nav-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  opacity: 0.7;
  flex-shrink: 0;
}

body.school-erp .sch-nav-details:not([open]) .sch-nav-chevron {
  transform: rotate(-90deg);
}

body.school-erp .sch-nav-details[open] .sch-nav-chevron {
  transform: rotate(0deg);
}

body.school-erp .sch-nav-group__list {
  list-style: none !important;
  margin: 0;
  padding: 0 0 0.35rem 0.35rem;
  overflow: hidden;
}

body.school-erp .sch-nav-details:not([open]) > .sch-nav-group__list {
  display: none;
}

body.school-erp .sch-nav-group.sch-nav-group--empty {
  display: none !important;
}

body.school-erp .sidebar-section-title.sch-section-empty {
  display: none !important;
}

body.school-erp .navbar.topbar {
  background: var(--kyd-surface) !important;
  border-bottom: 1px solid var(--kyd-line);
  box-shadow: 0 1px 0 rgba(22, 36, 71, 0.04);
}

body.school-erp .topbar-title {
  font-weight: 700;
  color: var(--kyd-navy);
}

/* ——— Top bar layout ——— */
body.school-erp .sch-topbar {
  padding: 0 !important;
}

body.school-erp .sch-topbar__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: var(--sch-topbar-height, 3.75rem);
  padding: 0.45rem 1rem 0.45rem 0.65rem;
}

body.school-erp .sch-topbar__start {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

body.school-erp .sch-topbar__menu {
  padding: 0.35rem 0.45rem !important;
  line-height: 1;
  font-size: 1.35rem;
}

body.school-erp .sch-topbar__brand {
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

body.school-erp .sch-topbar__search {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 28rem;
  margin: 0 !important;
  position: relative;
}

body.school-erp .sch-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1200;
  max-height: 22rem;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--kyd-line, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(22, 36, 71, 0.12);
}

body.school-erp .sch-search-results__item {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--kyd-navy, #162447);
  border-bottom: 1px solid #f1f5f9;
}

body.school-erp .sch-search-results__item:hover,
body.school-erp .sch-search-results__item:focus {
  background: #f8fafc;
}

body.school-erp .sch-search-results__type {
  flex: 0 0 auto;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  min-width: 3.5rem;
}

body.school-erp .sch-search-results__label {
  font-size: 0.875rem;
  font-weight: 500;
}

body.school-erp .sch-search-results__empty {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: #64748b;
}

body.school-erp .sch-topbar__search input {
  background: #f8fafc;
  border-color: var(--kyd-line);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

body.school-erp .sch-topbar__search input:focus {
  background: #fff;
  border-color: var(--kyd-navy);
  box-shadow: 0 0 0 3px rgba(22, 36, 71, 0.08);
  outline: none;
}

body.school-erp .sch-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
  min-width: 0;
}

body.school-erp .sch-topbar__year {
  display: none;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

body.school-erp .sch-band-select,
body.school-erp .sch-ws-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.15rem 0.55rem 0.15rem 0.45rem;
  border: 1px solid var(--kyd-line);
  border-radius: 999px;
  background: #fff;
  color: var(--kyd-navy);
  font-size: 0.8125rem;
  line-height: 1.2;
}

body.school-erp .sch-band-select i,
body.school-erp .sch-ws-switch i {
  color: #64748b;
  font-size: 0.9rem;
  flex-shrink: 0;
}

body.school-erp .sch-band-select select,
body.school-erp .sch-ws-switch select {
  border: 0;
  background: transparent;
  color: var(--kyd-navy);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.15rem 1.35rem 0.15rem 0;
  max-width: 9.5rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23162447' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
  background-size: 0.65rem;
}

body.school-erp .sch-band-select select:focus,
body.school-erp .sch-ws-switch select:focus {
  outline: none;
}

body.school-erp .sch-band-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--kyd-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

body.school-erp .sch-topbar__user {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-left: 0.55rem;
  margin-left: 0.15rem;
  border-left: 1px solid var(--kyd-line);
}

body.school-erp .sch-topbar__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--kyd-navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

body.school-erp .sch-topbar__email {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
}

body.school-erp .sch-topbar__logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--kyd-line);
  border-radius: 999px;
  background: #fff;
  padding: 0.38rem 0.7rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--kyd-navy);
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}

body.school-erp .sch-topbar__logout:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.school-erp .sch-topbar__logout i {
  font-size: 1rem;
}

@media (min-width: 1200px) {
  body.school-erp .sch-topbar__year {
    display: inline-flex;
  }

  body.school-erp .sch-topbar__email {
    max-width: 11rem;
  }
}

@media (max-width: 991.98px) {
  body.school-erp .sch-topbar__email,
  body.school-erp .sch-topbar__logout-label {
    display: none;
  }

  body.school-erp .sch-topbar__logout {
    padding: 0.38rem 0.55rem;
  }

  body.school-erp .sch-topbar__search {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  body.school-erp .sch-topbar__brand {
    display: none;
  }

  body.school-erp .sch-topbar__inner {
    gap: 0.45rem;
    padding-inline: 0.55rem;
  }

  body.school-erp .sch-band-select select,
  body.school-erp .sch-ws-switch select {
    max-width: 6.5rem;
  }
}

/* Band switcher */
.sch-band-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.sch-band-tab {
  border: 1px solid var(--kyd-line);
  background: var(--kyd-surface);
  color: var(--kyd-navy);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sch-band-tab:hover {
  background: var(--kyd-yellow-soft);
  border-color: var(--kyd-yellow);
}

.sch-band-tab.is-active {
  background: var(--kyd-navy);
  border-color: var(--kyd-navy);
  color: #fff;
}

.sch-band-single {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--kyd-navy);
}

.sch-band-choice-grid {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.sch-band-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--kyd-line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
}

.sch-band-choice:has(input:checked) {
  border-color: var(--kyd-blue, #2563eb);
  background: #eff6ff;
}

/* Pathshala dashboard */
.sch-dash {
  display: grid;
  gap: 1rem;
}

.sch-dash__welcome {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: stretch;
  background: linear-gradient(135deg, #dce9ff 0%, #f5f8ff 100%);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--kyd-line);
}

.sch-dash__welcome h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--kyd-navy);
  margin: 0 0 0.35rem;
}

.sch-dash__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.sch-metric {
  background: var(--kyd-surface);
  border: 1px solid var(--kyd-line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 8px rgba(22, 36, 71, 0.04);
}

.sch-metric__label {
  font-size: 0.75rem;
  color: var(--kyd-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sch-metric__value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--kyd-navy);
  margin: 0.25rem 0 0;
  line-height: 1.1;
}

.sch-metric__meta {
  font-size: 0.78rem;
  color: var(--kyd-gray);
  margin-top: 0.25rem;
}

.sch-dash__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 991px) {
  .sch-dash__grid2 { grid-template-columns: 1fr; }
}

.sch-panel {
  background: var(--kyd-surface);
  border: 1px solid var(--kyd-line);
  border-radius: 16px;
  padding: 1rem 1.15rem;
}

.sch-panel__title {
  font-weight: 700;
  color: var(--kyd-navy);
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.sch-attendance-ring {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sch-attendance-ring__stats span {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.sch-attendance-ring__stats .present { color: #2563eb; }
.sch-attendance-ring__stats .absent { color: var(--kyd-red); }
.sch-attendance-ring__stats .late { color: var(--kyd-orange); }

.sch-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.sch-quick-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--kyd-line);
  background: var(--kyd-surface);
  color: var(--kyd-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.sch-quick-btn--primary {
  background: var(--kyd-navy);
  color: #fff;
  border-color: var(--kyd-navy);
}

.sch-quick-btn:hover {
  background: var(--kyd-yellow-soft);
  border-color: var(--kyd-yellow);
  color: var(--kyd-navy);
}

.sch-quick-btn--primary:hover {
  background: var(--kyd-navy-soft);
  color: #fff;
}

/* Pill inputs (design system) */
body.school-erp .qb-field input,
body.school-erp .qb-field select,
body.school-erp .qb-field textarea,
body.school-erp .sc-table-toolbar input {
  border-radius: 999px !important;
  border-color: rgba(22, 36, 71, 0.15) !important;
}

body.school-erp .qb-field input:focus,
body.school-erp .qb-field select:focus {
  border-color: var(--kyd-yellow) !important;
  box-shadow: 0 0 0 3px var(--kyd-yellow-soft) !important;
}

body.school-erp .btn-primary,
body.school-erp .btn-accent {
  background: var(--kyd-navy) !important;
  border-color: var(--kyd-navy) !important;
  border-radius: 999px !important;
  font-weight: 600;
}

body.school-erp .btn-outline-primary,
body.school-erp .btn-outline-secondary {
  border-radius: 999px !important;
  font-weight: 600;
}

/* Pickup console */
.sch-pickup-console {
  max-width: 520px;
  margin: 0 auto;
}

.sch-pickup-console .sch-pin-input {
  letter-spacing: 0.35em;
  font-size: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.sch-pickup-result {
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1rem;
  border: 1px solid var(--kyd-line);
}

.sch-pickup-result--ok {
  background: rgba(93, 193, 98, 0.12);
  border-color: var(--kyd-green);
}

.sch-pickup-result--deny {
  background: rgba(179, 38, 30, 0.08);
  border-color: var(--kyd-red);
}

.sch-nav-hidden { display: none !important; }

/* ——— Section gate (Professional plan) ——— */
body.school-gated .sidebar,
body.school-gated .sch-topbar__search,
body.school-gated .sch-topbar__bands,
body.school-gated .sch-topbar__workspace,
body.school-gated #schSidebarMenu a[data-section]:not([data-section="dashboard"]) {
  pointer-events: none;
  opacity: 0.55;
}

.sch-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--sch-topbar-height, 3.75rem) - 3rem);
  padding: 2rem 1rem;
}

.sch-gate__card {
  max-width: 32rem;
  width: 100%;
  background: var(--kyd-surface, #fff);
  border: 1px solid var(--kyd-line);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(22, 36, 71, 0.08);
}

.sch-gate__icon {
  font-size: 2.5rem;
  color: var(--kyd-navy);
  margin-bottom: 0.75rem;
}

.sch-gate__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--kyd-navy);
}

.sch-gate__lead {
  margin: 0 0 1.25rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sch-gate__btn {
  margin-top: 1.25rem;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  background: var(--kyd-navy);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.sch-gate__btn:hover {
  filter: brightness(1.05);
}

/* ——— In-app notifications ——— */
body.school-erp .sch-topbar,
body.school-erp .sch-topbar__inner,
body.school-erp .sch-topbar__actions {
  overflow: visible;
}
body.school-erp .sch-topbar__notify-wrap {
  position: relative;
  z-index: 2200;
  flex: 0 0 auto;
  overflow: visible;
}

body.school-erp .sch-topbar__notify {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--kyd-line);
  border-radius: 999px;
  background: #fff;
  color: var(--kyd-navy);
  cursor: pointer;
}

body.school-erp .sch-topbar__notify-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sch-notify-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  left: auto;
  box-sizing: border-box;
  width: 22rem;
  max-width: calc(100vw - 1.5rem);
  min-width: 18rem;
  background: #fff;
  border: 1px solid var(--kyd-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(22, 36, 71, 0.12);
  z-index: 2200;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  overflow: hidden;
}

.sch-notify-panel[hidden] {
  display: none !important;
}

.sch-notify-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.sch-notify-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--kyd-line);
}

.sch-notify-panel__head strong {
  white-space: nowrap;
}

.sch-notify-panel__mark {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.sch-notify-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 18rem;
  overflow-y: auto;
}

.sch-notify-panel__empty {
  padding: 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
  white-space: normal;
  writing-mode: horizontal-tb;
}

.sch-notify-item a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
}

.sch-notify-item a strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--kyd-navy);
}

.sch-notify-item a span {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.sch-notify-item a small {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.7rem;
}

.sch-notify-item--unread a {
  background: #f8fafc;
}

.sch-notify-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: 20rem;
  background: var(--kyd-navy);
  color: #fff;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 12px 32px rgba(22, 36, 71, 0.25);
  z-index: 3000;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.25s, transform 0.25s;
  cursor: pointer;
}

.sch-notify-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.school-erp .sc-flash.is-success {
  color: #15803d;
}
body.school-erp .sc-flash.is-error {
  color: #b42318;
}

.sch-notify-toast p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.sch-finance-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.sch-finance-flag--ok {
  background: #ecfdf5;
  color: #047857;
}

.sch-finance-flag--blocked {
  background: #fef2f2;
  color: #b91c1c;
}

/* School ERP branding */
body.school-erp .sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

body.school-erp .sch-brand-logo {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

body.school-erp.sch-has-brand-logo .kyd-logo-mark {
  display: none;
}

body.school-erp .sch-brand-panel .sch-brand-form__grid {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.85rem;
}

body.school-erp .sch-brand-preview {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 14px;
  border: 1px dashed var(--kyd-line, #e2e8f0);
  background: var(--brand-paper, #eef3fb);
  display: grid;
  place-items: center;
  overflow: hidden;
}

body.school-erp .sch-brand-preview__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.school-erp .sch-brand-preview__placeholder {
  color: #94a3b8;
  font-size: 1.75rem;
}

body.school-erp .sch-brand-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

body.school-erp .sch-brand-colors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.75rem;
}

body.school-erp .sch-brand-colors input[type="color"] {
  width: 100%;
  height: 2.4rem;
  padding: 0.2rem;
  border: 1px solid var(--kyd-line, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

body.school-erp .sch-brand-remove {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 720px) {
  body.school-erp .sch-brand-panel .sch-brand-form__grid {
    grid-template-columns: 1fr;
  }
}

/* Suite modals: clear vertical rhythm between fields (Bootstrap label margins collapse otherwise). */
body.school-erp .sc-modal-card form,
body.school-erp .sc-modal-card #scModalForm {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

body.school-erp .sc-modal-card .sc-modal-field {
  margin: 0;
}

body.school-erp .sc-modal-card .sc-modal-field-row {
  gap: 1rem;
}

body.school-erp .sc-modal-card label {
  margin-bottom: 0;
  gap: 0.45rem;
}

body.school-erp .sc-modal-card input[type="date"],
body.school-erp .sc-modal-card input[type="time"],
body.school-erp .sc-modal-card input[type="datetime-local"] {
  border-radius: 10px;
}

body.school-erp .sc-preset-chip.is-active {
  background: var(--brand-primary, #162447);
  border-color: var(--brand-primary, #162447);
}

body.school-erp .sc-modal-actions {
  margin-top: 0.9rem;
  padding-top: 1rem;
}
