@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f1f3f9;
  --panel: #ffffff;
  --line: #dde3f1;
  --text: #3E4B5B;
  --heading: #334152;
  --muted: #7b8794;
  --brand-a: #1f2ec5;
  --brand-b: #5d59f4;
  --brand-soft: #e8ebff;
  --ok-bg: #e8f7ee;
  --ok-text: #178648;
  --warn-bg: #fff3e5;
  --warn-text: #b66f21;
  --danger-bg: #ffe9e9;
  --danger-text: #bf3e3e;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  line-height: 1.4;
  font-weight: 400;
}

a {
  color: #335dd6;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.sidebar-shell {
  background: linear-gradient(180deg, #18235b, #131c49 42%, #10173d);
  color: #eef1ff;
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: .2px;
  color: #ffffff;
}

.platform-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  padding: 4px;
}

.brand-side {
  margin-bottom: 4px;
}

.sidebar-caption {
  margin: 0 0 20px;
  color: #b9c2ee;
  font-size: .9rem;
}

.side-section-title {
  margin: 16px 0 8px;
  color: #9aa7dd;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #d6ddff;
  border: 1px solid transparent;
  font-weight: 500;
}

.side-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.side-link.active {
  background: linear-gradient(135deg, var(--brand-b), var(--brand-a));
  color: #fff;
  box-shadow: 0 10px 24px rgba(35, 46, 146, .35);
}

.nav-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: currentColor;
  opacity: .92;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.nav-label {
  line-height: 1;
}

.health-link {
  display: inline-block;
  margin-top: 20px;
  font-size: .84rem;
  color: #9fc1ff;
}

.workspace-shell {
  min-width: 0;
}

.workspace-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.workspace-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
}

.workspace-top h1 {
  margin: 0;
  font-size: 2rem;
  line-height: .95;
  color: var(--heading);
  font-weight: 500;
}

.workspace-top p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.muted {
  color: var(--muted);
  font-size: .92rem;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.top-notification {
  appearance: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #d9e0f4;
  background: #f7f9ff;
  color: #485488;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .15s ease;
  cursor: pointer;
}

.top-notification-wrap {
  position: relative;
}

.top-notification:hover {
  border-color: #b9c7f3;
  background: #edf2ff;
}

.top-notification.has-new {
  border-color: #c6d6ff;
  background: linear-gradient(180deg, #edf3ff, #f8fbff);
}

.top-notification-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.top-notification-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.top-notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  background: #cf2f45;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
}

.top-notification-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, 88vw);
  border-radius: 12px;
  border: 1px solid #d8deef;
  background: #fff;
  box-shadow: 0 16px 30px rgba(17, 29, 76, .18);
  overflow: hidden;
  z-index: 80;
}

.top-notification-menu-head {
  padding: 12px 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.top-notification-menu-head h3 {
  margin: 0;
  font-size: .96rem;
  color: #2d3968;
}

.top-notification-unread {
  font-size: .72rem;
  border-radius: 999px;
  padding: 3px 8px;
  background: #d91f3a;
  color: #fff;
  font-weight: 700;
}

.top-notification-pills {
  padding: 0 14px 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.notif-pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: .73rem;
  font-weight: 700;
}

.notif-pill.pending {
  background: #f4b400;
  color: #233048;
}

.notif-pill.approved {
  background: #16a35d;
  color: #fff;
}

.notif-pill.rejected {
  background: #6c22bf;
  color: #fff;
}

.top-notification-list {
  max-height: 250px;
  overflow: auto;
  border-top: 1px solid #edf1fb;
  border-bottom: 1px solid #edf1fb;
}

.top-notification-empty {
  margin: 0;
  padding: 12px 14px;
  color: #7a84a7;
}

.top-notification-item {
  display: block;
  padding: 10px 14px;
  color: #2f3a67;
  border-top: 1px solid #f0f3fb;
}

.top-notification-item:first-child {
  border-top: 0;
}

.top-notification-item.unread {
  background: #f5f8ff;
}

.top-notification-item-status {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .66rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.top-notification-item-status.pending {
  background: #fde7af;
  color: #6c4e00;
}

.top-notification-item-status.approved {
  background: #d8f4e5;
  color: #0c7340;
}

.top-notification-item-status.rejected,
.top-notification-item-status.expired {
  background: #f0dffd;
  color: #5c228d;
}

.top-notification-item strong {
  display: block;
  font-size: .86rem;
}

.top-notification-item small {
  display: block;
  margin-top: 2px;
  color: #69759f;
  font-size: .75rem;
}

.top-notification-actions {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-notification-actions a,
.top-notification-actions button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #2f3d73;
  font-size: .9rem;
  padding: 0;
  cursor: pointer;
}

.workspace-main {
  padding: 18px 24px 28px;
}

.flash {
  margin-bottom: 12px;
  border: 1px solid;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: .92rem;
}

.flash.success {
  border-color: #bde2cb;
  background: #edf9f2;
  color: #146d3b;
}

.flash.error {
  border-color: #efc0c0;
  background: #fff0f0;
  color: #8f2a2a;
}

.hero,
.section-banner {
  border-radius: 14px;
  background: linear-gradient(135deg, #5b57ef, #423cd0);
  color: #fff;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 14px 28px rgba(66, 60, 208, .25);
}

.section-banner-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
}

.section-banner-text {
  margin: 6px 0 0;
  color: #e3e6ff;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.card-subtle {
  background: #f9fbff;
}

.card.narrow {
  max-width: 860px;
}

.card h1,
.card h2,
.card h3 {
  margin: 0 0 10px;
  color: var(--heading);
  font-weight: 500;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  border: 1px solid var(--line);
  background: #fbfcff;
  border-radius: 12px;
  padding: 12px;
}

.module-card p {
  color: #67739b;
  margin: 0 0 10px;
}

.title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ui-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: #4f5ed4;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.kpi-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8a94b5;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
  line-height: 1;
  color: #30375d;
  font-weight: 600;
}

.kpi-card small {
  color: #8a93af;
}

.kpi-grid-compact .kpi-card {
  padding: 10px 11px;
}

.kpi-grid-compact .kpi-card strong {
  font-size: 1.28rem;
}

.kpi-grid-compact .kpi-card span {
  font-size: .68rem;
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.school-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.school-cover {
  height: 88px;
  background: linear-gradient(130deg, #2f63d8, #4a52ce 58%, #5d43c6);
}

.school-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: -40px;
  padding: 0 12px 6px;
}

.school-avatar {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  border: 3px solid #fff;
  background: #2f3aaf;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(39, 57, 130, .24);
  font-size: 1.15rem;
}

.school-avatar.has-logo {
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  color: transparent;
}

.school-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 1px;
}

.school-card-head > div {
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  border: 1px solid #dbe4f7;
  border-radius: 12px;
  padding: 9px 12px;
  box-shadow: 0 10px 24px rgba(38, 55, 126, .14);
}

.school-card-head h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.1;
}

.school-card-head h3 a {
  color: #1f2a57;
  font-weight: 700;
  text-decoration: none;
}

.school-card-head h3 a:hover {
  color: #214db5;
}

.school-card-head p {
  margin: 3px 0 0;
  color: #61709b;
  font-size: .84rem;
}

.school-card-head .badge {
  justify-self: end;
  align-self: start;
  margin-top: 4px;
}

.school-meta {
  margin: 10px 12px;
  padding: 8px 0;
  border-top: 1px dashed #d7dced;
  border-bottom: 1px dashed #d7dced;
}

.school-meta p {
  margin: 4px 0;
  font-size: .9rem;
}

.school-sync-ok {
  color: #0f8e59;
  font-weight: 700;
}

.school-sync-outdated {
  color: #c63c55;
  font-weight: 700;
}

.school-last-sync-success {
  color: #0f8e59;
  font-weight: 700;
}

.school-last-sync-error {
  color: #c63c55;
  font-weight: 700;
}

.school-last-sync-skipped {
  color: #876900;
  font-weight: 700;
}

.school-last-sync-none {
  color: #7f8cb3;
  font-weight: 600;
}

.school-actions {
  padding: 0 12px 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.school-checklist {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #5d678f;
  display: grid;
  gap: 4px;
  font-size: .85rem;
}

.school-checklist span::before {
  content: "• ";
  color: #4f5ed4;
  font-weight: 700;
}

.schools-portfolio { display: block; }
.schools-portfolio-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 17px 20px;
  border: 1px solid #dce3f2;
  border-radius: 19px;
  background: linear-gradient(145deg, #fff, #f8faff);
  box-shadow: 0 11px 26px rgba(38, 55, 126, .07);
}
.schools-portfolio-head h1 { margin: 3px 0; color: #252e4b; font-size: 1.65rem; line-height: 1.05; }
.schools-portfolio-head p { margin: 0; color: #7c86a2; font-size: .82rem; }
.schools-portfolio-total { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #f4f6fb; }
.schools-portfolio-total strong { color: #2d3654; font-size: 1.35rem; }
.schools-portfolio-total span { max-width: 82px; color: #7c86a1; font-size: .7rem; line-height: 1.2; }

.schools-primary-toolbar {
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid #dce3f2;
  border-radius: 16px;
  background: #fff;
}
.schools-primary-toolbar > form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.schools-primary-toolbar label { min-width: 180px; margin: 0; }
.schools-primary-toolbar label > span { display: block; margin-bottom: 5px; color: #687491; font-size: .72rem; font-weight: 700; }
.schools-primary-toolbar .schools-search-field { flex: 1 1 360px; }
.schools-primary-toolbar input,
.schools-primary-toolbar select { min-height: 42px; }
.schools-advanced-filters { flex: 1 0 100%; border-top: 1px solid #e6eaf3; margin-top: 2px; padding-top: 9px; }
.schools-advanced-filters summary { width: fit-content; color: #66728f; cursor: pointer; font-size: .75rem; font-weight: 700; }
.schools-advanced-filters > div { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 10px; padding: 11px; border-radius: 12px; background: #f7f8fc; }

.schools-technical-summary,
.schools-deployment-tools {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #e0e5f0;
  border-radius: 14px;
  background: #fff;
}
.schools-technical-summary > summary,
.schools-deployment-tools > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}
.schools-technical-summary > summary::-webkit-details-marker,
.schools-deployment-tools > summary::-webkit-details-marker { display: none; }
.schools-technical-summary summary span:first-child strong,
.schools-technical-summary summary span:first-child small,
.schools-deployment-tools summary div strong,
.schools-deployment-tools summary div small { display: block; }
.schools-technical-summary summary strong,
.schools-deployment-tools summary strong { color: #3c4664; font-size: .8rem; }
.schools-technical-summary summary small,
.schools-deployment-tools summary small { margin-top: 2px; color: #929aaf; font-size: .68rem; }
.schools-technical-alerts { color: #a16e00; font-size: .72rem; font-weight: 700; }
.schools-technical-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.schools-technical-kpis article { padding: 9px; border-radius: 10px; background: #f6f7fb; text-align: center; }
.schools-technical-kpis span { display: block; color: #8c95ac; font-size: .65rem; }
.schools-technical-kpis strong { display: block; margin-top: 3px; color: #39425e; font-size: 1rem; }

.schools-results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 17px 2px 10px; }
.schools-results-heading h2 { margin: 0; color: #27304d; font-size: 1.12rem; }
.schools-results-heading p { margin: 3px 0 0; color: #8790a7; font-size: .76rem; }
.schools-results-heading > span { padding: 5px 9px; border-radius: 999px; background: #eef1f8; color: #68738f; font-size: .7rem; font-weight: 700; }
.schools-list-stage { margin: 0 0 14px; padding: 12px; border: 1px solid #dfe5f1; border-radius: 18px; background: #f7f8fc; }
.schools-bulk-tools { margin-bottom: 11px; border: 1px solid #dce2ed; border-radius: 12px; background: #fff; }
.schools-bulk-tools > summary { display: flex; align-items: center; gap: 8px; padding: 9px 11px; cursor: pointer; color: #5d6884; font-size: .74rem; list-style: none; }
.schools-bulk-tools > summary::-webkit-details-marker { display: none; }
.schools-bulk-tools summary svg { width: 16px; height: 16px; fill: currentColor; }
.schools-bulk-tools summary small { margin-left: auto; color: #9aa2b4; }
.schools-bulk-tools .quick-actions { padding: 0 11px 11px; }

.schools-portfolio .school-grid { grid-template-columns: repeat(auto-fit, minmax(315px, 1fr)); gap: 11px; }
.schools-portfolio .school-card { border-color: #dbe2ef; border-radius: 16px; box-shadow: 0 8px 20px rgba(38, 55, 126, .055); }
.schools-portfolio .school-cover { height: 58px; background: linear-gradient(125deg, #314a91, #4055ac 60%, #96780d); }
.schools-portfolio .school-card-head { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 9px; margin-top: -30px; padding: 0 12px 8px; }
.schools-portfolio .school-avatar { width: 62px; height: 62px; border-radius: 15px; font-size: .95rem; }
.schools-portfolio .school-card-head > div { min-width: 0; padding: 8px 10px; }
.schools-portfolio .school-card-head h3 { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.schools-portfolio .school-card-head p { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.school-card-select { display: none; }
.schools-portfolio.is-bulk-mode .school-card-select { display: inline-flex; }
.school-primary-info { display: grid; grid-template-columns: .7fr 1.3fr; gap: 8px; margin: 8px 12px 10px; }
.school-primary-info > span { min-width: 0; padding: 9px 10px; border-radius: 10px; background: #f6f7fb; }
.school-primary-info small,
.school-primary-info strong { display: block; }
.school-primary-info small { margin-bottom: 3px; color: #949caf; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.school-primary-info strong { overflow: hidden; color: #3c4662; font-size: .76rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.schools-portfolio .school-actions { display: grid; grid-template-columns: 1.25fr .75fr; padding: 0 12px 10px; }
.schools-portfolio .school-actions .btn { justify-content: center; padding: 9px 10px; font-size: .75rem; }
.school-card-technical { margin: 0 12px 11px; border-top: 1px solid #e4e8f1; }
.school-card-technical summary { padding: 8px 0 0; color: #8790a6; cursor: pointer; font-size: .68rem; font-weight: 700; }
.school-card-technical .school-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin: 8px 0 0; padding: 8px; border: 0; border-radius: 9px; background: #f7f8fb; }
.school-card-technical .school-meta p { margin: 0; font-size: .7rem; }
.school-card-technical .school-checklist { grid-template-columns: 1fr 1fr; margin: 7px 0 0; padding: 0; font-size: .68rem; }
.schools-deployment-tools > summary { justify-content: flex-start; }
.schools-deployment-tools > summary > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #f0f2f8; color: #68738e; }
.schools-deployment-tools summary svg { width: 17px; height: 17px; fill: currentColor; }
.schools-deployment-tools-body { padding: 0 10px 10px; }
.schools-deployment-tools-body .card { margin: 8px 0 0; padding: 12px; box-shadow: none; }
.schools-empty-state { padding: 42px 20px; border: 1px dashed #ccd5e7; border-radius: 18px; background: #fafbfe; text-align: center; }
.schools-empty-state > span { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #eef1f8; color: #697590; }
.schools-empty-state svg { width: 24px; height: 24px; fill: currentColor; }
.schools-empty-state h3 { margin: 10px 0 4px; color: #38415e; }
.schools-empty-state p { margin: 0 0 12px; color: #8992a8; font-size: .8rem; }

@media (max-width: 1100px) {
  .schools-technical-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .schools-portfolio-head { grid-template-columns: 1fr auto; }
  .schools-portfolio-head > .btn { grid-column: 1 / -1; justify-content: center; }
  .schools-primary-toolbar > form { align-items: stretch; }
  .schools-primary-toolbar label,
  .schools-primary-toolbar .btn { width: 100%; }
  .schools-advanced-filters > div { display: grid; grid-template-columns: 1fr; }
  .schools-technical-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schools-portfolio .school-grid { grid-template-columns: 1fr; }
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin: 4px 0;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  background: #edf0fd;
  color: #4c58b9;
}

.badge .badge-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  vertical-align: -2px;
}

.badge .badge-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.customer-academic-card { overflow: hidden; }
.customer-academic-eyebrow { margin: 0 0 3px; color: #9a7300; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.customer-academic-lead,
.customer-academic-section-title p { margin: 4px 0 0; color: #737d9d; font-size: .84rem; }
.customer-academic-unavailable { padding: 18px; border: 1px solid #f1dba1; border-radius: 12px; background: #fffaf0; color: #6d5922; }
.customer-academic-unavailable p { margin: 5px 0; }
.customer-academic-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 16px 0 10px; }
.customer-academic-kpis article { min-width: 0; padding: 13px; border: 1px solid #e5e8f2; border-radius: 12px; background: linear-gradient(145deg, #fff, #fafbff); }
.customer-academic-kpis span,
.customer-academic-kpis small { display: block; color: #7d87a5; font-size: .7rem; }
.customer-academic-kpis span { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.customer-academic-kpis strong { display: block; margin: 5px 0 3px; overflow: hidden; color: #28304f; font-size: 1rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.customer-academic-progress { height: 7px; margin-bottom: 18px; overflow: hidden; border-radius: 999px; background: #edf0f7; }
.customer-academic-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c59a09, #e6ba22); }
.customer-academic-columns { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; margin-bottom: 18px; }
.customer-academic-columns > div,
.customer-academic-scopes { padding: 16px; border: 1px solid #e5e8f2; border-radius: 13px; background: #fff; }
.customer-academic-columns h3,
.customer-academic-section-title h3 { margin: 0; color: #2c3454; font-size: 1rem; }
.customer-academic-definition { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.customer-academic-definition div { padding: 9px 10px; border-radius: 9px; background: #f7f8fc; }
.customer-academic-definition dt { color: #8790aa; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.customer-academic-definition dd { margin: 3px 0 0; color: #303754; font-size: .83rem; }
.customer-policy-node-list { display: grid; gap: 7px; margin-top: 12px; }
.customer-policy-node { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid #eceef5; border-radius: 9px; }
.customer-policy-node strong,
.customer-policy-node small { display: block; }
.customer-policy-node strong { color: #343b58; font-size: .84rem; }
.customer-policy-node small { margin-top: 2px; color: #848da7; font-size: .7rem; }
.customer-policy-node > span { flex: none; padding: 4px 8px; border-radius: 999px; background: #f5edcf; color: #806000; font-size: .72rem; font-weight: 700; }
.customer-academic-scopes { margin-bottom: 18px; }
.customer-academic-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 18px 0 12px; }
.customer-academic-scopes .customer-academic-section-title { margin-top: 0; }
.customer-academic-global { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px; border-radius: 10px; background: #f4f8f3; color: #3f6543; }
.customer-scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.customer-scope-grid article { padding: 11px; border: 1px solid #e5e8f2; border-radius: 10px; background: #fafbfe; }
.customer-scope-grid span,
.customer-scope-grid small { display: block; color: #818aa4; font-size: .7rem; }
.customer-scope-grid strong { display: block; margin-top: 3px; color: #303754; }
.customer-scope-grid p { margin: 5px 0; color: #626c8c; font-size: .8rem; }
.customer-workflow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.customer-workflow article { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 11px; border: 1px solid #e6e9f1; border-radius: 11px; background: #fff; }
.customer-workflow article.is-complete { border-color: #cfe4d3; background: #fbfefb; }
.customer-workflow-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #eef0f6; color: #65708f; font-size: .78rem; font-weight: 700; }
.customer-workflow .is-complete .customer-workflow-number { background: #ddefdf; color: #337243; }
.customer-workflow strong { color: #333b58; font-size: .84rem; }
.customer-workflow p { margin: 3px 0; color: #7a839e; font-size: .73rem; }
.customer-workflow small { color: #929ab0; font-size: .68rem; }
.customer-academic-counts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.customer-academic-counts span { padding: 6px 9px; border-radius: 999px; background: #f1f3f9; color: #69738f; font-size: .74rem; }
.customer-academic-counts strong { color: #313956; }

.badge-role-type-system {
  background: #e9eefb;
  color: #2f54a7;
}

.badge-role-type-custom {
  background: #eceff4;
  color: #5a667f;
}

.badge-role-protected {
  background: #fff3d8;
  color: #9d6409;
}

.badge-role-status-active {
  background: #e7f7ee;
  color: #157a46;
}

.badge-role-status-inactive {
  background: #f3ecff;
  color: #6b1fc8;
}

.badge-user-role {
  background: #edf2ff;
  color: #3249a5;
}

.badge-user-role-superadmin {
  background: #fff3d8;
  color: #9d6409;
}

.badge-user-role-billing_admin {
  background: #e8efff;
  color: #2f58b9;
}

.badge-user-role-ops_admin {
  background: #e6f4ff;
  color: #0f6b9b;
}

.badge-user-role-support_admin {
  background: #e9f9f1;
  color: #157a46;
}

.badge-user-status-active {
  background: #e7f7ee;
  color: #157a46;
}

.badge-user-status-inactive {
  background: #f3ecff;
  color: #6b1fc8;
}

.status-draft { background: #edf1f7; color: #62708e; }
.status-trial { background: #e8efff; color: #3460c5; }
.status-active { background: var(--ok-bg); color: var(--ok-text); }
.status-suspended { background: var(--warn-bg); color: var(--warn-text); }
.status-cancelled,
.status-archived { background: var(--danger-bg); color: var(--danger-text); }

.check {
  color: #1d7f46;
  font-weight: 600;
}

.muted-danger {
  color: #b84343;
}

.inline-form,
.inline-filters {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
  width: auto;
  min-width: 120px;
  flex: 1 1 140px;
}

.inline-form-status select {
  min-width: 106px;
  flex: 1 1 110px;
}

.inline-form-status .btn {
  padding: 8px 10px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
  margin: 10px 0 12px;
}

.inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form-inline {
  display: inline-flex;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 25, 46, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 28px 58px rgba(20, 26, 50, .35);
  padding: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

body.modal-open {
  overflow: hidden;
}

.js-modal[hidden] {
  display: none !important;
}

.js-modal:not([hidden]) {
  display: flex !important;
}

.roles-matrix th,
.roles-matrix td {
  text-align: center;
  vertical-align: middle;
}

.roles-matrix th {
  white-space: nowrap;
}

.roles-matrix th:first-child,
.roles-matrix td:first-child {
  text-align: left;
}

.role-modal-card {
  max-width: 1020px;
}

.roles-matrix-toolbar {
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.roles-template-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.roles-group-row td {
  background: #f0f3fb;
  color: #2f3760;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .74rem;
}

.roles-module-row td:first-child strong {
  display: inline-block;
  margin-bottom: 2px;
}

.roles-module-code {
  color: #7c84a3;
}

.roles-matrix input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.roles-matrix .perm-master {
  width: 16px;
  height: 16px;
  margin-left: 5px;
  vertical-align: middle;
}

.roles-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 8px;
}

.roles-filters-actions {
  display: inline-flex;
  gap: 8px;
}

.roles-pagination {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.users-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 220px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 8px;
}

.users-filters-actions {
  display: inline-flex;
  gap: 8px;
}

.users-pagination {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mail-template-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.mail-template-form {
  min-width: 0;
  order: 1;
}

.mail-template-code-label {
  display: block;
}

.mail-template-code-help {
  display: block;
  margin: 4px 0 8px;
  font-size: .8rem;
  color: #6f7aa2;
  font-weight: 500;
}

.mail-template-code-panel {
  background: #0f131a;
  border: 1px solid #2a313f;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.mail-template-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #232a37;
  background: linear-gradient(180deg, #161b24 0%, #121720 100%);
}

.mail-template-code-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f0f4ff;
  font-size: .95rem;
}

.mail-template-code-glyph {
  color: #8ca7ff;
  font-weight: 700;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .8rem;
}

.mail-template-code-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mail-template-code-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #c3cbe2;
  background: #1a2130;
  border: 1px solid #2f3748;
}

.mail-template-code-action svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.mail-template-code-input {
  min-height: 370px;
  margin-top: 0;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .86rem;
  line-height: 1.6;
  color: #edf2ff;
  background: #101520;
  border: 0;
  border-radius: 0;
  padding: 14px 14px 15px;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  resize: vertical;
  box-shadow: none;
}

.mail-template-code-input:focus {
  border: 0;
  background: #0f1522;
  box-shadow: inset 0 0 0 1px #4d6fff;
  outline: none;
}

.mail-template-vars-collapsible {
  margin: 10px 0 12px;
  border: 1px solid #d7def2;
  border-radius: 12px;
  background: #f9fbff;
}

.mail-template-vars-collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 12px;
  font-weight: 700;
  color: #283561;
  position: relative;
}

.mail-template-vars-collapsible > summary::-webkit-details-marker {
  display: none;
}

.mail-template-vars-collapsible > summary::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 1.2rem;
  color: #4d5fa8;
}

.mail-template-vars-collapsible[open] > summary::after {
  content: "-";
}

.mail-template-vars-grid {
  border-top: 1px solid #dfe5f6;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mail-template-var-item {
  border: 1px solid #dbe3f7;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.mail-template-var-item code {
  font-size: .8rem;
}

.mail-template-var-item p {
  margin: 7px 0 9px;
  color: #5d6993;
  font-size: .8rem;
}

.widget-embed-collapsible {
  border: 1px solid #d7def2;
  border-radius: 12px;
  background: #f9fbff;
}

.widget-embed-collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 12px;
  font-weight: 700;
  color: #283561;
  position: relative;
}

.widget-embed-collapsible > summary::-webkit-details-marker {
  display: none;
}

.widget-embed-collapsible > summary::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 1.2rem;
  color: #4d5fa8;
}

.widget-embed-collapsible[open] > summary::after {
  content: "-";
}

.widget-copy-code {
  width: 100%;
  border: 1px dashed #c9d5f5;
  background: #fff;
  border-radius: 10px;
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  transition: .12s ease;
}

.widget-copy-code:hover {
  border-color: #9eb0ec;
  background: #f8faff;
}

.widget-copy-code.copied {
  border-color: #39a46a;
  background: #eefaf3;
}

.widget-copy-code code {
  display: block;
  background: transparent;
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #2f3d6f;
}

.copy-sticker {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(.96);
  opacity: 0;
  background: #182952;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(19, 32, 73, .28);
  transition: transform .14s ease, opacity .14s ease;
}

.copy-sticker.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.mail-template-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
  padding: 12px;
  position: sticky;
  top: 80px;
  order: 2;
}

.mail-template-preview h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.mail-preview-title {
  margin: 8px 0 6px;
  font-size: .8rem;
  color: #6e7899;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 700;
}

.mail-preview-subject {
  background: #fff;
  border: 1px dashed #c8d2f3;
  border-radius: 10px;
  padding: 9px 10px;
  color: #2f3659;
  font-weight: 600;
}

.mail-preview-frame {
  width: 100%;
  height: 620px;
  border: 1px solid #d6def3;
  border-radius: 10px;
  background: #fff;
}

.mail-preview-text {
  margin: 0;
  background: #fff;
  border: 1px solid #d6def3;
  border-radius: 10px;
  padding: 9px 10px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  color: #3a4367;
  font-size: .83rem;
}

.table-sticky-wrap {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  max-height: 62vh;
}

.table-sticky-wrap table {
  margin: 0;
  min-width: 760px;
}

.users-table thead th,
.roles-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7f9ff;
}

.users-table th:last-child,
.users-table td:last-child,
.roles-table th:last-child,
.roles-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -6px 0 8px -8px rgba(19, 28, 58, .45);
}

.users-table thead th:last-child,
.roles-table thead th:last-child {
  z-index: 4;
  background: #f7f9ff;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  min-width: 260px;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  min-width: 165px;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  min-width: 130px;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  min-width: 140px;
}

.users-table th:last-child,
.users-table td:last-child {
  min-width: 230px;
  white-space: nowrap;
}

.roles-table th:nth-child(1),
.roles-table td:nth-child(1) {
  min-width: 280px;
}

.roles-table th:nth-child(2),
.roles-table td:nth-child(2) {
  min-width: 220px;
}

.roles-table th:nth-child(3),
.roles-table td:nth-child(3) {
  min-width: 140px;
}

.roles-table th:last-child,
.roles-table td:last-child {
  min-width: 220px;
  white-space: nowrap;
}

.users-table td:last-child .inline-actions,
.roles-table td:last-child .inline-actions {
  flex-wrap: nowrap;
}

@media (max-width: 900px) {
  .roles-filters {
    grid-template-columns: 1fr;
  }

  .users-filters {
    grid-template-columns: 1fr;
  }

  .mail-template-editor {
    grid-template-columns: 1fr;
  }

  .mail-template-preview {
    position: static;
    order: 2;
  }

  .mail-template-form {
    order: 1;
  }

  .mail-template-vars-grid {
    grid-template-columns: 1fr;
  }

  .table-sticky-wrap {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .users-table td:last-child .btn-label,
  .roles-table td:last-child .btn-label {
    display: none;
  }

  .users-table td:last-child .btn-icon,
  .roles-table td:last-child .btn-icon {
    margin-right: 0;
  }
}

.pricing-guide .list {
  margin-top: 8px;
}

.pricing-guide li {
  margin-bottom: 6px;
}

.hero-pricing {
  background: linear-gradient(135deg, #5b57ef, #453fd8 60%, #6c5df8);
}

.hero-kicker {
  margin: 0 0 6px;
  color: #dfe3ff;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.pricing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pricing-kpi {
  border: 1px solid #d9dff2;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.pricing-kpi p {
  margin: 0;
  color: #7d87ad;
  font-size: .82rem;
}

.pricing-kpi strong {
  display: block;
  font-size: 1.65rem;
  color: #2f3760;
  margin-top: 4px;
}

.pricing-kpi small {
  color: #7a85ab;
}

.pricing-toolbar {
  padding: 12px 14px !important;
}

.pricing-toolbar-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px !important;
  align-items: center !important;
  max-width: 1040px;
}

.pricing-toolbar-grid > .btn,
.pricing-toolbar-grid > a.btn,
.pricing-toolbar-grid > button.btn {
  border: 1px solid #d9def0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 44px;
  padding: 10px 14px;
  font-size: .92rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap !important;
}

.pricing-toolbar-grid > .btn .btn-label,
.pricing-toolbar-grid > a.btn .btn-label,
.pricing-toolbar-grid > button.btn .btn-label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 992px) {
  .pricing-toolbar {
    align-items: center;
  }
}

.btn-top-plan {
  background: linear-gradient(135deg, #3769f5, #2f4dc9);
}

.btn-top-addon {
  background: linear-gradient(135deg, #19b47c, #148f63);
}

.btn-top-help {
  background: linear-gradient(135deg, #f2a12d, #cf7d13);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 58, .5);
  z-index: 999;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal-overlay:target {
  display: grid;
}

.modal-card {
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #d9dff2;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 24px 40px rgba(16, 22, 56, .28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #d8def1;
  background: #f7f9ff;
  color: #3b4679;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.table-actions {
  white-space: nowrap;
}

label {
  display: block;
  color: #66739d;
  font-weight: 500;
  margin-bottom: 10px;
}

.form-help {
  margin: 0 0 10px;
  color: #7f8aae;
  font-size: .86rem;
}

.owner-summary {
  border: 1px solid #dbe1f2;
  background: #f8faff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.owner-summary p {
  margin: 0;
  color: #38446f;
  font-size: .9rem;
}

.owner-summary p + p {
  margin-top: 3px;
  color: #5f6b94;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 4px;
  border: 1px solid #d3d9ec;
  background: #fff;
  color: #2f3557;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: .92rem;
}

input[type="color"] {
  height: 44px;
  padding: 4px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid #d3d9ec;
  background: #fff;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}

.color-row {
  display: grid;
  grid-template-columns: 56px 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: -6px 0 10px;
}

.color-input {
  width: 56px;
  min-width: 56px;
  padding: 2px;
  height: 36px;
}

.color-chip {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #d3d9ec;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5);
}

.color-text {
  margin-top: 0;
  text-transform: uppercase;
  font-size: .84rem;
  letter-spacing: .03em;
  color: #4a567f;
  background: #f5f7ff;
}

.mobile-color-setting {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid #dce3f4;
  border-radius: 16px;
  background: #f8faff;
}

.mobile-color-setting h3 {
  margin: 0 0 5px;
  color: #202b50;
}

.mobile-color-setting .color-row {
  margin-top: 14px;
}

.mobile-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.mobile-color-swatch {
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.mobile-color-swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background: var(--swatch-color);
}

.mobile-color-swatch:hover {
  transform: translateY(-2px);
}

.mobile-color-swatch.selected {
  border-color: #202b50;
  box-shadow: 0 0 0 3px rgba(91, 80, 246, .13);
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 12px;
  color: #3c4d79;
  font-weight: 500;
}

.check-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #8d99ff;
  box-shadow: 0 0 0 3px rgba(103, 120, 235, .2);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-b), var(--brand-a));
}

.btn-secondary {
  background: var(--brand-soft);
  color: #354086;
}

.btn-danger {
  background: linear-gradient(135deg, #d25555, #b73333);
  color: #fff;
}

.btn-sm {
  padding: 7px 10px;
  font-size: .8rem;
}

.btn-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  margin-right: 6px;
  vertical-align: middle;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.btn-label {
  vertical-align: middle;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  font-size: .9rem;
}

th {
  background: #f7f9ff;
  color: #7680a4;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 600;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-nav a {
  display: inline-block;
  border: 1px solid #d6dcf0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f7f9ff;
  color: #425083;
  font-weight: 600;
  font-size: .86rem;
}

.tab-nav a.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-b), var(--brand-a));
}

.brand-logo-preview {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.brand-identity-card {
  border: 1px solid #d8def0;
  border-radius: 14px;
  background: linear-gradient(145deg, #fbfcff 0%, #f1f4ff 100%);
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
}

.brand-identity-preview {
  min-height: 132px;
  border: 1px dashed #bcc7ea;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #edf2ff 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(-45deg, #edf2ff 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(45deg, transparent 75%, #edf2ff 75%) -10px 0/20px 20px,
    linear-gradient(-45deg, transparent 75%, #edf2ff 75%) -10px 0/20px 20px,
    #f8faff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
}

.brand-logo-empty {
  display: none;
  color: #7480aa;
  font-size: .84rem;
  font-weight: 500;
}

.brand-identity-preview.is-empty .brand-logo-empty {
  display: block;
}

.brand-identity-preview.is-empty .brand-logo-preview {
  display: none;
}

.brand-identity-meta .meta-title {
  margin: 0 0 4px;
  color: #35406e;
  font-weight: 600;
  font-size: .9rem;
}

.brand-identity-meta .meta-path {
  margin: 0 0 8px;
  font-size: .82rem;
  color: #6674a4;
  overflow-wrap: anywhere;
}

.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.quick-actions form {
  margin: 0;
  display: inline-flex;
}

.quick-actions > .btn,
.quick-actions > a.btn,
.quick-actions > button.btn,
.quick-actions > form > .btn,
.quick-actions > form > button.btn {
  width: auto !important;
  min-width: 170px;
}

@media (max-width: 900px) {
  .quick-actions > .btn,
  .quick-actions > a.btn,
  .quick-actions > button.btn,
  .quick-actions > form > .btn,
  .quick-actions > form > button.btn {
    min-width: 100%;
  }
}

.school-detail-shell {
  --school-detail-soft: #f7f9ff;
  --school-detail-border: #dbe3f5;
}

.school-command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 24px;
  align-items: center;
  margin-bottom: 16px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid #d9e1f3;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0, rgba(197, 154, 9, .17), transparent 30%),
    linear-gradient(145deg, #fff, #f7f9ff);
  box-shadow: 0 16px 34px rgba(38, 55, 126, .09);
}

.school-command-main { min-width: 0; }
.school-command-eyebrow {
  display: block;
  color: #a27b00;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.school-command-main h1 {
  margin: 4px 0;
  color: #202944;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  line-height: 1.08;
}

.school-command-main p { margin: 0; color: #707b9d; }
.school-command-status,
.school-command-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.school-command-status { justify-content: flex-end; }
.school-command-actions { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid #e4e9f5; }

.school-portfolio-control {
  margin: 0 0 16px;
  border: 1px solid #d9e2f3 !important;
  border-left: 4px solid var(--accent, #c59a09) !important;
  background: linear-gradient(135deg, #fff, #f8faff) !important;
}

.school-portfolio-control > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
  cursor: pointer;
  list-style: none;
}

.school-portfolio-control > summary::-webkit-details-marker { display: none; }
.school-portfolio-control > summary .muted { max-width: 620px; font-size: .82rem; text-align: right; }
.school-portfolio-control[open] > summary { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #e3e8f4; }
.school-portfolio-control .form-grid { display: grid; grid-template-columns: minmax(240px, 420px); gap: 12px; }
.school-portfolio-control .checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin: 10px 0 18px; }
.school-portfolio-control .inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #dce3f2;
  border-radius: 14px;
  background: #fff;
}
.school-portfolio-control .inline-check input { width: 18px; height: 18px; margin: 0; }
.school-portfolio-control .inline-check span { display: grid; gap: 2px; }
.school-portfolio-control .inline-check small { color: #77819d; font-weight: 500; }

.school-workspace-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.school-workspace-link {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce3f2;
  border-radius: 17px;
  background: #fff;
  color: #313b5e;
  text-decoration: none;
  box-shadow: 0 9px 22px rgba(38, 55, 126, .06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.school-workspace-link:hover {
  border-color: #bbc8e6;
  box-shadow: 0 14px 28px rgba(38, 55, 126, .11);
  transform: translateY(-2px);
}

.school-workspace-link.is-active {
  border-color: #c8a21d;
  background: linear-gradient(145deg, #fffdf5, #fff9e7);
  box-shadow: 0 13px 28px rgba(175, 132, 0, .13);
}

.school-workspace-link.is-active::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #c59a09;
  content: "";
}

.school-workspace-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f0f3fa;
  color: #667391;
}

.school-workspace-link.is-active .school-workspace-icon { background: #f6edcb; color: #a57c00; }
.school-workspace-icon svg { width: 21px; height: 21px; fill: currentColor; }
.school-workspace-copy { min-width: 0; }
.school-workspace-copy small,
.school-workspace-copy strong,
.school-workspace-copy span { display: block; }
.school-workspace-copy small { color: #9aa2b8; font-size: .64rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.school-workspace-copy strong { margin: 2px 0 4px; color: #29324f; font-size: .9rem; line-height: 1.16; }
.school-workspace-copy span { color: #7b85a2; font-size: .73rem; line-height: 1.32; }
.school-workspace-link em {
  grid-column: 2;
  color: #9a7a16;
  font-size: .67rem;
  font-style: normal;
  font-weight: 650;
}

.school-task-guide {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 17px 19px;
  border: 1px solid #dce3f2;
  border-radius: 18px;
  background: #fff;
}

.school-task-guide h2 { margin: 3px 0 4px; color: #28314f; font-size: 1.12rem; }
.school-task-guide p { margin: 0; color: #7a84a0; font-size: .8rem; line-height: 1.4; }
.school-section-jumps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.school-section-jumps a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dce3f1;
  border-radius: 10px;
  background: #f8f9fd;
  color: #475373;
  font-size: .75rem;
  font-weight: 650;
  text-decoration: none;
}
.school-section-jumps a:hover { border-color: #c5a12c; background: #fffaf0; color: #8a6900; }
.school-section-jumps svg { width: 15px; height: 15px; fill: currentColor; }

.school-manage-card { scroll-margin-top: 18px; transition: box-shadow .18s ease; }
.school-manage-card > h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.school-manage-card.is-collapsed { padding-top: 14px; padding-bottom: 14px; box-shadow: 0 7px 17px rgba(38, 55, 126, .05); }
.school-manage-card.is-collapsed > :not(h2) { display: none !important; }
.school-card-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #d8dfef;
  border-radius: 9px;
  background: #f8f9fd;
  color: #5f6a89;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.school-card-toggle i {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
.school-card-toggle[aria-expanded="true"] i { transform: rotate(225deg) translate(-1px, -1px); }
.school-card-toggle:hover { border-color: #c7a539; background: #fffaf0; color: #8d6b00; }

@media (max-width: 1180px) {
  .school-workspace-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-task-guide { grid-template-columns: 1fr; }
  .school-section-jumps { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .school-command-hero { grid-template-columns: 1fr; padding: 18px; }
  .school-command-status { justify-content: flex-start; }
  .school-command-actions { grid-column: 1; }
  .school-command-actions .btn { width: 100%; justify-content: center; }
  .school-workspace-nav { grid-template-columns: 1fr; }
  .school-task-guide { padding: 15px; }
  .school-section-jumps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-section-jumps a { justify-content: flex-start; }
  .school-manage-card > h2 { align-items: flex-start; }
  .school-card-toggle span { display: none; }
  .school-card-toggle { width: 34px; height: 34px; justify-content: center; padding: 0; }
}

.school-detail-shell .section-banner {
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.school-detail-shell .section-banner code {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.school-detail-shell .kpi-grid {
  gap: 14px;
  margin-bottom: 16px;
}

.school-detail-shell .kpi-card {
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(38, 55, 126, .08);
}

.school-detail-shell .tab-nav {
  gap: 10px;
}

.school-detail-shell .tab-nav a {
  padding: 10px 13px;
}

.school-detail-shell .grid-two {
  align-items: start;
  gap: 18px;
}

.school-detail-shell .card {
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(38, 55, 126, .08);
}

.school-detail-shell .card h2 {
  margin-bottom: 6px;
}

.school-detail-shell .card h3 {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #d9e1f3;
}

.school-detail-shell #branding-card,
.school-detail-tab-commercial #package-access-card,
.school-detail-tab-commercial #subscriptions-card,
.school-detail-tab-commercial #addons-card,
.school-detail-tab-commercial #billing-card,
.school-detail-tab-commercial #overrides-card {
  grid-column: 1 / -1;
}

.school-package-access-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.school-package-role-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.school-package-role-filter .btn.is-active {
  background: linear-gradient(135deg, #3a66f1, #2b49c7);
  color: #fff;
}

.school-package-group + .school-package-group {
  margin-top: 10px;
}

.school-package-group h3 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border-top: 0 !important;
  font-size: .9rem;
  color: #5d6892;
}

.school-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.school-package-item {
  border: 1px solid #dfe6f6;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.school-package-item .module-name {
  min-width: 0;
  font-weight: 600;
  color: #2d3a64;
}

.school-package-item .module-state {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.school-package-item.is-on .module-state {
  background: #eaf9f2;
  color: #0f8e59;
}

.school-package-item.is-off .module-state {
  background: #fff1f3;
  color: #c63c55;
}

.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e1e7f7;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfcff, #f6f8ff);
}

.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) + form:not(.inline-filters):not(.inline-form) {
  margin-top: 12px;
}

.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) > .btn,
.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) > button,
.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) > .quick-actions,
.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) > .form-help,
.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) > .check-inline,
.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) > small {
  grid-column: 1 / -1;
}

.school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) label:has(textarea) {
  grid-column: 1 / -1;
}

.school-detail-shell .inline-filters {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #e1e7f7;
  border-radius: 14px;
  background: var(--school-detail-soft);
}

.school-detail-shell .inline-filters label {
  flex: 1 1 220px;
  margin-bottom: 0;
}

.school-detail-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid #dfe6f5;
  border-radius: 16px;
  background: #fff;
}

.school-detail-table {
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

.school-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
  background: #f3f6ff;
  color: #6f7aa2;
}

.school-detail-table td {
  vertical-align: top;
  background: #fff;
}

.school-detail-table tbody tr:nth-child(even) td {
  background: #fbfcff;
}

.school-detail-table tbody tr:hover td {
  background: #f5f8ff;
}

.school-detail-table code {
  font-size: .86rem;
  font-weight: 700;
}

.school-detail-table small {
  color: #7985aa;
}

.school-detail-table .table-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 210px;
}

.school-detail-table .table-actions form {
  display: inline-flex;
}

.school-detail-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.school-detail-summary-strip span {
  border: 1px solid #dfe6f5;
  border-radius: 14px;
  background: #f8faff;
  padding: 10px 12px;
  color: #35406e;
}

.school-detail-summary-strip strong {
  display: block;
  color: #7b86aa;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.school-detail-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.school-detail-note {
  border: 1px solid #dfe6f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8faff);
  padding: 13px;
}

.school-detail-note p {
  margin: 10px 0;
  color: #35406e;
  line-height: 1.55;
}

.school-detail-note small {
  color: #7b86aa;
}

.admin-notes-heading { margin-bottom: 14px; }
.admin-notes-heading h2 { margin: 4px 0 6px; }
.admin-notes-heading p { max-width: 760px; margin: 0; color: #6f7998; line-height: 1.55; }
.admin-note-type-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}
.admin-note-type-guide-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dfe5f2;
  border-left: 4px solid #7180a7;
  border-radius: 14px;
  background: #fafbfe;
}
.admin-note-type-guide-item.type-risk_flag { border-left-color: #db3d4d; background: #fff8f8; }
.admin-note-type-guide-item.type-billing_note { border-left-color: #c69700; background: #fffaf0; }
.admin-note-type-guide-item.type-support_note { border-left-color: #287bc1; background: #f6fbff; }
.admin-note-type-guide-item strong { color: #26304d; font-size: .92rem; }
.admin-note-type-guide-item span { color: #65708f; font-size: .8rem; line-height: 1.4; }
.admin-note-type-guide-item small { color: #8a93aa; font-size: .72rem; line-height: 1.35; }
.admin-note-form {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.6fr) auto;
  gap: 12px;
  align-items: end;
  margin: 15px 0 20px;
  padding: 16px;
  border: 1px solid #dce3f2;
  border-radius: 16px;
  background: #f8faff;
}
.admin-note-form label { margin: 0; }
.admin-note-form textarea { width: 100%; resize: vertical; }
.school-detail-note.type-risk_flag { border-left: 4px solid #db3d4d; }
.school-detail-note.type-billing_note { border-left: 4px solid #c69700; }
.school-detail-note.type-support_note { border-left: 4px solid #287bc1; }
.admin-notes-empty { display: grid; gap: 4px; padding: 22px; border: 1px dashed #cad4e7; border-radius: 14px; color: #6d7795; text-align: center; }
.admin-notes-empty strong { color: #303a59; }

@media (max-width: 980px) {
  .admin-note-form { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .admin-note-type-guide { grid-template-columns: 1fr; }
}

.school-detail-shell .list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.school-detail-shell .list li {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--school-detail-border);
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  color: #3a456f;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.school-detail-shell .list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: #5264e5;
  vertical-align: 1px;
}

.school-detail-shell .list li:has(> form:first-child)::before {
  display: none;
}

.school-detail-shell .list li .quick-actions {
  margin-top: 10px;
}

.school-detail-shell .list li > a.btn,
.school-detail-shell .list li > form {
  margin-top: 8px;
}

.school-detail-shell .list li > a.btn[style],
.school-detail-shell .list li > form[style] {
  margin-left: 0 !important;
}

.school-detail-shell .list li > form[style] {
  display: inline-flex !important;
  margin-right: 6px;
}

.school-detail-shell .owner-summary {
  margin-top: 12px;
}

.school-detail-shell .brand-identity-card {
  margin-top: 12px;
}

.school-detail-shell .invoice-line-editor {
  margin-top: 18px;
}

.quick-link {
  display: inline-block;
  border: 1px solid #d8def1;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8faff;
  color: #3f4a7d;
  font-weight: 600;
  font-size: .84rem;
}

.platform-preview-image {
  width: 220px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #d4dbee;
  background: #fff;
  padding: 4px;
}

.platform-preview-favicon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #d4dbee;
  background: #fff;
  padding: 4px;
}

.auth-page {
  min-height: 100vh;
  background-color: #f5f7ff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: "Poppins", sans-serif;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr minmax(360px, 540px);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  background: transparent;
}

.auth-brand-stage {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  border-radius: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.auth-brand-logo {
  width: clamp(140px, 18vw, 220px);
  height: clamp(140px, 18vw, 220px);
  object-fit: contain;
  border-radius: 18px;
  background: transparent;
  padding: 0;
  margin-bottom: 16px;
  box-shadow: none;
}

.auth-brand-name {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 1.05;
  letter-spacing: .01em;
  font-weight: 600;
  text-shadow: 0 2px 0 rgba(6, 12, 30, .42), 0 6px 12px rgba(6, 12, 30, .5);
}

.auth-brand-legal {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: clamp(.95rem, 1.5vw, 1.25rem);
  font-weight: 500;
  text-shadow: 0 1px 0 rgba(6, 12, 30, .38), 0 5px 10px rgba(6, 12, 30, .44);
}

.auth-brand-platform {
  margin: 8px 0 0;
  color: #ffffff;
  opacity: .96;
  font-size: .88rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(6, 12, 30, .34), 0 4px 8px rgba(6, 12, 30, .4);
}

.auth-card {
  width: min(520px, 96vw);
  background: #ffffff;
  border: 1px solid #dbe3f5;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 42px rgba(20, 26, 73, .28);
}

.auth-card h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-weight: 500;
  font-size: 2rem;
}

.auth-card h1.auth-title-sm {
  font-size: 1.5rem;
  line-height: 1.2;
}

.auth-card .form-help {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #dde5f8;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f6ff 100%);
  color: #5a6794;
  font-size: .88rem;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: #5d6a94;
  font-size: .9rem;
}

.inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-card form {
  margin: 0;
  border: 1px solid #d9e2f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #fdfefe 0%, #f6f8ff 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-card form label:not(.inline-check):not(.check-inline) {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #5c688f;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.auth-card form input[type="text"],
.auth-card form input[type="email"],
.auth-card form input[type="password"],
.auth-card form input[type="number"],
.auth-card form select,
.auth-card form textarea {
  margin: 0;
  min-height: 44px;
  border-radius: 11px;
  border-color: #cfd9f3;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .65);
}

.auth-card form textarea {
  min-height: 120px;
}

.auth-card form input:focus,
.auth-card form select:focus,
.auth-card form textarea:focus {
  border-color: #8393e6;
  box-shadow: 0 0 0 3px rgba(98, 118, 226, .2);
}

.auth-card form .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  border-radius: 11px;
  font-size: .92rem;
}

.recaptcha-wrap {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recaptcha-note {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.recaptcha-note.is-error {
  color: #c62828;
}

.recaptcha-wrap-v3 {
  padding: 10px 12px;
  border: 1px dashed rgba(37, 99, 235, .22);
  border-radius: 12px;
  background: rgba(37, 99, 235, .04);
}

.security-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.security-meta-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
  padding: 12px;
}

.security-meta-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--heading);
  font-weight: 600;
}

.security-meta-card span {
  color: var(--muted);
  font-size: .86rem;
}

.auth-card form .auth-links {
  margin-top: 2px;
}

.auth-links {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.auth-links a {
  color: #5a66bf;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  color: #4053b9;
  text-decoration: underline;
}

.auth-links.auth-links-stacked {
  justify-content: flex-start;
  gap: 16px;
}

.auth-aux-panel {
  margin-top: 16px;
  border-top: 1px dashed #d6ddf2;
  padding-top: 14px;
}

.auth-aux-title {
  margin: 0 0 10px;
  color: #64729b;
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.auth-aux-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-aux-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  border: 1px solid #d9e1f8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcff 0%, #f3f6ff 100%);
  padding: 10px 12px;
  color: #334177;
  text-decoration: none;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.auth-aux-link:hover {
  border-color: #b8c8f5;
  box-shadow: 0 10px 18px rgba(27, 44, 119, .12);
  transform: translateY(-1px);
}

.auth-aux-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eeff;
  color: #4760ce;
  flex-shrink: 0;
}

.auth-aux-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.auth-aux-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.auth-aux-content strong {
  font-size: .93rem;
  line-height: 1.2;
  color: #2f3a6c;
}

.auth-aux-content small {
  color: #6a789f;
  font-size: .79rem;
  line-height: 1.3;
}

.widget-success-panel {
  border: 1px solid #d9e3fb;
  border-radius: 16px;
  background: linear-gradient(165deg, #fcfdff 0%, #f3f7ff 100%);
  padding: 18px 16px;
  text-align: center;
}

.widget-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f7ef;
  color: #0f9a5c;
  border: 1px solid #bae9ce;
}

.widget-success-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.widget-success-logo {
  width: 124px;
  height: 124px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #d8e1f6;
  padding: 10px;
  margin: 2px auto 12px;
  display: block;
  box-shadow: 0 12px 24px rgba(36, 55, 127, .14);
}

.widget-success-panel h2 {
  margin: 0 0 8px;
  color: #253262;
  font-size: 1.28rem;
}

.widget-success-panel > p {
  margin: 0 auto 12px;
  color: #4f5d89;
  font-size: .92rem;
  line-height: 1.55;
  max-width: 44ch;
}

.widget-success-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 auto 12px;
}

.widget-success-brand strong {
  color: #2d3c75;
  font-size: .95rem;
}

.widget-success-brand span {
  color: #6a769d;
  font-size: .82rem;
}

.widget-success-meta {
  border: 1px solid #dce5fa;
  border-radius: 12px;
  background: #fff;
  padding: 10px 11px;
  text-align: left;
  margin-bottom: 12px;
}

.widget-success-meta p {
  margin: 0;
  color: #364677;
  font-size: .86rem;
}

.widget-success-meta p + p {
  margin-top: 6px;
}

.widget-success-actions {
  display: flex;
  justify-content: center;
}

.invoice-company-block {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d7deef;
  border-radius: 10px;
  background: #fbfcff;
}

.invoice-company-legal {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #20284f;
}

.invoice-company-display {
  margin: 2px 0 0;
  font-size: .92rem;
  color: #5f6b94;
}

.invoice-company-ruc {
  margin: 2px 0 0;
  font-size: .86rem;
  color: #606b8f;
}

.invoice-line-editor {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbe2f4;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, .96), rgba(255, 255, 255, .98)),
    radial-gradient(circle at top right, rgba(83, 119, 219, .11), transparent 34%);
}

.invoice-line-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.invoice-line-editor h4,
.invoice-line-existing h5 {
  margin: 0 0 4px;
  color: #20284f;
}

.invoice-line-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e0e6f6;
  border-radius: 14px;
  background: #fff;
}

.invoice-line-table th,
.invoice-line-table td {
  vertical-align: middle;
}

.invoice-line-table-edit th:nth-child(2),
.invoice-line-table-current th:nth-child(2) {
  min-width: 260px;
}

.invoice-line-table input,
.invoice-line-table select {
  min-width: 92px;
  margin-top: 0;
}

.invoice-line-table input[name="description[]"] {
  min-width: 240px;
}

.invoice-line-live-total,
.invoice-line-money {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #20284f;
  white-space: nowrap;
}

.invoice-line-empty {
  color: #7a84a6;
  font-style: italic;
  text-align: center;
}

.invoice-line-live-total.is-credit,
.invoice-line-money.is-credit {
  color: #a73535;
}

.invoice-line-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.invoice-line-actions .form-help {
  margin: 0;
}

.invoice-line-existing {
  margin-top: 18px;
}

.invoice-line-type,
.invoice-line-locked {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.invoice-line-type.manual {
  background: #edf7ee;
  color: #28723b;
}

.invoice-line-type.locked,
.invoice-line-locked {
  background: #eef2fb;
  color: #59658a;
}

.contract-form-section {
  border: 1px solid #dfe5f5;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(245, 248, 255, .96), rgba(255, 255, 255, .98));
  padding: 16px;
  margin: 14px 0;
}

.contract-form-section legend {
  color: #27315f;
  font-weight: 800;
  padding: 0 8px;
}

.contract-form-section textarea {
  min-height: 116px;
  resize: vertical;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 6px;
}

.feature-grid .feature-item {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 8px 10px;
  min-height: 42px;
  border: 1px solid #dce4f7;
  border-radius: 10px;
  background: #fff;
  color: #2e3c64;
  font-weight: 600;
  line-height: 1.25;
}

.feature-group-title {
  margin: 10px 0 6px;
  font-size: .78rem;
  font-weight: 800;
  color: #5b6795;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.module-role-matrix {
  border: 1px solid #dfe6f5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.matrix-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, 80px);
  align-items: center;
  gap: 0;
  min-height: 44px;
  border-top: 1px solid #edf1fa;
  margin: 0;
}

.matrix-row:first-child {
  border-top: 0;
}

.matrix-head {
  background: #f6f8ff;
  color: #5f6d98;
  font-weight: 700;
}

.matrix-col {
  padding: 8px 12px;
}

.matrix-col.module {
  font-weight: 600;
  color: #2d3a64;
}

.matrix-col.module small {
  display: block;
  color: #7f8cb3;
  font-weight: 500;
  margin-top: 2px;
}

.matrix-col.role {
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .matrix-row {
    grid-template-columns: minmax(150px, 1fr) repeat(4, 52px);
    min-height: 40px;
  }

  .matrix-col {
    padding: 6px 8px;
  }

  .matrix-col.module {
    font-size: .82rem;
  }
}

.feature-grid .feature-item .feature-label {
  flex: 0 0 60%;
  max-width: 60%;
  display: block;
  text-align: left;
  padding-right: 10px;
}

.feature-grid .feature-item .feature-toggle {
  flex: 0 0 40%;
  max-width: 40%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.feature-grid .feature-item .feature-toggle input[type="checkbox"] {
  margin: 0;
  width: 14px;
  height: 14px;
}

@media (max-width: 900px) {
  .school-package-grid {
    grid-template-columns: 1fr;
  }

  .pricing-toolbar-grid {
    grid-template-columns: 1fr !important;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1300px) {
  .pricing-toolbar-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

.contract-title-mini {
  display: inline-block;
  max-width: 280px;
  color: #27315f;
  line-height: 1.25;
}

.school-contract-card {
  border-color: #cfd8f5;
  background:
    radial-gradient(circle at top right, rgba(70, 78, 230, .10), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8faff);
}

.school-contract-card textarea {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}

.contract-lock-panel {
  border: 1px solid #bfd8c6;
  border-radius: 18px;
  background: #f0faf2;
  color: #245231;
  padding: 16px;
}

.contract-lock-panel p {
  margin: 8px 0 0;
}

.contract-editor-state {
  border: 1px dashed #b8c4ee;
  border-radius: 14px;
  background: rgba(239, 243, 255, .72);
  color: #3a4778;
  padding: 10px 12px;
}

code {
  background: #edf1fb;
  border-radius: 5px;
  padding: 1px 5px;
}

@media (max-width: 1280px) {
  .module-grid,
  .kpi-grid,
  .school-grid,
  .pricing-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-shell {
    position: static;
    height: auto;
  }

  .workspace-top {
    position: static;
  }

  .workspace-top-inner {
    padding: 14px;
  }

  .workspace-main {
    padding: 12px;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .brand-identity-card {
    grid-template-columns: 1fr;
  }

  .school-detail-shell article.card > form:not(.inline-filters):not(.inline-form) {
    grid-template-columns: 1fr;
  }

  .school-detail-summary-strip,
  .school-detail-note-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    justify-content: center;
    gap: 14px;
    padding: 16px;
  }

  .auth-brand-stage {
    min-height: 240px;
    padding: 20px;
  }

  .auth-brand-logo {
    width: clamp(118px, 34vw, 178px);
    height: clamp(118px, 34vw, 178px);
  }

  .auth-card {
    width: min(560px, 100%);
    justify-self: center;
  }

  .auth-card form {
    padding: 12px;
  }

  .auth-aux-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .module-grid,
  .kpi-grid,
  .school-grid,
  .pricing-kpi-grid {
    grid-template-columns: 1fr;
  }

  .workspace-top h1 {
    font-size: 1.5rem;
  }

  .invoice-line-editor {
    padding: 12px;
  }

  .invoice-line-editor-head,
  .invoice-line-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-line-table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .invoice-line-table thead {
    display: none;
  }

  .invoice-line-table,
  .invoice-line-table tbody,
  .invoice-line-table tr,
  .invoice-line-table td {
    display: block;
    width: 100%;
  }

  .invoice-line-table tr {
    margin-bottom: 12px;
    border: 1px solid #e0e6f6;
    border-radius: 14px;
    background: #fff;
    padding: 10px;
  }

  .invoice-line-table td {
    border-top: 0;
    padding: 6px 0;
  }

  .invoice-line-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #7a84a6;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
  }

  .invoice-line-table input,
  .invoice-line-table select,
  .invoice-line-table input[name="description[]"] {
    min-width: 0;
  }
}

@media (max-width: 1100px) {
  .customer-academic-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .customer-academic-kpis,
  .customer-academic-columns,
  .customer-scope-grid,
  .customer-workflow,
  .customer-academic-definition { grid-template-columns: 1fr; }
  .customer-academic-section-title,
  .customer-academic-global { align-items: flex-start; flex-direction: column; }
}

@media print {
  html,
  body,
  .app-shell,
  .workspace-shell,
  .workspace-main,
  .card {
    background: #fff !important;
  }

  body {
    color: #111 !important;
  }

  .invoice-company-block {
    background: #fff !important;
    border-color: #ddd !important;
  }
}
.backup-saas-private{display:grid;grid-template-columns:1.35fr 1.35fr .45fr;gap:10px;margin:16px 0}.backup-saas-private label{min-width:0;margin:0;padding:12px;border:1px solid #dfe6ef;border-radius:13px;background:#f8fafc;color:#66758a;font-size:12px;font-weight:700}.backup-saas-private code{display:block;margin-top:6px;overflow-x:auto;color:#18243a;font-size:11px;white-space:nowrap}.backup-saas-private+label textarea{margin-top:7px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:11px;line-height:1.55}@media(max-width:900px){.backup-saas-private{grid-template-columns:1fr}}
