/* ── Text colour ── */
.text-muted   { color: var(--text-muted); }
.text-faint   { color: var(--text-faint); }
.text-heading { color: var(--text-heading); }
.text-brand   { color: var(--brand); }
.text-success { color: var(--green-text); }
.text-danger  { color: var(--red-text); }

/* ── Text size ── */
.tx-xs   { font-size: var(--tx-xs); }
.tx-sm   { font-size: var(--tx-sm); }
.tx-base { font-size: var(--tx-base); }
.tx-md   { font-size: var(--tx-md); }

/* ── Font weight ── */
.fw-medium   { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold     { font-weight: 700; }

/* ── Alignment ── */
.text-right  { text-align: right; }
.text-center { text-align: center; }

/* ── Whitespace ── */
.nowrap    { white-space: nowrap; }
.break-all { word-break: break-all; }

/* ── Table cell width caps ── */
.cell-narrow { max-width: 140px; }
.cell-wide   { max-width: 220px; }

/* ── Spacing ── */
.mt-xs { margin-top: var(--sp-xs); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mb-xs { margin-bottom: var(--sp-xs); }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }

/* ── Flex helpers ── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }

/* ── Full-page centred layout (error pages, login) ── */
.page-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
}

/* ── Error page card ── */
.error-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 48px 44px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-lg);
}

.error-icon.red   { background: var(--red-bg); }
.error-icon.amber { background: var(--amber-bg); }

.error-code {
  font-size: var(--tx-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
}

.error-code.red   { color: var(--red-text); }
.error-code.amber { color: var(--orange-text); }

/* ── Split-panel layout (login) ── */
.split-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
}

.split-panel-brand {
  width: 420px;
  flex-shrink: 0;
  background: linear-gradient(155deg, #0f2d1a 0%, #15803d 60%, #16a34a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
}

.split-panel-brand::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.split-panel-brand::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}

.split-brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.split-brand-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.split-brand-name {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.split-brand-name span { opacity: 0.7; font-weight: 400; }

.split-tagline {
  position: relative;
  z-index: 1;
}

.split-tagline h2 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.split-tagline p {
  color: rgba(255,255,255,.65);
  font-size: 14px;
  line-height: 1.6;
}

.split-footer {
  color: rgba(255,255,255,.4);
  font-size: 11px;
  position: relative;
  z-index: 1;
}

.split-panel-form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.split-form-card {
  width: 100%;
  max-width: 380px;
}

.split-form-card h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.split-form-card .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.error-box {
  background: var(--red-bg);
  border: 1px solid #fecaca;
  color: var(--red-text);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 700px) {
  .split-panel-brand { display: none; }
  .split-layout { background: #fff; }
}

/* ── Table footer note ── */
.table-footer {
  color: var(--text-faint);
  font-size: var(--tx-sm);
  margin-top: var(--sp-sm);
}
