/* Workflow service UI. Builds on the Portal palette; RTL-safe (logical properties only). */
:root {
    --wf-primary: #195c75;
    --wf-primary-600: #144b60;
    --wf-deep: #173e55;
    --wf-ink: #17324a;
    --wf-text: #2c4558;
    --wf-muted: #6a8092;
    --wf-line: #e2e9ef;
    --wf-line-strong: #cfdbe4;
    --wf-soft: #f4f8fb;
    --wf-softer: #f9fbfd;
    --wf-mint: #76d7bc;
    --wf-ok: #1f7a4d;
    --wf-ok-bg: #e8f5ee;
    --wf-warn: #b86e0b;
    --wf-warn-bg: #fdf3e2;
    --wf-bad: #c0392b;
    --wf-bad-bg: #fcebea;
    --wf-info-bg: #e7f1f5;
    --wf-radius: 14px;
    --wf-shadow: 0 1px 2px #0d2c4010, 0 6px 22px #0d2c400b;
    --wf-shadow-lg: 0 18px 50px #0d2c4022;
}

.wf { color: var(--wf-text); }
.wf h1, .wf h2, .wf h3, .wf h4, .wf h5 { color: var(--wf-ink); }
.wf a { color: var(--wf-primary); }
.wf .text-muted, .wf .wf-muted { color: var(--wf-muted) !important; }
.wf svg.feather { width: 17px; height: 17px; vertical-align: -3px; }
.wf .btn { border-radius: 10px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.wf .btn-primary { background: var(--wf-primary); border-color: var(--wf-primary); }
.wf .btn-primary:hover { background: var(--wf-primary-600); border-color: var(--wf-primary-600); }
.wf .btn-light { background: #fff; border: 1px solid var(--wf-line-strong); color: var(--wf-text); }
.wf .btn-light:hover { background: var(--wf-soft); }
.wf .btn-ghost { background: transparent; border: 1px solid transparent; color: var(--wf-muted); }
.wf .btn-ghost:hover { background: var(--wf-soft); color: var(--wf-ink); }
.wf .form-control, .wf .form-select { border-radius: 10px; border-color: var(--wf-line-strong); min-height: 42px; }
.wf textarea.form-control { min-height: 96px; }
.wf .form-label { font-weight: 600; font-size: 13px; color: var(--wf-ink); margin-bottom: 6px; }
.wf .form-text { color: var(--wf-muted); font-size: 12px; }
.wf .invalid-feedback { display: block; }

/* ---------- header ---------- */
.wf-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 26px 30px; margin-bottom: 18px; border-radius: 18px; color: #fff;
    background: radial-gradient(ellipse at 100% 0%, #2a8199 0, transparent 60%), radial-gradient(ellipse at 0% 120%, #1f6d73 0, transparent 55%), var(--wf-deep);
}
html[dir=rtl] .wf-hero { background: radial-gradient(ellipse at 0% 0%, #2a8199 0, transparent 60%), radial-gradient(ellipse at 100% 120%, #1f6d73 0, transparent 55%), var(--wf-deep); }
.wf-hero::after { content: ""; position: absolute; inset-inline-end: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 40px solid #ffffff0a; pointer-events: none; }
.wf-hero .wf-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.4px; color: #bfdbe6; font-weight: 600; margin-bottom: 8px; }
.wf-hero .wf-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wf-mint); box-shadow: 0 0 0 4px #76d7bc33; }
.wf-hero h1 { color: #fff !important; font-size: 26px; margin: 0 0 6px; font-weight: 700; }
.wf-hero p { color: #d3e5ee; margin: 0; max-width: 640px; font-size: 14px; line-height: 1.8; }
.wf-hero .wf-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.wf-hero .btn-hero { background: #fff; color: var(--wf-deep); border: 0; }
.wf-hero .btn-hero:hover { background: #e8f3f7; color: var(--wf-deep); }
.wf-hero .btn-hero-ghost { background: #ffffff14; color: #fff; border: 1px solid #ffffff2e; }
.wf-hero .btn-hero-ghost:hover { background: #ffffff24; color: #fff; }

/* ---------- sub navigation ---------- */
.wf-subnav { display: flex; gap: 4px; padding: 5px; background: #fff; border: 1px solid var(--wf-line); border-radius: 13px; margin-bottom: 20px; overflow-x: auto; box-shadow: var(--wf-shadow); }
.wf-subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; color: var(--wf-muted); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .18s, color .18s; }
.wf-subnav a:hover { background: var(--wf-soft); color: var(--wf-ink); }
.wf-subnav a.active { background: var(--wf-info-bg); color: var(--wf-primary); }
.wf-subnav .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--wf-primary); color: #fff; font-size: 11px; font-weight: 700; }
.wf-subnav .count.bad { background: var(--wf-bad); }
.wf-subnav .spacer { flex: 1; }

/* ---------- cards ---------- */
.wf-card { background: #fff; border: 1px solid var(--wf-line); border-radius: var(--wf-radius); box-shadow: var(--wf-shadow); margin-bottom: 18px; }
.wf-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 0; flex-wrap: wrap; }
.wf-card-head h2, .wf-card-head h3 { font-size: 16px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 9px; }
.wf-card-head p { margin: 4px 0 0; font-size: 13px; color: var(--wf-muted); }
.wf-card-body { padding: 18px 20px 20px; }
.wf-card-body.flush { padding: 0; }
.wf-card-foot { padding: 14px 20px; border-top: 1px solid var(--wf-line); background: var(--wf-softer); border-radius: 0 0 var(--wf-radius) var(--wf-radius); }
.wf-section-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--wf-info-bg); color: var(--wf-primary); flex-shrink: 0; }
.wf-section-icon svg.feather { width: 16px; height: 16px; vertical-align: 0; }

/* ---------- KPIs ---------- */
.wf-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.wf-kpi { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--wf-line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--wf-shadow); color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.wf-kpi:hover { transform: translateY(-3px); box-shadow: var(--wf-shadow-lg); border-color: color-mix(in srgb, var(--k, var(--wf-primary)) 35%, #fff); color: inherit; }
.wf-kpi::after { content: ""; position: absolute; inset-inline-end: -26px; bottom: -26px; width: 86px; height: 86px; border-radius: 50%; background: color-mix(in srgb, var(--k, var(--wf-primary)) 7%, transparent); }
.wf-kpi .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; color: var(--k, var(--wf-primary)); background: color-mix(in srgb, var(--k, var(--wf-primary)) 12%, #fff); }
.wf-kpi .ic svg.feather { width: 21px; height: 21px; vertical-align: 0; }
.wf-kpi .txt { display: flex; flex-direction: column; min-width: 0; }
.wf-kpi .label { font-size: 12.5px; color: var(--wf-muted); font-weight: 600; line-height: 1.4; }
.wf-kpi strong { display: block; font-size: 28px; line-height: 1.15; color: var(--wf-ink); font-weight: 800; letter-spacing: -.5px; }
.wf-kpi.bad strong { color: var(--wf-bad); }
.wf-kpi.bad { --k: var(--wf-bad); }
.wf-kpi.warn { --k: var(--wf-warn); }
.wf-kpi.ok { --k: var(--wf-ok); }
.wf-kpi.violet { --k: #6d5bd0; }

/* ---------- pills & badges ---------- */
.wf-dept { --c: var(--wf-primary); display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); }
.wf-dept .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.wf-dept svg.feather { width: 13px; height: 13px; vertical-align: 0; }
.wf-dept.lg { padding: 7px 14px 7px 11px; font-size: 14px; }
.wf-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.wf-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wf-status.open { color: var(--wf-primary); background: var(--wf-info-bg); }
.wf-status.on_hold { color: var(--wf-warn); background: var(--wf-warn-bg); }
.wf-status.completed { color: var(--wf-ok); background: var(--wf-ok-bg); }
.wf-status.rejected, .wf-status.cancelled { color: var(--wf-bad); background: var(--wf-bad-bg); }
.wf-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--wf-soft); color: var(--wf-text); border: 1px solid var(--wf-line); white-space: nowrap; }
.wf-tag.media-static { background: #eef2ff; color: #4338ca; border-color: #dfe3fb; }
.wf-tag.media-screen { background: #ecfeff; color: #0e7490; border-color: #cdf3f8; }
.wf-tag.gift { background: #fdf2f8; color: #be185d; border-color: #f9d7ea; }
.wf-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; color: var(--wf-ink); letter-spacing: .3px; direction: ltr; unicode-bidi: isolate; }

/* deadline */
.wf-deadline { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.wf-deadline svg.feather { width: 14px; height: 14px; vertical-align: 0; }
.wf-deadline.ok { color: var(--wf-ok); background: var(--wf-ok-bg); }
.wf-deadline.soon { color: var(--wf-warn); background: var(--wf-warn-bg); }
.wf-deadline.overdue, .wf-deadline.late { color: var(--wf-bad); background: var(--wf-bad-bg); }
.wf-deadline.overdue { animation: wf-pulse 2.4s ease-in-out infinite; }
.wf-deadline.done { color: var(--wf-muted); background: var(--wf-soft); }
@keyframes wf-pulse { 0%, 100% { box-shadow: 0 0 0 0 #c0392b00; } 50% { box-shadow: 0 0 0 4px #c0392b1f; } }

/* ---------- tables ---------- */
.wf-table-wrap { overflow-x: auto; }
.wf-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.wf-table th { position: sticky; top: 0; background: var(--wf-softer); color: var(--wf-muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 12px 14px; border-bottom: 1px solid var(--wf-line); white-space: nowrap; text-align: start; }
html[dir=rtl] .wf-table th { text-transform: none; letter-spacing: 0; font-size: 13px; }
.wf-table td { padding: 13px 14px; border-bottom: 1px solid var(--wf-line); vertical-align: middle; text-align: start; }
.wf-table tbody tr { transition: background .15s; }
.wf-table tbody tr:hover { background: #f7fafc; }
.wf-table tbody tr.is-overdue { background: linear-gradient(90deg, #fcebea80, transparent 40%); }
html[dir=rtl] .wf-table tbody tr.is-overdue { background: linear-gradient(270deg, #fcebea80, transparent 40%); }
.wf-table tr:last-child td { border-bottom: 0; }
.wf-table .row-link { color: inherit; display: block; }
.wf-table td.cell-data { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.wf-brief dd[dir=auto], .wf-bubble .body[dir=auto] { text-align: start; unicode-bidi: plaintext; }
.wf-table .title { font-weight: 700; color: var(--wf-ink); }
.wf-table .sub { font-size: 12px; color: var(--wf-muted); margin-top: 2px; }
.wf-mini-journey { display: flex; align-items: center; gap: 3px; margin-top: 6px; }
.wf-mini-journey span { width: 16px; height: 5px; border-radius: 3px; background: var(--c, var(--wf-line-strong)); opacity: .45; }
.wf-mini-journey span.current { opacity: 1; width: 24px; }

/* ---------- filters ---------- */
.wf-filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wf-search { position: relative; flex: 1 1 260px; }
.wf-search svg.feather { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--wf-muted); }
.wf-search .form-control { padding-inline-start: 40px; }
.wf-filter-panel { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--wf-line-strong); }
.wf-filter-panel.show { display: block; }
.wf-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.wf-range { display: flex; gap: 6px; align-items: center; }
.wf-range .form-control { min-width: 0; }
.wf-range span { color: var(--wf-muted); font-size: 12px; }
.wf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--wf-line-strong); background: #fff; color: var(--wf-text); font-size: 13px; font-weight: 600; }
.wf-chip:hover { border-color: var(--wf-primary); color: var(--wf-primary); }
.wf-chip.active { background: var(--wf-primary); color: #fff; border-color: var(--wf-primary); }
.wf-chip .n { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #00000012; }
.wf-chip.active .n { background: #ffffff2e; }

/* ---------- inbox cards ---------- */
.wf-inbox-list { display: grid; gap: 10px; }
.wf-inbox-item { display: grid; grid-template-columns: 4px 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--wf-line); border-radius: 14px; padding: 13px 16px 13px 0; color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s; }
html[dir=rtl] .wf-inbox-item { padding: 13px 0 13px 16px; }
.wf-inbox-item.is-new { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 5%, #fff), #fff 45%); }
html[dir=rtl] .wf-inbox-item.is-new { background: linear-gradient(270deg, color-mix(in srgb, var(--c) 5%, #fff), #fff 45%); }
.wf-inbox-item .main { min-width: 0; }
.wf-inbox-item h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-inbox-item .wf-code { font-size: 12px; color: var(--wf-muted); font-weight: 600; }
.wf-pill-new { font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #fff; background: var(--wf-bad); padding: 2px 7px; border-radius: 6px; }

/* initials tiles */
.wf-tile { --c: var(--wf-primary); width: 44px; height: 44px; border-radius: 13px; display: inline-grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: 15px; letter-spacing: .3px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c) 20%, #fff); }
.wf-tile.sm { width: 30px; height: 30px; border-radius: 50%; font-size: 11.5px; }
.wf-tile.bad { --c: var(--wf-bad); }
.wf-tile svg.feather { width: 14px; height: 14px; vertical-align: 0; }

/* tabs */
.wf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--wf-line); margin: -4px 0 16px; overflow-x: auto; }
.wf-tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 13px; color: var(--wf-muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.wf-tabs a:hover { color: var(--wf-ink); }
.wf-tabs a.active { color: var(--wf-primary); }
.wf-tabs a.active::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--wf-primary); }
.wf-tabs .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11px; background: var(--wf-info-bg); color: var(--wf-primary); }
.wf-tabs .n.bad { background: var(--wf-bad-bg); color: var(--wf-bad); }

.wf-group-head { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; font-size: 12.5px; font-weight: 800; color: var(--wf-muted); text-transform: uppercase; letter-spacing: .5px; }
html[dir=rtl] .wf-group-head { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.wf-group-head:first-of-type { margin-top: 4px; }
.wf-group-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wf-primary); }
.wf-group-head.overdue { color: var(--wf-bad); }
.wf-group-head.overdue .dot { background: var(--wf-bad); box-shadow: 0 0 0 4px #c0392b1f; }
.wf-group-head.today .dot { background: var(--wf-warn); }
.wf-group-head .n { margin-inline-start: 2px; padding: 1px 8px; border-radius: 9px; background: var(--wf-soft); color: var(--wf-text); font-size: 11.5px; }
.wf-group-head::after { content: ""; flex: 1; height: 1px; background: var(--wf-line); }

/* activity feed */
.wf-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wf-feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; position: relative; }
.wf-feed li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 14px; top: 34px; bottom: -12px; width: 2px; background: var(--wf-line); }
.wf-feed p { margin: 0; font-size: 13px; color: var(--wf-text); line-height: 1.5; }
.wf-feed p b { color: var(--wf-ink); }
.wf-feed a { display: block; font-size: 12.5px; font-weight: 700; color: var(--wf-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-feed a .wf-code { font-size: 11px; color: var(--wf-muted); font-weight: 600; }
.wf-feed time { font-size: 11.5px; color: var(--wf-muted); }

/* greeting hero */
.wf-hero-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.wf-hero-stats a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #ffffff14; border: 1px solid #ffffff22; color: #d3e5ee !important; font-size: 13px; font-weight: 600; transition: background .15s; }
html[dir=rtl] .wf-hero-stats a { padding: 6px 6px 6px 12px; }
.wf-hero-stats a:hover { background: #ffffff24; }
.wf-hero-stats b { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; display: inline-grid; place-items: center; background: #fff; color: var(--wf-deep); font-size: 13px; }
.wf-hero-stats a.bad b { background: #ff7b6b; color: #fff; }
.wf-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(#ffffff14 1px, transparent 1px); background-size: 18px 18px;
    mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); }
html[dir=rtl] .wf-hero::before { mask-image: linear-gradient(270deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(270deg, transparent, #000 70%); }
.wf-hero > * { position: relative; z-index: 1; }

/* header initials (no uploaded photo) */
.header .wf-initials { width: 100%; height: 100%; min-width: 36px; min-height: 36px; display: grid; place-items: center; border-radius: inherit; background: linear-gradient(135deg, #2a8199, #173e55); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .3px; }
.wf-inbox-item:hover { border-color: var(--wf-line-strong); box-shadow: var(--wf-shadow-lg); transform: translateY(-1px); color: inherit; }
.wf-inbox-item .bar { align-self: stretch; border-radius: 0 4px 4px 0; background: var(--c, var(--wf-primary)); margin-block: -14px; }
html[dir=rtl] .wf-inbox-item .bar { border-radius: 4px 0 0 4px; }
.wf-inbox-item .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.wf-inbox-item h3 { font-size: 15.5px; font-weight: 700; margin: 0; }
.wf-inbox-item .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--wf-muted); }
.wf-inbox-item .meta span { display: inline-flex; align-items: center; gap: 5px; }
.wf-inbox-item .meta svg.feather { width: 13px; height: 13px; vertical-align: 0; }
.wf-inbox-item .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.wf-new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wf-bad); box-shadow: 0 0 0 3px #c0392b26; }

.wf-load { display: grid; gap: 12px; }
.wf-load-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; color: inherit; }
.wf-load-row:hover { color: inherit; }
.wf-load-row > .wf-dept { justify-self: start; }
.wf-load-row .name { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--wf-ink); min-width: 0; }
.wf-load-row .name .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.wf-load-row { padding: 6px 8px; margin: -6px -8px; border-radius: 10px; transition: background .15s; }
.wf-load-row:hover, .wf-load-row.active { background: var(--wf-soft); }
.wf-load-row .bar { grid-column: 1 / -1; height: 7px; background: var(--wf-soft); border-radius: 4px; overflow: hidden; display: flex; }
.wf-load-row .bar i { display: block; height: 100%; background: var(--c); }
.wf-load-row .bar i.over { background: var(--wf-bad); }
.wf-load-row .nums { font-size: 12.5px; color: var(--wf-muted); white-space: nowrap; }
.wf-load-row .nums b { color: var(--wf-ink); }
.wf-load-row .nums .bad { color: var(--wf-bad); font-weight: 700; }

/* ---------- request page ---------- */
.wf-request-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.wf-request-head .badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.wf-request-head h1 { font-size: 24px; margin: 0 0 6px; }
.wf-request-head .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #d3e5ee; }
.wf-request-head .meta span { display: inline-flex; gap: 6px; align-items: center; }
.wf-request-head .meta svg.feather { width: 14px; height: 14px; vertical-align: 0; }
.wf-hero .wf-status.open { background: #ffffff1f; color: #fff; }
.wf-hero .wf-tag { background: #ffffff1a; color: #fff; border-color: #ffffff2b; }

.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.wf-sticky { position: sticky; top: 80px; }

/* journey stepper */
.wf-journey { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.wf-step { position: relative; flex: 0 0 auto; min-width: 168px; max-width: 220px; padding-inline-end: 26px; scroll-snap-align: start; }
.wf-step::after { content: ""; position: absolute; top: 17px; inset-inline-start: 38px; inset-inline-end: 4px; height: 2px; background: var(--wf-line-strong); }
.wf-step:last-child::after { display: none; }
.wf-step.done::after { background: color-mix(in srgb, var(--c) 45%, #fff); }
.wf-step .node { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--c); color: var(--c); }
.wf-step .node svg.feather { width: 16px; height: 16px; vertical-align: 0; }
.wf-step.done .node { background: var(--c); color: #fff; }
.wf-step.current .node { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); animation: wf-node 2.2s ease-in-out infinite; }
.wf-step.late .node::after { content: ""; position: absolute; top: -2px; inset-inline-end: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--wf-bad); border: 2px solid #fff; }
@keyframes wf-node { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent); } 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--c) 8%, transparent); } }
.wf-step h4 { font-size: 14px; font-weight: 700; margin: 10px 0 3px; }
.wf-step .when { font-size: 12px; color: var(--wf-muted); }
.wf-step .took { font-size: 12px; margin-top: 4px; font-weight: 600; color: var(--wf-text); }
.wf-step .took.late { color: var(--wf-bad); }
.wf-step .via { display: block; margin-top: 4px; font-size: 11.5px; color: var(--wf-muted); }

/* brief */
.wf-brief { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 18px; }
.wf-brief > div { grid-column: span var(--w, 6); min-width: 0; }
.wf-brief dt { font-size: 12px; font-weight: 600; color: var(--wf-muted); margin-bottom: 3px; }
.wf-brief dd { margin: 0; font-weight: 600; color: var(--wf-ink); word-wrap: break-word; white-space: pre-line; }
.wf-brief dd.empty { color: var(--wf-line-strong); font-weight: 400; }
.wf-brief .chips { display: flex; flex-wrap: wrap; gap: 5px; }

/* current stage panel */
.wf-now { border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 6%, #fff), #fff 120px); }
.wf-now .wf-card-head { padding-top: 16px; }
.wf-now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.wf-now-grid > div { background: #fff; border: 1px solid var(--wf-line); border-radius: 11px; padding: 10px 12px; }
.wf-now-grid .k { font-size: 11.5px; color: var(--wf-muted); font-weight: 600; margin-bottom: 4px; }
.wf-now-grid .v { font-weight: 700; color: var(--wf-ink); font-size: 13.5px; }
.wf-actions { display: grid; gap: 8px; }
.wf-action-btn { --c: var(--wf-primary); display: flex; align-items: center; gap: 11px; width: 100%; text-align: start; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--wf-line); background: #fff; color: var(--wf-ink); font-weight: 700; font-size: 14px; transition: border-color .15s, background .15s, transform .15s; }
.wf-action-btn:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, #fff); transform: translateX(var(--shift, 2px)); }
html[dir=rtl] .wf-action-btn:hover { --shift: -2px; }
.wf-action-btn .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); flex-shrink: 0; }
.wf-action-btn .ic svg.feather { width: 16px; height: 16px; vertical-align: 0; }
.wf-action-btn small { display: block; font-weight: 500; color: var(--wf-muted); font-size: 12px; margin-top: 1px; }
.wf-action-btn .go { margin-inline-start: auto; color: var(--wf-muted); }
html[dir=rtl] .wf-action-btn .go svg { transform: scaleX(-1); }
.wf-ack { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 11px; background: var(--wf-warn-bg); border: 1px solid #f6dfb5; margin-bottom: 12px; }
.wf-ack p { margin: 0; font-size: 13px; color: #7c4a06; font-weight: 600; flex: 1; }

/* closed request summary */
.wf-closed { --c: var(--wf-ok); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, #fff), #fff 140px); border-color: color-mix(in srgb, var(--c) 25%, #fff); }
.wf-closed.bad { --c: var(--wf-bad); }
.wf-closed .ic { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 14%, transparent); margin: 6px 0 14px; }
.wf-closed .ic svg.feather { width: 26px; height: 26px; vertical-align: 0; }
.wf-closed h3 { font-size: 19px; font-weight: 800; color: var(--c); margin: 0 0 2px; }
.wf-closed-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.wf-closed-stats div { background: #fff; border: 1px solid var(--wf-line); border-radius: 11px; padding: 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.wf-closed-stats b { font-size: 15px; color: var(--wf-ink); }
.wf-closed-stats span { font-size: 11.5px; color: var(--wf-muted); font-weight: 600; }
.wf-closed-stats .late b { color: var(--wf-bad); }

/* thread */
.wf-thread { position: relative; display: grid; gap: 16px; }
.wf-thread::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 19px; width: 2px; background: var(--wf-line); }
.wf-msg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.wf-avatar { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c, var(--wf-primary)); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--wf-line); font-size: 14px; overflow: hidden; }
.wf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wf-bubble { background: #fff; border: 1px solid var(--wf-line); border-radius: 4px 14px 14px 14px; padding: 12px 15px; min-width: 0; }
html[dir=rtl] .wf-bubble { border-radius: 14px 4px 14px 14px; }
.wf-msg.action .wf-bubble { border-color: color-mix(in srgb, var(--ac, var(--wf-primary)) 35%, #fff); background: color-mix(in srgb, var(--ac, var(--wf-primary)) 4%, #fff); }
.wf-bubble .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 4px; }
.wf-bubble .who b { color: var(--wf-ink); }
.wf-bubble .who time { color: var(--wf-muted); font-size: 12px; margin-inline-start: auto; }
.wf-bubble .what { font-weight: 700; color: var(--ac, var(--wf-ink)); font-size: 13.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.wf-bubble .body { margin-top: 6px; white-space: pre-line; line-height: 1.75; color: var(--wf-text); word-wrap: break-word; }
.wf-bubble .extra { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.wf-msg.system { grid-template-columns: 40px minmax(0, 1fr); align-items: center; }
.wf-msg.system .wf-avatar { width: 40px; height: 26px; border-radius: 13px; background: var(--wf-soft); color: var(--wf-muted); box-shadow: 0 0 0 1px var(--wf-line); }
.wf-msg.system .wf-avatar svg.feather { width: 14px; height: 14px; vertical-align: 0; }
.wf-msg.system .line { font-size: 12.5px; color: var(--wf-muted); }
.wf-msg.system .line b { color: var(--wf-text); }
.wf-msg.escalated .wf-avatar { background: var(--wf-bad-bg); color: var(--wf-bad); }
.wf-msg.escalated .line { color: var(--wf-bad); font-weight: 600; }
.wf-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wf-file { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--wf-line); border-radius: 9px; background: var(--wf-softer); font-size: 12.5px; color: var(--wf-text); max-width: 260px; }
.wf-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-file:hover { border-color: var(--wf-primary); color: var(--wf-primary); }
.wf-thumb { display: block; width: 104px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--wf-line); background: var(--wf-soft); }
.wf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.wf-thumb:hover img { transform: scale(1.06); }

.wf-composer { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; margin-top: 18px; }
.wf-composer .box { border: 1px solid var(--wf-line-strong); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.wf-composer .box:focus-within { border-color: var(--wf-primary); box-shadow: 0 0 0 4px #195c7514; }
.wf-composer textarea { border: 0 !important; box-shadow: none !important; resize: vertical; min-height: 84px; padding: 13px 15px; border-radius: 0; }
.wf-composer .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--wf-softer); border-top: 1px solid var(--wf-line); }

/* uploads */
.wf-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed var(--wf-line-strong); border-radius: 12px; background: var(--wf-softer); color: var(--wf-muted); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.wf-drop:hover, .wf-drop.drag { border-color: var(--wf-primary); background: var(--wf-info-bg); color: var(--wf-primary); }
.wf-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wf-drop .ic { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; border: 1px solid var(--wf-line); color: var(--wf-primary); flex-shrink: 0; }
.wf-picked { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wf-picked:empty { display: none; }
.wf-picked .p { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px 5px 5px; border: 1px solid var(--wf-line); border-radius: 9px; background: #fff; font-size: 12px; max-width: 220px; }
.wf-picked .p img, .wf-picked .p i { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: var(--wf-soft); display: grid; place-items: center; font-style: normal; color: var(--wf-muted); flex-shrink: 0; }
.wf-picked .p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* requirements checklist (modal) */
.wf-reqs { display: grid; gap: 6px; padding: 12px 14px; border-radius: 11px; background: var(--wf-softer); border: 1px solid var(--wf-line); margin-bottom: 16px; }
.wf-reqs .t { font-size: 12px; font-weight: 700; color: var(--wf-muted); text-transform: uppercase; letter-spacing: .4px; }
.wf-reqs .r { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--wf-muted); }
.wf-reqs .r::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--wf-line-strong); flex-shrink: 0; transition: all .15s; }
.wf-reqs .r.met { color: var(--wf-ok); }
.wf-reqs .r.met::before { border-color: var(--wf-ok); background: var(--wf-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* segmented choice (static / screen, targets) */
.wf-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-seg label { flex: 1 1 120px; margin: 0; }
.wf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.wf-seg .opt { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1.5px solid var(--wf-line-strong); border-radius: 11px; cursor: pointer; font-weight: 700; color: var(--wf-text); background: #fff; transition: all .15s; }
.wf-seg .opt svg.feather { color: var(--wf-muted); }
.wf-seg .opt small { display: block; font-weight: 500; color: var(--wf-muted); font-size: 11.5px; }
.wf-seg input:checked + .opt { border-color: var(--c, var(--wf-primary)); background: color-mix(in srgb, var(--c, var(--wf-primary)) 7%, #fff); color: var(--c, var(--wf-primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--wf-primary)) 13%, transparent); }
.wf-seg input:checked + .opt svg.feather { color: inherit; }
.wf-seg input:focus-visible + .opt { outline: 2px solid var(--wf-primary); outline-offset: 2px; }

/* modals */
.wf-modal .modal-content { border: 0; border-radius: 18px; box-shadow: var(--wf-shadow-lg); overflow: hidden; }
.wf-modal .modal-header { border: 0; padding: 20px 22px 6px; align-items: flex-start; }
.wf-modal .modal-title { font-weight: 700; font-size: 18px; color: var(--wf-ink); display: flex; align-items: center; gap: 10px; }
.wf-modal .modal-title .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--wf-primary)) 13%, #fff); color: var(--c, var(--wf-primary)); }
.wf-modal .modal-sub { font-size: 13px; color: var(--wf-muted); margin: 4px 0 0; }
.wf-modal .modal-body { padding: 14px 22px; }
.wf-modal .modal-footer { border: 0; padding: 12px 22px 20px; background: transparent; }
.wf-modal .btn-close { margin: 0; }

/* forms (create) */
.wf-form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.wf-form-grid > .f { grid-column: span var(--w, 6); min-width: 0; }
.wf-req { color: var(--wf-bad); margin-inline-start: 2px; }
.wf-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wf-choice { position: relative; margin: 0; }
.wf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.wf-choice .card-in { --c: var(--wf-primary); height: 100%; display: flex; gap: 11px; align-items: flex-start; padding: 13px; border: 1.5px solid var(--wf-line-strong); border-radius: 12px; cursor: pointer; background: #fff; transition: all .15s; }
.wf-choice .card-in .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); flex-shrink: 0; }
.wf-choice .card-in b { display: block; color: var(--wf-ink); font-size: 14px; }
.wf-choice .card-in small { color: var(--wf-muted); font-size: 12px; line-height: 1.5; }
.wf-choice input:checked + .card-in { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent); }
.wf-steps-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wf-steps-head .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--wf-primary); color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.wf-steps-head h2 { font-size: 16px; margin: 0; font-weight: 700; }
.wf-submit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 20px; margin: 0 -1px; background: #ffffffee; backdrop-filter: blur(6px); border-top: 1px solid var(--wf-line); border-radius: 0 0 var(--wf-radius) var(--wf-radius); }

/* settings */
.wf-settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.wf-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.wf-map-node { --c: var(--wf-primary); display: block; border: 1px solid var(--wf-line); border-top: 4px solid var(--c); border-radius: 13px; padding: 14px; background: #fff; color: inherit; transition: box-shadow .18s, transform .18s; }
.wf-map-node:hover { box-shadow: var(--wf-shadow-lg); transform: translateY(-2px); color: inherit; }
.wf-map-node .h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.wf-map-node .h b { font-size: 15px; color: var(--wf-ink); }
.wf-map-node .h .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); }
.wf-map-node ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.wf-map-node li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--wf-text); flex-wrap: wrap; }
.wf-map-node li .arrow { color: var(--wf-muted); }
html[dir=rtl] .wf-map-node li .arrow { transform: scaleX(-1); }
.wf-flags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.wf-switch { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--wf-line); border-radius: 10px; cursor: pointer; background: #fff; margin: 0; }
.wf-switch:hover { border-color: var(--wf-line-strong); }
.wf-switch .form-check-input { margin: 2px 0 0; flex-shrink: 0; float: none; }
.wf-switch span { font-size: 13.5px; font-weight: 600; color: var(--wf-ink); }
.wf-switch small { display: block; font-weight: 400; color: var(--wf-muted); font-size: 12px; }
.wf-switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.wf-color { width: 46px; height: 42px; padding: 4px; border-radius: 10px; border: 1px solid var(--wf-line-strong); background: #fff; cursor: pointer; }
.wf-members { max-height: 460px; overflow: auto; }
.wf-members .wf-table td { padding-block: 9px; }
.wf-empty { text-align: center; padding: 46px 20px; color: var(--wf-muted); }
.wf-empty .ic { width: 58px; height: 58px; border-radius: 16px; display: inline-grid; place-items: center; background: var(--wf-soft); color: var(--wf-primary); margin-bottom: 12px; }
.wf-empty .ic svg.feather { width: 26px; height: 26px; vertical-align: 0; }
.wf-empty h3 { font-size: 16px; margin: 0 0 4px; }
.wf-hint { display: flex; gap: 10px; padding: 11px 13px; border-radius: 11px; background: var(--wf-info-bg); color: #164e63; font-size: 13px; line-height: 1.7; }
.wf-hint svg.feather { flex-shrink: 0; margin-top: 3px; }

.wf .pagination { margin: 0; gap: 4px; flex-wrap: wrap; }
.wf .page-link { border-radius: 8px !important; border-color: var(--wf-line); color: var(--wf-text); }
.wf .page-item.active .page-link { background: var(--wf-primary); border-color: var(--wf-primary); }

/* select2 inside workflow forms */
.wf .select2-container { width: 100% !important; }
.wf .select2-container--default .select2-selection--multiple, .wf .select2-container--default .select2-selection--single { border-radius: 10px; border-color: var(--wf-line-strong); min-height: 42px; }
.wf .select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--wf-info-bg); border-color: #cfe3ea; color: var(--wf-primary); border-radius: 7px; font-weight: 600; }
.wf .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; }
.wf .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }

/* ---------- header bell ---------- */
.wf-bell > a { position: relative; }
.wf-bell .wf-bell-count { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; line-height: 1; }
.wf-bell .wf-bell-count[hidden] { display: none; }
.wf-bell .dropdown-menu { width: 360px; max-width: 92vw; padding: 0; border-radius: 14px; overflow: hidden; }
.wf-bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #e2e9ef; font-weight: 700; color: #17324a; }
.wf-bell-head form { margin: 0; }
.wf-bell-head button { border: 0; background: none; color: #195c75; font-size: 12.5px; font-weight: 600; padding: 0; }
.wf-bell-list { max-height: 380px; overflow: auto; }
.wf-bell-item { display: flex !important; gap: 10px; padding: 11px 14px !important; white-space: normal !important; border-bottom: 1px solid #f0f4f7; font-size: 13px; line-height: 1.55; color: #2c4558 !important; }
.wf-bell-item:hover { background: #f4f8fb !important; }
.wf-bell-item .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: #e7f1f5; color: #195c75; }
.wf-bell-item .ic.bad { background: #fcebea; color: #c0392b; }
.wf-bell-item .ic svg { width: 15px; height: 15px; }
.wf-bell-item time { display: block; font-size: 11.5px; color: #6a8092; margin-top: 2px; }
.wf-bell-empty { padding: 26px 14px; text-align: center; color: #6a8092; font-size: 13px; }
.wf-bell-foot { display: block; text-align: center; padding: 10px; font-weight: 600; font-size: 13px; background: #f9fbfd; color: #195c75; }

/* sidebar badge */
.sidebar .wf-side-count { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: #ffffff2b; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.sidebar .wf-side-count.bad { background: #e05a4a; }
.sidebar li.active .wf-side-count { background: #195c75; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1399px) { .wf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1199px) {
    .wf-layout { grid-template-columns: minmax(0, 1fr); }
    .wf-sticky { position: static; }
    .wf-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .wf-hero { padding: 22px 20px; border-radius: 14px; }
    .wf-hero h1 { font-size: 21px; }
    .wf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .wf-kpi strong { font-size: 24px; }
    .wf-filter-grid { grid-template-columns: minmax(0, 1fr); }
    .wf-form-grid > .f, .wf-brief > div { grid-column: 1 / -1; }
    .wf-inbox-item { grid-template-columns: 4px 44px minmax(0, 1fr); }
    .wf-inbox-item .side { grid-column: 3; flex-direction: row; align-items: center; flex-wrap: wrap; }
    .wf-kpi { padding: 13px; gap: 10px; }
    .wf-kpi .ic { width: 38px; height: 38px; }
    .wf-now-grid { grid-template-columns: 1fr; }
    .wf-card-head, .wf-card-body { padding-inline: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .wf-deadline.overdue, .wf-step.current .node { animation: none; }
    .wf-kpi, .wf-inbox-item, .wf-map-node, .wf-action-btn { transition: none; }
}

/* =================================================================
   Navigation v2: segmented main tabs + separate management tools
   ================================================================= */
.wf-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.wf-nav-main { display: inline-flex; gap: 4px; padding: 5px; background: #e8eff4; border-radius: 14px; border: 1px solid #dde7ee; overflow-x: auto; max-width: 100%; }
.wf-nav-main a { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 10px; color: #4f6679; font-weight: 700; font-size: 14.5px; white-space: nowrap; transition: background .18s, color .18s, box-shadow .18s; }
.wf-nav-main a svg.feather { width: 18px; height: 18px; vertical-align: 0; }
.wf-nav-main a:hover { color: var(--wf-ink); background: #ffffff80; }
.wf-nav-main a.active { background: #fff; color: var(--wf-primary); box-shadow: 0 1px 2px #0d2c4014, 0 4px 14px #0d2c4014; }
.wf-nav-main .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 800; background: var(--wf-primary); color: #fff; }
.wf-nav-main .count.bad { background: var(--wf-bad); }
.wf-nav-main .count[hidden] { display: none; }
.wf-nav-tools { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wf-nav-tools .lbl { font-size: 11.5px; font-weight: 700; color: var(--wf-muted); text-transform: uppercase; letter-spacing: .5px; margin-inline-end: 2px; }
html[dir=rtl] .wf-nav-tools .lbl { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.wf-nav-tools .tool { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 11px; border: 1px solid var(--wf-line-strong); background: #fff; color: var(--wf-text); font-weight: 600; font-size: 13.5px; transition: border-color .15s, color .15s, background .15s; }
.wf-nav-tools .tool:hover { border-color: var(--wf-primary); color: var(--wf-primary); }
.wf-nav-tools .tool.active { background: var(--wf-info-bg); border-color: #bcd6e0; color: var(--wf-primary); }
.wf-nav-tools .btn { padding: 9px 16px; margin-inline-start: 6px; box-shadow: 0 6px 16px #195c7533; }

/* settings sub-navigation as descriptive cards */
.wf-settings-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.wf-settings-tabs a { --c: var(--wf-primary); display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--wf-line); color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s; position: relative; overflow: hidden; }
.wf-settings-tabs a:hover { transform: translateY(-2px); box-shadow: var(--wf-shadow-lg); color: inherit; }
.wf-settings-tabs a.active { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent); }
.wf-settings-tabs a.active::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--c); }
.wf-settings-tabs .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.wf-settings-tabs a.active .ic { background: var(--c); color: #fff; }
.wf-settings-tabs b { display: block; font-size: 14.5px; color: var(--wf-ink); }
.wf-settings-tabs small { display: block; font-size: 12px; color: var(--wf-muted); line-height: 1.5; margin-top: 2px; }

.sidebar .wf-side-count { min-width: 24px; height: 22px; font-size: 11.5px; font-weight: 800; background: #ffffff33; }

/* =================================================================
   Create request
   ================================================================= */
.wf-hero-steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; position: relative; z-index: 1; }
.wf-hero-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: #ffffff14; border: 1px solid #ffffff22; color: #d3e5ee; font-weight: 600; font-size: 13px; }
html[dir=rtl] .wf-hero-steps li { padding: 7px 7px 7px 14px; }
.wf-hero-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #ffffff26; color: #fff; font-weight: 800; font-size: 12px; }
.wf-hero-steps li.on { background: #fff; color: var(--wf-deep); }
.wf-hero-steps li.on span { background: var(--wf-primary); }
.wf-hero-steps li.ok span { background: var(--wf-mint); color: var(--wf-deep); }

.wf-type-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.wf-type-switch a { --c: var(--wf-primary); display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border-radius: 12px; border: 1.5px solid var(--wf-line-strong); background: #fff; color: var(--wf-text); font-weight: 700; }
.wf-type-switch a .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.wf-type-switch a.active { border-color: var(--c); color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent); }

.wf-create { grid-template-columns: minmax(0, 1fr) 390px; }
.wf-create .wf-section-icon[style*="--c"] { background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); }

.wf-progress { min-width: 190px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.wf-progress .t { font-size: 12.5px; color: var(--wf-muted); font-weight: 600; text-align: end; }
.wf-progress .t b { color: var(--wf-ink); }
.wf-progress .bar { height: 7px; border-radius: 4px; background: var(--wf-soft); overflow: hidden; }
.wf-progress .bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #2a8199, var(--wf-primary)); transition: width .3s ease; }
.wf-progress.done .bar i { background: var(--wf-ok); }
.wf-progress.done .t b { color: var(--wf-ok); }

.wf-form-section { padding: 6px 0 22px; }
.wf-form-section + .wf-form-section { border-top: 1px dashed var(--wf-line-strong); padding-top: 22px; }
.wf-form-section:last-child { padding-bottom: 4px; }
.wf-form-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wf-form-section-head .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--wf-info-bg); color: var(--wf-primary); font-weight: 800; font-size: 12.5px; }
.wf-form-section-head h3 { font-size: 15px; font-weight: 800; margin: 0; }
.wf-form-section .form-control, .wf-form-section .form-select { background-color: #fbfdfe; }
.wf-form-section .form-control:focus, .wf-form-section .form-select:focus { background-color: #fff; }
.wf-form-section .f.is-filled > .form-label::after { content: "✓"; color: var(--wf-ok); margin-inline-start: 6px; font-weight: 800; }

.wf-route-list { display: grid; gap: 8px; }
.wf-route-list .wf-choice .card-in { padding: 11px 12px; align-items: center; }
.wf-route-list .wf-choice .card-in small { display: block; }
.wf-route-list.single { display: none; } /* one possible action: go straight to the destination list */
.wf-route-list.single + [data-for-action] .form-label:first-child { margin-top: 0 !important; }

.wf-dest-list { display: grid; gap: 7px; }
.wf-dest-list label { --c: var(--wf-primary); margin: 0; position: relative; }
.wf-dest-list input { position: absolute; opacity: 0; pointer-events: none; }
.wf-dest-list .opt { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--wf-line-strong); background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.wf-dest-list .opt:hover { border-color: color-mix(in srgb, var(--c) 55%, #fff); }
.wf-dest-list .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.wf-dest-list .ic svg.feather { width: 16px; height: 16px; vertical-align: 0; }
.wf-dest-list .nm { font-weight: 700; color: var(--wf-ink); font-size: 14px; }
.wf-dest-list .hrs { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--wf-muted); }
.wf-dest-list .hrs svg.feather { width: 13px; height: 13px; vertical-align: 0; }
.wf-dest-list .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--wf-line-strong); transition: all .15s; }
.wf-dest-list input:checked + .opt { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent); }
.wf-dest-list input:checked + .opt .radio { border-color: var(--c); background: radial-gradient(circle, var(--c) 0 4px, #fff 5px); }
.wf-dest-list input:focus-visible + .opt { outline: 2px solid var(--wf-primary); outline-offset: 2px; }

.wf-due-preview { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 13px; border-radius: 12px; background: var(--wf-soft); border: 1px dashed var(--wf-line-strong); color: var(--wf-muted); font-size: 13px; line-height: 1.6; }
.wf-due-preview svg.feather { flex-shrink: 0; margin-top: 2px; }
.wf-due-preview.on { background: var(--wf-info-bg); border: 1px solid #c9dfe7; color: #164e63; font-weight: 600; }

.wf-more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--wf-primary); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.wf-more summary::-webkit-details-marker { display: none; }

.wf-send { background: #fff; border: 1px solid var(--wf-line); border-radius: var(--wf-radius); box-shadow: var(--wf-shadow); padding: 16px; margin-bottom: 18px; }
.wf-send .wf-reqs { margin-bottom: 12px; }
.wf-send .btn-lg { padding: 13px; font-size: 16px; border-radius: 12px; box-shadow: 0 8px 22px #195c7540; }
.wf-send .btn-lg:disabled { box-shadow: none; opacity: .55; }

.wf-brief-section { grid-column: 1 / -1 !important; display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--wf-primary); }
.wf-brief-section::after { content: ""; flex: 1; height: 1px; background: var(--wf-line); }

/* =================================================================
   Requests list v2
   ================================================================= */
.wf-list-card { padding: 0; }
.wf-status-tabs { list-style: none; margin: 0; padding: 6px 18px 0; flex-wrap: nowrap; }
.wf-status-tabs li { margin: 0; }
.wf-status-tabs a svg.feather { width: 15px; height: 15px; vertical-align: 0; }
.wf-status-tabs a.is-bad.active { color: var(--wf-bad); }
.wf-status-tabs a.is-bad.active::after { background: var(--wf-bad); }
.wf-status-tabs .n { background: var(--wf-soft); color: var(--wf-text); }
.wf-status-tabs a.active .n { background: var(--wf-primary); color: #fff; }
.wf-status-tabs .n.bad, .wf-status-tabs a.is-bad.active .n { background: var(--wf-bad); color: #fff; }
.wf-list-card .wf-tabs { margin-bottom: 0; }
.wf-toolbar-form { padding: 16px 18px; }
.wf-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wf-toolbar .wf-search { flex: 1 1 280px; }
.wf-tool-select { width: auto; min-width: 180px; max-width: 270px; padding-inline-end: 2.4rem; }
.wf-filter-btn { position: relative; }
.wf-filter-btn.has { border-color: var(--wf-primary); color: var(--wf-primary); background: var(--wf-info-bg); }
.wf-filter-btn .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--wf-primary); color: #fff; font-size: 11px; }
.wf-filter-btn[aria-expanded=true] { background: var(--wf-soft); }
.wf-view-toggle { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--wf-soft); border: 1px solid var(--wf-line); }
.wf-view-toggle a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; color: var(--wf-muted); font-weight: 700; font-size: 13px; }
.wf-view-toggle a svg.feather { width: 15px; height: 15px; vertical-align: 0; }
.wf-view-toggle a.active { background: #fff; color: var(--wf-primary); box-shadow: 0 1px 3px #0d2c401a; }
.wf-filter-panel { margin-top: 14px; padding: 16px; border: 1px solid var(--wf-line); border-radius: 13px; background: var(--wf-softer); }
.wf-filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--wf-line); }
.wf-active-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 0 18px 16px; }
.wf-fchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 11px; border-radius: 999px; background: var(--wf-info-bg); border: 1px solid #cbe0e8; color: var(--wf-primary); font-size: 12.5px; font-weight: 700; max-width: 320px; }
html[dir=rtl] .wf-fchip { padding: 5px 11px 5px 8px; }
.wf-fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-fchip svg.feather { width: 14px; height: 14px; vertical-align: 0; padding: 2px; border-radius: 50%; background: #ffffffaa; flex-shrink: 0; }
.wf-fchip:hover { background: var(--wf-bad-bg); border-color: #f3c9c3; color: var(--wf-bad); }
.wf-clear { font-size: 12.5px; font-weight: 700; color: var(--wf-muted) !important; margin-inline-start: 4px; }
.wf-clear:hover { color: var(--wf-bad) !important; }

/* table */
.wf-table-card { overflow: hidden; }
.wf-req-table th { font-size: 11.5px; padding: 11px 14px; }
html[dir=rtl] .wf-req-table th { font-size: 12.5px; }
.wf-req-table td { padding: 12px 14px; }
.wf-req-table tbody tr { cursor: pointer; }
.wf-req-table tbody tr td:first-child { box-shadow: inset 4px 0 0 var(--c); }
html[dir=rtl] .wf-req-table tbody tr td:first-child { box-shadow: inset -4px 0 0 var(--c); }
.wf-req-table tbody tr:hover td { background: #f6fafc; }
.wf-req-table tbody tr.is-overdue td { background: #fff8f7; }
.wf-req-table tbody tr.is-overdue:hover td { background: #fdf0ee; }
.wf-req-table tbody tr.is-closed .wf-req-cell .title { color: var(--wf-text); }
.wf-req-table .sticky-col { position: sticky; inset-inline-start: 0; z-index: 2; background: #fff; min-width: 260px; }
.wf-req-table thead .sticky-col { background: var(--wf-softer); z-index: 3; }
.wf-req-cell { display: flex; align-items: center; gap: 12px; }
.wf-req-cell .wf-tile { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.wf-req-cell .title { display: block; font-weight: 800; color: var(--wf-ink); font-size: 14.5px; line-height: 1.35; }
.wf-req-cell .title:hover { color: var(--wf-primary); }
.wf-req-cell .sub { font-size: 12px; color: var(--wf-muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.wf-col header b, .wf-bcard .ttl b { font-weight: 800; }
.wf-req-cell .sub .wf-code { font-size: 11.5px; color: var(--wf-muted); }
.wf-req-cell .wf-tag { padding: 0 6px; font-size: 11px; }
.wf-prog { min-width: 170px; }
.wf-prog .segs { display: flex; gap: 3px; margin-bottom: 7px; }
.wf-prog .segs span { flex: 1; max-width: 22px; height: 6px; border-radius: 3px; background: var(--c); opacity: .35; }
.wf-prog .segs span.current { opacity: 1; max-width: 34px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.wf-prog .now { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--c, var(--wf-text)); white-space: nowrap; }
.wf-prog .now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.wf-prog .now em { font-style: normal; font-weight: 600; color: var(--wf-warn); }
.wf-prog .now.muted { color: var(--wf-muted); font-weight: 600; }
.wf-req-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.wf-mini-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--wf-soft); border: 1px solid var(--wf-line); font-size: 12px; font-weight: 600; }
.wf-mini-more { display: inline-block; margin-inline-start: 3px; padding: 2px 6px; border-radius: 6px; background: var(--wf-info-bg); color: var(--wf-primary); font-size: 11.5px; font-weight: 800; }
.wf-who { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.wf-who b { display: block; font-size: 13px; color: var(--wf-ink); }
.wf-who small { display: block; font-size: 11.5px; color: var(--wf-muted); }
.go-col { width: 34px; color: var(--wf-line-strong); }
.wf-req-table tbody tr:hover .go-col { color: var(--wf-primary); }
.wf-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--wf-line); background: var(--wf-softer); }

/* board */
.wf-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.wf-col { --c: var(--wf-primary); background: #eef3f7; border: 1px solid var(--wf-line); border-radius: 16px; padding: 10px; min-height: 160px; }
.wf-col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 12px; border-bottom: 3px solid var(--c); margin-bottom: 10px; }
.wf-col header .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; }
.wf-col header .ic svg.feather { width: 15px; height: 15px; vertical-align: 0; }
.wf-col header b { font-size: 14px; color: var(--wf-ink); flex: 1; }
.wf-col header .n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; background: #fff; font-size: 12px; font-weight: 800; color: var(--wf-text); }
.wf-col header .n.bad { background: var(--wf-bad); color: #fff; }
.wf-col .cards { display: grid; gap: 8px; }
.wf-col .empty { text-align: center; padding: 18px 8px; color: var(--wf-muted); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wf-bcard { display: flex; flex-direction: column; gap: 8px; padding: 11px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--wf-line); color: inherit; box-shadow: 0 1px 2px #0d2c400d; transition: transform .15s, box-shadow .15s, border-color .15s; }
.wf-bcard:hover { transform: translateY(-2px); box-shadow: var(--wf-shadow-lg); border-color: var(--c); color: inherit; }
.wf-bcard.late { border-color: #f3c9c3; box-shadow: inset 3px 0 0 var(--wf-bad); }
html[dir=rtl] .wf-bcard.late { box-shadow: inset -3px 0 0 var(--wf-bad); }
.wf-bcard .top { display: flex; justify-content: space-between; align-items: center; }
.wf-bcard .top .wf-code { font-size: 11.5px; color: var(--wf-muted); }
.wf-bcard .ttl { display: flex; align-items: center; gap: 9px; }
.wf-bcard .ttl b { font-size: 14px; color: var(--wf-ink); line-height: 1.35; }
.wf-bcard .tags { display: flex; gap: 5px; flex-wrap: wrap; }
.wf-bcard .tags .wf-tag { font-size: 11px; padding: 1px 7px; }
.wf-bcard .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.wf-bcard .foot .wf-deadline { font-size: 11.5px; padding: 3px 8px; }

@media (max-width: 767px) {
    .wf-tool-select { flex: 1 1 140px; min-width: 0; max-width: none; }
    .wf-view-toggle span { display: none; }
    .wf-req-table .sticky-col { min-width: 210px; }
    .wf-board { grid-auto-columns: 82%; }
}

/* =================================================================
   Request page v2
   ================================================================= */
.wf-req-hero { align-items: center; }
.wf-req-id { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.wf-req-tile { width: 68px; height: 68px; border-radius: 18px; flex-shrink: 0; display: grid; place-items: center; background: #fff; color: var(--wf-deep); font-size: 24px; font-weight: 800; letter-spacing: .5px; box-shadow: 0 10px 26px #0000002e; }
.wf-req-hero .badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.wf-req-hero h1 { margin-bottom: 8px; }
.wf-req-hero .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #d3e5ee; }
.wf-req-hero .meta span { display: inline-flex; gap: 6px; align-items: center; }
.wf-req-hero .meta svg.feather { width: 14px; height: 14px; vertical-align: 0; }
.wf-req-now { --c: var(--wf-primary); min-width: 260px; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: #ffffff12; border: 1px solid #ffffff26; backdrop-filter: blur(4px); }
.wf-req-now .k { font-size: 11px; letter-spacing: 1px; font-weight: 700; color: #bfdbe6; text-transform: uppercase; }
html[dir=rtl] .wf-req-now .k { letter-spacing: 0; font-size: 12px; }
.wf-req-now .d { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: #fff; }
.wf-req-now .d .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 0 0 3px #ffffff30; }
.wf-req-now .d .ic svg.feather { width: 17px; height: 17px; vertical-align: 0; }
.wf-req-now .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 12.5px; color: #d3e5ee; font-weight: 600; }
.wf-req-now .wf-deadline { background: #fff; }
.timebar { display: block; height: 6px; border-radius: 3px; background: #ffffff26; overflow: hidden; }
.timebar i { display: block; height: 100%; border-radius: 3px; background: var(--wf-mint); }
.wf-req-now.late .timebar i { background: #ff7b6b; }

/* journey track */
.wf-track { list-style: none; margin: 0; padding: 4px 2px 8px; display: flex; overflow-x: auto; gap: 0; scroll-snap-type: x proximity; }
.wf-track li { --c: var(--wf-primary); position: relative; flex: 0 0 auto; width: 190px; padding-inline-end: 18px; scroll-snap-align: start; }
.wf-track li::before { content: ""; position: absolute; top: 17px; inset-inline-start: 36px; inset-inline-end: 0; height: 3px; border-radius: 2px; background: var(--wf-line); }
.wf-track li.done::before { background: color-mix(in srgb, var(--c) 50%, #fff); }
.wf-track li:last-child::before { display: none; }
.wf-track .node { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; border: 3px solid #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, #fff); }
.wf-track .node svg.feather { width: 15px; height: 15px; vertical-align: 0; }
.wf-track li.current .node { animation: wf-node 2.2s ease-in-out infinite; }
.wf-track li.late .node { background: var(--wf-bad); box-shadow: 0 0 0 1px #f3b3ab; }
.wf-track .card-s { position: relative; margin-top: 12px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--wf-line); background: var(--wf-softer); display: flex; flex-direction: column; gap: 4px; min-height: 104px; }
.wf-track li.current .card-s { background: #fff; border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent), var(--wf-shadow); }
.wf-track .card-s::before { content: ""; position: absolute; top: -7px; inset-inline-start: 13px; width: 12px; height: 12px; background: inherit; border-top: 1px solid; border-inline-start: 1px solid; border-color: inherit; transform: rotate(45deg); }
html[dir=rtl] .wf-track .card-s::before { transform: rotate(-45deg); }
.wf-track .card-s b { font-size: 14px; color: var(--wf-ink); }
.wf-track .num { position: absolute; top: 9px; inset-inline-end: 10px; font-size: 11px; font-weight: 800; color: var(--wf-muted); background: #fff; border: 1px solid var(--wf-line); border-radius: 6px; padding: 0 6px; }
.wf-track .when { font-size: 12px; color: var(--wf-muted); }
.wf-track .dur { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: #fff; border: 1px solid var(--wf-line); color: var(--wf-text); }
.wf-track .dur.late { color: var(--wf-bad); background: var(--wf-bad-bg); border-color: #f6cfca; }
.wf-track .dur svg.feather { width: 12px; height: 12px; vertical-align: 0; }
.wf-track .via { font-size: 11.5px; color: var(--wf-muted); line-height: 1.45; }
.wf-track .wf-deadline { align-self: flex-start; font-size: 12px; }
.wf-track li.end .card-s { background: color-mix(in srgb, var(--c) 7%, #fff); border-color: color-mix(in srgb, var(--c) 30%, #fff); }

/* main tabs */
.wf-req-main { padding: 0; }
.wf-req-tabs { list-style: none; padding: 6px 18px 0; margin: 0; flex-wrap: nowrap; }
.wf-req-tabs li { margin: 0; }
.wf-req-tabs a svg.feather { width: 16px; height: 16px; vertical-align: 0; }
.wf-req-main .tab-content { padding: 20px; }

/* files */
.wf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.wf-gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 13px; overflow: hidden; background: var(--wf-soft); border: 1px solid var(--wf-line); }
.wf-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.wf-gallery-item:hover img { transform: scale(1.05); }
.wf-gallery-item .cap { position: absolute; inset-inline: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, #0d2233d9); color: #fff; display: flex; flex-direction: column; }
.wf-gallery-item .cap b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-gallery-item .cap small { font-size: 11px; opacity: .85; }
.wf-doc-list { display: grid; gap: 8px; }
.wf-doc { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--wf-line); background: #fff; color: inherit; }
.wf-doc:hover { border-color: var(--wf-primary); color: var(--wf-primary); }
.wf-doc .ext { height: 46px; border-radius: 10px; display: grid; place-items: center; background: var(--wf-bad-bg); color: var(--wf-bad); font-weight: 800; font-size: 11px; }
.wf-doc .nm b { display: block; font-size: 13.5px; color: var(--wf-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-doc .nm small { font-size: 12px; color: var(--wf-muted); }

/* bookings */
.wf-booking-list { display: grid; gap: 10px; }
.wf-booking { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--wf-line); background: #fff; }
.wf-booking .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--wf-info-bg); color: var(--wf-primary); }
.wf-booking .ic.gift { background: #fdf2f8; color: #be185d; }
.wf-booking .nm b { display: block; color: var(--wf-ink); }
.wf-booking .nm small { color: var(--wf-muted); font-size: 12px; }
.wf-booking .period { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wf-text); font-weight: 600; }
.wf-booking .period svg.feather { width: 14px; height: 14px; vertical-align: 0; }
.wf-booking .price { font-weight: 800; color: var(--wf-ink); font-size: 15px; }
.wf-booking .gifts { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; }

/* side: current stage */
.wf-stage-card { overflow: hidden; border-color: color-mix(in srgb, var(--c) 28%, #fff); }
.wf-stage-card .band { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, #fff), color-mix(in srgb, var(--c) 5%, #fff)); border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, #fff); }
.wf-stage-card .band .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; flex-shrink: 0; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.wf-stage-card .band small { display: block; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #333); }
.wf-stage-card .band b { display: block; font-size: 17px; color: var(--wf-ink); }
.wf-stage-card .band .st { margin-inline-start: auto; font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 8px; background: #fff; color: var(--wf-warn); border: 1px solid #f6dfb5; white-space: nowrap; }
.wf-stage-card .band .st.acknowledged { color: var(--wf-primary); border-color: #c9dfe7; }
.wf-clock { text-align: center; padding: 14px; border-radius: 14px; background: var(--wf-ok-bg); color: var(--wf-ok); margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.wf-clock.soon { background: var(--wf-warn-bg); color: var(--wf-warn); }
.wf-clock.late { background: var(--wf-bad-bg); color: var(--wf-bad); }
.wf-clock .big { font-size: 24px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.wf-clock small { font-size: 12px; color: var(--wf-muted); font-weight: 600; }
.wf-clock .timebar { background: #ffffffaa; height: 7px; }
.wf-clock .timebar i { background: currentColor; }
.wf-facts { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 2px; }
.wf-facts li { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 2px; border-bottom: 1px dashed var(--wf-line); font-size: 13px; }
.wf-facts li:last-child { border-bottom: 0; }
.wf-facts li svg.feather { width: 15px; height: 15px; color: var(--wf-muted); vertical-align: 0; }
.wf-facts li span { color: var(--wf-muted); }
.wf-facts li b { text-align: end; color: var(--wf-ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-facts li.ok svg.feather, .wf-facts li.ok b { color: var(--wf-ok); }
.wf-facts li.warn svg.feather, .wf-facts li.warn b { color: var(--wf-warn); }
.wf-ack-btn { font-weight: 800; padding: 10px; border-radius: 11px; }
.wf-actions-title { font-size: 12.5px; color: var(--wf-muted); font-weight: 600; margin-bottom: 8px; line-height: 1.6; }
.wf-manage { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--wf-line); }
.wf-manage summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--wf-muted); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.wf-manage summary::-webkit-details-marker { display: none; }
.wf-manage summary:hover { color: var(--wf-primary); }

@media (max-width: 1199px) {
    .wf-req-now { min-width: 0; width: 100%; }
}
@media (max-width: 767px) {
    .wf-req-tile { width: 52px; height: 52px; font-size: 19px; border-radius: 14px; }
    .wf-req-id { align-items: flex-start; }
    .wf-booking { grid-template-columns: 42px minmax(0, 1fr); }
    .wf-booking .gifts { grid-column: 1 / -1; }
    .wf-req-main .tab-content { padding: 14px; }
}

@media (max-width: 1199px) {
    .wf-create { grid-template-columns: minmax(0, 1fr); }
    .wf-settings-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .wf-nav { flex-direction: column; align-items: stretch; }
    .wf-nav-main a { padding: 9px 12px; flex: 1; justify-content: center; }
    .wf-nav-tools .tool span, .wf-nav-tools .lbl { display: none; }
    .wf-hero-steps { display: none; }
    .wf-settings-tabs { grid-template-columns: minmax(0, 1fr); }
    .wf-settings-tabs small { display: none; }
    .wf-progress { min-width: 0; width: 100%; }
}

/* =================================================================
   My tasks
   ================================================================= */
.tk-card { padding: 0; overflow: hidden; }
.tk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 6px 18px 0; border-bottom: 1px solid var(--wf-line); }
.tk-head .wf-view-toggle { margin-bottom: 8px; }
.tk-tabs { list-style: none; margin: 0; padding: 0; border-bottom: 0; flex-wrap: nowrap; }
.tk-tabs li { margin: 0; }
.tk-tabs .n.bad { background: var(--wf-bad); color: #fff; }
.tk-body { padding: 14px 18px 18px; display: grid; gap: 10px; }
.tk-row { --c: var(--wf-primary); --s: var(--wf-ok); --sbg: var(--wf-ok-bg); display: grid; grid-template-columns: 130px minmax(0, 1fr) 210px auto; gap: 16px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 14px; border: 1px solid var(--wf-line); background: #fff; transition: border-color .15s, box-shadow .15s; }
html[dir=rtl] .tk-row { padding: 12px 12px 12px 14px; }
.tk-row:hover { box-shadow: var(--wf-shadow-lg); border-color: var(--wf-line-strong); }
.tk-row.warn { --s: var(--wf-warn); --sbg: var(--wf-warn-bg); }
.tk-row.bad { --s: var(--wf-bad); --sbg: var(--wf-bad-bg); border-color: #f3cdc8; }
.tk-wait { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 12px; border-radius: 11px; background: var(--sbg); color: var(--s); text-align: center; }
.tk-wait small { font-size: 11px; font-weight: 700; opacity: .85; }
.tk-wait b { font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }
.tk-wait .since { font-size: 11px; color: var(--wf-muted); font-weight: 600; }
.tk-main { min-width: 0; }
.tk-main .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tk-main .ttl { font-size: 15.5px; font-weight: 800; color: var(--wf-ink); }
.tk-main .ttl:hover { color: var(--wf-primary); }
.tk-main .wf-code { font-size: 12px; color: var(--wf-muted); }
.tk-main .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--wf-muted); }
.tk-main .meta > span { display: inline-flex; align-items: center; gap: 5px; }
.tk-main .meta svg.feather { width: 13px; height: 13px; vertical-align: 0; }
.tk-flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 800; }
.tk-flag svg.feather { width: 12px; height: 12px; vertical-align: 0; }
.tk-flag.pending { background: var(--wf-warn-bg); color: var(--wf-warn); }
.tk-flag.progress { background: var(--wf-info-bg); color: var(--wf-primary); }
.tk-flag.mine { background: #f1edff; color: #6d5bd0; }
.tk-due { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.tk-due small { font-size: 11px; font-weight: 700; color: var(--wf-muted); }
.tk-due .ack { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--wf-muted); font-weight: 600; }
.tk-due .ack.late { color: var(--wf-bad); }
.tk-due .ack svg.feather { width: 12px; height: 12px; vertical-align: 0; }
.tk-act { display: flex; gap: 6px; align-items: center; }
.tk-act form { margin: 0; }
.tk-act .btn { white-space: nowrap; }
@media (max-width: 1199px) {
    .tk-row { grid-template-columns: 120px minmax(0, 1fr); }
    .tk-due, .tk-act { grid-column: 2; }
}
@media (max-width: 767px) {
    .tk-row { grid-template-columns: minmax(0, 1fr); }
    .tk-due, .tk-act { grid-column: 1; }
    .tk-wait { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* =================================================================
   Notifications
   ================================================================= */
.nt-card { padding: 0; overflow: hidden; }
.nt-tabs { list-style: none; margin: 0; padding: 6px 18px 0; }
.nt-tabs li { margin: 0; }
.nt-tabs a svg.feather { width: 15px; height: 15px; vertical-align: 0; }
.nt-tabs .n.bad { background: var(--wf-bad); color: #fff; }
.nt-body { padding: 6px 18px 18px; }
.nt-day { display: flex; align-items: center; gap: 10px; margin: 18px 4px 10px; font-size: 12.5px; font-weight: 800; color: var(--wf-muted); }
.nt-day::after { content: ""; flex: 1; height: 1px; background: var(--wf-line); }
.nt-list { display: grid; gap: 8px; }
.nt-item { --c: var(--wf-primary); position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--wf-line); color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.nt-item:hover { border-color: color-mix(in srgb, var(--c) 40%, #fff); box-shadow: var(--wf-shadow-lg); transform: translateY(-1px); color: inherit; }
.nt-item.unread { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 6%, #fff), #fff 55%); border-color: color-mix(in srgb, var(--c) 25%, #fff); }
html[dir=rtl] .nt-item.unread { background: linear-gradient(270deg, color-mix(in srgb, var(--c) 6%, #fff), #fff 55%); }
.nt-item .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.nt-item.unread .ic { background: var(--c); color: #fff; }
.nt-item .ic svg.feather { width: 19px; height: 19px; vertical-align: 0; }
.nt-item .kind { display: block; font-size: 11.5px; font-weight: 800; color: var(--c); margin-bottom: 2px; }
.nt-item p { margin: 0; font-size: 14px; color: var(--wf-text); line-height: 1.55; }
.nt-item.unread p { color: var(--wf-ink); font-weight: 700; }
.nt-item .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--wf-muted); }
.nt-item .meta .wf-code { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--wf-soft); }
.nt-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.nt-item .go { color: var(--wf-line-strong); }
.nt-item:hover .go { color: var(--c); }
@media (max-width: 767px) {
    .nt-item { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 12px; gap: 10px; }
    .nt-item .go { display: none; }
}

/* =================================================================
   Settings v2
   ================================================================= */
.wf-set-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.wf-set-layout { grid-template-columns: minmax(0, 1fr) 400px; }

/* workflow map as flow nodes */
.wf-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.wf-flow-node { --c: var(--wf-primary); display: flex; flex-direction: column; border-radius: 14px; background: #fff; border: 1px solid var(--wf-line); color: inherit; overflow: hidden; transition: box-shadow .18s, transform .18s, border-color .18s; }
.wf-flow-node:hover { transform: translateY(-2px); box-shadow: var(--wf-shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, #fff); color: inherit; }
.wf-flow-node .h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 13%, #fff), color-mix(in srgb, var(--c) 4%, #fff)); border-bottom: 1px solid color-mix(in srgb, var(--c) 16%, #fff); }
.wf-flow-node .h .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; flex-shrink: 0; }
.wf-flow-node .h .nm { flex: 1; min-width: 0; }
.wf-flow-node .h b { display: block; font-size: 14.5px; color: var(--wf-ink); }
.wf-flow-node .h small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--wf-muted); }
.wf-flow-node .h small svg.feather { width: 12px; height: 12px; vertical-align: 0; }
.wf-flow-node .h .flag { color: var(--c); }
.wf-flow-node ul { list-style: none; margin: 0; padding: 8px 10px 10px; display: grid; gap: 4px; }
.wf-flow-node li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 7px 8px; border-radius: 9px; }
.wf-flow-node li:hover { background: var(--wf-soft); }
.wf-flow-node li.none { color: var(--wf-muted); font-size: 12.5px; }
.wf-flow-node .act { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--wf-ink); }
.wf-flow-node .act svg.feather { width: 13px; height: 13px; vertical-align: 0; color: var(--ac); flex-shrink: 0; }
.wf-flow-node .to { display: flex; flex-wrap: wrap; gap: 4px; padding-inline-start: 19px; }
.wf-flow-node .dot { --c: var(--wf-primary); display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.wf-flow-node .dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.wf-flow-node .dot.muted { --c: #64748b; }
.wf-flow-node .dot.muted::before, .wf-flow-node .dot.end::before { display: none; }
.wf-flow-node .dot svg.feather { width: 11px; height: 11px; vertical-align: 0; }
.wf-flow-node .dot.end.completed { --c: var(--wf-ok); }
.wf-flow-node .dot.end.cancelled, .wf-flow-node .dot.end.rejected { --c: var(--wf-bad); }
.wf-flow-node .dot.end.on_hold { --c: var(--wf-warn); }

/* general settings form */
.wf-num { display: grid; grid-template-columns: 36px minmax(0, 1fr) 128px; align-items: center; gap: 10px; padding: 10px 0; margin: 0; border-bottom: 1px dashed var(--wf-line); }
.wf-num .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--wf-info-bg); color: var(--wf-primary); }
.wf-num .ic svg.feather { width: 16px; height: 16px; vertical-align: 0; }
.wf-num .lbl { font-size: 13.5px; font-weight: 700; color: var(--wf-ink); line-height: 1.4; }
.wf-num .in { display: flex; align-items: center; border: 1px solid var(--wf-line-strong); border-radius: 11px; overflow: hidden; background: #fff; }
.wf-num .in:focus-within { border-color: var(--wf-primary); box-shadow: 0 0 0 4px #195c7514; }
.wf-num input { width: 100%; border: 0; outline: 0; padding: 9px 10px; font-size: 16px; font-weight: 800; color: var(--wf-ink); text-align: center; min-width: 0; background: transparent; }
.wf-num em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--wf-muted); padding: 0 10px; background: var(--wf-soft); align-self: stretch; display: grid; place-items: center; }
.wf-set-sub { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 13px; font-weight: 800; color: var(--wf-primary); }
.wf-set-form .wf-switch { align-items: center; }
.wf-set-form .wf-switch span { font-size: 13px; }

/* department cards */
.wf-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wf-dept-card { --c: var(--wf-primary); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--wf-line); box-shadow: var(--wf-shadow); color: inherit; text-align: start; overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; }
.wf-dept-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--c); }
.wf-dept-card:hover { transform: translateY(-3px); box-shadow: var(--wf-shadow-lg); border-color: color-mix(in srgb, var(--c) 35%, #fff); color: inherit; }
.wf-dept-card.off { opacity: .6; }
.wf-dept-card .top { display: flex; align-items: center; gap: 12px; }
.wf-dept-card .top .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); flex-shrink: 0; }
.wf-dept-card .top .nm { flex: 1; min-width: 0; }
.wf-dept-card .top b { display: block; font-size: 16px; color: var(--wf-ink); }
.wf-dept-card .top small { font-size: 12px; color: var(--wf-muted); }
.wf-dept-card .go { color: var(--wf-line-strong); }
.wf-dept-card:hover .go { color: var(--c); }
.wf-dept-card .people { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wf-avatars { display: flex; align-items: center; }
.wf-avatars .wf-tile { border: 2px solid #fff; margin-inline-start: -8px; box-shadow: 0 1px 3px #0d2c401a; }
.wf-avatars .wf-tile:first-child { margin-inline-start: 0; }
.wf-avatars .wf-tile.more { --c: #64748b; font-size: 10.5px; }
.wf-dept-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wf-dept-card .stats span { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--wf-softer); border: 1px solid var(--wf-line); font-size: 12px; color: var(--wf-muted); font-weight: 600; white-space: nowrap; overflow: hidden; }
.wf-dept-card .stats svg.feather { width: 14px; height: 14px; vertical-align: 0; color: var(--c); flex-shrink: 0; }
.wf-dept-card .stats b { font-size: 15px; color: var(--wf-ink); line-height: 1.2; font-weight: 800; }
.wf-dept-card .top b, .wf-flow-node .h b, .wf-settings-tabs b, .wf-dept-card.add b { font-weight: 800; }
.wf-dept-card .load { display: block; height: 5px; border-radius: 3px; background: var(--wf-soft); overflow: hidden; }
.wf-dept-card .load i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.wf-dept-card .flags { display: flex; gap: 5px; flex-wrap: wrap; }
.wf-dept-card .flags .wf-tag { font-size: 11px; padding: 2px 7px; }
.wf-dept-card .flags .wf-tag svg.feather { width: 11px; height: 11px; }
.wf-dept-card.add { align-items: center; justify-content: center; min-height: 220px; border: 2px dashed var(--wf-line-strong); background: transparent; box-shadow: none; color: var(--wf-muted); cursor: pointer; }
.wf-dept-card.add::before { display: none; }
.wf-dept-card.add .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--wf-line); color: var(--wf-primary); }
.wf-dept-card.add:hover { border-color: var(--wf-primary); color: var(--wf-primary); background: #fff; }

@media (max-width: 1199px) {
    .wf-set-layout { grid-template-columns: minmax(0, 1fr); }
    .wf-set-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
