/* ─────────────────────────────────────────────────────────────────────
   HOMEi Workforce — visual identity layer ("HOMEi Workday")
   Presentation only. RTL-safe: logical properties exclusively.
   Registered as a Filament asset — republish via `php artisan filament:assets`.
   ──────────────────────────────────────────────────────────────────── */

:root {
    --wf-radius: 12px;
    --wf-radius-sm: 8px;
    --wf-border: rgb(229 231 235);          /* gray-200 */
    --wf-border-soft: rgb(243 244 246);     /* gray-100 */
    --wf-surface: #ffffff;
    --wf-surface-soft: rgb(249 250 251);    /* gray-50 */
    --wf-ink: rgb(17 24 39);                /* gray-900 */
    --wf-muted: rgb(107 114 128);           /* gray-500 */
    --wf-faint: rgb(156 163 175);           /* gray-400 */
    --wf-danger: rgb(220 38 38);
    --wf-danger-soft: rgb(254 242 242);
    --wf-warn: rgb(180 100 10);
    --wf-warn-strong: rgb(217 119 6);
    --wf-warn-soft: rgb(255 251 235);
    --wf-ok: rgb(22 128 61);
    --wf-ok-soft: rgb(240 253 244);
    --wf-info: rgb(29 78 216);
    --wf-info-soft: rgb(239 246 255);
}

.dark {
    --wf-border: rgb(255 255 255 / 0.10);
    --wf-border-soft: rgb(255 255 255 / 0.06);
    --wf-surface: rgb(24 24 27);
    --wf-surface-soft: rgb(255 255 255 / 0.03);
    --wf-ink: rgb(244 244 245);
    --wf-muted: rgb(161 161 170);
    --wf-faint: rgb(113 113 122);
    --wf-danger: rgb(248 113 113);
    --wf-danger-soft: rgb(127 29 29 / 0.25);
    --wf-warn: rgb(217 159 70);
    --wf-warn-strong: rgb(245 158 11);
    --wf-warn-soft: rgb(120 53 15 / 0.25);
    --wf-ok: rgb(74 222 128);
    --wf-ok-soft: rgb(20 83 45 / 0.30);
    --wf-info: rgb(96 165 250);
    --wf-info-soft: rgb(30 58 138 / 0.30);
}

/* ── Typography helpers ─────────────────────────────────────────────── */
.wf-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wf-muted);
}
.wf-num { font-variant-numeric: tabular-nums; }
.wf-muted { color: var(--wf-muted); }
.wf-faint { color: var(--wf-faint); }

/* ── Greeting header (Inbox) ────────────────────────────────────────── */
.wf-greeting { display: flex; flex-direction: column; gap: 2px; margin-block-end: 4px; }
.wf-greeting-title { font-size: 22px; font-weight: 700; color: var(--wf-ink); letter-spacing: -0.01em; }
.wf-greeting-sub { font-size: 13px; color: var(--wf-muted); }

/* ── Section card ───────────────────────────────────────────────────── */
.wf-card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 14px 16px;
}
.wf-card + .wf-card { margin-block-start: 12px; }
.wf-card-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-block-end: 10px;
}
.wf-count {
    font-size: 11px;
    color: var(--wf-muted);
    background: var(--wf-surface-soft);
    border: 1px solid var(--wf-border-soft);
    border-radius: 999px;
    padding: 0 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Work rows (Inbox / queues) ─────────────────────────────────────── */
.wf-rows { display: flex; flex-direction: column; gap: 8px; }
.wf-row {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border-soft);
    border-radius: var(--wf-radius-sm);
    padding: 10px 14px;
    padding-inline-start: 18px;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.wf-row:hover { border-color: var(--wf-border); background: var(--wf-surface-soft); }
.wf-row::before {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-start: 7px;
    width: 3px;
    border-radius: 2px;
    background: var(--wf-border);
}
.wf-row.is-danger::before { background: var(--wf-danger); }
.wf-row.is-warn::before { background: var(--wf-warn-strong); }
.wf-row.is-ok::before { background: var(--wf-ok); }
.wf-row.is-info::before { background: var(--wf-info); }
.wf-row-main { flex: 1 1 220px; min-width: 0; }
.wf-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wf-ink);
    text-decoration: none;
    display: inline-block;
    line-height: 1.35;
}
a.wf-row-title:hover { text-decoration: underline; }
.wf-row-meta {
    font-size: 12px;
    color: var(--wf-muted);
    margin-block-start: 1px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
    align-items: baseline;
}
.wf-row-note-danger { color: var(--wf-danger); font-weight: 500; }
.wf-row-note-warn { color: var(--wf-warn); font-weight: 500; }
.wf-row-side { display: flex; align-items: center; gap: 8px; }

/* ── Pills / chips ──────────────────────────────────────────────────── */
.wf-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
}
.wf-pill-danger { color: var(--wf-danger); background: var(--wf-danger-soft); }
.wf-pill-warn { color: var(--wf-warn); background: var(--wf-warn-soft); }
.wf-pill-ok { color: var(--wf-ok); background: var(--wf-ok-soft); }
.wf-pill-info { color: var(--wf-info); background: var(--wf-info-soft); }
.wf-pill-quiet { color: var(--wf-muted); background: var(--wf-surface-soft); border-color: var(--wf-border-soft); }

/* ── Avatars (deterministic hue set inline via --h) ─────────────────── */
.wf-avatar {
    --h: 215;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: hsl(var(--h) 45% 32%);
    background: hsl(var(--h) 65% 92%);
    border: 1px solid hsl(var(--h) 45% 84%);
}
.dark .wf-avatar {
    color: hsl(var(--h) 70% 80%);
    background: hsl(var(--h) 45% 22% / 0.6);
    border-color: hsl(var(--h) 40% 34%);
}
.wf-avatar-lg { width: 56px; height: 56px; font-size: 18px; border-radius: 16px; }

/* ── Identity cell (Employees list) ─────────────────────────────────── */
.wf-identity { display: flex; align-items: center; gap: 10px; min-width: 0; padding-block: 2px; }
.wf-identity-name { font-size: 14px; font-weight: 600; color: var(--wf-ink); line-height: 1.3; }
.wf-identity-sub { font-size: 12px; color: var(--wf-muted); line-height: 1.3; }

/* ── Profile hero ───────────────────────────────────────────────────── */
.wf-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.wf-hero-id { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; }
.wf-hero-name { font-size: 20px; font-weight: 700; color: var(--wf-ink); letter-spacing: -0.01em; line-height: 1.2; }
.wf-hero-role { font-size: 13px; color: var(--wf-muted); margin-block-start: 2px; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.wf-hero-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px 22px;
    flex: 2 1 420px;
    border-inline-start: 1px solid var(--wf-border-soft);
    padding-inline-start: 18px;
}
@media (max-width: 720px) {
    .wf-hero-facts { border-inline-start: none; padding-inline-start: 0; }
}
.wf-fact-label { font-size: 11px; color: var(--wf-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.wf-fact-value { font-size: 13.5px; font-weight: 600; color: var(--wf-ink); margin-block-start: 1px; display: flex; align-items: center; gap: 6px; }
.wf-fact-value a { color: inherit; text-decoration: none; }
.wf-fact-value a:hover { text-decoration: underline; }
.wf-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wf-warn);
    background: var(--wf-warn-soft);
    border: 1px solid color-mix(in srgb, var(--wf-warn-strong) 25%, transparent);
    border-radius: var(--wf-radius-sm);
    padding: 8px 12px;
}

/* ── Skills rows ────────────────────────────────────────────────────── */
.wf-skills { display: flex; flex-direction: column; }
.wf-skill {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding-block: 9px;
    border-block-end: 1px solid var(--wf-border-soft);
}
.wf-skill:last-child { border-block-end: none; }
.wf-skill-name { flex: 1 1 160px; font-size: 13.5px; font-weight: 600; color: var(--wf-ink); }
.wf-dots { display: inline-flex; gap: 3px; }
.wf-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--wf-border); }
.wf-dot.on { background: var(--wf-info); }
.wf-skill-meta { font-size: 11.5px; color: var(--wf-muted); font-variant-numeric: tabular-nums; }

/* ── Timeline ───────────────────────────────────────────────────────── */
.wf-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.wf-timeline::before {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-start: 15px;
    width: 2px;
    background: var(--wf-border-soft);
}
.wf-event { position: relative; display: flex; gap: 14px; padding-block: 10px; }
.wf-event-icon {
    position: relative;
    z-index: 1;
    flex: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    color: var(--wf-muted);
}
.wf-event-icon svg { width: 15px; height: 15px; }
.wf-event.is-ok .wf-event-icon { color: var(--wf-ok); background: var(--wf-ok-soft); border-color: transparent; }
.wf-event.is-danger .wf-event-icon { color: var(--wf-danger); background: var(--wf-danger-soft); border-color: transparent; }
.wf-event.is-info .wf-event-icon { color: var(--wf-info); background: var(--wf-info-soft); border-color: transparent; }
.wf-event-body { flex: 1; min-width: 0; padding-block-start: 4px; }
.wf-event-title { font-size: 13.5px; font-weight: 600; color: var(--wf-ink); }
.wf-event-meta { font-size: 11.5px; color: var(--wf-faint); font-variant-numeric: tabular-nums; }
.wf-event-note { font-size: 12.5px; color: var(--wf-muted); margin-block-start: 2px; }

/* ── Org tree ───────────────────────────────────────────────────────── */
.wf-tree, .wf-tree ul { list-style: none; margin: 0; padding: 0; }
.wf-tree ul { padding-inline-start: 34px; position: relative; }
.wf-tree ul::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 16px;
    width: 2px;
    background: var(--wf-border-soft);
}
.wf-node { padding-block: 4px; position: relative; }
.wf-tree ul .wf-node::before {
    content: "";
    position: absolute;
    inset-inline-start: -18px;
    inset-block-start: 26px;
    width: 16px;
    height: 2px;
    background: var(--wf-border-soft);
}
.wf-node-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: 10px;
    padding: 7px 14px 7px 8px;
    padding-inline-end: 14px;
    padding-inline-start: 8px;
    text-decoration: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.wf-node-card:hover { border-color: var(--wf-info); box-shadow: 0 1px 6px rgb(0 0 0 / 0.06); }
.wf-node-name { font-size: 13.5px; font-weight: 600; color: var(--wf-ink); line-height: 1.25; }
.wf-node-sub { font-size: 11.5px; color: var(--wf-muted); line-height: 1.25; }

/* ── Task board ─────────────────────────────────────────────────────── */
.wf-board { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 12px; min-width: 940px; }
.wf-col-head { display: flex; align-items: center; gap: 7px; margin-block-end: 10px; }
.wf-col-head svg { width: 15px; height: 15px; color: var(--wf-muted); }
.wf-tcard {
    position: relative;
    display: block;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border-soft);
    border-radius: 10px;
    padding: 10px 12px;
    padding-inline-start: 16px;
    margin-block-end: 8px;
    text-decoration: none;
    transition: border-color 0.12s ease, transform 0.12s ease;
}
.wf-tcard:hover { border-color: var(--wf-info); transform: translateY(-1px); }
.wf-tcard::before {
    content: "";
    position: absolute;
    inset-block: 9px;
    inset-inline-start: 6px;
    width: 3px;
    border-radius: 2px;
    background: var(--wf-border);
}
.wf-tcard.is-danger::before { background: var(--wf-danger); }
.wf-tcard.is-warn::before { background: var(--wf-warn-strong); }
.wf-tcard.is-ok::before { background: var(--wf-ok); }
.wf-tcard.is-info::before { background: var(--wf-info); }
.wf-tcard-code { font-size: 10.5px; color: var(--wf-faint); font-variant-numeric: tabular-nums; }
.wf-tcard-title { font-size: 13px; font-weight: 600; color: var(--wf-ink); line-height: 1.35; margin-block: 1px 3px; }
.wf-tcard-meta { font-size: 11.5px; color: var(--wf-muted); }
.wf-col-empty {
    border: 1px dashed var(--wf-border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--wf-faint);
}

/* ── Empty / celebration states ─────────────────────────────────────── */
.wf-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-block: 34px; text-align: center; }
.wf-empty svg { width: 36px; height: 36px; color: var(--wf-ok); }
.wf-empty-title { font-size: 15px; font-weight: 700; color: var(--wf-ink); }
.wf-empty-sub { font-size: 12.5px; color: var(--wf-muted); }

/* ── Reserved placeholders footer ───────────────────────────────────── */
.wf-reserved {
    border: 1px dashed var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wf-reserved p { font-size: 11.5px; color: var(--wf-faint); margin: 0; }

/* ── Request wizard type grid (Filament v4 radio markup) ───────────── */
.wf-typegrid .fi-fo-radio {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.wf-typegrid .fi-fo-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    border: 1px solid var(--wf-border);
    border-radius: 10px;
    padding: 11px 13px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.wf-typegrid .fi-fo-radio-label:hover { border-color: var(--wf-info); }
.wf-typegrid .fi-fo-radio-label:has(input:checked) {
    border-color: var(--wf-info);
    background: var(--wf-info-soft);
}
.wf-confirm { display: flex; flex-direction: column; gap: 8px; }
.wf-confirm-line { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.wf-confirm-line .wf-fact-label { min-width: 120px; }

/* ── Table row status stripes (Filament tables) ─────────────────────── */
.fi-ta-row.wf-stripe-danger { box-shadow: inset 3px 0 0 0 var(--wf-danger); }
.fi-ta-row.wf-stripe-warn { box-shadow: inset 3px 0 0 0 var(--wf-warn-strong); }
[dir="rtl"] .fi-ta-row.wf-stripe-danger { box-shadow: inset -3px 0 0 0 var(--wf-danger); }
[dir="rtl"] .fi-ta-row.wf-stripe-warn { box-shadow: inset -3px 0 0 0 var(--wf-warn-strong); }

/* ── Configuration cards ────────────────────────────────────────────── */
.wf-config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.wf-config-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 14px 16px;
    text-decoration: none;
    transition: border-color 0.12s ease;
}
.wf-config-card:hover { border-color: var(--wf-info); }
.wf-config-card svg { width: 20px; height: 20px; color: var(--wf-muted); flex: none; }
.wf-config-title { font-size: 13.5px; font-weight: 600; color: var(--wf-ink); }
.wf-config-sub { font-size: 12px; color: var(--wf-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
    .wf-row { padding-inline-end: 10px; }
    .wf-row-side { width: 100%; justify-content: flex-end; }
    .wf-hero-facts { grid-template-columns: repeat(2, 1fr); }
}

/* ── Approval stepper (Request details) ─────────────────────────────── */
.wf-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; width: 100%; }
.wf-step { position: relative; display: flex; gap: 9px; align-items: flex-start; min-width: 150px; flex: 1 1 150px; }
.wf-step:not(:last-child)::after {
    content: ""; position: absolute; inset-inline-end: -20px; inset-block-start: 12px;
    width: 14px; height: 2px; background: var(--wf-border);
}
.wf-step-dot {
    flex: none; width: 26px; height: 26px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
    background: var(--wf-surface-soft); color: var(--wf-muted); border: 1px solid var(--wf-border);
}
.wf-step.is-done .wf-step-dot { background: var(--wf-ok-soft); color: var(--wf-ok); border-color: transparent; }
.wf-step.is-rejected .wf-step-dot { background: var(--wf-danger-soft); color: var(--wf-danger); border-color: transparent; }
.wf-step.is-current .wf-step-dot { background: var(--wf-info); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px var(--wf-info-soft); }
.wf-step-body { display: flex; flex-direction: column; min-width: 0; }
.wf-step-label { font-size: 12.5px; font-weight: 600; color: var(--wf-muted); }
.wf-step.is-current .wf-step-label { color: var(--wf-ink); font-size: 13px; }
.wf-step-meta { font-size: 11px; color: var(--wf-faint); }

/* ── HR strip (Inbox balances) ──────────────────────────────────────── */
.wf-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.wf-strip-chip {
    display: flex; align-items: center; gap: 9px;
    border: 1px solid var(--wf-border); border-radius: 10px;
    padding: 9px 14px; text-decoration: none; background: var(--wf-surface);
    transition: border-color 0.12s ease;
}
a.wf-strip-chip:hover { border-color: var(--wf-info); }
.wf-strip-chip svg { width: 17px; height: 17px; color: var(--wf-muted); flex: none; }
.wf-strip-label { font-size: 11px; color: var(--wf-faint); display: block; }
.wf-strip-value { font-size: 13px; font-weight: 700; color: var(--wf-ink); font-variant-numeric: tabular-nums; }

/* ═══ Dashboard consolidation (docs/59) — hero + KPI cards, Commission-family
   visual language. Logical properties throughout for intentional RTL. ═══ */

.wf-hero-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(118deg, #4f46e5 0%, #4338ca 40%, #3730a3 80%, #1e1b4b 100%);
    color: #fff;
    border-radius: 16px;
    padding: 26px 30px;
    min-height: 110px;
    text-decoration: none;
    box-shadow: 0 12px 34px rgb(67 56 202 / 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.wf-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(700px 340px at 85% -20%, rgb(255 255 255 / 0.2), transparent 60%);
    pointer-events: none;
}
a.wf-hero-card:hover { transform: translateY(-2px); filter: brightness(1.06); }
.wf-hero-card.is-clear {
    background: linear-gradient(118deg, #059669 0%, #047857 55%, #064e3b 100%);
    box-shadow: 0 12px 30px rgb(5 150 105 / 0.25);
}
.wf-hero-ic {
    width: 54px; height: 54px; border-radius: 14px;
    background: rgb(255 255 255 / 0.17);
    display: grid; place-items: center; flex: none;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2);
}
.wf-hero-ic svg { width: 28px; height: 28px; color: #fff; }
.wf-hero-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wf-hero-k { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.wf-hero-v { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.wf-hero-sub { font-size: 12.5px; opacity: 0.85; }
.wf-hero-big {
    margin-inline-start: auto;
    font-size: 58px; font-weight: 900; line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 3px 14px rgb(0 0 0 / 0.22);
}
.wf-hero-go {
    background: rgb(255 255 255 / 0.2);
    border: 1px solid rgb(255 255 255 / 0.25);
    border-radius: 11px; padding: 11px 18px;
    font-weight: 800; font-size: 14px; white-space: nowrap;
    transition: background 0.15s ease;
}
a.wf-hero-card:hover .wf-hero-go { background: rgb(255 255 255 / 0.3); }
.wf-hero-arrow { display: inline-block; }
[dir="rtl"] .wf-hero-arrow { transform: scaleX(-1); }

.wf-kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 768px) { .wf-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .wf-kpis { grid-template-columns: repeat(4, 1fr); } }

.wf-kpi {
    position: relative;
    display: flex; flex-direction: column; gap: 3px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: 13px;
    padding: 14px 16px;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.wf-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(15 23 42 / 0.08); border-color: var(--wf-info); }
a.wf-kpi:focus-visible { outline: 2px solid var(--wf-info); outline-offset: 2px; }
a.wf-kpi::after {
    content: "↗";
    position: absolute;
    bottom: 12px; inset-inline-end: 14px;
    font-size: 13px; font-weight: 700; color: var(--wf-info);
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
[dir="rtl"] a.wf-kpi::after { content: "↖"; }
a.wf-kpi:hover::after { opacity: 1; transform: translate(0, 0); }
.wf-kpi-ic {
    position: absolute; top: 13px; inset-inline-end: 13px;
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
}
.wf-kpi-ic svg { width: 19px; height: 19px; }
.wf-kpi-vl { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--wf-ink); font-variant-numeric: tabular-nums; padding-inline-end: 44px; }
.wf-kpi-lb { font-size: 12.5px; font-weight: 700; color: var(--wf-ink); }
.wf-kpi-dt { font-size: 11px; color: var(--wf-faint); }

.wf-tone-red .wf-kpi-ic  { background: var(--wf-danger-soft); color: var(--wf-danger); }
.wf-tone-orn .wf-kpi-ic  { background: var(--wf-warn-soft); color: var(--wf-warn); }
.wf-tone-grn .wf-kpi-ic  { background: var(--wf-ok-soft); color: var(--wf-ok); }
.wf-tone-blu .wf-kpi-ic  { background: var(--wf-info-soft); color: var(--wf-info); }
.wf-tone-dgn .wf-kpi-ic  { background: rgb(237 233 254); color: rgb(124 58 237); }
.wf-tone-gray .wf-kpi-ic { background: rgb(241 245 249); color: var(--wf-muted); }
.dark .wf-tone-dgn .wf-kpi-ic { background: rgb(76 29 149 / 0.35); color: rgb(196 181 253); }
.dark .wf-tone-gray .wf-kpi-ic { background: rgb(51 65 85 / 0.5); }

.wf-kpis-profile { margin-block-end: 4px; }
.wf-kpis-profile .wf-kpi-vl { font-size: 24px; }

/* Anchored sections get breathing room when jumped to. */
#wf-compliance, #wf-lifecycle { scroll-margin-top: 90px; }

/* Motion discipline: respect the user, always. */
@media (prefers-reduced-motion: reduce) {
    .wf-hero-card, .wf-kpi, .wf-hero-go, a.wf-kpi::after { transition: none; }
    a.wf-hero-card:hover, a.wf-kpi:hover { transform: none; }
}

/* ═══ Final consistency pass: period chip, live tags, SLA aggregate. ═══ */
.wf-topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wf-month-chip {
    position: relative;
    display: flex; align-items: center; gap: 9px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: 11px;
    padding: 7px 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wf-month-chip:hover { border-color: var(--wf-info); }
.wf-month-chip:focus-within { outline: 2px solid var(--wf-info); outline-offset: 1px; }
.wf-month-chip > svg { width: 17px; height: 17px; color: var(--wf-muted); flex: none; }
.wf-month-select {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.wf-kpi-legend {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; color: var(--wf-faint);
    margin-block-end: -4px;
}
.wf-live-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--wf-ok); background: var(--wf-ok-soft);
    border-radius: 5px; padding: 1px 6px;
    vertical-align: middle;
}
.wf-live-tag::before { content: "●"; font-size: 7px; }
#wf-sla { scroll-margin-top: 90px; }

/* Quiet KPI group captions (pre-pilot quick win). */
.wf-kpi-group {
    grid-column: 1 / -1;
    font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--wf-faint);
    margin-block-start: 2px;
}

/* ═══ Final acceptance pass (docs/62): request details, density, nav. ═══ */
.wf-facts-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px 22px;
    width: 100%;
    background: var(--wf-surface-soft);
    border: 1px solid var(--wf-border-soft);
    border-radius: 12px;
    padding: 14px 16px;
}
.wf-facts-wide .wf-fact-value { font-size: 14.5px; font-weight: 700; }
.wf-steps-wide { width: 100%; }
.wf-step-actions { display: inline-flex; gap: 8px; margin-block-start: 8px; flex-wrap: wrap; }
.wf-citation {
    display: flex; align-items: center; gap: 7px;
    width: 100%;
    font-size: 12px; color: var(--wf-muted);
    border-top: 1px dashed var(--wf-border);
    padding-block-start: 10px;
}

.wf-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-preview-warn {
    width: 100%;
    margin-block-start: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--wf-warn);
    background: var(--wf-warn-soft);
    border-radius: 8px; padding: 7px 10px;
}
/* Dashboard density (docs/62 §4): quiet "more metrics" expander. */
.wf-kpi-more { grid-column: 1 / -1; }
.wf-kpi-more summary {
    cursor: pointer; list-style: none;
    font-size: 12px; font-weight: 700; color: var(--wf-muted);
    padding: 6px 2px;
}
.wf-kpi-more summary:hover { color: var(--wf-info); }
.wf-kpi-more .wf-kpis { margin-block-start: 10px; }
.wf-view-all { font-size: 12px; font-weight: 700; color: var(--wf-info); text-decoration: none; }
/* Board polish (docs/62 §8): readable columns, calm scroll, RTL logical. */
.wf-board { grid-auto-columns: minmax(240px, 1fr); gap: 14px; }
.wf-tcard { border-radius: 11px; }
.wf-tcard-title { font-size: 13.5px; line-height: 1.35; }
@media (max-width: 640px) {
    .wf-board { grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: 1fr; }
}

/* ═══ Compact dashboard (docs/63 §6): tight header, hero, 2-col, minis. ═══ */
.wf-topline-tight { margin-block-end: -2px; }
.wf-hero-compact { padding: 18px 24px; min-height: 84px; }
.wf-hero-compact .wf-hero-big { font-size: 44px; }
.wf-hero-compact .wf-hero-v { font-size: 17px; }
.wf-hero-compact .wf-hero-ic { width: 44px; height: 44px; border-radius: 12px; }
.wf-hero-compact .wf-hero-ic svg { width: 22px; height: 22px; }
.wf-two-col { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 1024px) { .wf-two-col { grid-template-columns: 5fr 3fr; } }
.wf-side-col { display: flex; flex-direction: column; gap: 12px; }
.wf-side-col .wf-card { margin: 0; }
.wf-card-quiet { background: var(--wf-surface-soft); }
.wf-rows-tight .wf-row { padding-block: 7px; }
.wf-footnote { font-size: 10.5px; color: var(--wf-faint); margin: 8px 0 0; }
.wf-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wf-mini {
    position: relative;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: 12px;
    padding: 11px 13px;
    text-decoration: none;
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
a.wf-mini:hover { transform: translateY(-1px); border-color: var(--wf-info); box-shadow: 0 5px 14px rgb(15 23 42 / 0.06); }
a.wf-mini:focus-visible { outline: 2px solid var(--wf-info); outline-offset: 2px; }
.wf-mini .wf-kpi-ic { width: 28px; height: 28px; border-radius: 8px; top: 11px; }
.wf-mini .wf-kpi-ic svg { width: 15px; height: 15px; }
.wf-mini-vl { font-size: 17px; font-weight: 800; color: var(--wf-ink); padding-inline-end: 34px; }
.wf-mini-lb { font-size: 11px; font-weight: 600; color: var(--wf-muted); }
@media (prefers-reduced-motion: reduce) { .wf-mini { transition: none; } a.wf-mini:hover { transform: none; } }

/* ═══ Final UI alignment (docs/64): eyebrow icons + tasteful card energy. ═══ */
.wf-eyebrow-ic { width: 14px; height: 14px; margin-inline-end: 5px; vertical-align: -2px; display: inline-block; color: var(--wf-muted); }
/* Priority cards: a soft tone wash — colorful but calm, platform-style. */
.wf-tone-red.wf-kpi  { background: var(--wf-danger-soft); border-color: transparent; }
.wf-tone-orn.wf-kpi  { background: var(--wf-warn-soft); border-color: transparent; }
.wf-tone-grn.wf-kpi  { background: var(--wf-ok-soft); border-color: transparent; }
.wf-tone-blu.wf-kpi  { background: var(--wf-info-soft); border-color: transparent; }
.wf-tone-dgn.wf-kpi  { background: rgb(237 233 254 / 0.6); border-color: transparent; }
.dark .wf-tone-dgn.wf-kpi { background: rgb(76 29 149 / 0.2); }
.wf-kpi .wf-kpi-ic { background: var(--wf-surface); box-shadow: 0 1px 3px rgb(15 23 42 / 0.08); }
a.wf-kpi:hover { border-color: transparent; box-shadow: 0 8px 22px rgb(15 23 42 / 0.12); }
/* Minis stay quiet white — hierarchy: hero > priority > lists > minis. */
/* docs/64 correction: in-pill / stepper-dot heroicons (no emoji glyphs). */
.wf-pill-ic { width: 12px; height: 12px; margin-inline-end: 4px; display: inline-block; vertical-align: -2px; }
.wf-dot-ic { width: 13px; height: 13px; display: inline-block; }

/* ═══ Smart Manager Summary (docs/65 §1): compact, beside the hero. ═══ */
.wf-top2 { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
@media (min-width: 1024px) { .wf-top2 { grid-template-columns: 2fr 1fr; } }
.wf-top2-hero { min-width: 0; display: flex; flex-direction: column; }
.wf-top2-hero .wf-hero-card { flex: 1; }
.wf-summary-card {
    display: flex; flex-direction: column; gap: 8px;
    background: linear-gradient(150deg, rgb(237 233 254 / 0.75), var(--wf-surface) 70%);
    border: 1px solid var(--wf-border);
    border-radius: 16px;
    padding: 14px 16px;
    min-width: 0;
}
.dark .wf-summary-card { background: linear-gradient(150deg, rgb(76 29 149 / 0.25), var(--wf-surface) 70%); }
.wf-summary-card.is-loading { opacity: 0.55; }
.wf-summary-head { display: flex; align-items: center; justify-content: space-between; }
.wf-summary-refresh {
    display: grid; place-items: center;
    width: 26px; height: 26px; border-radius: 8px;
    color: var(--wf-muted); background: transparent; border: none; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.wf-summary-refresh:hover { background: var(--wf-surface-soft); color: var(--wf-info); }
.wf-summary-refresh svg { width: 15px; height: 15px; }
.wf-summary-headline { font-size: 14px; font-weight: 800; color: var(--wf-ink); line-height: 1.45; }
.wf-summary-headline.is-clear { color: var(--wf-ok); }
.wf-summary-points { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 3px; }
.wf-summary-points li { font-size: 12.5px; color: var(--wf-muted); }
.wf-summary-cta {
    align-self: flex-start;
    font-size: 12.5px; font-weight: 800; color: rgb(124 58 237);
    text-decoration: none;
}
.wf-summary-cta:hover { text-decoration: underline; }
.wf-summary-meta { margin-block-start: auto; font-size: 10.5px; color: var(--wf-faint); }
@media (prefers-reduced-motion: reduce) { .wf-summary-refresh { transition: none; } }

/* ═══ docs/65: setup CTAs, import cards, dashboard shortcut. ═══ */
.wf-setup-ctas { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .wf-setup-ctas { grid-template-columns: 1fr 1fr; } }
.wf-setup-cta {
    display: flex; align-items: center; gap: 12px; text-align: start;
    background: var(--wf-surface); border: 1px solid var(--wf-border);
    border-radius: 14px; padding: 16px 18px; cursor: pointer;
    text-decoration: none; color: var(--wf-ink);
    transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.wf-setup-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(15 23 42 / 0.1); }
.wf-setup-cta.is-primary { background: var(--wf-info-soft); border-color: transparent; }
.wf-setup-cta-title { display: block; font-size: 15px; font-weight: 800; }
.wf-import-card span { display: block; }
.wf-import-actions { display: flex; gap: 6px; margin-block-start: 8px; }
.wf-import-btn {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; color: var(--wf-muted);
    background: var(--wf-surface-soft); border: 1px solid var(--wf-border);
    border-radius: 7px; padding: 4px 8px; cursor: pointer;
}
.wf-import-btn:hover { color: var(--wf-info); border-color: var(--wf-info); }
.wf-import-btn.is-primary { color: var(--wf-info); background: var(--wf-info-soft); border-color: transparent; }
.wf-import-btn svg { width: 12px; height: 12px; }
.wf-mini-wide { grid-column: span 2; }
@media (prefers-reduced-motion: reduce) { .wf-setup-cta { transition: none; } .wf-setup-cta:hover { transform: none; } }
.wf-sprint-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-block-end: 4px; }

/* ── Local full-review mode (docs/67) — banner + view chips ─────────── */
.wf-review-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
    color: var(--wf-info); background: var(--wf-info-soft);
    border: 1px dashed color-mix(in srgb, var(--wf-info) 45%, transparent);
    margin-block-end: 8px;
}
.wf-review-banner svg { width: 15px; height: 15px; flex: none; }
.wf-review-views { display: flex; gap: 6px; flex-wrap: wrap; margin-block-end: 10px; }
.wf-review-chip {
    font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
    border: 1px solid var(--wf-border); background: transparent; cursor: pointer;
    color: var(--wf-muted); transition: color .12s ease, border-color .12s ease;
}
.wf-review-chip:hover { color: var(--wf-info); border-color: var(--wf-info); }
.wf-review-chip.is-active { color: var(--wf-info); background: var(--wf-info-soft); border-color: transparent; }

/* Review Guide */
.wf-guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.wf-guide-card { border: 1px solid var(--wf-border); border-radius: 12px; padding: 14px 16px; }
.wf-guide-card h3 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.wf-guide-card h3 svg { width: 15px; height: 15px; color: var(--wf-info); }
.wf-guide-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wf-guide-card a { font-size: 12.5px; color: inherit; text-decoration: none; display: flex; gap: 6px; align-items: baseline; }
.wf-guide-card a:hover { color: var(--wf-info); }
.wf-guide-card a::before { content: '→'; color: var(--wf-info); flex: none; }
[dir='rtl'] .wf-guide-card a::before { content: '←'; }
.wf-guide-note { font-size: 12px; color: var(--wf-muted); margin-block-start: 6px; }
