/* BGMS V113 R18 — real markup rebuild for five Browser-UAT target screens.
   Explicit classes only; no legacy Education/R8/R9/R13/R16/R17 layout dependency. */

.bgms-u18-page{
  --u18-line:var(--line,#dfe5eb);
  --u18-text:var(--text,#172033);
  --u18-muted:var(--muted,#6b7280);
  --u18-surface:var(--surface,#fff);
  display:grid;
  gap:16px;
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  align-content:start;
}

.bgms-u18-page *{box-sizing:border-box}
.bgms-u18-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  min-width:0;
  margin:0;
  padding:0 0 14px;
  border:0;
  border-bottom:1px solid var(--u18-line);
  background:transparent;
}
.bgms-u18-page-copy{min-width:0;max-width:850px}
.bgms-u18-kicker{
  display:block;
  margin:0 0 3px;
  color:var(--u18-muted);
  font-size:10px;
  font-weight:850;
  letter-spacing:.02em;
}
.bgms-u18-page h1{
  margin:0;
  color:var(--u18-text);
  font-size:clamp(24px,2vw,31px);
  line-height:1.35;
}
.bgms-u18-page h2{
  margin:0;
  color:var(--u18-text);
  font-size:18px;
  line-height:1.5;
}
.bgms-u18-page h3{
  margin:0;
  color:var(--u18-text);
  font-size:15px;
  line-height:1.55;
}
.bgms-u18-page p{margin:4px 0 0;color:var(--u18-muted);font-size:12px;line-height:1.75}
.bgms-u18-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
  flex:0 0 auto;
}

.bgms-u18-section{
  min-width:0;
  margin:0;
  padding:0 0 14px;
  border:0;
  border-bottom:1px solid var(--u18-line);
  background:transparent;
  box-shadow:none;
}
.bgms-u18-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  min-width:0;
  margin:0 0 10px;
}
.bgms-u18-section-head>div:first-child{min-width:0}
.bgms-u18-section-head--programs{align-items:end}
.bgms-u18-count{
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  flex:0 0 auto;
  color:var(--u18-muted);
  font-size:11px;
}
.bgms-u18-count strong{color:var(--u18-text);font-size:18px}

.bgms-u18-toolbar{
  display:grid;
  align-items:end;
  gap:9px;
  min-width:0;
  margin:0;
  padding:8px 0 10px;
}
.bgms-u18-toolbar--catalog{grid-template-columns:minmax(260px,1.5fr) minmax(210px,.8fr) auto}
.bgms-u18-toolbar--programs{grid-template-columns:minmax(250px,1fr) auto;min-width:min(100%,470px)}
.bgms-u18-toolbar--events{grid-template-columns:minmax(300px,1fr) minmax(160px,210px) minmax(160px,210px) auto}
.bgms-u18-field{display:grid;gap:5px;min-width:0;color:var(--u18-muted);font-size:11px;font-weight:800}
.bgms-u18-field--grow{min-width:0}
.bgms-u18-field input,.bgms-u18-field select,.bgms-u18-search input{
  width:100%;
  min-width:0;
  min-height:40px;
  margin:0;
}
.bgms-u18-toolbar-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.bgms-u18-search{position:relative;display:block;min-width:0}
.bgms-u18-search svg{
  position:absolute;
  inset-inline-start:12px;
  top:50%;
  width:17px;
  height:17px;
  transform:translateY(-50%);
  color:var(--u18-muted);
  pointer-events:none;
}
.bgms-u18-search input{padding-inline-start:39px}

.bgms-u18-list{display:grid;min-width:0}
.bgms-u18-list-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  min-width:0;
  margin:0;
  padding:11px 2px;
  border:0;
  border-bottom:1px solid var(--u18-line);
  background:transparent;
}
.bgms-u18-list-row:last-child{border-bottom:0}
.bgms-u18-list-main{display:grid;gap:2px;min-width:0}
.bgms-u18-list-main h3 a{text-decoration:none}
.bgms-u18-eyebrow{color:var(--u18-muted);font-size:10px;font-weight:800}
.bgms-u18-list-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  min-width:max-content;
}
.bgms-u18-inline-stat{color:var(--u18-muted);font-size:11px}
.bgms-u18-inline-stat strong{color:var(--u18-text);font-size:14px}
.bgms-u18-progress{font-size:16px;font-variant-numeric:tabular-nums}
.bgms-u18-note{color:var(--u18-muted);font-size:11px}

.bgms-u18-empty{
  display:grid;
  gap:4px;
  min-height:0;
  margin:0;
  padding:13px 2px;
  color:var(--u18-muted);
  text-align:start;
  border:0;
  border-bottom:1px dashed var(--u18-line);
  border-radius:0;
  background:transparent;
}
.bgms-u18-empty strong{color:var(--u18-text)}
.bgms-u18-empty-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}

.bgms-u18-enrollment-list{display:grid}
.bgms-u18-enrollment-row{
  display:grid;
  grid-template-columns:minmax(190px,1.25fr) minmax(110px,.55fr) minmax(110px,.55fr) minmax(170px,.8fr) minmax(280px,1.3fr);
  align-items:center;
  gap:12px;
  min-width:0;
  padding:11px 2px;
  border-bottom:1px solid var(--u18-line);
}
.bgms-u18-enrollment-row:last-child{border-bottom:0}
.bgms-u18-enrollment-identity{display:grid;gap:3px;min-width:0}
.bgms-u18-enrollment-identity strong{font-size:14px;overflow-wrap:anywhere}
.bgms-u18-fact{display:grid;gap:3px;min-width:0}
.bgms-u18-fact span{color:var(--u18-muted);font-size:9px;font-weight:800}
.bgms-u18-fact strong{color:var(--u18-text);font-size:11px;line-height:1.65;overflow-wrap:normal;word-break:normal}
.bgms-u18-enrollment-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0}
.bgms-u18-cancel-form{display:flex;align-items:center;gap:6px;min-width:0;margin:0}
.bgms-u18-cancel-form input{width:150px;min-width:0;min-height:36px;padding:6px 9px}

.bgms-u18-summary-line{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:5px 0 7px;
  color:var(--u18-muted);
  font-size:11px;
}
.bgms-u18-summary-line strong{color:var(--u18-text);font-size:13px}

.bgms-u18-program-list{display:grid;min-width:0;border-top:1px solid var(--u18-line)}
.bgms-u18-program-head,
.bgms-u18-program-row{
  display:grid;
  grid-template-columns:minmax(160px,1.35fr) minmax(145px,1fr) minmax(105px,.8fr) minmax(90px,.65fr) minmax(80px,.55fr) minmax(105px,.8fr) minmax(175px,auto);
  gap:10px;
  align-items:center;
  min-width:0;
}
.bgms-u18-program-head{
  padding:7px 2px;
  color:var(--u18-muted);
  font-size:9px;
  font-weight:850;
  border-bottom:1px solid var(--u18-line);
}
.bgms-u18-program-row{
  min-height:72px;
  padding:10px 2px;
  border-bottom:1px solid var(--u18-line);
}
.bgms-u18-program-row:last-child{border-bottom:0}
.bgms-u18-program-identity{display:grid;gap:3px;min-width:0}
.bgms-u18-program-identity>strong{font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.bgms-u18-program-action{display:flex;justify-content:flex-end;min-width:max-content}
.bgms-u18-pills{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.bgms-u18-pill{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  min-height:24px;
  padding:2px 7px;
  border:1px solid color-mix(in srgb,var(--primary,#1d4ed8),transparent 72%);
  border-radius:999px;
  background:color-mix(in srgb,var(--primary,#1d4ed8),transparent 94%);
  color:var(--primary,#1d4ed8);
  font-size:9px;
  font-weight:800;
}
.bgms-u18-pill--muted{border-color:var(--u18-line);background:transparent;color:var(--u18-muted)}
.bgms-u18-pill--success{border-color:#a7e7cd;background:#effcf6;color:#087a55}
.bgms-u18-pill--warning{border-color:#f4d5a1;background:#fff8e8;color:#9a5b06}

.bgms-u18-table-wrap{
  width:100%;
  max-width:100%;
  overflow:auto;
  border-block:1px solid var(--u18-line);
  background:transparent;
  scrollbar-gutter:stable;
}
.bgms-u18-table{width:100%;min-width:1040px;margin:0;border-collapse:collapse;background:transparent}
.bgms-u18-table th,.bgms-u18-table td{padding:10px 11px;text-align:start;vertical-align:middle;border-bottom:1px solid var(--u18-line)}
.bgms-u18-table th{position:sticky;top:0;z-index:2;background:var(--surface-2,#f8fafc);color:var(--u18-muted);font-size:10px}
.bgms-u18-table tbody tr:last-child td{border-bottom:0}
.bgms-u18-table-identity,.bgms-u18-table-stack,.bgms-u18-date{display:grid;gap:3px;min-width:0}
.bgms-u18-table-identity span,.bgms-u18-table-identity small,.bgms-u18-date span{color:var(--u18-muted);font-size:10px}
.bgms-u18-table-stack{font-size:11px}
.bgms-u18-date{font-size:11px}

@media(max-width:1180px){
  .bgms-u18-program-head{display:none}
  .bgms-u18-program-row{
    grid-template-columns:minmax(200px,1.2fr) repeat(3,minmax(110px,.7fr));
    align-items:start;
  }
  .bgms-u18-program-identity{grid-column:1 / 3}
  .bgms-u18-program-action{grid-column:4;grid-row:1;align-self:center}
  .bgms-u18-enrollment-row{
    grid-template-columns:minmax(220px,1.2fr) repeat(3,minmax(120px,.7fr));
  }
  .bgms-u18-enrollment-actions{grid-column:1 / -1;justify-content:flex-start}
}

@media(max-width:900px){
  .bgms-u18-page-head,.bgms-u18-section-head{align-items:flex-start;flex-direction:column}
  .bgms-u18-head-actions{justify-content:flex-start}
  .bgms-u18-toolbar--catalog,.bgms-u18-toolbar--events{grid-template-columns:1fr 1fr}
  .bgms-u18-toolbar--catalog .bgms-u18-field--grow,
  .bgms-u18-toolbar--events .bgms-u18-search{grid-column:1 / -1}
  .bgms-u18-toolbar--programs{grid-template-columns:1fr;min-width:0;width:100%}
  .bgms-u18-section-head--programs{align-items:stretch}
  .bgms-u18-program-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px}
  .bgms-u18-program-identity{grid-column:1 / -1}
  .bgms-u18-program-action{grid-column:1 / -1;grid-row:auto;justify-content:flex-start}
  .bgms-u18-enrollment-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bgms-u18-enrollment-identity,.bgms-u18-enrollment-actions{grid-column:1 / -1}
}

@media(max-width:620px){
  .bgms-u18-page{gap:12px}
  .bgms-u18-page h1{font-size:23px}
  .bgms-u18-head-actions,.bgms-u18-head-actions .btn{width:100%}
  .bgms-u18-toolbar--catalog,.bgms-u18-toolbar--events{grid-template-columns:1fr}
  .bgms-u18-toolbar--catalog .bgms-u18-field--grow,
  .bgms-u18-toolbar--events .bgms-u18-search{grid-column:auto}
  .bgms-u18-toolbar-actions,.bgms-u18-toolbar-actions .btn{width:100%}
  .bgms-u18-list-row{grid-template-columns:1fr;gap:8px}
  .bgms-u18-list-meta{justify-content:flex-start;min-width:0}
  .bgms-u18-program-row,.bgms-u18-enrollment-row{grid-template-columns:1fr}
  .bgms-u18-program-identity,.bgms-u18-program-action,.bgms-u18-enrollment-identity,.bgms-u18-enrollment-actions{grid-column:auto}
  .bgms-u18-program-action,.bgms-u18-program-action .btn{width:100%}
  .bgms-u18-enrollment-actions{display:grid}
  .bgms-u18-cancel-form{display:grid}
  .bgms-u18-cancel-form input,.bgms-u18-cancel-form .btn,.bgms-u18-enrollment-actions>.btn{width:100%}
}

/* BGMS V113 R19 — actual table + native collapsible list contract. */
.bgms-u19-table-accordion{display:block;width:100%;min-width:0;margin:0;border:0;border-bottom:1px solid var(--u18-line,var(--line,#dfe5eb));background:transparent}
.bgms-u19-table-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;padding:9px 2px;cursor:pointer;list-style:none;user-select:none}
.bgms-u19-table-summary::-webkit-details-marker{display:none}
.bgms-u19-table-summary>div:first-child{display:grid;gap:2px;min-width:0}
.bgms-u19-table-summary>div:first-child>strong{font-size:18px;line-height:1.45;color:var(--u18-text,var(--text,#172033))}
.bgms-u19-summary-side{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.bgms-u19-chevron{display:inline-grid;place-items:center;width:30px;height:30px;font-size:18px;font-weight:900;transition:transform .16s ease}
.bgms-u19-table-accordion[open] .bgms-u19-chevron{transform:rotate(180deg)}
.bgms-u19-table-shell{width:100%;max-width:100%;max-height:480px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;border-top:1px solid var(--u18-line,var(--line,#dfe5eb))}
.bgms-u19-table{width:100%;min-width:860px;margin:0;border-collapse:separate;border-spacing:0;background:transparent;table-layout:auto}
.bgms-u19-table--programs{min-width:1080px}
.bgms-u19-table--my-courses{min-width:980px}
.bgms-u19-table th,.bgms-u19-table td{padding:10px 12px;vertical-align:middle;text-align:start;border-bottom:1px solid var(--u18-line,var(--line,#dfe5eb));white-space:normal;word-break:normal;overflow-wrap:normal}
.bgms-u19-table thead th{position:sticky;top:0;z-index:2;background:var(--surface-2,#f8fafc);color:var(--u18-muted,var(--muted,#6b7280));font-size:10px;font-weight:850;white-space:nowrap}
.bgms-u19-table tbody tr:last-child td{border-bottom:0}
.bgms-u19-table tbody tr:hover td{background:color-mix(in srgb,var(--surface-2,#f8fafc),transparent 35%)}
.bgms-u19-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:max-content}
.bgms-u19-cell-stack{display:grid;gap:4px;min-width:0}
.bgms-u19-cell-stack>span:not(.bgms-u18-pill){color:var(--u18-muted,var(--muted,#6b7280));font-size:10px}
.bgms-u19-inline-form{display:flex;align-items:center;gap:6px;margin:0}
.bgms-u19-inline-form input{width:150px;min-width:0;min-height:36px;padding:6px 9px}
@media(max-width:900px){.bgms-u19-table-shell{max-height:420px}.bgms-u19-table-summary{align-items:flex-start}}
@media(max-width:620px){.bgms-u19-table-summary{min-height:54px;padding:8px 0}.bgms-u19-table-summary>div:first-child>strong{font-size:16px}}
