/* MySchoolPortal base styles
   Tokens first, then layout, then components. --brand is set per school. */

:root {
  --brand: #0F766E;
  --brand-ink: #ffffff;

  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #6B7280;
  --ink-400: #9CA3AF;
  --line: #E5E7EB;
  --line-strong: #D1D5DB;
  --canvas: #F6F7F9;
  --surface: #FFFFFF;
  --sidebar: #0F172A;
  --sidebar-ink: #CBD5E1;
  --sidebar-ink-strong: #F8FAFC;
  --sidebar-line: #1E293B;

  --ok: #166534;
  --ok-bg: #F0FDF4;
  --ok-line: #BBF7D0;
  --bad: #B91C1C;
  --bad-bg: #FEF2F2;
  --bad-line: #FECACA;
  --info: #1E40AF;
  --info-bg: #EFF6FF;
  --info-line: #BFDBFE;
  --focus: #F59E0B;

  --radius: 6px;
  --radius-sm: 4px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--canvas);
}
h1, h2, h3 { text-wrap: balance; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--ink-900);
  padding: 8px 12px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* ---------- App shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; gap: 12px; align-items: center;
  padding: 20px 18px; border-bottom: 1px solid var(--sidebar-line);
}
.brand-mark {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--brand); color: var(--brand-ink);
  font-weight: 600; font-size: 14px; letter-spacing: .02em;
}
.brand-mark-lg { width: 56px; height: 56px; font-size: 20px; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; border-radius: var(--radius-sm); background: #fff; }
.brand-text { min-width: 0; }
.brand-name {
  color: var(--sidebar-ink-strong); font-weight: 600; font-size: 14px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.brand-sub { font-size: 12px; color: var(--ink-400); margin-top: 2px; }

.sidebar-nav { padding: 12px 10px; flex: 1 1 auto; overflow-y: auto; }
.nav-link-item {
  display: block; padding: 8px 12px; margin-bottom: 2px;
  color: var(--sidebar-ink); text-decoration: none; font-size: 14px;
  border-radius: var(--radius-sm); border-left: 3px solid transparent;
}
.nav-link-item:hover { background: var(--sidebar-line); color: var(--sidebar-ink-strong); }
.nav-link-item.is-active {
  background: var(--sidebar-line); color: var(--sidebar-ink-strong);
  border-left-color: var(--brand); font-weight: 500;
}

.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--sidebar-line); }
.who { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.who-avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sidebar-line); color: var(--sidebar-ink-strong); font-size: 12px; font-weight: 600;
}
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { color: var(--sidebar-ink-strong); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-role { color: var(--ink-400); font-size: 12px; }
.btn-quiet {
  background: transparent; border: 1px solid var(--sidebar-line); color: var(--sidebar-ink);
  border-radius: var(--radius-sm); padding: 5px 10px; font-size: 13px; width: 100%;
}
.btn-quiet:hover { color: var(--sidebar-ink-strong); border-color: var(--ink-500); }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: none; align-items: center; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px 16px; position: sticky; top: 0; z-index: 20;
}
.menu-toggle {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-900);
  border-radius: var(--radius-sm); padding: 4px 12px; font-size: 14px; font-weight: 500;
}
.topbar-title { font-weight: 600; }
.content { padding: 32px 40px 48px; max-width: 1240px; width: 100%; }
.content:focus { outline: none; }

.sidebar-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 39; }

@media (max-width: 960px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 40;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .topbar { display: flex; }
  .content { padding: 20px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* ---------- Page parts ---------- */

.page-head { margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.page-sub { color: var(--ink-500); margin: 0; }
.sep { margin: 0 6px; color: var(--ink-400); }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  margin-bottom: 24px; overflow: hidden;
}
.stat { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat-label { font-size: 13px; color: var(--ink-500); }
.stat-value {
  font-size: 26px; font-weight: 600; margin-top: 4px; line-height: 1.2;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.stat-note { font-size: 12px; color: var(--ink-400); margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.panel-narrow { max-width: 480px; }
.panel-title { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.attention-list li {
  padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line);
  position: relative;
}
.attention-list li::before {
  content: ""; position: absolute; left: 0; top: 17px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--focus);
}
.attention-list li:last-child, .row-list li:last-child { border-bottom: 0; }
.row-list li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-primary { font-weight: 500; }
.row-secondary { font-size: 13px; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.empty { color: var(--ink-500); margin: 0; }

/* ---------- Notices ---------- */

.notice {
  border: 1px solid; border-left-width: 4px; border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 16px; font-size: 14px;
}
.notice-success { background: var(--ok-bg); border-color: var(--ok-line); border-left-color: var(--ok); color: var(--ok); }
.notice-error { background: var(--bad-bg); border-color: var(--bad-line); border-left-color: var(--bad); color: var(--bad); }
.notice-info { background: var(--info-bg); border-color: var(--info-line); border-left-color: var(--info); color: var(--info); }

/* ---------- Forms ---------- */

.field { margin-bottom: 18px; }
.field-label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.field-hint { font-size: 13px; color: var(--ink-500); margin: -2px 0 6px; }
.field-input {
  display: block; width: 100%; padding: 9px 12px; font-size: 15px; font-family: inherit;
  color: var(--ink-900); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s ease;
}
.field-input:hover { border-color: var(--ink-400); }
.field-input:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--ink-900); }

.btn-primary-solid {
  display: inline-block; text-align: center; text-decoration: none;
  background: var(--brand); color: var(--brand-ink);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 15px; font-weight: 500; font-family: inherit;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18);
}
.btn-primary-solid:hover { filter: brightness(.94); color: var(--brand-ink); }
.btn-primary-solid:disabled { opacity: .65; }
.link-btn {
  background: none; border: 0; padding: 0; color: var(--brand);
  font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px;
}

/* ---------- Sign-in and single pages ---------- */

.auth-body { background: var(--surface); }
.auth-wrap { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; min-height: 100vh; }
.auth-aside {
  background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; align-items: flex-end;
  padding: 48px; position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--brand);
}
.auth-aside-inner { max-width: 420px; }
.auth-logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: var(--radius); padding: 4px; }
.auth-school { color: var(--sidebar-ink-strong); font-size: 28px; font-weight: 600; margin: 20px 0 6px; letter-spacing: -.01em; }
.auth-motto { color: var(--ink-400); font-style: italic; margin: 0; }
.auth-help { margin: 40px 0 0; border-top: 1px solid var(--sidebar-line); }
.auth-help > div { padding: 14px 0; border-bottom: 1px solid var(--sidebar-line); }
.auth-help dt { color: var(--sidebar-ink-strong); font-weight: 500; font-size: 14px; }
.auth-help dd { margin: 2px 0 0; font-size: 14px; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card-wide { max-width: 560px; }
.auth-title { font-size: 26px; font-weight: 600; margin: 0 0 20px; letter-spacing: -.01em; }
.auth-foot { margin: 20px 0 0; font-size: 14px; color: var(--ink-500); }
.auth-single { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 20px; background: var(--canvas); }
.auth-single .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); margin: 0 0 6px; }
.lead-text { color: var(--ink-700); margin: -8px 0 20px; }
.error-detail { background: var(--canvas); border: 1px solid var(--line); padding: 10px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; }

@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { padding: 32px 20px 24px; align-items: flex-start; }
  .auth-school { font-size: 22px; margin-top: 14px; }
  .auth-help { margin-top: 20px; }
  .auth-main { padding: 28px 16px 48px; align-items: flex-start; }
}

/* ---------- Step 3: navigation groups, tables, forms ---------- */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-heading {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-500); padding: 16px 12px 6px;
}
.content a:not([class]) { color: var(--brand); text-underline-offset: 2px; }

.page-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--ink-500); margin: 0 0 4px; }
.crumb a { color: var(--ink-500); }
.crumb a:hover { color: var(--ink-900); }
.muted { color: var(--ink-400); }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.optional { font-weight: 400; color: var(--ink-500); font-size: 13px; }
.section-title { font-size: 17px; font-weight: 600; margin: 36px 0 4px; }
.section-text { color: var(--ink-500); margin: 0 0 16px; max-width: 760px; }

/* Buttons */
.btn-line {
  display: inline-block; text-decoration: none; text-align: center;
  background: var(--surface); color: var(--ink-900);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 15px; font-weight: 500; font-family: inherit; line-height: 1.3;
}
.btn-line:hover { border-color: var(--ink-500); color: var(--ink-900); }
.btn-small { padding: 4px 10px; font-size: 13px; }
.btn-danger-line { color: var(--bad); border-color: var(--bad-line); }
.btn-danger-line:hover { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.inline-form { display: inline; margin: 0; }
.form-actions { display: flex; gap: 10px; align-items: center; margin: 4px 0 24px; flex-wrap: wrap; }

/* Status: coloured dot and plain text, no pills */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-400); }
.status-active::before { background: #16A34A; }
.status-pending::before { background: var(--focus); }
.status-suspended::before, .status-closed::before { background: var(--bad); }
.panel-title .status { margin-left: 10px; vertical-align: middle; }
td .status { margin-left: 8px; }
td .status:first-child { margin-left: 0; }

/* Toolbar, tabs, search */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab {
  padding: 8px 12px; color: var(--ink-500); text-decoration: none; font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink-900); }
.tab.is-active { color: var(--ink-900); border-bottom-color: var(--brand); }
.tab-count { color: var(--ink-400); font-variant-numeric: tabular-nums; margin-left: 2px; }
.search-form { display: flex; gap: 8px; }
.field-input-sm { padding: 6px 10px; font-size: 14px; }
.field-input-auto { width: auto; min-width: 160px; }
.field-num { max-width: 100px; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.field-color { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
select.field-input { appearance: auto; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel-flush { padding: 0; overflow: hidden; margin-bottom: 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.data-table th, .data-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table thead th {
  font-size: 12px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em;
  background: #FAFAFB; white-space: nowrap;
}
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody tr:hover td { background: #FCFCFD; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table-form td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.table-wrap:not(.panel) > .data-table { border: 1px solid var(--line); border-radius: var(--radius); }
.panel > .table-wrap { margin: 0 -20px; }
.panel > .table-wrap .data-table th:first-child, .panel > .table-wrap .data-table td:first-child { padding-left: 20px; }
.row-link { color: var(--ink-900); font-weight: 500; text-decoration: none; }
.row-link:hover { color: var(--brand); text-decoration: underline; }
.cell-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; font-weight: 400; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell > * + * { margin-left: 6px; }
.check-col { width: 72px; text-align: center !important; }
.group-row th {
  background: var(--canvas); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-700); padding-top: 8px !important; padding-bottom: 8px !important;
}
.is-current-row td { background: #F7FBFA; }
.is-muted-row th, .is-muted-row td { color: var(--ink-400); }
.mini-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.mini-table th { font-weight: 500; color: var(--ink-500); text-align: left; padding: 4px 0; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.mini-table td.num { text-align: left; font-variant-numeric: tabular-nums; }
.empty-panel { text-align: center; padding: 40px 20px; }

/* Subject grid */
.grid-table th.grid-head, .grid-table td.grid-cell { text-align: center; padding-left: 6px; padding-right: 6px; }
.grid-cell input { width: 18px; height: 18px; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 210px; font-weight: 400; }
.grid-table thead .sticky-col { background: #FAFAFB; }
.grid-table abbr { text-decoration: none; cursor: help; }

/* Panels */
.panel + .panel, .panel + section, .notice + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .panel-title { margin: 0; }
.panel-head-pad { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.panel-meta { font-size: 13px; color: var(--ink-500); }
.panel-text { color: var(--ink-500); margin: -6px 0 16px; font-size: 14px; }
.panel-foot { margin-top: 16px; display: flex; gap: 8px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .panel + .panel { margin-top: 0; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .split > .panel + .panel { margin-top: 0; } }
.scheme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.scheme-grid > .panel + .panel { margin-top: 0; }
.stat-grid-compact .stat-value { font-size: 22px; }
.stat-value-sm { font-size: 16px !important; font-weight: 500; }

/* Form sections: label column on the left on wide screens */
.form-stack { max-width: 980px; }
.form-section {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.form-section:first-of-type { border-top: 0; padding-top: 4px; }
.form-section-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.form-section-text { font-size: 14px; color: var(--ink-500); margin: 0; }
.form-section-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
@media (max-width: 900px) { .form-section { grid-template-columns: 1fr; gap: 12px; } }

.check-group { border: 0; padding: 0; margin: 0 0 14px; }
.check-legend { font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; float: none; width: auto; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; margin: 0; }
.check input { width: 16px; height: 16px; }
.check-inline { margin-top: 8px; }

.fact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 18px; }
.fact-list dt { font-size: 13px; color: var(--ink-500); font-weight: 400; }
.fact-list dd { margin: 0; font-weight: 500; }

.logo-preview {
  height: 100%; min-height: 96px; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px;
}
.logo-preview img { max-width: 96px; max-height: 96px; object-fit: contain; }
.logo-preview-note { font-size: 12px; color: var(--ink-500); }

.term-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 4px 0 20px; }
.term-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0; }
.term-legend { font-size: 14px; font-weight: 600; padding: 0 6px; margin-left: -6px; float: none; width: auto; margin-bottom: 0; }
@media (max-width: 760px) { .term-grid { grid-template-columns: 1fr; } }

.subject-teacher-list { display: grid; gap: 10px; }
.subject-teacher-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
@media (max-width: 560px) { .subject-teacher-row { grid-template-columns: 1fr; gap: 4px; } }

.notice-action { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.row-with-actions { flex-direction: row !important; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-with-actions > div:first-child { display: flex; flex-direction: column; }
.row-actions { display: flex; gap: 6px; }

.disclosure { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.disclosure summary { cursor: pointer; font-weight: 500; color: var(--brand); font-size: 14px; }
.disclosure-body { margin-top: 14px; }

.credentials {
  border: 1px solid var(--ok-line); border-left: 4px solid var(--ok); background: var(--ok-bg);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 20px;
}
.credentials-title { font-size: 15px; font-weight: 600; margin: 0 0 2px; color: var(--ok); }
.credentials-text { font-size: 14px; color: var(--ink-700); margin: 0 0 12px; }
.credentials-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0; }
.credentials-list dt { font-size: 12px; color: var(--ink-500); font-weight: 400; }
.credentials-list dd { margin: 0; word-break: break-all; }
.credentials-pass { font-size: 18px; font-weight: 600; letter-spacing: .04em; }

.danger-zone {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--bad-line); border-radius: var(--radius); padding: 16px 20px; margin-top: 12px; max-width: 980px;
}
.danger-title { font-size: 15px; font-weight: 600; margin: 0; }
.danger-text { font-size: 14px; color: var(--ink-500); margin: 2px 0 0; }

.weights-total { font-variant-numeric: tabular-nums; }
.weights-total.is-off { color: var(--bad); }
.weights-total.is-ok { color: var(--ok); }

.attention-list a { color: var(--ink-900); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.attention-list a:hover { text-decoration-color: var(--brand); color: var(--brand); }

/* Fixes */
.panel-flush > .table-wrap { margin: 0; }
.panel-flush .data-table th:first-child, .panel-flush .data-table td:first-child,
.table-wrap.panel-flush .data-table th:first-child, .table-wrap.panel-flush .data-table td:first-child { padding-left: 20px; }
.term-name + .status { margin-left: 10px; }
label { margin-bottom: 0; }
.field-label { margin-bottom: 6px; }
.table-wrap.panel-flush { overflow-x: auto; }
.sidebar { overflow: hidden; }
@media (max-width: 960px) { .shell { overflow-x: clip; } }
.table-wrap, .data-table th { position: relative; }
.data-table .sticky-col { position: sticky; }
