:root {
  /* PowerSchool Neon design-system palette (https://neon.powerschool.com) */
  --bg: #f5f9ff;            /* neon theme main canvas (navy-50) */
  --panel: #ffffff;
  --ink: #222222;           /* text-color-dark */
  --muted: #4d5557;         /* text-color-light */
  --accent: #1162ee;        /* branding-secondary-1 / button-primary (PowerSchool blue) */
  --accent-hover: #0050a2;  /* button-primary-hover */
  --accent-active: #00427c; /* button-primary-active (navy-700) */
  --accent-2: #00b6ef;      /* branding-primary (PowerSchool bright cyan) */
  --header-bg: #00427c;     /* deep navy header */
  --link: #1162ee;          /* text-color-link */
  --border: #dfe2e2;        /* global-divider (gray-200) */
  --row-alt: #f5f9ff;       /* navy-50 zebra tint */
  --hover-surface: #e8f0fd; /* navy-100 / button-secondary-hover */
  --success: #218900;       /* status-success-dark */
  --success-bg: #e4f7de;    /* status-success-light */
  --danger: #ba100c;        /* red-600 */
  --danger-bg: #fbddda;     /* status-error-light */
  --warning: #c85100;       /* status-warning-dark */
  --warning-bg: #fff2e9;    /* orange-50 */
  --neon-border: #E2E8F0;
  --neon-bg: #F8FAFC;
  --neon-blue-100: #EFF6FF;
  --neon-blue-600: #2563EB;
  --neon-green-bg: #F0FDF4;
  --neon-green: #16A34A;
  --neon-text-light: #94A3B8;
  --neon-text-medium: #475569;
  --neon-theme-primary-co-brand: #0050A2;
  --neon-font: 'Inter', system-ui, sans-serif;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

.ipm-locations { padding: 16px 24px 24px; }
.ipm-location-list { list-style: none; margin: 0; padding: 0; }
.ipm-location-list > li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ipm-location-list > li > span { min-width: 0; overflow-wrap: anywhere; }
#ipm-banner-drawer .neon-drawer { width: 600px; max-width: 100vw; }
#ipm-discard-confirmation .neon-overlay { z-index: 10000; }
#ipm-banner-drawer { font-family: var(--neon-font); font-size: 13px; }
#ipm-banner-drawer .neon-drawer { font-family: var(--neon-font); }
#ipm-banner-drawer label,
#ipm-banner-drawer input,
#ipm-banner-drawer .ipm-image-preview { font-family: var(--neon-font); font-size: 13px; }
#ipm-banner-drawer button { font-family: var(--neon-font); font-size: 14px; }
.ipm-drawer-heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; }
.ipm-drawer-title { font-family: var(--neon-font); font-size: 17px; font-weight: 700; line-height: 1.4; }
.ipm-drawer-location { font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.ipm-drawer-body { display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.ipm-banner { display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); min-width: 0; }
.ipm-banner-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ipm-banner-heading h3 { margin: 0; font-family: var(--neon-font); font-size: 14px; font-weight: 600; line-height: 1.4; }
.ipm-image-preview { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 1; border-radius: 6px; background: var(--row-alt); color: var(--muted); overflow: hidden; }
.ipm-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.ipm-drawer-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 24px; }
@media (max-width: 480px) { .ipm-locations { padding: 12px; } .ipm-drawer-body { padding: 16px; } .ipm-drawer-footer { padding: 16px; } }

.school-picker-results {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
}

#root { width: 100%; max-width: none; margin: 0; height: 100vh; }

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

neon-4_3_0-app-header {
  display: block;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
}

.app-layout-shell {
  display: flex;
  height: calc(100vh - 52px);
  overflow: hidden;
}

.app-layout-shell > neon-4_3_0-app-nav {
  align-self: stretch;
  height: 100%;
}

.who {
  font-size: 12px;
  color: var(--panel);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f0fd;
  color: #0756b5;
  font-size: 11px;
  font-weight: 600;
}

.crm-app-container {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
}

#district-provisioning-detail .neon-layout-detail-header {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr) minmax(12rem, 1fr);
  align-items: center;
  gap: 16px;
  padding-inline: 24px;
}

#district-provisioning-detail-aria-labelledby-target,
#district-provisioning-detail [data-slot='header-content'] {
  display: contents;
}

#provisioning-heading {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

#provisioning-heading .neon-page-header-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

#provisioning-heading .neon-page-header-heading,
#provisioning-heading .neon-page-header-subheading {
  max-width: 100%;
  margin: 0;
}

#provisioning-heading .neon-page-header-heading > span,
#provisioning-heading .neon-page-header-subheading {
  text-align: center;
}

#provisioning-heading .neon-page-header-subheading {
  padding-top: 6px;
}

#district-provisioning-detail [data-slot='pre-body'],
#district-provisioning-detail [data-slot='body'] {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
}

#district-provisioning-detail fieldset.neon-4_3_0-form-fieldset {
  margin: 0;
}

#district-provisioning-detail legend {
  padding: 0;
}

#district-provisioning-detail .neon-4_3_0-text > p,
#district-provisioning-detail p.neon-4_3_0-text {
  margin-bottom: 0;
}

.provisioning-subscriptions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.provisioning-subscriptions-table {
  table-layout: fixed;
}

.provisioning-subscriptions-table tbody tr {
  min-width: 0;
}

.provisioning-subscriptions-table .provisioning-subscriptions-empty p {
  text-align: center;
  margin-inline: auto;
}

.provisioning-subscriptions-table th:first-child {
  width: 40%;
}

.provisioning-subscriptions-table th:last-child {
  width: 48px;
}

.provisioning-subscriptions-table :is([neon-select-field], [neon-date-range-field], [neon-date-field]) {
  min-width: 0;
  width: 100%;
}

.provisioning-subscription-term .neon-date-range-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.provisioning-subscriptions-table [data-show-label='false'] > .neon-abstract-input-info {
  order: 1;
}

.provisioning-subscriptions-table [data-show-label='false'] > .neon-input-field-first {
  margin-top: 0;
}

.provisioning-subscriptions-table [data-show-label='false'] > :is(.neon-error-message, .neon-success-message) {
  order: 2;
}

#provisioning-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

@media (min-width: 769px) {
  #provisioning-footer:has(#school-provisioning-back) .neon-button-footer-tertiary {
    flex: 0 0 auto;
  }

  #provisioning-footer:has(#school-provisioning-back) .neon-button-footer-end-container {
    flex: 1;
  }

  #provisioning-footer:has(#school-provisioning-back) .neon-button-footer-buttons {
    margin-inline-end: auto;
  }
}

@media (max-width: 768px) {
  #district-provisioning-detail .neon-layout-detail-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 16px;
  }

  #provisioning-heading {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #provisioning-close {
    grid-column: 2;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

button:not(:where(#district-schools-modal *, #directory-subscriptions-modal *, #district-provisioning-detail *, .neon-4_3_0-popper-content *, neon-4_3_0-date-field *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}
/* button:hover { background: var(--accent-hover); } */
button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }

table:not(:where(#district-provisioning-detail *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) { width: 100%; border-collapse: collapse; font-size: 14px; }
:is(th, td):not(:where(#district-provisioning-detail *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th:not(:where(#district-provisioning-detail *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:nth-child(even) td:not(:where(#district-provisioning-detail *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) { background: var(--row-alt); }

.meta { color: var(--muted); font-size: 13px; margin: 8px 2px; }
.error { color: var(--danger); background: var(--danger-bg); border: 1px solid #f7bfbb; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.loading { color: var(--muted); padding: 24px; text-align: center; }

.header-right { display: flex; align-items: center; gap: 12px; }

/* ---- Page ---- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.page-header h2 { margin: 0; font-size: 20px; }
.search-bar { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: flex-end; }
.search-bar neon-text-field { flex: 1 1 220px; }
.search-bar neon-select-field { flex: 0 1 220px; }
.search-bar neon-button { flex: 0 0 auto; }
.header-actions { display: flex; gap: 8px; }

/* A–Z alphabetical browse */
.alpha-bar { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 12px; }
.alpha {
  background: transparent; color: var(--accent); border: 1px solid transparent;
  border-radius: 4px; padding: 3px 9px; font-size: 13px; cursor: pointer;
}
.alpha:hover { background: var(--hover-surface); border-color: var(--border); }

:is(input, select):not(:where(#district-provisioning-detail *, .neon-4_3_0-popper-content *, neon-4_3_0-date-field *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) {
  font-family: inherit;
}
:is(input[type='text'], input[type='number'], input[type='email'], input[type='date'], select):not(:where(#district-provisioning-detail *, .neon-4_3_0-popper-content *, neon-4_3_0-date-field *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; width: 100%;
}
input:disabled:not(:where(#district-provisioning-detail *, .neon-4_3_0-popper-content *, neon-4_3_0-date-field *, .neon-4_3_0-date-article *, .neon-4_3_0-date-range-article *)) { background: #f1f4f4; color: var(--muted); }

/* ---- Detail header ---- */
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.detail-header h2 { margin: 4px 0; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.subtle { font-size: 13px; color: var(--muted); }
.subtle a { color: var(--accent); text-decoration: none; }
.detail-actions { display: flex; gap: 8px; }

/* ---- Tabs ---- */
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tab {
  background: transparent; color: var(--muted); border: none; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 10px 16px; font-size: 14px; margin-bottom: -2px;
}
.tab:hover { background: var(--hover-surface); color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; background: transparent; }
.tab-content { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.tab-content.listing-tab-content { border: 0; border-radius: 0; padding: 0; width: 100%; }
.tab-content h3 { margin-top: 0; }
.tab-content hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toolbar h3 { margin: 0; }
.subscription-row-actions { display: flex; align-items: center; gap: 4px; }
.field-validation-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* ---- Forms ---- */
.entity-form { margin-top: 16px; }
.entity-form h4 { margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.field-label { color: var(--muted); font-weight: 600; }
.field-hint { color: var(--muted); font-size: 11px; }
.field input[type='checkbox'] { width: auto; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.muted { color: var(--muted); font-size: 13px; }

/* Modal form stack (account activation / edit, etc.) */
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.district-subscription-form .neon-input-field-first { width: 100%; max-width: none; }
.district-subscription-form > div > * { display: block; width: 100%; }
.district-subscription-form .neon-date-field-input-container { display: flex; }
.district-subscription-form .neon-date-field-input-container input { flex: 1; width: 0; min-width: 0; }
.district-subscription-form .neon-date-field-picker-button { flex: none; }
.form-error {
  color: var(--danger); background: var(--danger-bg); border: 1px solid #f7bfbb;
  padding: 8px 10px; border-radius: 6px; font-size: 13px; margin: 0;
}

/* Staff accounts */
.staff-new-action { white-space: nowrap; }
.staff-account-filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 320px));
  align-content: start;
  gap: 12px;
  min-height: 116px;
  padding: 16px 24px;
}
@media (max-width: 640px) {
  .staff-account-filter-fields { grid-template-columns: minmax(0, 1fr); }
}
.flag-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px 16px; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 0;
}
.flag-grid legend { color: var(--muted); font-weight: 600; font-size: 12px; padding: 0 6px; }

/* Subscription calculator bar (legacy edit_product calculator) */
.calc-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.calc-total { font-size: 14px; }
.calc-total strong { color: var(--accent); }

/* ---- Buttons / banners ---- */
button.danger { background: var(--danger); }
button.danger:hover { background: #930c09; }
button.link-danger { background: transparent; color: var(--danger); padding: 2px 6px; font-size: 13px; }
button.link-danger:hover { background: var(--danger-bg); }
.success { color: var(--success); background: var(--success-bg); border: 1px solid #bdebae; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }

/* ---- AG Grid ---- */
.ag-theme-alpine {
  --ag-header-background-color: #f1f4f4;
  --ag-odd-row-background-color: var(--row-alt);
  --ag-border-color: var(--border);
  --ag-font-family: inherit;
  --ag-font-size: 13px;
  --ag-row-hover-color: var(--hover-surface);
  --ag-selected-row-background-color: var(--hover-surface);
  --ag-header-foreground-color: #8fa1b9;
  --ag-header-column-separator-color: #dce5f2;
  margin-top: 4px;
}

/* ---- Provisioning directory ---- */
.directory-page { display: block; width: 100%; max-width: none; margin: 0; }
.colleges-page { display: flex; flex-direction: column; width: calc(100% + 44px); height: calc(100vh - 62px); max-width: none; margin: -22px -22px 0; }
.colleges-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 20px; }
.colleges-header h1 { margin: 0 0 3px; color: #182230; font-size: 22px; font-weight: 700; line-height: 1.2; }
.colleges-header p { margin: 0; color: #53657c; font-size: 13px; line-height: 1.4; }
.colleges-header neon-button { margin-top: -2px; flex: 0 0 auto; }
.colleges-panel { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; width: 100%; background: #fff; border: 1px solid #dfe7f0; border-radius: 7px; box-shadow: none; overflow: hidden; }
.colleges-search-row { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; padding: 18px 22px 14px; border-bottom: 1px solid #e8edf3; }
.colleges-search {
  --neon-border: #e2e8f0;
  --neon-blue-600: #2563eb;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.colleges-search:focus-within { --neon-border: var(--neon-blue-600); }
.colleges-search neon-4_3_0-search,
.colleges-search neon-search,
.colleges-search [id='college-search'] {
  --neon-border: inherit;
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none !important;
}
.colleges-search .neon-search-box {
  display: flex;
  width: 100%;
  min-width: 0;
  border-color: var(--neon-border) !important;
}
.colleges-search .neon-search-main-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
@media (min-width: 769px) {
  #college-search label .neon-constrain-description,
  #college-search label.input-size-small,
  #college-search.neon-constrain-description,
  .colleges-search neon-4_3_0-search label.neon-constrain-description,
  .colleges-search neon-4_3_0-search label.input-size-small,
  .colleges-search neon-4_3_0-search label .neon-constrain-description,
  .colleges-search neon-search label.neon-constrain-description,
  .colleges-search neon-search label.input-size-small,
  .colleges-search neon-search label .neon-constrain-description {
    min-width: 0 !important;
    width: 100% !important;
  }
}
.colleges-search:focus-within .neon-search-box {
  border-color: var(--neon-blue-600, #2563eb) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--neon-blue-600, #2563eb) 20%, transparent);
}
.colleges-table-wrap { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.colleges-table-wrap .error { margin: 12px; }
.colleges-table-wrap .loading { flex: 1 1 auto; }
.colleges-table-wrap .ag-theme-alpine { flex: 1 1 auto; min-height: 0; margin-top: 0; }
.colleges-panel .ag-theme-alpine {
  --ag-background-color: #fff;
  --ag-border-color: #e4ebf3;
  --ag-header-background-color: #f8fafc;
  --ag-header-foreground-color: #8a9bb4;
  --ag-foreground-color: #34435a;
  --ag-row-border-color: #e8edf3;
  --ag-row-hover-color: #f8fbff;
  --ag-font-size: 13px;
  --ag-header-column-separator-display: none;
}
.colleges-panel .ag-header-cell { font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.colleges-panel .ag-header-cell-label { justify-content: flex-start; }
.colleges-panel .ag-cell { display: flex; align-items: center; }
.colleges-panel .ag-cell-value { overflow: visible; }
.colleges-table { min-width: 850px; font-size: 13px; }
.colleges-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #8a9bb4; padding: 9px 9px; border-top: 1px solid #e8edf3; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.colleges-table td { height: 36px; padding: 7px 9px; color: #263448; border-bottom: 1px solid #e8edf3; white-space: nowrap; }
.colleges-table tr:nth-child(even) td { background: #fff; }
.colleges-table tbody tr:hover td { background: #f5f9ff; }
.college-name { min-width: 0; padding: 0; color: #1162ee; background: transparent; border: 0; border-radius: 0; font: inherit; font-weight: 600; text-align: left; }
.college-name:hover { color: #004fae; background: transparent; text-decoration: underline; }
.masked-id { color: #91a0b4 !important; }
.college-type { display: inline-flex; align-items: center; gap: 3px; border-radius: 12px; padding: 2px 7px; font-size: 11px; line-height: 1; }
.college-type.public { border: 1px solid #b7d5ff; color: #1162ee; background: #edf5ff; }
.college-type.private { border: 1px solid #dfe6ed; color: #53657c; background: #f4f7fa; }
.college-empty { height: 120px !important; color: #53657c !important; text-align: center; }
.colleges-footer { display: flex; flex: 0 0 auto; align-items: center; min-height: 39px; border-top: 1px solid #e8edf3; padding: 5px 9px; color: #182230; background: #fff; font-size: 13px; }
.colleges-pagination { display: block; flex: 1 1 auto; }
.colleges-pagination .neon-pagination-button,
.colleges-pagination .neon-pagination-button .neon-button {
  min-width: 30px;
  min-height: 30px;
  font-size: 12px;
}
.colleges-pagination .neon-pagination-next,
.colleges-pagination .neon-pagination-next .neon-button {
  min-width: 24px;
  min-height: 24px;
  font-size: 10px;
}
.colleges-pagination button[aria-current='page'],
.colleges-pagination [aria-current='page'] .neon-button {
  color: #fff !important;
  background: var(--neon-blue-600, #2563eb) !important;
  border-color: var(--neon-blue-600, #2563eb) !important;
  font-size: 12px;
}
.colleges-grid-wrapper { border: 0; border-radius: 0; }
.colleges-neon-table .masked-id { color: #91a0b4; }

.field-external-label { display: block; margin: 0 0 5px; color: #40516a; font-size: 13px; line-height: 1.2; }
.field-required-marker { color: #d92d27; }
.district-success-toast, .subscription-notification {
  position: fixed;
  top: 6px;
  right: 12px;
  z-index: 10001;
  width: min(368px, calc(100vw - 24px));
}
.district-success-toast .neon-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  background: #16783d;
  border: 0;
  border-radius: 5px;
  box-shadow: 0 6px 14px rgb(15 23 42 / 20%);
  color: #fff;
}
.district-success-toast .neon-toast-header,
.district-success-toast .neon-toast-status-icon,
.district-success-toast .neon-toast-close-button { color: #fff !important; }
.district-success-toast .neon-toast-header { margin: 0; font-size: 12px !important; font-weight: 600; line-height: 1.3; }
.district-success-toast .neon-toast-status-icon svg,
.district-success-toast .neon-toast-close-button svg { fill: #fff !important; }
.directory-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.directory-header h2 { margin: 0 0 6px; color: #17395f; font-size: 30px; font-weight: 650; line-height: 1.06; }
.directory-header p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.25; }
.directory-actions { display: flex; gap: 12px; padding-top: 18px; }
.directory-search-area {
  margin-bottom: 12px;
}

.directory-applied-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px;
  flex-shrink: 0;
}

.directory-applied-filters neon-4_3_0-chip-set {
  display: block;
  flex: 1 1 240px;
  min-width: 0;
}

.directory-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.directory-filter-search {
  flex: 1 1 auto;
  min-width: 0;
}

.directory-filter-search neon-4_3_0-text-field,
.directory-filter-search neon-4_3_0-search,
.directory-filter-search [id="directory-search"] {
  display: block;
  width: 100%;
  max-width: none;
}

.directory-filter-search #directory-search:focus-within .neon-search-box {
  border-color: var(--neon-blue-600, #2563eb) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--neon-blue-600, #2563eb) 20%, transparent) !important;
}

.directory-filter-search #directory-search .neon-search-main-input:focus {
  outline: 0;
}

.directory-filter-select {
  width: 190px;
  flex: 0 0 auto;
}

.directory-search-control {
  color: #4d5557;
  --button-icon-dark: #4d5557;
}

.directory-layout { display: flex; flex-direction: column; gap: 16px; min-height: 0; height: 100%; }
.directory-title-block h2 { margin: 0; }
.directory-title-block p { margin: 4px 0 0; }
.directory-pagination-wrap { margin-top: 12px; }

.directory-layout neon-4_3_0-card-standard {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 8px;
}

.directory-layout .neon-card-standard-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.directory-layout .neon-card-standard-footer,
.directory-layout .neon-card-standard-footer-slot-container {
  flex: 0 0 auto;
}

.directory-card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.directory-layout neon-4_3_0-tabs {
  display: block;
  margin-top: 10px;
  background: #fff;
  padding: 0 24px;
}

.directory-grid-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: calc(100% - 48px);
  margin-right: 24px;
  margin-left: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid #d6d8db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 0;
}

.directory-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
}

.directory-neon-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.directory-neon-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f7f9;
}

.directory-neon-table td,
.directory-neon-table th {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.directory-neon-table .directory-col-header {
  min-width: 280px;
}

.directory-neon-table .directory-col-name {
  min-width: 280px;
  color: var(--neon-blue-600);
  font-family: var(--neon-font);
}

.directory-name-link {
  border: none;
  background: transparent;
  color: var(--neon-blue-600);
  padding: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.directory-neon-table .directory-col-name neon-4_3_0-tag {
  margin-left: 8px;
}

.directory-neon-table td neon-4_3_0-tag {
  vertical-align: middle;
}

.directory-neon-table .directory-col-settings-id {
  min-width: 260px;
}

.directory-table-row {
  cursor: default;
}

.directory-table-row:hover td {
  background: #f8f9fa;
}

.directory-table-empty {
  text-align: center;
  color: #637381;
  padding: 24px;
}

.directory-count-link {
  border: none;
  background: transparent;
  color: var(--neon-blue-600);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

/* .directory-count-link:hover {
  text-decoration: underline;
} */

#district-schools-modal [data-slot='dialog-pre-body'] {
  padding-top: 12px;
}

.directory-filter-drawer-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 16px;
  padding: 24px;
  background: #f8fafc;
}

#directory-filter-drawer .neon-drawer {
  width: min(380px, 100vw) !important;
  max-width: 380px !important;
  animation: drawer-slide-in-right 180ms ease-out both;
}
#directory-filter-drawer[data-animate-out='true'] .neon-drawer {
  animation: drawer-slide-out-right 180ms ease-in both;
}

:is(#directory-filter-drawer, #change-school-alias, #change-staff-email-domain) .neon-modal-drawer-title {
  color: #fff !important;
  background: var(--neon-theme-primary-co-brand, #087eb4) !important;
}

:is(#directory-filter-drawer, #change-school-alias, #change-staff-email-domain) .neon-close-button,
:is(#directory-filter-drawer, #change-school-alias, #change-staff-email-domain) .neon-close-button .neon-button,
:is(#directory-filter-drawer, #change-school-alias, #change-staff-email-domain) .neon-close-button neon-4_3_0-icon,
:is(#directory-filter-drawer, #change-school-alias, #change-staff-email-domain) .neon-close-button svg {
  color: #fff !important;
  fill: #fff !important;
}
:is(#directory-filter-drawer, #change-school-alias, #change-staff-email-domain) .neon-close-button .neon-button {
  background: #167fec7a !important;
}

.directory-filter-drawer-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.directory-filter-drawer-fields neon-4_3_0-select-field {
  display: block;
  width: 100%;
}

.directory-filter-drawer-footer {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  gap: 8px;
}

#directory-filter-drawer .neon-modal-drawer-button-footer {
  background: #fff;
  border-top: 0;
  box-shadow: none;
}
@keyframes drawer-slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes drawer-slide-out-right {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  #directory-filter-drawer .neon-drawer,
  #directory-filter-drawer[data-animate-out='true'] .neon-drawer { animation: none; }
}
.directory-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.directory-header h2 { margin: 0 0 7px; color: #17395f; font-size: 30px; font-weight: 650; }
.directory-header p { margin: 0; color: #64748b; font-size: 14px; }
.directory-actions { display: flex; gap: 10px; padding-top: 27px; }
.button-primary, .button-secondary, .button-filter { border-radius: 7px; padding: 10px 16px; font: inherit; font-size: 13px; font-weight: 600; }
.button-primary { background: #1162ee; }
.button-primary:hover { background: #0050a2; }
.button-secondary, .button-filter { background: #fff; color: #1162ee; border: 1px solid #a8c2e4; }
.button-secondary:hover, .button-filter:hover { background: #eaf3ff; }
.directory-panel { display: block; width: 100%; max-width: none; background: #fff; border: 1px solid #d7e0eb; border-radius: 7px; box-shadow: 0 3px 12px rgba(19, 59, 101, .07); overflow: hidden; }
.directory-search-row {
  display: flex;
  gap: 16px;
  padding: 15px 24px;
}
.directory-search { display: flex; align-items: center; gap: 10px; flex: 1; border: 1px solid #c8d3e1; border-radius: 7px; padding: 0 13px; color: #6a7c91; }
.directory-search input { border: 0; outline: 0; padding: 12px 0; font-size: 14px; }
.directory-tabs { display: flex; gap: 24px; padding: 0 29px; border-bottom: 1px solid #d7e0eb; }
.directory-tab { background: transparent; color: #69798c; border-radius: 0; border-bottom: 3px solid transparent; padding: 13px 2px 11px; font-size: 13px; }
.directory-tab:hover, .directory-tab.active { background: transparent; color: #0756b5; }
.directory-tab.active { border-bottom-color: #1162ee; }
.directory-tab b { margin-left: 5px; color: #8b9aae; font-weight: 500; }
.directory-table-wrap { display: block; width: 100%; max-width: none; overflow-x: auto; border: 1px solid #d7e0eb; border-radius: 7px; }
.directory-table { width: 100%; min-width: 900px; max-width: none; font-size: 13px; }
.directory-table th { background: #f4f7fb; color: #65778d; padding: 12px 15px; }
.directory-table td { padding: 13px 15px; white-space: nowrap; }
.directory-table tbody tr { cursor: pointer; }
.directory-table tbody tr:hover td { background: #edf5ff; }
.directory-table td a { color: #0756b5; font-weight: 600; text-decoration: none; }
.type-pill { display: inline-block; border: 1px solid #8cb5ff; border-radius: 12px; color: #235ed1; padding: 5px 10px; font-size: 14px; font-weight: 400; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #a7e4bd; border-radius: 12px; color: #218900; padding: 5px 10px; font-size: 14px; font-weight: 400; }
.status-dot { color: #3aa35c; font-size: 10px; }
.directory-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #d7e0eb; color: #182230; padding: 16px 29px; font-size: 14px; font-weight: 300; }
.directory-pagination { display: flex; align-items: center; gap: 4px; }
.directory-pagination button { width: 36px; height: 36px; min-width: 36px; padding: 0; border: 0; border-radius: 7px; background: #fff; color: #182230; font-size: 14px; font-weight: 300; }
.directory-pagination button:hover { background: #edf3ff; }
.directory-pagination button.current { background: #3564d8; color: #fff; font-weight: 400; }
.directory-pagination button[aria-label='Previous page'], .directory-pagination button[aria-label='Next page'] { border: 1px solid #d7e0eb; color: #182230; font-size: 18px; }
.directory-pagination button:disabled { color: #b2bdca; background: #fff; }
.directory-page-control-group { display: inline-flex; align-items: center; gap: 4px; }
.directory-page-ellipsis { color: #182230; font-size: 14px; font-weight: 300; padding: 0 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.directory-modal-subscriptions-wrap {
  overflow-x: auto;
}

.directory-modal-subscriptions-wrap table {
  min-width: 520px;
}

.directory-modal-subscriptions-wrap td:nth-child(2) {
  white-space: nowrap;
}

.directory-modal-subscriptions-wrap td:last-child {
  min-width: 80px;
}

.directory-layout .ag-theme-alpine { margin-top: 0; }

.announcement-drawer-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  gap: 16px;
  padding: 24px;
}

.announcement-datetime-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-datetime-field label {
  color: var(--neon-text-medium);
  font-size: 14px;
  font-weight: 600;
}

.announcement-datetime-field input {
  padding: 8px 10px;
  border: 1px solid var(--neon-border);
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
}

#announcement-scheduled-locked .neon-system-message-title {
  font-weight: 400 !important;
}

.announcement-drawer-footer,
.announcement-drawer-actions {
  display: flex;
  align-items: center;
}

.announcement-drawer-footer {
  justify-content: space-between;
  width: 100%;
}

.announcement-drawer-actions {
  gap: 8px;
}

.announcement-grid-wrapper {
  border: 0;
  border-radius: 0;
  background: #fff;
}

.announcement-table { table-layout: fixed; }
.announcement-table th:first-child { width: 50%; }
.announcement-table th:last-child { width: 128px; }
.announcement-table td { overflow-wrap: anywhere; }

.announcement-new-action { white-space: nowrap; }

neon-4_3_0-tag.status-tag-active {
  border-color: #BBF7D0 !important;
  color: #16A34A !important;
}

neon-4_3_0-tag.status-tag-active span {
  color: #16A34A !important;
}

neon-4_3_0-tag.status-tag-active neon-4_3_0-icon {
  color: #16A34A !important;
  fill: #16A34A !important;
  flex-shrink: 0;
  transform: scale(0.85);
  transform-origin: center;
}

neon-4_3_0-tag.status-tag-inactive {
  background: var(--neon-navy-100) !important;
  border-color: var(--neon-border) !important;
  color: var(--neon-text-medium) !important;
}

/* neon-4_3_0-tag.status-tag-inactive span,
neon-4_3_0-tag.status-tag-inactive neon-4_3_0-icon {
  color: var(--neon-text-medium) !important;
} */

.type-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #9ac0ff;
  color: #2f66c6;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border: 1px solid #ffbe8a;
  background: #fff2e6;
  color: #eb7b21;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}

.deletion-tag {
  display: inline-flex;
  border: 1px solid #ffb3b3;
  color: #df2f2f;
  background: #fff0f0;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 800px) {
  .crm-app-container { padding: 30px 18px 46px; }
  .directory-header { flex-direction: column; margin-bottom: 22px; }
  .colleges-page { height: calc(100vh - 76px); }
  .colleges-header { flex-direction: column; gap: 12px; }
  .colleges-search-row { padding: 14px; }
  .colleges-filter { flex-basis: 96px; }
  .directory-actions { padding-top: 0; }
  .directory-filters { flex-wrap: wrap; }
  .directory-search-row { flex-direction: column; align-items: stretch; }
  .directory-filter-search { min-width: 100%; }
  .directory-filter-select { width: calc(50% - 6px); min-width: 180px; }
}

/* ---- Detail sections (single-page read/edit, mirrors legacy layout) ---- */
.detail-sections { display: flex; flex-direction: column; gap: 16px; }
.detail-section {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 14px;
}
.section-head h3 { margin: 0; font-size: 15px; color: var(--accent); }
.section-actions { display: flex; gap: 8px; }

/* Read-mode definition list */
.def-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 6px 32px; margin: 0;
}
.def-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: baseline; padding: 3px 0; }
.def-row dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.def-row dd { margin: 0; font-size: 14px; word-break: break-word; }
.def-row dd a { color: var(--accent); text-decoration: none; }

/* ---- College detail (Neon card presentation) ---- */
.college-detail-page { display: flex; flex-direction: column; font-family: Roboto, Arial, Helvetica, sans-serif; gap: 16px; }
.college-read-field { align-items: baseline; display: flex; flex-wrap: wrap; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.college-detail-pair { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.profile-wrap-text { overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .college-detail-pair { grid-template-columns: 1fr; }
}
