/* RecoHR shared components (E45.3, reco-devops#472; DESIGN.md §4).
   Every rule applies only inside an element with the class `ui` (:where keeps the specificity of the
   component class): redesigned pages put `ui` on their root, older pages keep their own CSS even when
   they reuse names such as .empty-state, .toast or .timeline. Ported from the approved prototype
   (reco-demo/recohr/assets/hr.css); values come from tokens.css. Mobile-first: 360 -> 560/768/1024. */


/* ---------- Base inside .ui ---------- */
:where(.ui) { font-family: var(--font-body); color: var(--ink); }
:where(.ui) h1, :where(.ui) h2, :where(.ui) h3, :where(.ui) .num { font-family: var(--font-display); color: var(--navy); letter-spacing: -0.03em; }
:where(.ui) h1 { font-size: clamp(1.55rem, 3.6vw, 2.3rem); letter-spacing: -0.042em; line-height: 1.12; margin: 0; }
:where(.ui) h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.2; margin: 0; }
:where(.ui) h3 { font-size: 1.04rem; line-height: 1.3; margin: 0; }
:where(.ui) .num { font-weight: 700; font-variant-numeric: tabular-nums; }
:where(.ui) .eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-text); }
:where(.ui) .muted { color: var(--muted); }
:where(.ui) svg.i { width: 18px; height: 18px; flex: none; vertical-align: -0.2em; }
:where(.ui) svg.i-lg { width: 22px; height: 22px; }

/* ---------- Page head ---------- */
:where(.ui) .page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
:where(.ui) .page-head p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
@media (min-width: 1024px) { :where(.ui) .page-head { margin-bottom: 26px; } }

/* ---------- Buttons (.btn + Bootstrap variants come from bootstrap-bridge.css) ---------- */
:where(.ui) .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch-min); padding: 10px 18px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; box-shadow: none; text-decoration: none; background: transparent; color: var(--navy); border: 1px solid transparent; }
:where(.ui) .btn:hover { transform: translateY(-1px); }
:where(.ui) .btn:active { transform: none; }
:where(.ui) .btn-primary { background: var(--orange-button); color: var(--white); border-color: var(--orange-button); box-shadow: 0 10px 22px rgb(242 118 34 / 0.2); }
:where(.ui) .btn-primary:hover, :where(.ui) .btn-primary:active { background: var(--orange-button-hover); color: var(--white); border-color: var(--orange-button-hover); }
:where(.ui) .btn-navy { background: var(--navy); color: var(--white); border: 1px solid var(--navy); }
:where(.ui) .btn-navy:hover { background: var(--navy-2); color: var(--white); border-color: var(--navy-2); }
:where(.ui) .btn-outline { background: var(--white); color: var(--navy); border: 1px solid var(--line); }
:where(.ui) .btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--navy); }
:where(.ui) .btn-ghost { background: transparent; color: var(--white); border: 1px solid rgb(255 255 255 / 0.5); }
:where(.ui) .btn-ghost:hover { background: rgb(255 255 255 / 0.12); color: var(--white); }
:where(.ui) .btn-light { background: var(--white); color: var(--navy); border: 1px solid var(--white); }
:where(.ui) .btn-danger-quiet { background: var(--white); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
:where(.ui) .btn-danger-quiet:hover { background: var(--danger-soft); color: var(--danger); }
:where(.ui) .btn-text { background: transparent; color: var(--navy-2); border: 0; padding-inline: 6px; }
:where(.ui) .btn-text:hover { background: var(--soft); color: var(--navy); }
:where(.ui) .btn-sm { min-height: 36px; padding: 6px 13px; font-size: 0.82rem; }
:where(.ui) .btn-block { width: 100%; }
:where(.ui) .btn[aria-busy="true"] { pointer-events: none; opacity: 0.8; }
:where(.ui) .btn[aria-busy="true"]::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ui-spin 0.7s linear infinite; }
:where(.ui) .btn:disabled, :where(.ui) .btn.disabled { background: var(--soft); color: var(--muted); border-color: var(--soft); box-shadow: none; transform: none; }
:where(.ui) .link { background: none; border: 0; padding: 0; color: var(--orange-text); font-weight: 700; font-size: 0.86rem; cursor: pointer; text-decoration: none; }
:where(.ui) .link:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
:where(.ui) .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
:where(.ui) .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
:where(.ui) .card-body { padding: 16px 18px; }
:where(.ui) .card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 50%, var(--white)); }
@media (min-width: 768px) { :where(.ui) .card-head { padding: 17px 22px; } :where(.ui) .card-body { padding: 20px 22px; } :where(.ui) .card-foot { padding: 14px 22px; } }
:where(.ui) .hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--white); background: radial-gradient(120% 140% at 100% 0%, rgb(242 118 34 / 0.26), transparent 52%), linear-gradient(115deg, var(--navy), var(--navy-2)); padding: 20px; box-shadow: var(--shadow-float); }
@media (min-width: 768px) { :where(.ui) .hero { padding: 28px 30px; } }
:where(.ui) .hero h1, :where(.ui) .hero h2, :where(.ui) .hero h3, :where(.ui) .hero .num { color: var(--white); }
:where(.ui) .hero .muted { color: rgb(255 255 255 / 0.72); }
:where(.ui) .hero .eyebrow { color: var(--accent-light); }

/* ---------- Figures ---------- */
:where(.ui) .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { :where(.ui) .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
:where(.ui) .stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; }
:where(.ui) .stat .num { display: block; font-size: 1.6rem; color: var(--navy); line-height: 1.15; }
:where(.ui) .stat .num small { font-size: 0.9rem; color: var(--muted); letter-spacing: -0.01em; }
:where(.ui) .stat .lbl { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
:where(.ui) .stat .bar { display: block; height: 5px; border-radius: 3px; background: var(--soft); margin-top: 10px; overflow: hidden; }
:where(.ui) .stat .bar i { display: block; height: 100%; background: var(--orange); border-radius: 3px; }
:where(.ui) .stat.tone-ok .num { color: var(--verified-text); }
:where(.ui) .stat.tone-warn .num { color: var(--orange-text); }
:where(.ui) .stat.tone-bad .num { color: var(--danger); }

/* ---------- Quick actions ---------- */
:where(.ui) .quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 768px) { :where(.ui) .quick { grid-template-columns: repeat(6, 1fr); gap: 12px; } }
:where(.ui) .quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: var(--radius-lg); text-decoration: none; text-align: center; font-size: 0.76rem; font-weight: 600; color: var(--ink); line-height: 1.25; background: var(--white); border: 1px solid var(--line); transition: transform 0.16s ease, box-shadow 0.16s ease; }
:where(.ui) .quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
:where(.ui) .quick .qi { position: relative; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--navy) 7%, var(--white)); color: var(--navy); }
:where(.ui) .quick .qi svg.i { width: 21px; height: 21px; }
:where(.ui) .quick .qi .count { position: absolute; top: -6px; right: -8px; }

/* ---------- Lists ---------- */
:where(.ui) .list { list-style: none; margin: 0; padding: 0; }
:where(.ui) .list > li { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
:where(.ui) .list > li:last-child { border-bottom: 0; }
@media (min-width: 768px) { :where(.ui) .list > li { padding: 14px 22px; } }
:where(.ui) .list .main { min-width: 0; flex: 1; }
:where(.ui) .list .main b { display: block; font-size: 0.92rem; color: var(--navy); letter-spacing: -0.015em; }
:where(.ui) .list .main span { display: block; font-size: 0.8rem; color: var(--muted); }
:where(.ui) .list .end { flex: 0 1 auto; max-width: 46%; text-align: right; display: grid; justify-items: end; gap: 4px; }
:where(.ui) .ico-tile { width: 40px; height: 40px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--navy); }
:where(.ui) .ico-tile.o { background: var(--notice); color: var(--orange-text); }
:where(.ui) .ico-tile.g { background: var(--verified-soft); color: var(--verified-text); }
:where(.ui) .ico-tile.b { background: var(--leave-soft); color: var(--leave); }
:where(.ui) .ico-tile.p { background: var(--wfh-soft); color: var(--wfh); }
:where(.ui) .ico-tile.r { background: var(--danger-soft); color: var(--danger); }
:where(.ui) .count { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--danger); color: var(--white); font-size: 0.66rem; font-weight: 700; box-shadow: 0 0 0 2px var(--white); }

/* ---------- Avatars ---------- */
:where(.ui) .avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; }
:where(.ui) .avatar img { width: 100%; height: 100%; object-fit: cover; }
:where(.ui) .avatar.sm { width: 32px; height: 32px; font-size: 0.7rem; }
:where(.ui) .avatar.lg { width: 56px; height: 56px; font-size: 1.05rem; }
:where(.ui) .avatars { display: flex; }
:where(.ui) .avatars .avatar { box-shadow: 0 0 0 2px var(--white); margin-left: -8px; }
:where(.ui) .avatars .avatar:first-child { margin-left: 0; }

/* ---------- Status and chips (DESIGN.md §2.2) ---------- */
:where(.ui) .st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
:where(.ui) .st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
:where(.ui) .st-ok { color: var(--verified-text); background: var(--verified-soft); }
:where(.ui) .st-wait { color: var(--orange-text); background: var(--notice); }
:where(.ui) .st-leave { color: var(--leave); background: var(--leave-soft); }
:where(.ui) .st-wfh { color: var(--wfh); background: var(--wfh-soft); }
:where(.ui) .st-trip { color: var(--navy-2); background: var(--navy-soft); }
:where(.ui) .st-bad { color: var(--danger); background: var(--danger-soft); }
:where(.ui) .st-off { color: var(--muted); background: var(--soft); }
:where(.ui) .chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 600; border: 1px solid var(--line); background: var(--white); color: var(--muted); white-space: nowrap; }
:where(.ui) .chip svg.i { width: 13px; height: 13px; }

/* ---------- Segmented tabs ---------- */
:where(.ui) .seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-md); background: var(--soft); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
:where(.ui) .seg::-webkit-scrollbar { display: none; }
:where(.ui) .seg button { flex: none; min-height: 36px; border: 0; background: transparent; padding: 7px 13px; border-radius: var(--radius-sm); font-size: 0.84rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
:where(.ui) .seg button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: 0 2px 8px rgb(8 39 67 / 0.1); }
:where(.ui) .seg .n { margin-left: 4px; font-size: 0.72rem; color: var(--orange-text); }

/* ---------- Forms ---------- */
:where(.ui) .field { display: grid; gap: 6px; }
:where(.ui) .field > span, :where(.ui) .field > label { font-size: 0.8rem; font-weight: 700; color: var(--navy); }
:where(.ui) .field .req { color: var(--danger); }
:where(.ui) .field .hint { font-size: 0.78rem; color: var(--muted); }
:where(.ui) .field .err { font-size: 0.78rem; color: var(--danger); }
:where(.ui) .inp { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: 0.95rem; }
:where(.ui) .inp:focus { outline: none; border-color: var(--navy); box-shadow: var(--focus-ring); }
:where(.ui) .inp:disabled { background: var(--soft); color: var(--muted); }
:where(.ui) .inp[aria-invalid="true"] { border-color: var(--danger); }
:where(.ui) textarea.inp { min-height: 92px; resize: vertical; }
:where(.ui) .inp-ico { position: relative; }
:where(.ui) .inp-ico svg.i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
:where(.ui) .inp-ico .inp { padding-left: 40px; }
:where(.ui) .pw { position: relative; }
:where(.ui) .pw .inp { padding-right: 48px; }
:where(.ui) .pw button { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; }
:where(.ui) .grid-2 { display: grid; gap: 12px; }
@media (min-width: 560px) { :where(.ui) .grid-2 { grid-template-columns: 1fr 1fr; } }
:where(.ui) .check { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch-min); font-size: 0.88rem; cursor: pointer; }
:where(.ui) .check input { width: 18px; height: 18px; accent-color: var(--navy); }

/* ---------- Dialog / bottom sheet ---------- */
/* margin: auto restores the UA centring of a modal <dialog>, which the global `* { margin: 0 }` reset removes. */
:where(.ui) dialog.sheet { width: min(560px, 100vw); max-width: 100vw; max-height: 92vh; margin: auto; padding: 0; border: 0; border-radius: var(--radius-xl); background: var(--white); color: var(--ink); box-shadow: var(--shadow-float); }
:where(.ui) dialog.sheet::backdrop { background: rgb(5 25 40 / 0.45); backdrop-filter: blur(2px); }
@media (max-width: 767px) { :where(.ui) dialog.sheet { margin: auto 0 0; width: 100vw; border-radius: var(--radius-xl) var(--radius-xl) 0 0; } :where(.ui) dialog.sheet[open] { animation: ui-up 0.24s ease; } }
:where(.ui) .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
:where(.ui) .sheet-head button { width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--radius-md); }
:where(.ui) .sheet-body { padding: 4px 20px 18px; display: grid; gap: 14px; overflow-y: auto; }
:where(.ui) .sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 50%, var(--white)); }
@media (max-width: 767px) { :where(.ui) .sheet-foot .btn { flex: 1; } }

/* ---------- Toasts (container gets the .ui class from ui.js) ---------- */
:where(.ui).toasts, :where(.ui) .toasts { position: fixed; z-index: 1080; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-h) + 14px); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
@media (min-width: 1024px) { :where(.ui).toasts, :where(.ui) .toasts { bottom: 24px; } }
/* Bootstrap hides .toast:not(.show) and app-combined.css has a fixed, transparent .toast (offline
   indicator): reset both; the :not() repeat wins Bootstrap's specificity. */
:where(.ui) .toast, :where(.ui) .toast:not(.show) { position: relative; inset: auto; transform: none; opacity: 1; z-index: auto; width: auto; max-width: 100%; border: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--navy); color: var(--white); font-size: 0.88rem; box-shadow: var(--shadow-float); animation: ui-up 0.2s ease; }
:where(.ui) .toast.err { background: var(--danger); }
:where(.ui) .toast button { margin-left: auto; min-height: 36px; background: none; border: 0; color: var(--accent-light); font-weight: 700; cursor: pointer; }
:where(.ui) .toast.err button { color: var(--white); text-decoration: underline; }

/* ---------- Empty state ---------- */
:where(.ui) .empty-state { text-align: center; padding: 34px 18px; color: var(--muted); }
:where(.ui) .empty-state .ico-tile { margin: 0 auto 10px; width: 52px; height: 52px; border-radius: 16px; }
:where(.ui) .empty-state b { display: block; color: var(--navy); font-size: 1rem; margin-bottom: 4px; }
:where(.ui) .empty-state .btn { margin-top: 14px; }

/* ---------- Table → cards under 768 px ---------- */
:where(.ui) .tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
:where(.ui) .tbl th { text-align: left; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: color-mix(in srgb, var(--soft) 45%, var(--white)); }
:where(.ui) .tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
:where(.ui) .tbl tbody tr:last-child td { border-bottom: 0; }
:where(.ui) .tbl tbody tr:hover { background: color-mix(in srgb, var(--soft) 45%, var(--white)); }
@media (max-width: 767px) {
  :where(.ui) .tbl, :where(.ui) .tbl tbody, :where(.ui) .tbl tr, :where(.ui) .tbl td { display: block; width: 100%; }
  :where(.ui) .tbl thead { display: none; }
  :where(.ui) .tbl tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  :where(.ui) .tbl tbody tr:last-child { border-bottom: 0; }
  :where(.ui) .tbl td { border: 0; padding: 5px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  :where(.ui) .tbl td::before { content: attr(data-l); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  :where(.ui) .tbl td.first { padding-top: 8px; }
  :where(.ui) .tbl td.first::before { display: none; }
}

/* ---------- Month calendar ---------- */
:where(.ui) .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
:where(.ui) .cal > * { min-width: 0; }
@media (max-width: 379px) { :where(.ui) .cal { gap: 3px; } :where(.ui) .cal .dow { letter-spacing: 0; } :where(.ui) .day { padding: 2px; border-radius: 8px; } }
:where(.ui) .cal .dow { text-align: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
:where(.ui) .day { position: relative; aspect-ratio: 1 / 1.05; min-height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--navy); cursor: pointer; padding: 4px; }
@media (min-width: 768px) { :where(.ui) .day { aspect-ratio: 1.25 / 1; align-items: flex-start; justify-content: space-between; padding: 8px 10px; } }
:where(.ui) .day small { display: none; font-size: 0.68rem; font-weight: 600; line-height: 1.2; text-align: left; }
@media (min-width: 768px) { :where(.ui) .day small { display: block; } }
:where(.ui) .day::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
@media (min-width: 768px) { :where(.ui) .day::after { position: absolute; top: 10px; right: 10px; } }
:where(.ui) .day.ok::after { background: var(--verified); }
:where(.ui) .day.ok small { color: var(--verified-text); }
:where(.ui) .day.late::after { background: var(--orange); }
:where(.ui) .day.late small { color: var(--orange-text); }
:where(.ui) .day.leave { background: color-mix(in srgb, var(--leave) 7%, var(--white)); }
:where(.ui) .day.leave::after { background: var(--leave); }
:where(.ui) .day.leave small { color: var(--leave); }
:where(.ui) .day.wfh { background: color-mix(in srgb, var(--wfh) 7%, var(--white)); }
:where(.ui) .day.wfh::after { background: var(--wfh); }
:where(.ui) .day.wfh small { color: var(--wfh); }
:where(.ui) .day.miss { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 5%, var(--white)); }
:where(.ui) .day.miss::after { background: var(--danger); }
:where(.ui) .day.miss small { color: var(--danger); }
:where(.ui) .day.off { background: transparent; border-style: dashed; color: var(--muted); font-weight: 600; }
:where(.ui) .day.future { color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--soft) 40%, var(--white)); }
:where(.ui) .day.today { border: 2px solid var(--orange); }
:where(.ui) .day.today small { color: var(--orange-text); }
:where(.ui) .day[aria-pressed="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 22%, transparent); border-color: var(--navy); }
:where(.ui) .day.empty { visibility: hidden; }
:where(.ui) .legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.78rem; color: var(--muted); }
:where(.ui) .legend span { display: inline-flex; align-items: center; gap: 6px; }
:where(.ui) .legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Timeline ---------- */
:where(.ui) .timeline { list-style: none; margin: 0; padding: 0; display: grid; }
:where(.ui) .timeline > li { position: relative; padding: 0 0 16px 26px; }
:where(.ui) .timeline > li::before { content: ''; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--orange); background: var(--white); box-sizing: border-box; }
:where(.ui) .timeline > li.done::before { border-color: var(--verified); background: var(--verified); }
:where(.ui) .timeline > li:not(:last-child)::after { content: ''; position: absolute; left: 6px; top: 20px; bottom: 2px; width: 2px; background: var(--line); }
:where(.ui) .timeline b { display: block; font-size: 0.9rem; color: var(--navy); }
:where(.ui) .timeline span { font-size: 0.8rem; color: var(--muted); }

/* ---------- Bulk action bar ---------- */
:where(.ui) .bulkbar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--navy); color: var(--white); box-shadow: var(--shadow-float); }
:where(.ui) .bulkbar .acts { margin-left: auto; display: flex; gap: 8px; }
:where(.ui) .bulkbar[hidden] { display: none; }

/* ---------- Key–value list ---------- */
:where(.ui) .kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; font-size: 0.88rem; }
:where(.ui) .kv dt { color: var(--muted); }
:where(.ui) .kv dd { margin: 0; font-weight: 600; color: var(--navy); text-align: right; }

/* ---------- Skeleton ---------- */
:where(.ui) .skel { display: block; height: 12px; border-radius: var(--radius-sm); background: var(--soft); animation: ui-pulse 1.1s ease-in-out infinite alternate; }
:where(.ui) .skel + .skel { margin-top: 10px; }
:where(.ui) .skel.w60 { width: 60%; }
:where(.ui) .skel.h18 { height: 18px; }

/* ---------- E47 daily pages: layout, "Today" hero, quick tones, news rows (reco-devops#480) ----------
   Bootstrap owns .row, .progress and the !important .mt-* utilities, so the prototype's versions are
   not ported under those names (.row-wrap, `.today .progress` and the .stack gap are used instead). */
@media (min-width: 1024px) { :where(.ui).stack, :where(.ui) .stack { gap: 18px; } }
:where(.ui) .spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
:where(.ui) .small { font-size: 0.84rem; }
:where(.ui) .micro { font-size: 0.75rem; color: var(--muted); }
:where(.ui) .cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
:where(.ui) .cols > *, :where(.ui) .stack > * { min-width: 0; }
@media (min-width: 1024px) {
  :where(.ui) .cols { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
  :where(.ui) .cols .side { position: sticky; top: calc(var(--header-h) + 20px); }
}
:where(.ui) .icon-btn { position: relative; width: var(--touch-min); height: var(--touch-min); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; text-decoration: none; }
:where(.ui) .icon-btn:hover { border-color: var(--navy); }
:where(.ui) .icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--white); }
:where(.ui) .quick .qi.o { background: var(--notice); color: var(--orange-text); }
:where(.ui) .quick .qi.g { background: var(--verified-soft); color: var(--verified-text); }
:where(.ui) .quick .qi.b { background: var(--leave-soft); color: var(--leave); }
:where(.ui) .quick .qi.p { background: var(--wfh-soft); color: var(--wfh); }
:where(.ui) .quick .qi i { font-size: 1.15rem; }
@media (max-width: 767px) { :where(.ui) .quick .hide-sm { display: none; } }
:where(.ui) .today { display: grid; gap: 18px; }
@media (min-width: 768px) { :where(.ui) .today { grid-template-columns: 1fr auto; align-items: center; } }
:where(.ui) .today .times { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 14px; }
:where(.ui) .today .times span { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgb(255 255 255 / 0.66); font-weight: 700; }
:where(.ui) .today .times .num { font-size: 1.7rem; }
:where(.ui) .today .progress { display: block; height: 6px; border-radius: 3px; background: rgb(255 255 255 / 0.16); overflow: hidden; margin-top: 14px; }
:where(.ui) .today .progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-light), var(--orange)); }
:where(.ui) .today .micro { color: rgb(255 255 255 / 0.72); margin: 8px 0 0; }
:where(.ui) .pill-light { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.12); color: var(--white); font-size: 0.76rem; font-weight: 600; }
:where(.ui) .pill-light.ok { background: color-mix(in srgb, var(--verified) 32%, transparent); color: var(--verified-soft); }
:where(.ui) .pill-light svg.i { width: 14px; height: 14px; }
:where(.ui) .post { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
:where(.ui) .post:last-child { border-bottom: 0; }
:where(.ui) .post.no-img { grid-template-columns: minmax(0, 1fr); }
:where(.ui) .post img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-md); }
:where(.ui) .post b { display: block; color: var(--navy); font-size: 0.92rem; line-height: 1.3; letter-spacing: -0.015em; }
:where(.ui) .post:hover b { text-decoration: underline; }
@media (min-width: 768px) { :where(.ui) .post { padding: 14px 22px; } }
:where(.ui) .stats.fit { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
:where(.ui) .list > li.has-link { padding: 0; }
:where(.ui) .list a.li-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 13px 18px; color: inherit; text-decoration: none; }
:where(.ui) .list a.li-link:hover b { text-decoration: underline; }
@media (min-width: 768px) {
  :where(.ui) .list a.li-link { padding: 14px 22px; }
  :where(.ui) .list.two-col { display: grid; grid-template-columns: 1fr 1fr; }
  :where(.ui) .list.two-col > li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
:where(.ui) .ico-tile > i { font-size: 1.05rem; }
:where(.ui) .list > li.muted { font-size: 0.86rem; }


/* ---------- Layout helpers ---------- */
:where(.ui).wrap, :where(.ui) .wrap { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 18px var(--gutter) 40px; }
:where(.ui).stack, :where(.ui) .stack { display: grid; gap: 14px; }
:where(.ui) .row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:where(.ui) .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Motion ---------- */
@keyframes ui-up { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-pulse { from { opacity: 0.55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  :where(.ui) *, :where(.ui) *::before, :where(.ui) *::after { animation: none !important; transition: none !important; }
}
