/* ==========================================================================
   MMBC Attendance - Reusable UI components
   --------------------------------------------------------------------------
   Every pattern the application needs, defined once. Screens compose these
   classes; they do not invent their own styling.

   Accessibility rule applied throughout: status is carried by an icon and a
   text label as well as colour, never by colour alone.
   ========================================================================== */

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 0.875rem;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-instant) var(--ease-out);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn .icon {
  width: 1.125em;
  height: 1.125em;
}

/* --- Variants --- */

.btn--primary {
  color: var(--text-inverse);
  background: var(--mmbc-600);
  box-shadow: var(--shadow-xs);
}
.btn--primary:hover:not(:disabled) { background: var(--mmbc-700); }
.btn--primary:active:not(:disabled) { background: var(--mmbc-800); }

.btn--secondary {
  color: var(--text-primary);
  background: var(--surface-card);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn--secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--border-strong);
}

.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}
.btn--ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.btn--danger {
  color: var(--text-inverse);
  background: var(--danger-600);
}
.btn--danger:hover:not(:disabled) { background: var(--danger-700); }

.btn--danger-soft {
  color: var(--danger-700);
  background: var(--danger-50);
  border-color: var(--danger-100);
}
.btn--danger-soft:hover:not(:disabled) { background: var(--danger-100); }

.btn--link {
  padding: 0;
  color: var(--text-link);
  background: none;
}
.btn--link:hover:not(:disabled) { text-decoration: underline; }

/* --- Sizes --- */

.btn--sm {
  padding: 0.3125rem 0.625rem;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: 0.6875rem 1.25rem;
  font-size: var(--text-base);
}

.btn--block { width: 100%; }

.btn--icon {
  padding: 0.4375rem;
  border-radius: var(--radius-md);
}
.btn--icon.btn--sm { padding: 0.25rem; }

/* Loading state: the label is replaced by a spinner but the button keeps its
   width, so the layout does not jump. */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--text-inverse);
  animation: spin 0.6s linear infinite;
}
.btn--secondary.is-loading::after,
.btn--ghost.is-loading::after { color: var(--text-secondary); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Forms
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Vertical rhythm for fields stacked in a single column. */
.field + .field { margin-top: var(--space-4); }

/*
  ...but not inside a grid. There the container's own `gap` already provides
  the spacing, and this margin would additionally push every field after the
  first down by one gap - leaving its label and its input a row-gap lower than
  the fields beside it. Cancelling it is what keeps "New password" and
  "Confirm new password" on exactly the same two rows.
*/
.form-grid > .field + .field,
.filters__grid > .field + .field {
  margin-top: 0;
}

.field__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.field__required {
  color: var(--danger-600);
  font-weight: var(--weight-semibold);
}

.field__hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--danger-600);
}
.field__error .icon { margin-top: 0.1em; }

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: var(--text-md);
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-disabled); }

.input:hover:not(:disabled),
.textarea:hover:not(:disabled),
.select:hover:not(:disabled) { border-color: var(--border-strong); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--mmbc-500);
  box-shadow: 0 0 0 3px var(--mmbc-100);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
  color: var(--text-disabled);
  background: var(--surface-sunken);
  cursor: not-allowed;
}

.input.is-invalid,
.textarea.is-invalid,
.select.is-invalid { border-color: var(--danger-600); }

.input.is-invalid:focus,
.textarea.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-50); }

.textarea { resize: vertical; min-height: 5rem; }

.select {
  appearance: none;
  padding-right: 2.25rem;
  /* Chevron drawn with a gradient-free inline data URI: no network request,
     no external asset. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2371718a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1rem;
}

.select[multiple] {
  background-image: none;
  padding-right: 0.75rem;
  min-height: 7rem;
}

/* --- Input with a leading icon --- */

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-group .input { padding-left: 2.375rem; }

.input-group__action {
  position: absolute;
  right: 0.375rem;
  display: inline-flex;
  padding: 0.3125rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.input-group__action:hover { color: var(--text-primary); background: var(--surface-hover); }

/* --- Checkbox and radio --- */

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  cursor: pointer;
}

.check input[type="checkbox"],
.check input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.125rem 0 0;
  accent-color: var(--mmbc-600);
  cursor: pointer;
  flex: none;
}

.check__label { font-size: var(--text-md); }
.check__hint { display: block; font-size: var(--text-sm); color: var(--text-muted); }

/* --- Choice cards (radio group presented as selectable cards) --- */

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}
.choice:hover { border-color: var(--mmbc-300); background: var(--mmbc-50); }
.choice:has(input:checked) {
  border-color: var(--mmbc-600);
  background: var(--mmbc-50);
  box-shadow: inset 0 0 0 1px var(--mmbc-600);
}
.choice input { margin-top: 0.2rem; accent-color: var(--mmbc-600); flex: none; }

/* --- Form layout --- */

/*
  Auto-fitting columns that collapse to a single column below ~240px each, so
  fields stack cleanly on a phone with no separate breakpoint. `align-items:
  start` keeps every field anchored to the top of its row, so a validation
  message under one field cannot shift its neighbours.
*/
.form-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

/*
  Two related panels side by side - "what is recorded" next to "change it".

  Distinct from `.grid-auto`, which sizes an unknown number of cards. Here the
  count is exactly two and the second one holds a form, so the pair is given
  half the row each and told to start at the same top edge. Below the
  breakpoint they stack, which is the only sensible reading order on a phone.
*/
.split-pair {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 60rem) {
  .split-pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.form-actions--end { justify-content: flex-end; }

/* --- Password rules list --- */

.password-rules {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: var(--surface-sunken);
  border-radius: var(--radius-md);
}
.password-rules li { display: flex; align-items: center; gap: var(--space-2); }
.password-rules .icon { color: var(--text-muted); }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.card__body { padding: var(--space-5); }
.card__body--flush { padding: 0; }

.card__footer {
  padding: var(--space-4) var(--space-5);
  background: var(--gray-25);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* --- Stat card --- */

.stat {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

a.stat:hover {
  border-color: var(--mmbc-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--mmbc-700);
  background: var(--mmbc-50);
  border-radius: var(--radius-md);
  flex: none;
}

.stat--warning .stat__icon { color: var(--warning-700); background: var(--warning-50); }

.stat__value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1875rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
}

.badge .icon { width: 0.875em; height: 0.875em; stroke-width: 2; }

.badge--neutral { color: var(--gray-700); background: var(--gray-100); border-color: var(--gray-200); }
.badge--brand   { color: var(--mmbc-700); background: var(--mmbc-50); border-color: var(--mmbc-100); }
.badge--success { color: var(--success-700); background: var(--success-50); border-color: var(--success-100); }
.badge--warning { color: var(--warning-700); background: var(--warning-50); border-color: var(--warning-100); }
.badge--danger  { color: var(--danger-700); background: var(--danger-50); border-color: var(--danger-100); }
.badge--info    { color: var(--info-700); background: var(--info-50); border-color: var(--info-100); }

.badge--square { border-radius: var(--radius-sm); }

/* ==========================================================================
   Avatar
   ========================================================================== */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--mmbc-800);
  background: var(--mmbc-100);
  border-radius: var(--radius-full);
  flex: none;
  user-select: none;
}

/* A photo in the same circle. The box is square and a photograph is usually
 * not, so without this the browser fills the box by stretching one axis - a
 * portrait came out visibly narrowed. `cover` crops to fill instead, which is
 * what the circle wanted all along.
 *
 * Thumbnails are cropped square on the server too, so for anything uploaded
 * after RC-D-05 this changes nothing. It is what makes the ones stored before
 * it render correctly without anybody re-uploading. */
img.avatar {
  object-fit: cover;
  object-position: center 15%;
}

.avatar--sm { width: 1.5rem; height: 1.5rem; font-size: var(--text-2xs); }
.avatar--lg { width: 3rem; height: 3rem; font-size: var(--text-base); }
.avatar--xl { width: 4rem; height: 4rem; font-size: var(--text-xl); }

.avatar--inverse { color: var(--mmbc-100); background: var(--mmbc-700); }

.person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.person__name {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.person__meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-shell {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.table-shell__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  font-size: var(--text-md);
  text-align: left;
}

.table th {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
  background: var(--gray-25);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: var(--z-base);
}

.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr {
  transition: background-color var(--duration-instant) var(--ease-out);
}

.table tbody tr:hover { background: var(--gray-25); }

/* --- A whole row that opens one thing --------------------------------------

   Only rows marked as linked get a pointer. A hover shade on a row that does
   nothing reads as an invitation, and the Live board spent a UAT round telling
   people to click rows that were inert.

   The anchor in the first cell is the real control: it focuses, it takes
   Enter, it opens in a new tab, and it works with no JavaScript at all.
   Clicking elsewhere on the row is a mouse convenience layered on top by
   `initRowLinks` in app.js.

   A stretched `::after` overlay was tried first and cannot work here: this
   table's row headers are `position: sticky`, which makes the *cell* the
   containing block, so the overlay covered the first cell and nothing else.
   Only a browser shows you that - the markup looks correct either way.
*/
.table__row--linked { cursor: pointer; }

.table__row-link { font-weight: var(--weight-medium); }

/* The row shows the focus, since the row is what activating the link opens. */
.table__row--linked:focus-within { background: var(--gray-25); }

.table__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
}

.table--compact th,
.table--compact td { padding: var(--space-2) var(--space-3); }

/* --------------------------------------------------------------------------
   Stacked table

   A table with more columns than a phone can hold. Below the breakpoint each
   row becomes its own labelled block: the heading comes from `data-label` on
   the cell, so a value can never end up under the wrong column the way it can
   when columns are simply squeezed. Above the breakpoint it is an ordinary
   table.
   -------------------------------------------------------------------------- */

@media (max-width: 47.99rem) {
  .table--stacked thead {
    /* Hidden visually; each cell carries its own label instead. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table--stacked,
  .table--stacked tbody,
  .table--stacked tr,
  .table--stacked th,
  .table--stacked td {
    display: block;
    width: auto;
  }

  .table--stacked tbody tr {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .table--stacked tbody tr:last-child { border-bottom: none; }

  .table--stacked tbody th,
  .table--stacked tbody td {
    display: grid;
    grid-template-columns: minmax(8rem, 40%) 1fr;
    gap: var(--space-3);
    align-items: baseline;
    padding: var(--space-1) var(--space-4);
    border-bottom: none;
    text-align: left;
  }

  .table--stacked tbody th[data-label]::before,
  .table--stacked tbody td[data-label]::before {
    content: attr(data-label);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-muted);
  }

  .table--stacked tbody td[data-label='Actions'] {
    grid-template-columns: 1fr;
    padding-top: var(--space-2);
  }

  .table--stacked tbody td[data-label='Actions']::before { content: none; }

  .table--stacked .table__actions { justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   Import preview rows

   The left edge carries the verdict so a long table can be scanned without
   reading the badge in the last column. Colour is never the only signal: every
   row also has a badge with a word on it.
   -------------------------------------------------------------------------- */

.import-row td:first-child { border-left: 3px solid transparent; }
.import-row--valid td:first-child { border-left-color: var(--success-600); }
.import-row--warning td:first-child { border-left-color: var(--warning-600); }
.import-row--invalid td:first-child { border-left-color: var(--danger-600); }
.import-row--invalid { background: var(--danger-50); }
.import-row--invalid:hover { background: var(--danger-50); }
.import-row .field__error,
.import-row .field__hint { margin-top: var(--space-1); }

/* ==========================================================================
   Empty state
   ========================================================================== */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--gray-400);
  background: var(--surface-sunken);
  border-radius: var(--radius-full);
}

.empty__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.empty__message {
  max-width: 42ch;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   Timeline
   --------------------------------------------------------------------------
   A vertical run of events. The connecting line is drawn on the list rather
   than per item, so it stays continuous however many events there are.
   ========================================================================== */

/*
  Timeline
  --------------------------------------------------------------------------
  Three parts on one row: the rail with its marker, the event, and the date it
  took effect. The event text keeps a bounded measure so a long detail stays
  readable, while the date is pushed to the far side - which is what makes a
  wide card look deliberate rather than half-empty. Below the breakpoint the
  date drops under the event and the rail stays put.
*/

.timeline {
  --timeline-rail: 1.75rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: 1.1rem;
  left: calc(var(--timeline-rail) / 2 - 1px);
  width: 2px;
  background: var(--border-subtle);
}

/*
  The marker sits at the timeline's own left edge and the content is indented
  past it. Hanging the marker outside the list with a negative offset put it
  through the card's left edge once the padding narrowed on a phone.
*/
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
  padding: var(--space-3) 0 var(--space-3)
           calc(var(--timeline-rail) + var(--space-3));
  border-bottom: 1px solid var(--border-subtle);
}

.timeline__item:last-child { border-bottom: none; }

@media (min-width: 45rem) {
  .timeline__item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: var(--space-6);
  }

  /* A readable measure. Stretching one short line across a wide screen is no
     better than crushing it into a corner. */
  .timeline__body { max-width: 60ch; }

  .timeline__date { justify-self: end; text-align: right; }
}

.timeline__marker {
  position: absolute;
  top: var(--space-3);
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--timeline-rail);
  height: var(--timeline-rail);
  color: var(--text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
}

.timeline__item--success .timeline__marker {
  color: var(--success-600);
  border-color: var(--success-100);
  background: var(--success-50);
}
.timeline__item--warning .timeline__marker {
  color: var(--warning-600);
  border-color: var(--warning-100);
  background: var(--warning-50);
}
.timeline__item--danger .timeline__marker {
  color: var(--danger-600);
  border-color: var(--danger-100);
  background: var(--danger-50);
}

.timeline__title { font-weight: var(--weight-medium); color: var(--text-primary); }
.timeline__detail { font-size: var(--text-sm); color: var(--text-secondary); }
.timeline__date {
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Meter (profile completeness)
   --------------------------------------------------------------------------
   The fill width comes from a CSS custom property that JavaScript sets through
   the CSSOM. An inline style attribute would need 'unsafe-inline' in the CSP;
   setProperty does not.
   ========================================================================== */

.meter {
  height: 6px;
  overflow: hidden;
  background: var(--gray-200);
  border-radius: var(--radius-full);
}

.meter__fill {
  display: block;
  height: 100%;
  width: var(--meter-value, 0%);
  background: var(--mmbc-600);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

.meter__fill--success { background: var(--success-600); }
.meter__fill--warning { background: var(--warning-600); }
.meter__fill--neutral { background: var(--mmbc-500); }

/* ==========================================================================
   Loading skeleton
   ========================================================================== */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: skeleton-sweep 1.4s ease-in-out infinite;
}

@keyframes skeleton-sweep { to { transform: translateX(100%); } }

.skeleton--text { height: 0.75rem; margin: 0.3rem 0; }
.skeleton--title { height: 1.25rem; width: 40%; }
.skeleton--line-short { width: 60%; }
.skeleton--avatar { width: 2rem; height: 2rem; border-radius: var(--radius-full); }
.skeleton--block { height: 6rem; border-radius: var(--radius-md); }

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* ==========================================================================
   Alerts / inline messages
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-md);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.alert .icon { margin-top: 0.1em; flex: none; }
.alert__title { font-weight: var(--weight-semibold); }
.alert__body { min-width: 0; }

.alert--info    { color: var(--info-700); background: var(--info-50); border-color: var(--info-100); }
.alert--success { color: var(--success-700); background: var(--success-50); border-color: var(--success-100); }
.alert--warning { color: var(--warning-700); background: var(--warning-50); border-color: var(--warning-100); }
.alert--error   { color: var(--danger-700); background: var(--danger-50); border-color: var(--danger-100); }

/* The Companion fallback notice.
 *
 * It is a real failure and stays discoverable, but it is also one that can
 * recur on every sign-in on a machine where the Companion is not installed -
 * and at full alert size it took the top of the dashboard each time. Smaller
 * type, tighter spacing, and the actions on one line: the same words, about
 * half the height. Nothing here changes when it appears or what it offers.
 */
.companion-fallback {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.companion-fallback .alert__body { gap: var(--space-1); }

.companion-fallback .alert__title {
  font-size: var(--text-sm);
  margin: 0;
}

.companion-fallback p { margin: 0; }

.companion-fallback .cluster { margin-block-start: var(--space-1); }

/* An alert that blocks what the person came to do. Same palette as its
   variant, with more weight, so it reads before anything else on the page. */
.alert--prominent {
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-lg);
  border-width: 2px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.alert--prominent .alert__title { font-size: var(--text-xl); font-weight: var(--weight-bold); }
.alert--prominent ul { padding-left: var(--space-5); list-style: disc; }
.alert--warning.alert--prominent { border-color: var(--warning-600); }

/* ==========================================================================
   Toast notifications
   ========================================================================== */

.toast-region {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(24rem, calc(100vw - var(--space-8)));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gray-400);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in var(--duration-slow) var(--ease-spring);
}

.toast.is-leaving { animation: toast-out var(--duration-fast) var(--ease-out) forwards; }

.toast__icon { flex: none; margin-top: 0.1em; }
.toast__body { flex: 1; min-width: 0; font-size: var(--text-md); }
.toast__close {
  flex: none;
  padding: 0.125rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.toast__close:hover { color: var(--text-primary); background: var(--surface-hover); }

.toast--success { border-left-color: var(--success-600); }
.toast--success .toast__icon { color: var(--success-600); }
.toast--error { border-left-color: var(--danger-600); }
.toast--error .toast__icon { color: var(--danger-600); }
.toast--warning { border-left-color: var(--warning-600); }
.toast--warning .toast__icon { color: var(--warning-600); }
.toast--info { border-left-color: var(--info-600); }
.toast--info .toast__icon { color: var(--info-600); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(1rem) scale(0.98); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(1rem); }
}

/* ==========================================================================
   Modal / confirmation dialog
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 48, 0.45);
  backdrop-filter: blur(2px);
  animation: fade-in var(--duration-fast) var(--ease-out);
}

.modal__panel {
  position: relative;
  width: min(32rem, 100%);
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: modal-in var(--duration-base) var(--ease-spring);
}

.modal--wide .modal__panel { width: min(48rem, 100%); }

.modal__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  flex: none;
}
.modal__icon--danger { color: var(--danger-600); background: var(--danger-50); }
.modal__icon--warning { color: var(--warning-600); background: var(--warning-50); }
.modal__icon--brand { color: var(--mmbc-700); background: var(--mmbc-50); }

.modal__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.modal__body { padding: 0 var(--space-5) var(--space-5); color: var(--text-secondary); }
.modal__body--top { padding-top: var(--space-3); }

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--gray-25);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(0.75rem) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Drawer (side panel)
   ========================================================================== */

.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
}

.drawer[hidden] { display: none; }

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 48, 0.4);
  animation: fade-in var(--duration-fast) var(--ease-out);
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(28rem, 100%);
  background: var(--surface-card);
  box-shadow: var(--shadow-xl);
  animation: drawer-in var(--duration-slow) var(--ease-out);
}

.drawer--left .drawer__panel {
  right: auto;
  left: 0;
  animation-name: drawer-in-left;
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer__body { flex: 1; padding: var(--space-5); overflow-y: auto; }

.drawer__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes drawer-in-left { from { transform: translateX(-100%); } to { transform: translateX(0); } }

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs__list {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tabs__tab {
  position: relative;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.tabs__tab:hover { color: var(--text-primary); }

.tabs__tab[aria-selected="true"] {
  color: var(--mmbc-700);
  border-bottom-color: var(--mmbc-600);
}

.tabs__panel { padding-top: var(--space-5); }
.tabs__panel[hidden] { display: none; }

/* ==========================================================================
   Accordion
   ========================================================================== */

.accordion__item { border-bottom: 1px solid var(--border-subtle); }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-4) 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  text-align: left;
  color: var(--text-primary);
}

.accordion__trigger:hover { color: var(--mmbc-700); }

.accordion__chevron {
  color: var(--text-muted);
  transition: transform var(--duration-base) var(--ease-out);
}

.accordion__trigger[aria-expanded="true"] .accordion__chevron { transform: rotate(180deg); }

.accordion__panel {
  overflow: hidden;
  color: var(--text-secondary);
  transition: height var(--duration-base) var(--ease-out);
}

.accordion__panel[hidden] { display: none; }
.accordion__panel-inner { padding-bottom: var(--space-4); }

/* ==========================================================================
   Searchable select (combobox)
   ========================================================================== */

.combobox { position: relative; }

.combobox__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: var(--text-md);
  text-align: left;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.combobox__trigger:hover { border-color: var(--border-strong); }
.combobox__trigger[aria-expanded="true"] {
  border-color: var(--mmbc-500);
  box-shadow: 0 0 0 3px var(--mmbc-100);
}

.combobox__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combobox__value--placeholder { color: var(--text-disabled); }

/*
  Positioned in the viewport, not inside its parent.

  As an absolutely-positioned child it was clipped by any ancestor with
  `overflow: hidden` - and three of them wrap a searchable select: the
  accordion panel on the Employment tab and the list's advanced filters, the
  table shell, and the drawer body. The list appeared as a one-row sliver, so
  the operator could only find an option by typing its name.

  `position: fixed` escapes every one of those. The coordinates are written by
  the component through the CSSOM on open, which the CSP allows; the fallback
  values here simply keep the box sane if a script ever fails to run.
*/
.combobox__popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 16rem;
  z-index: var(--z-popover);
  display: flex;
  flex-direction: column;
  max-height: 18rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: popover-in var(--duration-fast) var(--ease-out);
}

.combobox__popover[hidden] { display: none; }

.combobox__search { padding: var(--space-2); border-bottom: 1px solid var(--border-subtle); }
/* `min-height` guarantees at least two rows are reachable even where the
   viewport is short, rather than collapsing to nothing. */
.combobox__list { flex: 1; min-height: 4.5rem; overflow-y: auto; padding: var(--space-1); }

.combobox__option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-md);
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.combobox__option:hover,
.combobox__option.is-active { background: var(--mmbc-50); }
.combobox__option[aria-selected="true"] { color: var(--mmbc-700); font-weight: var(--weight-medium); }
.combobox__option .icon { margin-left: auto; color: var(--mmbc-600); }

.combobox__empty { padding: var(--space-4); font-size: var(--text-sm); color: var(--text-muted); text-align: center; }

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Filter panel
   ========================================================================== */

.filters {
  padding: var(--space-4) var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.filters__grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.filters__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.filters__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--gray-25);
}

.pagination__summary { font-size: var(--text-sm); color: var(--text-muted); }
.pagination__controls { display: flex; align-items: center; gap: var(--space-1); }

.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.pagination__link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  text-decoration: none;
}

.pagination__link[aria-current="page"] {
  color: var(--mmbc-700);
  background: var(--mmbc-50);
  border-color: var(--mmbc-200);
  font-weight: var(--weight-medium);
}

.pagination__link[aria-disabled="true"] {
  color: var(--text-disabled);
  pointer-events: none;
}

/* ==========================================================================
   Command palette
   ========================================================================== */

.palette {
  position: fixed;
  inset: 0;
  z-index: var(--z-palette);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh var(--space-4) var(--space-4);
}

.palette[hidden] { display: none; }

.palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 48, 0.4);
  backdrop-filter: blur(3px);
  animation: fade-in var(--duration-fast) var(--ease-out);
}

.palette__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(36rem, 100%);
  max-height: 60vh;
  overflow: hidden;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: modal-in var(--duration-base) var(--ease-spring);
}

.palette__search {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.palette__search .icon { color: var(--text-muted); flex: none; }

.palette__input {
  flex: 1;
  font-size: var(--text-lg);
  border: none;
  outline: none;
  background: transparent;
}

.palette__input::placeholder { color: var(--text-disabled); }

.palette__results { overflow-y: auto; padding: var(--space-2); }

.palette__group-label {
  padding: var(--space-2) var(--space-3) var(--space-1);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
}

.palette__option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-md);
  text-align: left;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.palette__option .icon { color: var(--text-muted); flex: none; }
.palette__option.is-active { background: var(--mmbc-50); color: var(--mmbc-800); }
.palette__option.is-active .icon { color: var(--mmbc-600); }

.palette__footer {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--gray-25);
  border-top: 1px solid var(--border-subtle);
}

.palette__hint { display: flex; align-items: center; gap: var(--space-1); }

/* ==========================================================================
   Description list (detail pages)
   ========================================================================== */

.detail-list {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.detail-list__item { min-width: 0; }

.detail-list__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.detail-list__value {
  font-size: var(--text-md);
  color: var(--text-primary);
  word-break: break-word;
}

/* ==========================================================================
   Secret reveal (shown once, never recoverable)
   ========================================================================== */

.secret {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  color: var(--mmbc-900);
  background: var(--mmbc-50);
  border: 1px dashed var(--mmbc-300);
  border-radius: var(--radius-md);
  user-select: all;
}

.secret__value { flex: 1; min-width: 12ch; word-break: break-all; }

/* --- A unit sitting beside a number ---------------------------------------

   For fields whose value is meaningless without one. The unit is decoration:
   the label carries it too, so a screen reader hears it without the suffix
   being announced twice.
*/
.input-group { display: flex; align-items: stretch; }

.input-group .input {
  flex: 1 1 auto;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group__unit {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--gray-25);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Branding slots

   One row per replaceable image: a preview, what it is, and the two things
   that can be done to it. The preview sits on a chequerboard so a logo with
   transparency reads as transparent rather than as one with a white box
   painted behind it - which is the difference between "this looks wrong" and
   "this is what it will look like on a dark sidebar".
--------------------------------------------------------------------------- */

.branding-slot {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-default);
}

.branding-slot:last-child { border-bottom: 0; }

.branding-slot__preview {
  flex: none;
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  padding: var(--space-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--gray-0);
  background-image:
    linear-gradient(45deg, var(--gray-100) 25%, transparent 25%),
    linear-gradient(-45deg, var(--gray-100) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--gray-100) 75%),
    linear-gradient(-45deg, transparent 75%, var(--gray-100) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.branding-slot__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.branding-slot__detail { min-width: 0; flex: 1 1 auto; }

.branding-slot__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-1);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.branding-slot__help { margin: 0 0 var(--space-1); color: var(--text-muted); }

.branding-slot__limits {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.branding-slot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.branding-slot__upload {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

.branding-slot__upload .input { max-width: 22rem; }

@media (max-width: 40rem) {
  .branding-slot { flex-direction: column; }
}

/* ------------------------------------------------------------ Tickets
   A ticket's own words keep their line breaks. An internal note is tinted and
   labelled so it can never be mistaken for a reply the requester can read; a
   change of status or assignment is a quieter line. */
.ticket-description,
.ticket-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-description {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

.timeline__item--internal {
  background: var(--warning-50);
  border-left: 3px solid var(--warning-700);
  padding-right: var(--space-3);
}

.timeline__item--internal .timeline__marker { background: var(--warning-700); }

.timeline__item--event .timeline__title {
  font-weight: var(--weight-regular, 400);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ----------------------------------------------------------- Overtime
   A candidate and an approval are different figures and must never look like
   the same one: the approved figure carries the brand colour and a label that
   says whether it is payable. Review Required shows the old decision and the
   current facts side by side, never merged. */
.ot-figures {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.ot-figure {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.ot-figure--approved { border-color: var(--mmbc-100); background: var(--mmbc-50); }
.ot-figure__label { font-size: var(--text-sm); color: var(--text-secondary); }
.ot-figure__value { font-size: 1.5rem; font-weight: var(--weight-medium); }
.ot-figure--approved .ot-figure__value { color: var(--mmbc-700); }
.ot-figure__note { font-size: var(--text-sm); color: var(--text-secondary); }
.ot-approved { color: var(--mmbc-700); font-weight: var(--weight-medium); }

.ot-compare {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.ot-compare__side {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.ot-compare__title { font-size: var(--text-sm); font-weight: var(--weight-medium);
  margin: 0 0 var(--space-2); }
.ot-review { border-color: var(--danger-100); }


/* --- Notifications --- */

.action-indicator {
  position: relative;
}

.action-indicator__badge {
  position: absolute;
  top: calc(var(--space-1) * -1);
  inset-inline-end: calc(var(--space-1) * -1);
  min-width: 1.25rem;
  padding: 0 var(--space-1);
  border-radius: var(--radius-full);
  background: var(--danger-600);
  color: #fff;
  font-size: var(--text-xs);
  line-height: 1.25rem;
  text-align: center;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.notification:last-child { border-bottom: none; }

.notification--unread {
  border-inline-start: 3px solid var(--mmbc-500);
  padding-inline-start: var(--space-3);
}

.notification__title {
  margin: 0 0 var(--space-1);
  font-weight: var(--weight-medium);
}

.notification__body { flex: 1 1 20rem; }
