/* ============================================================================
   AnyShift UI v2 — the "AnyShift Admin" artifact language, app-wide.
   Loaded LAST on every page (after tokens/bootstrap/style/components/theme),
   so it is the final word on look & feel. Reads the --as-* tokens.

   Contents
     1. Base + type helpers         6. Tables
     2. App shell (sidebar/topbar)  7. Badges / status pills
     3. Page layout + header        8. Forms, toolbar, segmented tabs
     4. Cards, KPI, panels          9. Overlays (modal, offcanvas, dropdown)
     5. Buttons                    10. Legacy bridge (classes JS still emits)
                                   11. Auth + standalone pages
   ========================================================================== */

/* 1. Base ------------------------------------------------------------------ */
html, body { background: var(--as-bg); color: var(--as-ink); }
body.as-body { margin: 0; font-family: var(--as-font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .as-display { font-family: var(--as-font-display); letter-spacing: -0.02em; color: var(--as-ink); }
*:focus-visible { outline: 2px solid var(--as-primary); outline-offset: 2px; border-radius: 4px; }
.as-eyebrow, .eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: 11px; font-weight: 600; color: var(--as-text-muted); margin: 0;
}
.as-eyebrow--brand { color: var(--as-primary); }
.as-mono { font-size: 13px; font-variant-numeric: tabular-nums; }
.as-muted { color: var(--as-text-muted) !important; }
.as-ink { color: var(--as-ink) !important; }
.as-text-ok { color: var(--as-success) !important; }
.as-text-brand { color: var(--as-primary) !important; }
.as-ico { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }
.as-fade-in { animation: as-fade .22s ease both; }
/* Opacity only: a transform on .as-page would trap fixed modals/offcanvas inside it. */
@keyframes as-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .as-fade-in { animation: none; } }

/* 2. App shell ------------------------------------------------------------- */
.as-app { min-height: 100vh; background: var(--as-bg); }
.as-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1045; width: 256px;
  background: var(--as-navy); color: #fff; display: flex; flex-direction: column;
  transition: transform .2s var(--ease);
}
.as-sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 20px; text-decoration: none; }
.as-sidebar__brand img { height: 28px; width: auto; }
.as-sidebar__nav { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.as-sidebar__group { margin: 16px 12px 6px; color: rgba(255,255,255,.38); }
.as-nav__link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.6); text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.as-nav__link .as-ico { font-size: 18px; }
.as-nav__link:hover { background: rgba(255,255,255,.05); color: #fff; }
.as-nav__link.is-active { background: var(--as-primary); color: #fff; }
.as-sidebar__foot { padding: 8px 12px 20px; }
.as-sidebar__user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.05); color: #fff; text-decoration: none; width: 100%; border: 0; text-align: left;
}
.as-sidebar__user:hover { background: rgba(255,255,255,.09); color: #fff; }
.as-sidebar__user img, .as-sidebar__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: rgba(255,255,255,.1); display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.as-sidebar__user .name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-sidebar__user .as-eyebrow { color: rgba(255,255,255,.4); }

.as-shell { min-width: 0; }
@media (min-width: 992px) {
  .as-shell { padding-left: 256px; }
  .as-main { padding: 32px 32px 56px; }
  .as-topbar__inner { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 991.98px) {
  .as-sidebar { transform: translateX(-100%); }
  .as-app.is-drawer-open .as-sidebar { transform: none; box-shadow: var(--sh-3); }
}
.as-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(21,21,31,.5); display: none; }
.as-app.is-drawer-open .as-backdrop { display: block; }
@media (min-width: 992px) { .as-app.is-drawer-open .as-backdrop { display: none; } }

.as-topbar { position: sticky; top: 0; z-index: 1030; border-bottom: 1px solid var(--as-border);
  background: rgba(247,247,249,.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.as-topbar__inner { display: flex; align-items: center; gap: 12px; padding: 14px max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px)); }
.as-topbar__search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 1px solid var(--as-border); border-radius: 12px; background: var(--as-surface);
  color: var(--as-text-muted); font-size: 14px; text-align: left; cursor: pointer;
  transition: border-color .18s ease;
}
.as-topbar__search:hover { border-color: var(--as-border-strong); }
.as-topbar__search .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-topbar__search kbd {
font-size: 11px; color: var(--as-text-muted); background: var(--as-bg);
  border: 1px solid var(--as-border); border-radius: 6px; padding: 1px 6px;
}
.as-iconbtn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid var(--as-border); border-radius: 12px; background: var(--as-surface); color: var(--as-ink);
  font-size: 18px; transition: background .18s ease;
}
.as-iconbtn:hover { background: var(--as-bg); }
.as-iconbtn.dropdown-toggle::after { display: none; }
.as-iconbtn .noti-span { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--as-primary); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--as-bg);
}
.as-iconbtn .noti-span:empty { display: none; }
.as-langbtn { width: auto; padding: 0 12px;font-size: 12px; font-weight: 600; text-transform: uppercase; }
.as-topbar__user { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; height: 40px; border: 1px solid var(--as-border); border-radius: 12px; background: var(--as-surface); color: var(--as-ink); font-weight: 500; font-size: 14px; }
.as-topbar__user img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.as-topbar__user.dropdown-toggle::after { display: none; }
@media (max-width: 575.98px) { .as-topbar__user span, .as-topbar__search kbd { display: none; } }
.as-hide-lg { }
@media (min-width: 992px) { .as-hide-lg { display: none !important; } }

.as-main { padding: 28px max(20px, env(safe-area-inset-right, 0px)) 48px max(20px, env(safe-area-inset-left, 0px)); }
.as-container { max-width: 1440px; margin: 0 auto; }
.as-container--wide { max-width: 1360px; }

/* 3. Page layout ----------------------------------------------------------- */
/* No fill-mode: once the fade finishes the opacity animation stops applying, so
   .as-page does NOT keep a stacking context that would trap fixed offcanvas/modals
   (which were rendering under the sticky topbar). */
.as-page { display: flex; flex-direction: column; gap: 28px; animation: as-fade .22s ease; }
.as-page > * { min-width: 0; }
.as-page--tight { gap: 24px; }
.as-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.as-head__title { font-family: var(--as-font-display); font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; color: var(--as-ink); margin: 6px 0 0; }
@media (min-width: 640px) { .as-head__title { font-size: 36px; } }
.as-head__sub { margin: 6px 0 0; color: var(--as-text-muted); font-size: 14px; max-width: 64ch; }
.as-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.as-back { display: inline-flex; align-items: center; gap: 6px; color: var(--as-text-muted); font-size: 13px; font-weight: 500; text-decoration: none; margin-bottom: 4px; }
.as-back:hover { color: var(--as-primary); }
.as-section-title { font-family: var(--as-font-display); font-size: 18px; font-weight: 600; color: var(--as-ink); margin: 0 0 12px; letter-spacing: -0.01em; }
.as-section { display: flex; flex-direction: column; }
.as-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.as-grid--gap-lg { gap: 20px; }
@media (min-width: 640px) { .as-grid--2, .as-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .as-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) {
  .as-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .as-grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .as-grid--side { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
}
@media (min-width: 1200px) { .as-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.as-span-2 { grid-column: 1 / -1; }

/* 4. Cards ----------------------------------------------------------------- */
.as-card { background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20,20,31,.05); padding: 20px; min-width: 0;
}
@media (min-width: 640px) { .as-card { padding: 24px; } }
.as-card--flush { padding: 0 !important; overflow: hidden; }
.as-card--tint { background: var(--as-primary-weak); border-color: transparent; }
.as-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.as-card__title { font-family: var(--as-font-display); font-size: 18px; font-weight: 600; color: var(--as-ink); margin: 0; letter-spacing: -0.01em; }
.as-card__body { margin-top: 16px; }
.as-card__foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--as-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.as-card--flush > .as-card__head { padding: 18px 20px; border-bottom: 1px solid var(--as-border); }
.as-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--as-primary); text-decoration: none; }
.as-link:hover { color: var(--as-primary-hover); }

/* KPI card (artifact): eyebrow label + tinted icon chip, big display number */
.as-kpi { display: block; background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20,20,31,.05); padding: 20px; color: inherit; text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
a.as-kpi:hover { border-color: var(--as-border-strong); box-shadow: var(--sh-2); color: inherit; }
.as-kpi__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.as-kpi__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--as-primary-weak); color: var(--as-red-text); font-size: 18px; flex-shrink: 0; }
.as-kpi__value { font-family: var(--as-font-display); font-size: 30px; font-weight: 700; color: var(--as-ink); margin: 16px 0 0; line-height: 1.1; letter-spacing: -0.02em; }
.as-kpi__sub { margin: 4px 0 0; font-size: 14px; color: var(--as-text-muted); }
.as-kpi--ok .as-kpi__value { color: var(--as-success); }
.as-kpi--brand .as-kpi__value { color: var(--as-primary); }

/* Progress bar */
.as-progress { height: 4px; width: 100%; overflow: hidden; border-radius: 999px; background: var(--as-border); }
.as-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--as-primary); }
.as-progress--lg { height: 6px; }

/* Definition list (detail pages) */
/* Detail grid: AT MOST 3 columns (never a single long strip on wide screens), fewer as the card narrows.
   Container-aware — the column minimum is a third of the grid's own width, so a narrow card or a modal
   drops to 2 then 1 column without media queries. `--2` caps at two columns; `__wide` spans the row. */
.as-dl { --as-dl-gap: 32px; --as-dl-cols: 3; display: grid; gap: 22px var(--as-dl-gap); margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - (var(--as-dl-cols) - 1) * var(--as-dl-gap)) / var(--as-dl-cols))), 1fr)); }
.as-dl--2 { --as-dl-cols: 2; }
/* Cells whose value is deliberately not provided to this viewer (e.g. an employer never receives gender or city) disappear instead of leaving a label with nothing under it. */
.as-dl--hide-empty > div:has(> dd:empty) { display: none; }
.as-dl > div { min-width: 0; }
.as-dl dt { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 600; color: var(--as-text-muted); }
.as-dl dd { margin: 4px 0 0; font-size: 14px; font-weight: 500; color: var(--as-ink); overflow-wrap: anywhere; }

/* Lists (live jobs / approvals) */
.as-list { list-style: none; margin: 0; padding: 0; }
.as-list > li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--as-border); }
.as-list > li:first-child { border-top: 0; }
.as-rowlink { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--as-border); border-radius: 12px;
  color: inherit; text-decoration: none; transition: background .18s ease;
}
.as-rowlink:hover { background: var(--as-bg); color: inherit; }
.as-rowlink__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--as-primary-weak); color: var(--as-primary); flex-shrink: 0; }
.as-rowlink:hover .as-rowlink__arrow { color: var(--as-primary); }
.as-rowlink__arrow { color: var(--as-text-muted); }

/* Avatar (initials) */
.as-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--as-primary-weak); color: var(--as-red-text); font-size: 13px; font-weight: 600; flex-shrink: 0; overflow: hidden; object-fit: cover; }
.as-avatar--lg { width: 64px; height: 64px; font-size: 20px; border-radius: 16px; }
.as-avatar--xl { width: 88px; height: 88px; font-size: 26px; border-radius: 20px; }
img.as-avatar { display: inline-block; }

/* Callout strip */
.as-callout { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1px solid var(--as-border); border-radius: 12px; background: var(--as-surface); color: var(--as-text-muted); font-size: 14px; }
.as-callout .as-ico { color: var(--as-primary); margin-top: 3px; }

/* Settings / sub-navigation (vertical card on desktop, scroll pills on mobile) */
.as-subnav { display: flex; gap: 4px; overflow-x: auto; padding: 6px; background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(20,20,31,.05); }
.as-subnav__link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--as-text-muted); text-decoration: none; white-space: nowrap; font-weight: 500; font-size: 14px; transition: background .18s ease, color .18s ease; }
.as-subnav__link .as-ico { font-size: 17px; }
.as-subnav__link:hover { background: var(--as-bg); color: var(--as-ink); }
.as-subnav__link.is-active { background: var(--as-primary-weak); color: var(--as-red-text); }
.as-subnav__text { display: flex; flex-direction: column; min-width: 0; }
.as-subnav__hint { display: none; font-size: 12px; font-weight: 400; color: var(--as-text-muted); white-space: normal; }
@media (min-width: 992px) {
  .as-subnav { flex-direction: column; overflow: visible; position: sticky; top: 92px; }
  .as-subnav__link { white-space: normal; align-items: flex-start; }
  .as-subnav__link .as-ico { margin-top: 2px; }
  .as-subnav__hint { display: block; }
}

/* Entity tiles (locations, teams, functions) */
.as-tile { display: flex; flex-direction: column; background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(20,20,31,.05); color: inherit; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease; min-width: 0; }
a.as-tile:hover { border-color: var(--as-border-strong); box-shadow: var(--sh-2); color: inherit; }
.as-tile__title { font-family: var(--as-font-display); font-size: 18px; font-weight: 600; color: var(--as-ink); margin: 12px 0 0; }
.as-meta-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--as-text-muted); }

/* Empty-state refresh (component lives in components.css) */
.as-empty { border-radius: 16px; }

/* 5. Buttons --------------------------------------------------------------- */
.as-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px;
  border-radius: 12px; border: 1px solid transparent; font-family: var(--as-font); font-size: 14px; font-weight: 600;
  line-height: 1.25; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.as-btn:disabled, .as-btn.disabled { opacity: .55; pointer-events: none; }
.as-btn--primary { background: var(--as-primary); color: #fff; box-shadow: 0 1px 2px rgba(20,20,31,.08); }
.as-btn--primary:hover { background: var(--as-primary-hover); color: #fff; transform: none; }
.as-btn--ghost, .as-btn--secondary { background: var(--as-surface); border-color: var(--as-border); color: var(--as-ink); font-weight: 500; }
.as-btn--ghost:hover, .as-btn--secondary:hover { background: var(--as-bg); color: var(--as-ink); }
.as-btn--approve { background: var(--as-success-weak); color: var(--as-success); padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.as-btn--approve:hover { filter: brightness(.95); color: var(--as-success); }
.as-btn--reject { background: transparent; border-color: var(--as-border); color: var(--as-text-muted); padding: 6px 12px; font-size: 12px; font-weight: 500; border-radius: 10px; }
.as-btn--reject:hover { background: var(--as-bg); color: var(--as-ink); }
.as-btn--danger { background: var(--as-surface); border-color: #F5C2C5; color: var(--as-red-text); }
.as-btn--danger:hover { background: var(--as-primary-weak); color: var(--as-red-text); }
.as-btn--sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.as-btn--lg { padding: 12px 20px; font-size: 15px; }
.as-btn--block { width: 100%; }
.as-btn--icon { padding: 0; width: 34px; height: 34px; border-radius: 10px; }

/* 6. Tables ---------------------------------------------------------------- */
.as-table-card { background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(20,20,31,.05); overflow: hidden; }
.as-table-card .table-responsive, .as-table-scroll { overflow-x: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.as-table, .as-table-card .table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; background: transparent; }
.as-table thead th, .as-table-card .table thead th {
text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 600;
  color: var(--as-text-muted); white-space: nowrap; padding: 14px 20px; text-align: left; background: transparent;
  border: 0; border-bottom: 0;
}
.as-table tbody td, .as-table-card .table tbody td { padding: 16px 20px; border: 0; border-top: 1px solid var(--as-border); color: var(--as-ink); vertical-align: middle; background: transparent;
}
.as-table tbody tr, .as-table-card .table tbody tr { transition: background .15s ease; }
.as-table tbody tr:hover > td, .as-table-card .table tbody tr:hover > td { background: var(--as-bg); }
.as-table .text-end, .as-table-card .table .text-end { text-align: right; }
.as-table-card .as-pagination, .as-table-card .paginationjs, .as-table-foot { padding: 14px 20px; border-top: 1px solid var(--as-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.as-cell-strong { font-weight: 500; color: var(--as-ink); }
.as-cell-sub { display: block; font-size: 13px; color: var(--as-text-muted); }
th[data-sort-key] { cursor: pointer; }
.as-table > :not(:first-child), .as-table-card .table > :not(:first-child), .table > :not(:first-child) { border-top: 0 !important; }
.as-table > :not(caption) > * > *, .as-table-card .table > :not(:not(caption)) > * > * { box-shadow: none; }
.as-table thead tr, .as-table-card .table thead tr { border-bottom: 1px solid var(--as-border); }
.as-table thead th, .as-table-card .table thead th { padding-top: 14px; padding-bottom: 14px; }
.as-table tbody tr:first-child > td, .as-table-card .table tbody tr:first-child > td { border-top: 0; }

/* 7. Badges ---------------------------------------------------------------- */
.as-badge, .status-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-family: var(--as-font); font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  background: rgba(228,228,233,.6); color: var(--as-text-muted); border: 0; text-transform: none; letter-spacing: 0;
}
.as-badge::before, .status-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.as-badge--info { background: var(--as-info-weak); color: var(--as-info); }
.as-badge--brand, .as-badge--danger { background: var(--as-primary-weak); color: var(--as-red-text); }
.as-badge--ok, .as-badge--success { background: var(--as-success-weak); color: var(--as-success); }
.as-badge--warn, .as-badge--warning { background: var(--as-warning-weak); color: var(--as-warning); }
.as-badge--muted, .as-badge--neutral { background: rgba(228,228,233,.6); color: var(--as-text-muted); }
.as-badge--plain::before { display: none; }
.as-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--as-bg); border: 1px solid var(--as-border);font-size: 11px; font-weight: 600; color: var(--as-text-muted); }
.as-stars { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--as-text-muted); }
.as-stars .as-ico { color: var(--as-warning); }

/* 8. Forms / toolbar / tabs ------------------------------------------------ */
.as-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.as-toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.as-toolbar__group:first-child { flex: 1 1 320px; }
@media (min-width: 768px) { .as-toolbar__group { flex-wrap: nowrap; } }
.as-toolbar .as-btn, .as-toolbar .as-input, .as-toolbar .as-select, .as-toolbar .site-input { height: 42px; min-height: 42px; }
.as-toolbar .as-btn--icon { width: 42px; border-radius: 12px; }
.as-toolbar label { white-space: nowrap; }
.as-table-card > .as-toolbar { padding: 16px 20px !important; border-bottom: 1px solid var(--as-border); }
.as-searchbox { position: relative; display: flex; align-items: center; min-width: 200px; flex: 0 1 380px; }
.as-searchbox .as-ico { position: absolute; left: 12px; color: var(--as-text-muted); pointer-events: none; }
.as-searchbox input { padding-left: 36px !important; width: 100%; }
.as-searchbox button { position: absolute; right: 6px; }

.as-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.as-label, .site-label {
text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 600;
  color: var(--as-text-muted); margin: 0;
}
.as-input, .as-select, .as-textarea,
.site-input, .form-control, .form-select { width: 100%; min-height: 42px; padding: 10px 14px; border: 1px solid var(--as-border); border-radius: 12px;
  background-color: var(--as-surface); color: var(--as-ink); font-family: var(--as-font); font-size: 14px;
  box-shadow: none; transition: border-color .18s ease, box-shadow .18s ease;
}
.as-select, .site-input:is(select), .form-select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7A85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.as-select--auto { width: auto; }
textarea.as-textarea, textarea.site-input, textarea.form-control { min-height: 110px; resize: vertical; }
.as-input:focus, .as-select:focus, .as-textarea:focus,
.site-input:focus, .form-control:focus, .form-select:focus { outline: none; border-color: var(--as-primary); box-shadow: 0 0 0 3px rgba(232,17,29,.12);
}
.as-input::placeholder, .site-input::placeholder, .form-control::placeholder { color: var(--as-text-subtle); }
.as-form-grid { display: grid; gap: 18px 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .as-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .as-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.as-form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.form-check-input:checked { background-color: var(--as-primary); border-color: var(--as-primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(232,17,29,.12); border-color: var(--as-primary); }
.invalid-feedback { font-size: 12px; }

/* Segmented control (artifact jobs filter). Works on <button>/<a> and Bootstrap .nav-link */
.as-seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--as-border); border-radius: 12px; background: var(--as-bg); flex-wrap: wrap; list-style: none; margin: 0; max-width: 100%; }
.as-seg > li { list-style: none; }
.as-seg__btn, .as-seg .nav-link { border: 0; background: transparent; border-radius: 9px; padding: 6px 14px; font-size: 14px; font-weight: 500;
  color: var(--as-text-muted); text-decoration: none; white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.as-seg__btn:hover, .as-seg .nav-link:hover { color: var(--as-ink); }
.as-seg__btn.is-active, .as-seg__btn.active, .as-seg .nav-link.active { background: var(--as-surface); color: var(--as-ink); box-shadow: 0 1px 2px rgba(20,20,31,.08); }

/* 9. Overlays -------------------------------------------------------------- */
.modal-content { border: 1px solid var(--as-border); border-radius: 20px; box-shadow: var(--sh-3); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--as-border); padding: 18px 24px; }
.modal-footer { border-top: 1px solid var(--as-border); padding: 14px 24px; }
.modal-title { font-family: var(--as-font-display); font-weight: 600; font-size: 18px; }
.modal-backdrop.show { opacity: .5; background: var(--as-navy); }
.offcanvas { border-left: 1px solid var(--as-border) !important; box-shadow: var(--sh-3); }
.offcanvas-header { padding: 20px 24px; border-bottom: 1px solid var(--as-border); }
.offcanvas-header h2, .offcanvas-title { font-family: var(--as-font-display); font-size: 20px; font-weight: 600; margin: 0; }
.offcanvas-body { padding: 20px 24px !important; }
.dropdown-menu { border: 1px solid var(--as-border); border-radius: 14px; box-shadow: var(--sh-2); padding: 6px; font-size: 14px; }
.dropdown-item { border-radius: 9px; padding: 8px 12px; color: var(--as-ink); display: flex; align-items: center; gap: 10px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--as-bg); color: var(--as-ink); }
.dropdown-item.active, .dropdown-item:active { background: var(--as-primary-weak); color: var(--as-red-text); }
.dropdown-item .as-ico { color: var(--as-text-muted); font-size: 16px; }
.noti-dropdown { width: min(360px, 92vw); padding: 10px 6px; }
.as-noti-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 8px; border-bottom: 1px solid var(--as-border); margin-bottom: 6px; }

/* 10. Legacy bridge -------------------------------------------------------- */
/* Primary/ghost buttons still emitted by page scripts */
.site-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 0; height: auto; width: auto;
  border-radius: 12px; border: 1px solid transparent; background: var(--as-primary) !important; color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(20,20,31,.08); text-transform: none; letter-spacing: 0;
}
.site-btn:hover { background: var(--as-primary-hover) !important; color: #fff; transform: none; box-shadow: 0 1px 2px rgba(20,20,31,.08); }
.site-btn.border-btn, .site-btn.secondary-btn { background: var(--as-surface) !important; border-color: var(--as-border); color: var(--as-ink); font-weight: 500; }
.site-btn.border-btn:hover, .site-btn.secondary-btn:hover { background: var(--as-bg) !important; color: var(--as-ink); }
.site-card, .card { background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(20,20,31,.05); }
.as-panel { border-radius: 16px; border: 1px solid var(--as-border); box-shadow: 0 1px 2px rgba(20,20,31,.05); }
.as-panel__title { font-family: var(--as-font-display); font-size: 18px; font-weight: 600; }
.rounded-input { border-radius: 12px !important; }
.red-text { color: var(--as-red-text) !important; }
.grey-text { color: var(--as-text-muted) !important; }
.placeholder { background-color: var(--as-border); border-radius: 6px; }
.page-link { border-color: var(--as-border); color: var(--as-ink); }
.page-item.active .page-link, .paginationjs .paginationjs-pages li.active > a { background: var(--as-primary) !important; border-color: var(--as-primary) !important; color: #fff !important; }
.nav-tabs { border-bottom: 1px solid var(--as-border); gap: 4px; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--as-text-muted); font-weight: 500; border-radius: 0; padding: 10px 14px; }
.nav-tabs .nav-link.active { color: var(--as-ink); border-bottom-color: var(--as-primary); background: transparent; }

/* Legacy status tag modifiers -> artifact tones */
.status-tag.status-open, .status-tag.status-upcoming, .status-tag.status-blue, .status-tag.status-checkin,
.status-tag.status-info { background: var(--as-info-weak); color: var(--as-info); }
.status-tag.status-ongoing, .status-tag.status-on_going, .status-tag.status-unpaid, .status-tag.status-checkout,
.status-tag.status-disputed, .status-tag.status-rejected, .status-tag.status-absent, .status-tag.status-no-show { background: var(--as-primary-weak); color: var(--as-red-text); }
.status-tag.status-active, .status-tag.status-approved, .status-tag.status-paid, .status-tag.status-complete,
.status-tag.status-accepted, .status-tag.status-success { background: var(--as-success-weak); color: var(--as-success); }
.status-tag.status-pending, .status-tag.status-waitlist, .status-tag.status-incomplete, .status-tag.status-shifter_approval,
.status-tag.status-admin, .status-tag.status-warning { background: var(--as-warning-weak); color: var(--as-warning); }
.status-tag.status-completed, .status-tag.status-cancelled, .status-tag.status-ended, .status-tag.status-expired,
.status-tag.status-inactive, .status-tag.status-closed { background: rgba(228,228,233,.6); color: var(--as-text-muted); }

/* 11. Auth + standalone pages ---------------------------------------------- */
.as-auth { min-height: 100vh; background: var(--as-bg); }
.as-auth__brand { background: var(--as-navy) !important; color: #fff; }
.as-auth__brand::after { background: radial-gradient(60% 50% at 80% 10%, rgba(232,17,29,.35), transparent 70%) !important; }
.as-auth__headline { font-family: var(--as-font-display); color: #fff !important; letter-spacing: -0.02em; }
.as-auth__points .svg-inline--fa, .as-auth__points i { color: var(--as-primary); }
.as-auth__card { border-radius: 20px; border: 1px solid var(--as-border); box-shadow: var(--sh-2); background: var(--as-surface); }
.as-auth__title { font-family: var(--as-font-display); font-weight: 700; letter-spacing: -0.02em; }

/* Minimal centred shell for shifter / error / index */
.as-solo { min-height: 100vh; display: flex; flex-direction: column; }
.as-solo__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--as-navy); }
.as-solo__bar img { height: 26px; }
.as-solo__main { flex: 1; padding: 28px 20px 48px; }

/* Notification dropdown + page (markup built by notifications.js) ------------ */
.as-iconbtn--bell { width: 44px; height: 44px; font-size: 22px; }
.as-iconbtn--bell .as-ico { width: 22px; height: 22px; }
.as-iconbtn--bell .noti-span { right: -4px; top: -4px; min-width: 20px; height: 20px; line-height: 16px; font-size: 11px; border: 2px solid var(--as-surface); box-shadow: none; }
.as-iconbtn--bell[aria-expanded="true"] { background: var(--as-primary-weak); color: var(--as-primary); border-color: transparent; }

.noti-dropdown { width: min(400px, 94vw); padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--as-border);
  box-shadow: 0 16px 40px rgba(20,20,31,.14), 0 2px 6px rgba(20,20,31,.06); }
.as-noti-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--as-border); margin: 0; background: var(--as-surface); }
.as-noti-head__title { margin: 0; font-family: var(--as-font-display); font-weight: 700; font-size: 16px; color: var(--as-ink); }
.as-noti-head__action { font-size: 13px; }
.notifications-list { max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.as-noti-foot { border-top: 1px solid var(--as-border); background: var(--as-surface); }
.as-noti-viewall { display: flex; align-items: center; justify-content: center; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--as-primary); text-decoration: none; }
.as-noti-viewall:hover { background: var(--as-bg); color: var(--as-primary-hover); }

.as-noti-list { display: flex; flex-direction: column; }
.as-noti { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--as-divider, var(--as-border)); transition: background .15s ease; white-space: normal; }
.as-noti:last-child { border-bottom: 0; }
.as-noti:hover, .as-noti:focus-visible { background: var(--as-bg); color: inherit; outline: none; }
.as-noti.has-link:hover .as-noti__title { color: var(--as-primary); }
.as-noti.is-unread { background: color-mix(in srgb, var(--as-primary-weak) 45%, var(--as-surface)); }
.as-noti.is-unread:hover { background: color-mix(in srgb, var(--as-primary-weak) 75%, var(--as-surface)); }
.as-noti.is-unread::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--as-primary); }
.as-noti__icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: var(--as-primary-weak); color: var(--as-primary); }
.as-noti__icon .as-ico { width: 18px; height: 18px; }
.as-noti.is-unread .as-noti__icon { background: var(--as-primary); color: #fff; }
.as-noti__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.as-noti__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.as-noti__title { font-size: 14px; font-weight: 500; color: var(--as-ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.as-noti.is-unread .as-noti__title { font-weight: 700; }
.as-noti__time { flex-shrink: 0; font-size: 12px; color: var(--as-text-muted); white-space: nowrap; }
.as-noti__msg { font-size: 13px; color: var(--as-text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-noti-list--page .as-noti__msg { -webkit-line-clamp: unset; display: block; }
.as-noti__dot { position: absolute; right: 16px; bottom: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--as-primary); }
.as-noti__mark { position: absolute; right: 12px; bottom: 10px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--as-border); border-radius: 8px;
  background: var(--as-surface); color: var(--as-text-muted); opacity: 0; transform: translateY(2px); transition: opacity .15s ease, transform .15s ease, color .15s ease; cursor: pointer; }
.as-noti__mark .as-ico { width: 14px; height: 14px; }
.as-noti:hover .as-noti__mark, .as-noti:focus-within .as-noti__mark { opacity: 1; transform: none; }
.as-noti:hover .as-noti__dot { opacity: 0; }
.as-noti__mark:hover { color: var(--as-primary); border-color: var(--as-primary); background: var(--as-primary-weak); }
@media (hover: none) { .as-noti__mark { opacity: 1; transform: none; } .as-noti__dot { display: none; } }

.as-noti-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 20px; gap: 6px; }
.as-noti-empty__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--as-bg); color: var(--as-text-muted); margin-bottom: 6px; }
.as-noti-empty__icon .as-ico { width: 22px; height: 22px; }
.as-noti-empty__title { margin: 0; font-weight: 600; color: var(--as-ink); font-size: 14px; }
.as-noti-empty__text { margin: 0; color: var(--as-text-muted); font-size: 13px; }

/* Full page (/admin/notifications) + inline (legacy business modal) variants */
.noti-dropdown--page, .noti-dropdown--inline { width: auto; box-shadow: none; border: 0; border-radius: 0; }
.noti-dropdown--page .as-noti { padding: 16px 20px; }
.noti-dropdown--page .as-noti__icon { width: 42px; height: 42px; flex-basis: 42px; }
.as-noti--skeleton { pointer-events: none; }
.as-noti--skeleton .as-noti__icon { background: var(--as-bg); }
.as-seg--buttons .as-seg__btn { cursor: pointer; }
.notifications-view-all-modal .btn-outline-primary { border-color: var(--as-border); color: var(--as-ink); border-radius: 12px; }
.notifications-view-all-modal .btn-outline-primary:hover { background: var(--as-bg); color: var(--as-ink); }

/* Legacy layout wrappers inside the v2 shell must never offset content
   (style.css gave .main-body a 260px margin + 100px top padding). */
.as-shell .main, .as-shell .main-body { margin: 0 !important; padding: 0 !important; width: auto; height: auto; min-height: 0; background: transparent; }
.as-shell .main-body > .container-fluid, .as-shell .main-body > .container { padding-left: 0; padding-right: 0; max-width: none; }
.as-shell .table-responsive { max-width: 100%; overflow-x: auto; }

/* Override legacy global `table` rules in style.css (forced 15px/25px padding,
   zebra rows, pill-rounded end cells, separated borders, grey 16px headers). */
.as-table, .as-table-card table { border-collapse: collapse !important; white-space: normal; background: transparent !important; }
.as-table th, .as-table-card table th { padding: 14px 20px !important; border: 0 !important; border-bottom: 1px solid var(--as-border) !important;
font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--as-text-muted); white-space: nowrap; background: transparent !important;
}
.as-table td, .as-table-card table td { padding: 16px 20px !important; border: 0 !important; border-top: 1px solid var(--as-border) !important;
  border-radius: 0 !important; color: var(--as-ink); font-weight: 400; font-size: 14px; white-space: nowrap; background: transparent;
}
.as-table tbody tr:first-child > td, .as-table-card table tbody tr:first-child > td { border-top: 0 !important; }
.as-table tbody tr:nth-child(2n-1) td, .as-table-card table tbody tr:nth-child(2n-1) td { background: transparent; }
.as-table tbody tr:hover > td, .as-table-card table tbody tr:hover > td { background: var(--as-bg); }
.as-table td.as-wrap, .as-table-card table td.as-wrap { white-space: normal; min-width: 220px; }

/* Filter trigger "applied" state (pages toggle .filterBtn-applied / .is-applied) */
.as-btn.filterBtn-applied, .as-btn.is-applied { background: var(--as-primary-weak) !important; border-color: transparent !important; color: var(--as-red-text) !important; }

/* Offcanvas filter panels sit above the sidebar, with their backdrop dimming it */
.offcanvas { z-index: 1060 !important; background: var(--as-surface) !important; }
.offcanvas-backdrop { z-index: 1055 !important; }
.custom_canvas .offcanvas-header { justify-content: space-between !important; padding: 20px 24px !important; }
.custom_canvas .btn-close.text-reset { position: static !important; }

/* Small utilities requested by page rewrites */
.as-card--narrow { max-width: 760px; width: 100%; }
.as-card--form { max-width: 560px; width: 100%; }
.as-icon-chip { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--as-primary-weak); color: var(--as-red-text); font-size: 18px; flex-shrink: 0; }
.as-icon-chip--lg { width: 48px; height: 48px; border-radius: 14px; font-size: 22px; }
.as-icon-chip--ok { background: var(--as-success-weak); color: var(--as-success); }
.as-dl > .as-dl__wide { grid-column: 1 / -1; }
.as-totals { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.as-totals__value { font-family: var(--as-font-display); font-size: 28px; font-weight: 700; color: var(--as-ink); }
.card-paid, .card-unpaid { padding: 0 !important; background: transparent !important; min-width: 0 !important; height: auto !important; }

/* Auth + standalone polish */
.as-auth__brandLogo { filter: none !important; }
.as-solo, .as-solo *, .as-solo *::before, .as-solo *::after { box-sizing: border-box; }
.as-solo__bar { color: #fff; }
.as-solo__bar a:not(.as-btn), .as-solo__bar .as-solo__name { color: rgba(255,255,255,.75); text-decoration: none; font-size: 14px; }
.as-solo__center { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 28px 20px; }

/* Searchbox with an inline action button; hero meta SVG icons; media tiles */
.as-searchbox:has(button) input { padding-right: 52px !important; }
.as-searchbox button { height: 34px !important; min-height: 0 !important; width: 34px; padding: 0; top: 4px; right: 4px; border-radius: 9px; }
.as-meta__item .as-ico { color: var(--as-text-muted); }
.as-tile--media { padding: 0; overflow: hidden; }
.as-tile--media > .as-tile__body { padding: 16px 20px 20px; }
.as-limit { display: inline-flex; align-items: center; gap: 8px; color: var(--as-text-muted); white-space: nowrap; }

.as-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-code { font-size: 28px; font-weight: 600; letter-spacing: .2em; color: var(--as-ink); }
.tab-content > .tab-pane > .as-dl:first-child, .tab-content > .tab-pane > .as-card:first-child { margin-top: 0; }

/* Photo avatars fill their frame; btn-check toggle groups; misc */
/* An <img> inside an avatar frame fills it; an <img> that IS the avatar keeps its size modifier. */
.as-avatar > img { width: 100%; height: 100%; object-fit: cover; }
img.as-avatar { width: 36px; height: 36px; max-width: none; object-fit: cover; flex-shrink: 0; }
img.as-avatar.as-avatar--lg { width: 64px; height: 64px; }
img.as-avatar.as-avatar--xl { width: 88px; height: 88px; }
.as-avatar > img { border-radius: inherit; }
.btn-check + .site-radio-btn, .btn-check + label.as-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--as-border); border-radius: 12px;
  background: var(--as-surface); color: var(--as-ink); font-weight: 500; cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.btn-check + .site-radio-btn:hover { background: var(--as-bg); }
.btn-check:checked + .site-radio-btn, .btn-check:checked + label.as-toggle { background: var(--as-primary-weak); border-color: var(--as-primary); color: var(--as-red-text); }
.fw-medium { font-weight: 500 !important; }
.as-row-setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--as-border); }
.as-row-setting:first-child { border-top: 0; }

/* Password reveal toggles are real <button>s now: keep the input-group look, add a visible keyboard focus ring. */
.input-group > button.input-group-text { cursor: pointer; }
.input-group > button.input-group-text:focus-visible { outline: 2px solid var(--as-primary); outline-offset: -2px; position: relative; z-index: 3; }

/* Timesheet tables are wide. Keep the row-actions column pinned to the right edge so the
   menu stays reachable while the other columns scroll sideways. */
.as-table-card .as-ts-table thead th:last-child,
.as-table-card .as-ts-table tbody td:last-child { position: sticky; right: 0; z-index: 1; background: var(--as-surface) !important; box-shadow: -1px 0 0 var(--as-border); }
.as-table-card .as-ts-table tbody tr:hover > td:last-child { background: var(--as-bg) !important; }
/* A sticky cell is its own stacking context: lift the one holding an open menu above the rows below it. */
.as-table-card .as-ts-table tbody td:last-child:focus-within,
.as-table-card .as-ts-table tbody td:last-child:has(.dropdown-menu.show) { z-index: 5; }

/* ==========================================================================
   Admin shared behaviours (admin-shared.js): busy state, export dialog,
   lightbox. Admin UAT round, Nov 2026.
   ========================================================================== */
/* Slim progress bar at the top of the viewport while API calls are in flight. */
.as-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent 0%, var(--as-primary) 40%, var(--as-primary) 60%, transparent 100%);
  background-size: 50% 100%; transition: opacity .15s ease; }
.as-progress.is-on { opacity: 1; animation: as-progress-slide 1s linear infinite; }
@keyframes as-progress-slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* Table / card overlay while a listing re-fetches (filters, search, page size). */
.is-busy { position: relative; }
.is-busy::after { content: ''; position: absolute; inset: 0; z-index: 4; border-radius: inherit;
  background: color-mix(in srgb, var(--as-surface) 55%, transparent); backdrop-filter: blur(1px); }
.is-busy::before { content: ''; position: absolute; z-index: 5; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border-radius: 50%; border: 3px solid var(--as-primary-weak); border-top-color: var(--as-primary); animation: as-spin .7s linear infinite; }
@keyframes as-spin { to { transform: rotate(360deg); } }

/* Button spinner (Filters / search / export). */
.as-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.as-btn.is-loading > * { visibility: hidden; }
.as-btn.is-loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; color: var(--as-ink); animation: as-spin .7s linear infinite; }
.as-btn--primary.is-loading::after { color: #fff; border-color: rgba(255,255,255,.35); }
.as-btn--ghost.is-loading::after { border-color: var(--as-primary-weak); color: var(--as-primary); }

/* Export dialog */
.as-export-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.as-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--as-border); border-radius: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.as-check:hover { background: var(--as-bg); }
.as-check input { width: 16px; height: 16px; accent-color: var(--as-primary); margin: 0; }
.as-check:has(input:checked) { border-color: var(--as-primary); background: var(--as-primary-weak); }

/* Lightbox */
.as-lightbox { position: fixed; inset: 0; z-index: 2100; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(20,20,31,.82); backdrop-filter: blur(4px); cursor: zoom-out; }
.as-lightbox.is-open { display: flex; animation: as-fade .15s ease; }
@keyframes as-fade { from { opacity: 0; } to { opacity: 1; } }
.as-lightbox__fig { margin: 0; max-width: min(92vw, 900px); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: default; }
.as-lightbox__fig img { max-width: 100%; max-height: 80vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; object-fit: contain; }
.as-lightbox__fig figcaption { color: #fff; font-size: 14px; font-weight: 500; }
.as-lightbox__fig figcaption:empty { display: none; }
.as-lightbox__close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.as-lightbox__close:hover { background: rgba(255,255,255,.22); }
html.as-lightbox-open { overflow: hidden; }

/* Avatars and logos always fill their frame; clickable ones hint at the lightbox. */
.as-hero .photo-circle { object-fit: cover; object-position: center; overflow: hidden; }
.as-hero img.photo-circle { cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease; }
.as-hero img.photo-circle:hover { transform: scale(1.03); box-shadow: 0 8px 20px rgba(232, 17, 29, .25); }
.as-entity-card__logo { object-fit: cover !important; object-position: center; width: 54px !important; height: 54px !important; min-width: 54px; flex: 0 0 54px; display: block; }
img[data-lightbox] { cursor: zoom-in; }

/* Employer list: companies cell */
.as-count-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--as-primary-weak); color: var(--as-red-text); font-weight: 700; font-size: 13px; cursor: default; }
.as-count-chip--zero { background: var(--as-bg); color: var(--as-text-muted); font-weight: 600; }
img.as-avatar--lg { width: 64px; height: 64px; }
.as-tooltip .tooltip-inner { white-space: pre-line; text-align: left; max-width: 280px; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
/* Company hero: the logo fills the frame (the <div class="photo-circle"> wraps an <img>). */
.as-hero div.photo-circle { display: grid; place-items: center; overflow: hidden; }
.as-hero div.photo-circle > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; cursor: zoom-in; }

/* Employer portal: company profile completion (business-company.js) ------------------- */
.as-subnav__link { position: relative; }
.as-subnav__tick { margin-left: auto; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.as-subnav__tick svg { width: 11px; height: 11px; }
.as-subnav__tick.is-done { background: var(--as-success, #1a9d5a); }
.as-subnav__tick.is-todo { background: var(--as-text-muted); opacity: .55; }
.as-subnav__tick.is-optional { display: none; }
@media (max-width: 991.98px) { .as-subnav__tick { margin-left: 6px; } }
.as-company-progress { margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--as-border); border-radius: 16px; background: var(--as-surface); box-shadow: 0 1px 2px rgba(20,20,31,.05); }
.as-company-progress__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.as-company-progress__title { margin: 0; font-weight: 700; font-size: 14px; color: var(--as-ink); }
.as-company-progress__pct { font-family: var(--as-font-display); font-weight: 700; font-size: 18px; color: var(--as-primary); }
.as-company-progress__track { height: 8px; border-radius: 4px; background: var(--as-bg); overflow: hidden; margin: 10px 0 8px; }
.as-company-progress__track span { display: block; height: 100%; border-radius: 4px; background: var(--as-primary); transition: width .3s ease; }
.as-company-progress__text { margin: 0; font-size: 12px; color: var(--as-text-muted); }
.as-company-progress--review { display: flex; gap: 12px; align-items: flex-start; background: var(--as-success-weak, #e8f6ee); border-color: transparent; }
.as-company-progress--review .as-company-progress__title { margin-bottom: 2px; }
.as-company-progress__icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--as-success, #1a9d5a); color: #fff; font-weight: 700; }
.as-alert-review { border-radius: 14px; }
.as-help { display: block; margin-top: 6px; font-size: 12px; color: var(--as-text-muted); }
.as-empty--illustrated { padding: 40px 24px; }
.as-empty__art { width: min(260px, 70%); height: auto; margin: 0 auto 14px; display: block; }
