/* ==========================================================================
   Breeder Portal - components
   Every class is prefixed p-. State classes are is-*. Modifiers use --.
   Pages must compose these; a page needing new CSS means a component is missing: add it here.
   ========================================================================== */

/* ---------- Icon (inline SVG sprite: core/img/icons.svg) ---------- */
.p-icon {
  width: var(--icon-md); height: var(--icon-md); flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.p-icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.p-icon--lg { width: var(--icon-lg); height: var(--icon-lg); }

/* ---------- Buttons ---------- */
.p-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: var(--h-control); padding: 0 var(--sp-4);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: 1; white-space: nowrap;
  text-decoration: none; user-select: none; -webkit-user-select: none;
  background: transparent; color: var(--c-text);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.p-btn:hover { text-decoration: none; }
.p-btn:active:not(:disabled) { transform: translateY(0.5px); }
.p-btn--primary { background: var(--c-primary); color: var(--c-on-primary); }
.p-btn--primary:hover:not(:disabled) { background: var(--c-primary-hover); }
.p-btn--primary:active:not(:disabled) { background: var(--c-primary-press); }
.p-btn--secondary { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border-strong); }
.p-btn--secondary:hover:not(:disabled) { background: var(--c-surface-hover); }
.p-btn--ghost { color: var(--c-text-2); }
.p-btn--ghost:hover:not(:disabled) { background: var(--c-surface-hover); color: var(--c-text); }
.p-btn--link { height: auto; padding: 0; color: var(--c-primary-text); font-weight: var(--fw-medium); }
.p-btn--link { position: relative; }
.p-btn--link::after { content: ""; position: absolute; inset: -14px -8px; }   /* 44px touch area for a text link */
.p-btn--link:hover { text-decoration: underline; text-underline-offset: 2px; }
.p-btn--danger { background: var(--c-surface); color: var(--c-danger-text); border-color: var(--c-danger); }
.p-btn--danger:hover:not(:disabled) { background: var(--c-danger-soft); }
.p-btn--sm { height: var(--h-control-sm); padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.p-btn--xs { height: var(--h-xs); padding: 0 var(--sp-2); font-size: var(--fs-xs); border-radius: var(--r-sm); }
.p-btn--block { display: flex; width: 100%; }
.p-btn:disabled, .p-btn.is-disabled {
  background: var(--c-divider); color: var(--c-text-disabled); border-color: transparent; box-shadow: none;
}
.p-btn--secondary:disabled, .p-btn--ghost:disabled { background: transparent; border-color: var(--c-divider); }

/* processing: spinner replaces the label width-neutrally; the click is ignored */
.p-btn.is-loading { pointer-events: none; color: transparent; }
.p-btn.is-loading > * { visibility: hidden; }
.p-btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--c-on-primary); border-top-color: transparent;
  animation: p-spin 0.7s linear infinite;
}
.p-btn--secondary.is-loading::after, .p-btn--ghost.is-loading::after { border-color: var(--c-text-2); border-top-color: transparent; }
@keyframes p-spin { to { transform: rotate(360deg); } }

.p-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: var(--h-control); height: var(--h-control);
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--c-text-2);
  text-decoration: none; position: relative;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.p-iconbtn:hover { background: var(--c-surface-hover); color: var(--c-text); text-decoration: none; }
.p-iconbtn--sm { width: var(--h-control-sm); height: var(--h-control-sm); }
.p-iconbtn__dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-danger); border: 2px solid var(--c-surface); box-sizing: content-box; }

/* ---------- Form fields ---------- */
.p-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p-label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text); }
.p-field--required > .p-label::after { content: " *"; color: var(--c-danger); }
.p-hint { font-size: var(--fs-xs); color: var(--c-text-3); line-height: var(--lh-snug); }
.p-error {
  display: none; align-items: flex-start; gap: 6px;
  font-size: var(--fs-xs); color: var(--c-danger-text); line-height: var(--lh-snug);
}
.p-error .p-icon { width: 14px; height: 14px; margin-top: 1px; }
.p-field.is-invalid .p-error { display: flex; }
.p-field.is-invalid .p-hint { display: none; }

.p-input, .p-select, .p-textarea {
  width: 100%; height: var(--h-control); padding: 0 var(--sp-3);
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-control-border); border-radius: var(--r-md);
  font-size: var(--fs-md); line-height: 1.2;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.p-input::placeholder, .p-textarea::placeholder { color: var(--c-text-3); }
.p-input:hover:not(:disabled):not([readonly]), .p-select:hover:not(:disabled), .p-textarea:hover:not(:disabled) { border-color: var(--c-text-3); }
.p-input:focus, .p-select:focus, .p-textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft-border);
}
.p-input[readonly], .p-textarea[readonly] { background: var(--c-surface-2); color: var(--c-text-2); }
.p-input:disabled, .p-select:disabled, .p-textarea:disabled { background: var(--c-divider); color: var(--c-text-disabled); }
.p-field.is-invalid .p-input, .p-field.is-invalid .p-select, .p-field.is-invalid .p-textarea, .p-field.is-invalid .p-inputgroup { border-color: var(--c-danger); }
.p-field.is-invalid .p-input:focus, .p-field.is-invalid .p-textarea:focus { box-shadow: 0 0 0 3px var(--c-danger-soft); }
.p-field.is-invalid .p-inputgroup .p-input:focus { box-shadow: none; }   /* in a group the group draws the ring, not the input inside it */
.p-field.is-invalid .p-inputgroup:focus-within { box-shadow: 0 0 0 3px var(--c-danger-soft); }
.p-textarea { height: auto; min-height: 88px; padding: 10px var(--sp-3); resize: vertical; line-height: var(--lh-body); }
.p-input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; }
.p-input[inputmode="numeric"], .p-input[inputmode="decimal"] { font-variant-numeric: tabular-nums; }

@media (max-width: 767px), (pointer: coarse) {
  .p-input, .p-select, .p-textarea { font-size: 16px; }   /* 16px stops iOS zooming into the field */
}

.p-select-wrap { position: relative; }
.p-select { -webkit-appearance: none; appearance: none; padding-right: 36px; }
.p-select-wrap > .p-icon { position: absolute; right: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--c-text-3); pointer-events: none; }

.p-inputgroup {
  display: flex; align-items: center; height: var(--h-control);
  background: var(--c-surface); border: 1px solid var(--c-control-border); border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.p-inputgroup:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft-border); }
.p-inputgroup .p-input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; box-shadow: none; background: transparent; }
.p-inputgroup__addon { flex-shrink: 0; padding: 0 var(--sp-3); font-size: var(--fs-sm); color: var(--c-text-3); white-space: nowrap; }
.p-inputgroup__addon--start { padding-right: 0; }

.p-search { position: relative; }
.p-search > .p-icon { position: absolute; left: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--c-text-3); pointer-events: none; }
.p-search .p-input { padding-left: 36px; }

/* edit mode: a changed field is tinted and shows what it was */
.p-field__orig { display: none; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--c-text-3); }
.p-field__orig b { font-weight: var(--fw-medium); color: var(--c-text-2); }
.p-field.is-changed .p-field__orig { display: flex; }
.p-field.is-changed .p-input, .p-field.is-changed .p-select, .p-field.is-changed .p-textarea, .p-field.is-changed .p-inputgroup, .p-field.is-changed .p-seg {
  background: var(--c-primary-soft); border-color: var(--c-primary);
}
.p-field.is-changed .p-seg { background: var(--c-primary-soft); }

.p-check { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--h-xl); font-size: var(--fs-md); cursor: pointer; }
.p-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--c-primary); flex-shrink: 0; }

/* Picker: a field that opens a searchable bottom sheet (long lists on phones) */
.p-picker {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); width: 100%; text-align: left;
  height: var(--h-control); padding: 0 var(--sp-3);
  background: var(--c-surface); border: 1px solid var(--c-control-border); border-radius: var(--r-md);
  font-size: var(--fs-md); color: var(--c-text);
}
.p-picker:hover { border-color: var(--c-text-3); }
.p-picker.is-empty .p-picker__value { color: var(--c-text-3); }
.p-picker__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-picker .p-icon { width: 16px; height: 16px; color: var(--c-text-3); }
@media (max-width: 767px), (pointer: coarse) { .p-picker { font-size: 16px; } }
.p-option {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); width: 100%;
  min-height: var(--h-xl); padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-md);
  background: transparent; text-align: left; font-size: var(--fs-md);
}
.p-option-list { gap: 0; }   /* the options of the picker sheet sit edge to edge (replaces an inline style, so the pages can forbid inline styles) */
.p-option:hover { background: var(--c-surface-hover); }
.p-option[aria-selected="true"] { background: var(--c-primary-soft); color: var(--c-primary-text); font-weight: var(--fw-medium); }
.p-option small { color: var(--c-text-3); font-size: var(--fs-xs); }

/* ---------- Segmented control and tabs ---------- */
.p-seg { display: flex; gap: 2px; padding: 3px; background: var(--c-divider); border-radius: var(--r-md); }
.p-seg__item {
  position: relative; flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: calc(var(--h-control) - 8px); padding: 0 var(--sp-3);
  border: 0; border-radius: calc(var(--r-md) - 2px); background: transparent;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text-2); white-space: nowrap; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.p-seg__item::after { content: ""; position: absolute; inset: -4px 0; }   /* full-height touch area inside the 3px padding */
.p-seg__item:hover { color: var(--c-text); }
.p-seg__item[aria-selected="true"], .p-seg__item[aria-pressed="true"], .p-seg__item.is-selected,
.p-seg input:checked + .p-seg__label { background: var(--c-surface); color: var(--c-text); box-shadow: var(--sh-1); font-weight: var(--fw-semibold); }
.p-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.p-seg input:focus-visible + .p-seg__label { outline: 2px solid var(--c-focus); outline-offset: 1px; }
.p-seg__label { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); width: 100%; height: 100%; border-radius: calc(var(--r-md) - 2px); pointer-events: none; }
.p-seg__item:has(input) { padding: 0; }
.p-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.p-dot--hatchery { color: var(--c-hatchery); }
.p-dot--breeder { color: var(--c-breeder); }

.p-tabs { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--c-border); }
.p-tab {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: var(--h-xl); padding: 0 2px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: var(--c-text-2); font-size: var(--fs-md); font-weight: var(--fw-medium); white-space: nowrap;
}
.p-tab:hover { color: var(--c-text); }
.p-tab[aria-selected="true"] { color: var(--c-primary-text); border-bottom-color: var(--c-primary); font-weight: var(--fw-semibold); }
.p-tab__count { font-size: var(--fs-xs); color: var(--c-text-3); font-weight: var(--fw-regular); }

/* Hatchery stage bar: Incubator / Hatch / Vaccine / Complete */
.p-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.p-stage {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: var(--sp-2) var(--sp-3); min-height: 52px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md);
  text-align: left; color: var(--c-text-2); font-size: var(--fs-xs); font-weight: var(--fw-medium);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.p-stage:hover { border-color: var(--c-border-strong); }
.p-stage__count { font-size: var(--fs-xl); line-height: 1.1; font-weight: var(--fw-semibold); color: var(--c-text); font-variant-numeric: tabular-nums; }
.p-stage[aria-selected="true"], .p-stage[aria-current="true"] { background: var(--c-hatchery-soft); border-color: var(--c-hatchery); color: var(--c-hatchery-text); }
.p-stage[aria-selected="true"] .p-stage__count, .p-stage[aria-current="true"] .p-stage__count { color: var(--c-hatchery-text); }
.p-stage.is-alert .p-stage__count::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 8px 4px; border-radius: 50%; background: var(--c-danger); }

/* ---------- Cards and summary tiles ---------- */
.p-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); min-width: 0; overflow: hidden; }
.p-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--c-divider); }
.p-card__head h2 { font-size: var(--fs-md); }
.p-card__body { padding: var(--sp-4); }
.p-card__foot { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--c-divider); }
.p-card--accent-hatchery { border-top: 2px solid var(--c-hatchery); }
.p-card--accent-breeder  { border-top: 2px solid var(--c-breeder); }

.p-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--c-divider); }
.p-stat { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) var(--sp-4); background: var(--c-surface); color: inherit; text-decoration: none; min-width: 0; }
a.p-stat:hover { background: var(--c-surface-hover); text-decoration: none; }
.p-stat__label { font-size: var(--fs-xs); color: var(--c-text-2); }
.p-stat__value { font-size: var(--fs-3xl); line-height: var(--lh-tight); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.p-stat__sub { font-size: var(--fs-xs); color: var(--c-text-3); }
.p-stat--alert .p-stat__value { color: var(--c-danger-text); }

/* quick actions: compact tiles, not buttons the size of cards */
.p-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.p-quick__item {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--h-xl); padding: var(--sp-2) var(--sp-3);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md);
  color: var(--c-text); font-size: var(--fs-sm); font-weight: var(--fw-medium); text-decoration: none; text-align: left;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.p-quick__item:hover { border-color: var(--c-border-strong); background: var(--c-surface-hover); text-decoration: none; }
.p-quick__item .p-leading { width: 28px; height: 28px; }
.p-quick__group { grid-column: 1 / -1; margin-top: var(--sp-1); }

/* ---------- Badges, quantity, leading icon ---------- */
.p-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 var(--sp-2);
  border-radius: var(--r-sm); background: var(--c-surface-hover); color: var(--c-text-2);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); line-height: 1; white-space: nowrap;
}
.p-badge .p-icon { width: 12px; height: 12px; }
.p-badge--success  { background: var(--c-success-soft);  color: var(--c-success-text); }
.p-badge--danger   { background: var(--c-danger-soft);   color: var(--c-danger-text); }
.p-badge--warning  { background: var(--c-warning-soft);  color: var(--c-warning-text); }
.p-badge--info     { background: var(--c-info-soft);     color: var(--c-info-text); }
.p-badge--hatchery { background: var(--c-hatchery-soft); color: var(--c-hatchery-text); }
.p-badge--breeder  { background: var(--c-breeder-soft);  color: var(--c-breeder-text); }
.p-badge--outline  { background: transparent; box-shadow: inset 0 0 0 1px var(--c-border-strong); }

.p-qty { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-qty--in  { color: var(--c-success-text); }
.p-qty--out { color: var(--c-danger-text); }
.p-qty--lg  { font-size: var(--fs-3xl); line-height: var(--lh-tight); }
.p-qty__unit { margin-left: var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text-2); }

.p-leading {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--c-surface-hover); color: var(--c-text-2);
}
.p-leading .p-icon { width: 18px; height: 18px; }
.p-leading--lg { width: 44px; height: 44px; }
.p-leading--lg .p-icon { width: 24px; height: 24px; }
.p-leading--in  { background: var(--c-success-soft);  color: var(--c-success-text); }
.p-leading--out { background: var(--c-danger-soft);   color: var(--c-danger-text); }
.p-leading--hatchery { background: var(--c-hatchery-soft); color: var(--c-hatchery-text); }
.p-leading--breeder  { background: var(--c-breeder-soft);  color: var(--c-breeder-text); }
.p-leading--info { background: var(--c-info-soft); color: var(--c-info-text); }

/* ---------- Lists (phone) ---------- */
.p-list { list-style: none; margin: 0; padding: 0; }
.p-list__group {
  padding: var(--sp-2) var(--sp-4); background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-divider); border-top: 1px solid var(--c-divider);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-text-2); letter-spacing: 0.02em;
}
.p-list > .p-list__group:first-child { border-top: 0; }
.p-item {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 60px; padding: var(--sp-2) var(--sp-4);
  background: var(--c-surface); color: inherit; text-decoration: none;
  border: 0; border-bottom: 1px solid var(--c-divider); width: 100%; text-align: left;
}
.p-item:last-child { border-bottom: 0; }
a.p-item:hover, button.p-item:hover { background: var(--c-surface-hover); text-decoration: none; }
.p-item__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p-item__title { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-weight: var(--fw-medium); min-width: 0; }   /* badges drop to a second line instead of squeezing the title */
.p-item__title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-item__meta { font-size: var(--fs-xs); color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-item__end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; text-align: right; }
.p-item__chev { color: var(--c-text-3); width: 16px; height: 16px; }

/* ---------- Filters, chips ---------- */
.p-toolbar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.p-toolbar .p-search { flex: 1 1 200px; }
.p-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.p-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--sp-2) 0 var(--sp-3);
  background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--c-text);
}
.p-chip button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--c-text-3); padding: 0; }
.p-chip button { position: relative; }
.p-chip button::after { content: ""; position: absolute; inset: -12px -6px; }   /* 44px touch area, look unchanged */
.p-chip button:hover { background: var(--c-surface-hover); color: var(--c-text); }
.p-chip button .p-icon { width: 12px; height: 12px; }

/* ---------- Table (tablet and desktop) ---------- */
.p-tablewrap { overflow-x: auto; }
.p-table { font-size: var(--fs-md); }
.p-table th {
  height: 36px; padding: 0 var(--sp-3); text-align: left; white-space: nowrap;
  background: var(--c-surface-2); border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-text-2);
}
.p-table td { height: 44px; padding: 0 var(--sp-3); border-bottom: 1px solid var(--c-divider); vertical-align: middle; }
.p-table tbody tr:hover td { background: var(--c-surface-hover); }
.p-table tbody tr:last-child td { border-bottom: 0; }
.p-table .p-num { text-align: right; }
.p-table th.p-num { text-align: right; }
.p-table th:first-child, .p-table td:first-child { padding-left: var(--sp-4); }
.p-table th:last-child, .p-table td:last-child { padding-right: var(--sp-4); }
.p-table .p-col-actions { width: 1%; text-align: right; white-space: nowrap; }
@media (max-width: 1023px) { .p-table .p-hide-tablet { display: none; } }   /* low-value columns drop out on tablets instead of scrolling sideways */
.p-th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; font: inherit; color: inherit; }
.p-th-sort .p-icon { width: 12px; height: 12px; opacity: 0.55; }
.p-th-sort[aria-sort] { color: var(--c-text); }
.p-th-sort[aria-sort] .p-icon { opacity: 1; }
.p-cell-main { display: flex; align-items: center; gap: var(--sp-3); }
.p-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--c-divider); font-size: var(--fs-sm); color: var(--c-text-2); }

/* ---------- Alerts and banners ---------- */
.p-alert {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--c-info-soft); color: var(--c-info-text);
  font-size: var(--fs-sm); line-height: var(--lh-snug);
}
.p-alert .p-icon { margin-top: 1px; width: 18px; height: 18px; }
.p-alert__body { flex: 1 1 auto; min-width: 0; color: var(--c-text); }
.p-alert__body strong { font-weight: var(--fw-semibold); }
.p-alert--success { background: var(--c-success-soft); color: var(--c-success-text); }
.p-alert--warning { background: var(--c-warning-soft); color: var(--c-warning-text); }
.p-alert--danger  { background: var(--c-danger-soft);  color: var(--c-danger-text); }
.p-banner { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); background: var(--c-warning-soft); color: var(--c-warning-text); font-size: var(--fs-sm); font-weight: var(--fw-medium); }

/* ---------- Before / after, definition list, history ---------- */
.p-diff { display: flex; flex-direction: column; }
.p-diff__row { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-divider); }
.p-diff__row:last-child { border-bottom: 0; }
.p-diff__label { font-size: var(--fs-sm); color: var(--c-text-2); }
.p-diff__vals { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--sp-2); min-width: 0; }
.p-diff__old { color: var(--c-text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.p-diff__arrow { width: 14px; height: 14px; color: var(--c-text-3); }
.p-diff__new { font-weight: var(--fw-semibold); color: var(--c-text); }

.p-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); }
.p-dl dt { font-size: var(--fs-xs); color: var(--c-text-3); margin-bottom: 2px; }
.p-dl dd { font-size: var(--fs-md); min-width: 0; overflow-wrap: anywhere; }
.p-dl__wide { grid-column: 1 / -1; }

.p-timeline { list-style: none; margin: 0; padding: 0; }
.p-timeline__item { position: relative; padding: 0 0 var(--sp-5) var(--sp-6); }
.p-timeline__item:last-child { padding-bottom: 0; }
.p-timeline__item::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 1px; background: var(--c-border); }
.p-timeline__item:last-child::before { display: none; }
.p-timeline__item::after { content: ""; position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-primary); }
.p-timeline__item--created::after { border-color: var(--c-border-strong); }
.p-timeline__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.p-timeline__reason { margin: var(--sp-1) 0 var(--sp-2); font-size: var(--fs-sm); color: var(--c-text-2); }

/* ---------- Sheet (phone: bottom sheet / tablet+: centred dialog) ---------- */
.p-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--c-overlay);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
}
.p-overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.p-sheet {
  position: fixed; z-index: var(--z-sheet); left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; max-height: 90vh; max-height: 90dvh;
  background: var(--c-surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--sh-3);
  padding-bottom: var(--safe-bottom);
  transform: translateY(100%); visibility: hidden;
  transition: transform var(--dur-slow) var(--ease), visibility 0s linear var(--dur-slow);
}
.p-sheet.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.p-sheet__grab { width: 36px; height: 4px; margin: var(--sp-2) auto 0; border-radius: 2px; background: var(--c-border-strong); flex-shrink: 0; }
.p-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-4); flex-shrink: 0; }
.p-sheet__head h2 { font-size: var(--fs-lg); }
.p-sheet__body { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-1) var(--sp-4) var(--sp-4); overscroll-behavior: contain; }
.p-sheet__foot { display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--c-divider); flex-shrink: 0; }
.p-sheet__foot > .p-btn { flex: 1 1 0; }

@media (min-width: 768px) {
  .p-sheet {
    left: 50%; right: auto; top: 50%; bottom: auto; width: min(480px, calc(100vw - 32px));
    border-radius: var(--r-lg);
    transform: translate(-50%, -47%) scale(0.98); opacity: 0;
    transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
  }
  .p-sheet.is-open { transform: translate(-50%, -50%); opacity: 1; }
  .p-sheet--wide { width: min(600px, calc(100vw - 32px)); }
  .p-sheet__grab { display: none; }
  .p-sheet__head { padding-left: var(--sp-5); padding-top: var(--sp-2); }
  .p-sheet__body { padding: var(--sp-1) var(--sp-5) var(--sp-5); }
  .p-sheet__foot { justify-content: flex-end; padding: var(--sp-3) var(--sp-5); }
  .p-sheet__foot > .p-btn { flex: 0 0 auto; }
}

/* ---------- Menu (desktop popover) ---------- */
.p-menu-wrap { position: relative; display: inline-flex; }
.p-menu {
  position: absolute; z-index: var(--z-menu); top: calc(100% + 4px); right: 0; min-width: 200px; padding: var(--sp-1);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--sh-2);
}
.p-menu--up { top: auto; bottom: calc(100% + 4px); left: 0; right: auto; }
.p-menu__item {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; height: var(--h-md); padding: 0 var(--sp-3);
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-text); font-size: var(--fs-md); text-align: left; text-decoration: none;
}
.p-menu__item:hover { background: var(--c-surface-hover); text-decoration: none; }
.p-menu__item .p-icon { color: var(--c-text-3); width: 18px; height: 18px; }
.p-menu__sep { height: 1px; margin: var(--sp-1) 0; background: var(--c-divider); }

/* ---------- Toasts ---------- */
.p-toasts {
  position: fixed; z-index: var(--z-toast); left: var(--sp-4); right: var(--sp-4);
  bottom: calc(var(--h-bottomnav) + var(--safe-bottom) + var(--sp-5));   /* clears the lifted centre button */
  display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none;
}
.p-focus .p-toasts { bottom: calc(76px + var(--safe-bottom)); }
.p-toast {
  display: flex; align-items: flex-start; gap: var(--sp-3); pointer-events: auto;
  padding: var(--sp-3); border-radius: var(--r-md); box-shadow: var(--sh-3);
  background: var(--c-text); color: var(--c-surface); font-size: var(--fs-sm); line-height: var(--lh-snug);
  animation: p-toast-in var(--dur-base) var(--ease);
}
.p-toast .p-icon { width: 18px; height: 18px; margin-top: 1px; }
.p-toast--success .p-icon { color: var(--c-toast-success); }
.p-toast--danger  .p-icon { color: var(--c-toast-danger); }
.p-toast__msg { flex: 1 1 auto; min-width: 0; }
.p-toast__act { border: 0; background: transparent; color: inherit; font-weight: var(--fw-semibold); text-decoration: underline; padding: 0 var(--sp-1); }
@keyframes p-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 768px) {
  .p-toasts { left: auto; right: var(--sp-6); bottom: auto; top: calc(var(--h-topbar-desktop) + var(--sp-3)); width: 360px; }
  .p-focus .p-toasts { bottom: auto; }
}

/* ---------- Loading, empty, error ---------- */
.p-skel {
  display: block; border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--c-skeleton-a) 25%, var(--c-skeleton-b) 50%, var(--c-skeleton-a) 75%);
  background-size: 200% 100%; animation: p-shimmer 1.4s linear infinite;
}
.p-skel--line { height: 12px; }
.p-skel--title { height: 16px; width: 45%; }
.p-skel--short { width: 30%; }
.p-skel--tile { height: 32px; width: 32px; border-radius: var(--r-md); flex-shrink: 0; }
@keyframes p-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.p-state { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-8) var(--sp-6); text-align: center; color: var(--c-text-2); }
.p-state__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-surface-hover); color: var(--c-text-3); margin-bottom: var(--sp-1); }
.p-state__title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--c-text); }
.p-state__text { font-size: var(--fs-sm); max-width: 32ch; }
.p-state .p-btn { margin-top: var(--sp-2); }
.p-state--error .p-state__icon { background: var(--c-danger-soft); color: var(--c-danger-text); }

/* ---------- Avatar ---------- */
.p-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary-text);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.02em;
}
.p-avatar--lg { width: 56px; height: 56px; font-size: var(--fs-xl); }

/* ---------- Install as an app (hidden in the markup; portal-ui.js shows it only where the device can install) ---------- */
.p-install { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.p-install__logo { flex-shrink: 0; width: var(--h-xl); height: var(--h-xl); border-radius: 50%; }
.p-install__body { flex: 1 1 12rem; min-width: 0; line-height: var(--lh-snug); }
.p-install__title { display: block; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.p-install__text { display: block; font-size: var(--fs-sm); color: var(--c-text-2); }
.p-install__text .p-icon { display: inline-block; width: var(--icon-sm); height: var(--icon-sm); vertical-align: text-bottom; }
.p-install__actions { display: flex; gap: var(--sp-2); margin-left: auto; }

/* ---------- Numbered steps (how-to instructions, e.g. browser.aspx) ---------- */
.p-steps { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; counter-reset: p-step; }
.p-steps__item { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-md); line-height: var(--lh-snug); counter-increment: p-step; }
.p-steps__item::before {
  content: counter(p-step); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: var(--h-xs); height: var(--h-xs); margin-top: -3px; border-radius: var(--r-full);
  background: var(--c-surface-2); border: 1px solid var(--c-control-border); color: var(--c-primary);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.p-steps__item strong { font-weight: var(--fw-semibold); }
.p-steps__key { display: inline-flex; align-items: center; justify-content: center; min-width: var(--h-xs); padding: 0 var(--sp-1); border: 1px solid var(--c-control-border); border-radius: var(--r-sm); font-weight: var(--fw-semibold); line-height: 1.3; vertical-align: text-bottom; }
.p-steps__key .p-icon { width: var(--icon-sm); height: var(--icon-sm); margin: 2px 0; }

/* ---------- Divider with a word ("or") ---------- */
.p-divider { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-text-2); }
.p-divider::before, .p-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--c-control-border); }

/* ---------- Sign-in layout ---------- */
.p-auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: var(--sp-4); }
.p-auth__box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: var(--sp-6); }
.p-auth__brand { display: flex; align-items: center; gap: var(--sp-3); }
.p-auth__brand .p-brand__logo { width: var(--h-lg); height: var(--h-lg); }
.p-auth__title { font-size: var(--fs-2xl); font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
.p-auth__foot { font-size: var(--fs-xs); color: var(--c-text-3); text-align: center; }
.p-auth__card { padding: var(--sp-5); }
@media (max-width: 479px) {
  .p-auth { align-items: flex-start; padding-top: var(--sp-12); }
  .p-auth__card { border: 0; background: transparent; padding: 0; }
}

/* ---------- Sign-in page (signin.aspx only; the error and offline pages keep .p-auth above) ----------
   Phones: forest header with logo, name and welcome, then a white section with the form that runs to the bottom.
   Tablet: the same, centred at the form width.  Desktop (1024+): split screen, brand panel left, form centred right.
   The shared field, button and alert components are reused: .p-login only re-points their tokens to the
   sign-in palette (tokens.css, --c-login-*), so nothing outside this block changes. */
.p-login {
  --c-bg: var(--c-login-bg);
  --c-surface: var(--c-login-surface);
  --c-surface-2: var(--c-login-bg);
  --c-surface-hover: var(--c-login-bg);
  --c-text: var(--c-login-text);
  --c-text-2: var(--c-login-text-2);
  --c-control-border: var(--c-login-border);
  --c-primary: var(--c-login-primary);
  --c-primary-hover: var(--c-login-primary-hover);
  --c-primary-press: var(--c-login-primary-press);
  --c-primary-text: var(--c-login-link);
  --c-primary-soft-border: var(--c-login-ring);
  --c-focus: var(--c-login-focus);
  --h-control: var(--h-login-control);
  --h-control-sm: var(--h-lg);
  --r-md: var(--r-login);

  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--c-login-surface); color: var(--c-text);
}
/* the page fits the screen, so no reserved scrollbar strip down the right edge (base.css reserves one on every page) */
html:has(> body > .p-login) { scrollbar-gutter: auto; }
body:has(> .p-login) { background: var(--c-login-surface); }

/* brand header (phones, tablet) / brand panel (desktop) */
.p-login__brand {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--safe-top) + var(--sp-6)) var(--sp-6) calc(var(--r-login-sheet) + var(--sp-8));
  background: var(--c-login-brand); color: var(--c-login-on-brand);
}
.p-login__brand::before {   /* two faint rings, top right: texture only */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: var(--sz-login-ring-sm); height: var(--sz-login-ring-sm); top: calc(var(--sz-login-ring-sm) * -0.58); right: calc(var(--sz-login-ring-sm) * -0.35);
  border: 1px solid var(--c-login-line); border-radius: 50%;
  box-shadow: 0 0 0 var(--sp-8) var(--c-login-brand), 0 0 0 calc(var(--sp-8) + 1px) var(--c-login-line);
}
.p-login__brand-in { position: relative; display: flex; flex-direction: column; gap: var(--sp-6); width: 100%; max-width: var(--w-login-form); margin: 0 auto; }
.p-login__id { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.p-login__logo { flex-shrink: 0; width: var(--sz-login-logo); height: var(--sz-login-logo); border-radius: 50%; box-shadow: 0 0 0 2px var(--c-login-logo-ring); }
.p-login__name { display: block; font-size: var(--fs-login-name); font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: -0.01em; }
.p-login__tagline { display: block; margin-top: 3px; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-login-accent); }
.p-login__intro { display: flex; flex-direction: column; gap: 6px; }
.p-login__welcome { font-size: var(--fs-login-welcome); font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: -0.02em; color: var(--c-login-on-brand); }
.p-login__lead { font-size: var(--fs-login-lead); line-height: var(--lh-body); color: var(--c-login-on-brand-2); max-width: 26rem; }

/* form section: a white sheet that overlaps the header's bottom edge on phones */
.p-login__main {
  position: relative; flex: 1 0 auto; display: flex; justify-content: center;
  margin-top: calc(-1 * var(--r-login-sheet));
  padding: var(--sp-8) var(--sp-6) calc(var(--safe-bottom) + var(--sp-5));
  background: var(--c-login-surface); border-radius: var(--r-login-sheet) var(--r-login-sheet) 0 0;
}
.p-login__panel { display: flex; flex-direction: column; gap: var(--sp-5); width: 100%; max-width: var(--w-login-form); }
.p-login__form { display: flex; flex-direction: column; gap: var(--sp-5); }
.p-login__head { display: flex; flex-direction: column; gap: var(--sp-1); }
.p-login__title { font-size: var(--fs-2xl); font-weight: var(--fw-semibold); letter-spacing: -0.015em; }
.p-login__sub { font-size: var(--fs-md); color: var(--c-text-2); }

/* fields: 48px, 16px text (no iOS zoom), leading icon that takes the focus colour */
.p-login .p-field { gap: var(--sp-2); }
.p-login .p-label { font-size: var(--fs-md); }
.p-login .p-input { font-size: var(--fs-lg); }
.p-login .p-inputgroup { background: var(--c-login-surface); }
.p-login .p-inputgroup:hover:not(:focus-within) { border-color: var(--c-login-border-hover); }
.p-login .p-inputgroup__addon--start { display: flex; align-items: center; padding-left: 14px; color: var(--c-text-2); transition: color var(--dur-fast) var(--ease); }
.p-login .p-inputgroup__addon--start .p-icon { width: 18px; height: 18px; }
.p-login .p-inputgroup:focus-within .p-inputgroup__addon--start { color: var(--c-primary); }
.p-login .p-inputgroup .p-input { padding-left: 10px; border-radius: var(--r-login); }
.p-login .p-inputgroup .p-iconbtn { margin-right: var(--sp-1); }
.p-login .p-inputgroup--readonly { background: var(--c-login-bg); }
.p-login .p-inputgroup--readonly .p-input { color: var(--c-text-2); }
.p-login .p-field.is-invalid .p-inputgroup:hover { border-color: var(--c-danger); }
.p-login .p-field.is-invalid .p-inputgroup__addon--start { color: var(--c-danger-text); }
.p-login .p-error { font-size: var(--fs-sm); }

/* browser autofill: the field keeps its own colour and text instead of the browser's yellow or blue fill */
.p-login .p-input:-webkit-autofill,
.p-login .p-input:-webkit-autofill:hover,
.p-login .p-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px var(--c-login-surface) inset;
  box-shadow: 0 0 0 100px var(--c-login-surface) inset;
  -webkit-text-fill-color: var(--c-text);
  caret-color: var(--c-text);
  transition: background-color 86400s 0s;
}
.p-login .p-input:autofill { box-shadow: 0 0 0 100px var(--c-login-surface) inset; }
.p-login .p-inputgroup--readonly .p-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--c-login-bg) inset;
  box-shadow: 0 0 0 100px var(--c-login-bg) inset;
  -webkit-text-fill-color: var(--c-text-2);
}

/* Sign in button: full width, a small arrow that nudges on hover */
.p-login__submit { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.p-login__submit .p-icon { width: 18px; height: 18px; transition: transform var(--dur-base) var(--ease); }
.p-login__submit:hover:not(:disabled) .p-icon { transform: translateX(2px); }
.p-login__submit.is-loading { background: var(--c-primary-hover); }   /* signing in: stays green so the white spinner reads (a plain disabled button is grey) */

.p-login .p-alert { font-size: var(--fs-md); }

/* back link (password-change form) and footer */
.p-login__back { align-self: center; }
.p-login__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px var(--sp-2);
  margin-top: auto; padding-top: var(--sp-2);
  font-size: var(--fs-xs); color: var(--c-text-2);
}
.p-login__foot-item { display: inline-flex; align-items: center; gap: 6px; }
.p-login__foot .p-icon { width: var(--icon-sm); height: var(--icon-sm); }
.p-login__foot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* short phones (iPhone SE, landscape): keep the form above the fold */
@media (max-height: 640px) and (max-width: 1023px) {
  .p-login__brand { padding-top: calc(var(--safe-top) + var(--sp-5)); padding-bottom: calc(var(--r-login-sheet) + var(--sp-5)); }
  .p-login__brand-in { gap: var(--sp-4); }
  .p-login__lead { display: none; }
  .p-login__main { padding-top: var(--sp-6); }
  .p-login__form, .p-login__panel { gap: var(--sp-4); }
}

/* tablet: more air in the header; the form section still runs to the bottom */
@media (min-width: 768px) and (min-height: 641px) {
  .p-login__brand { padding-top: calc(var(--safe-top) + var(--sp-12)); padding-bottom: calc(var(--r-login-sheet) + var(--sp-12)); }
  .p-login__main { padding-top: var(--sp-10); }
}

/* desktop: split screen, brand panel left, form card centred right */
@media (min-width: 1024px) {
  .p-login { flex-direction: row; background: var(--c-login-bg); }
  body:has(> .p-login) { background: var(--c-login-bg); }
  .p-login__brand { flex: 0 0 44%; max-width: var(--w-login-panel); display: flex; padding: var(--sp-12); }
  .p-login__brand::before {
    width: var(--sz-login-ring); height: var(--sz-login-ring); top: auto; bottom: calc(var(--sz-login-ring) * -0.38); right: calc(var(--sz-login-ring) * -0.4);
    box-shadow: 0 0 0 56px var(--c-login-brand), 0 0 0 57px var(--c-login-line), 0 0 0 128px var(--c-login-brand), 0 0 0 129px var(--c-login-line);
  }
  .p-login__brand-in { max-width: none; margin: 0; justify-content: space-between; }
  .p-login__intro { gap: var(--sp-4); padding-bottom: var(--sp-8); }
  .p-login__intro::before { content: ""; width: var(--sp-10); height: 2px; margin-bottom: var(--sp-2); border-radius: 2px; background: var(--c-login-accent); }
  .p-login__welcome { font-size: var(--fs-login-welcome-lg); }
  .p-login__lead { font-size: var(--fs-login-lead-lg); }
  .p-login__main {
    flex: 1 1 auto; align-items: center; margin: 0; border-radius: 0;
    padding: var(--sp-12) var(--sp-8); background: var(--c-login-bg);
  }
  .p-login__panel { gap: var(--sp-5); }
  .p-login__form { padding: var(--sp-8); background: var(--c-login-surface); border: 1px solid var(--c-login-border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
  .p-login__foot { margin-top: 0; padding-top: 0; }
}
@media (min-width: 1280px) {
  .p-login__brand { padding: var(--sp-12) var(--sz-login-pad-xl); }
}
