/* ==========================================================================
   FZ WorkFolio - design system
   One stylesheet for the whole app: dark "tech" default, light theme toggle,
   responsive shell (sidebar / topbar), aligned components, micro-animations.
   Loaded after Bootstrap so these rules win without !important spam.
   ========================================================================== */

/* ------------------------------------------------------------- tokens ---- */
:root {
    --wf-font: "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --wf-mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;
    --wf-primary: #7c5cff;
    --wf-primary-2: #22d3ee;
    --wf-accent: #f472b6;
    --wf-success: #22c55e;
    --wf-warn: #f59e0b;
    --wf-danger: #ef4444;
    --wf-info: #38bdf8;
    --wf-grad: linear-gradient(135deg, var(--wf-primary) 0%, #4f46e5 45%, var(--wf-primary-2) 100%);
    --wf-radius: 16px;
    --wf-radius-sm: 11px;
    --wf-side-w: 258px;
    --wf-side-w-collapsed: 76px;
    --wf-top-h: 66px;
    --wf-ease: cubic-bezier(.22, .61, .36, 1);
    --wf-shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
    --wf-shadow-2: 0 18px 48px -18px rgba(16, 24, 40, .38);
}

html[data-theme="dark"] {
    --wf-bg: #070b14;
    --wf-bg-2: #0c1220;
    --wf-surface: rgba(255, 255, 255, .045);
    --wf-surface-2: rgba(255, 255, 255, .075);
    --wf-surface-solid: #101728;
    --wf-border: rgba(148, 163, 184, .16);
    --wf-border-strong: rgba(148, 163, 184, .30);
    --wf-text: #e9eefb;
    --wf-muted: #97a3ba;
    --wf-shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -22px rgba(0, 0, 0, .9);
    --wf-shadow-2: 0 30px 70px -30px rgba(0, 0, 0, .95);
    --wf-grid: rgba(124, 92, 255, .10);
    color-scheme: dark;
}

html[data-theme="light"] {
    --wf-bg: #f2f5fb;
    --wf-bg-2: #e9eef8;
    --wf-surface: #ffffff;
    --wf-surface-2: #f5f7fd;
    --wf-surface-solid: #ffffff;
    --wf-border: rgba(16, 24, 40, .10);
    --wf-border-strong: rgba(16, 24, 40, .20);
    --wf-text: #101828;
    --wf-muted: #667085;
    --wf-shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -16px rgba(16, 24, 40, .28);
    --wf-shadow-2: 0 24px 60px -28px rgba(16, 24, 40, .40);
    --wf-grid: rgba(79, 70, 229, .07);
    color-scheme: light;
}

/* --------------------------------------------------------------- base ---- */
* { scrollbar-width: thin; scrollbar-color: var(--wf-border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--wf-border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--wf-primary); background-clip: content-box; }

html, body { min-height: 100%; }

body {
    font-family: var(--wf-font);
    background: var(--wf-bg);
    color: var(--wf-text);
    -webkit-font-smoothing: antialiased;
    letter-spacing: .005em;
    /* soft tech glow + faint grid, fixed so it never scrolls away */
    background-image:
        radial-gradient(1100px 620px at 82% -8%, rgba(124, 92, 255, .20), transparent 62%),
        radial-gradient(900px 520px at 0% 100%, rgba(34, 211, 238, .16), transparent 60%),
        linear-gradient(var(--wf-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--wf-grid) 1px, transparent 1px);
    background-size: auto, auto, 46px 46px, 46px 46px;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.015em; color: var(--wf-text); }
h4 { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.5rem); }
a { text-decoration: none; }
hr { border-color: var(--wf-border); opacity: 1; }
::selection { background: rgba(124, 92, 255, .38); color: #fff; }
:focus-visible { outline: 2px solid var(--wf-primary-2); outline-offset: 2px; border-radius: 6px; }

/* -------------------------------------------------------------- shell ---- */
.wf-shell { display: flex; min-height: 100vh; }

.wf-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--wf-side-w);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem .85rem;
    background: color-mix(in srgb, var(--wf-bg-2) 88%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-right: 1px solid var(--wf-border);
    z-index: 1045;
    transition: width .28s var(--wf-ease), transform .28s var(--wf-ease);
    overflow: hidden;
}

.wf-brand { display: flex; align-items: center; gap: .7rem; padding: .35rem .4rem 1rem; }
.wf-brand img { height: 38px; width: auto; border-radius: 9px; box-shadow: 0 6px 18px -8px rgba(124, 92, 255, .9); }
.wf-brand-txt { min-width: 0; }
.wf-brand-name {
    font-weight: 800; font-size: 1.02rem; line-height: 1.1; white-space: nowrap;
    background: var(--wf-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.wf-brand-sub { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wf-muted); white-space: nowrap; }

.wf-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: .15rem; padding-right: 2px; }
.wf-nav-label { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--wf-muted); padding: .85rem .75rem .3rem; white-space: nowrap; }

.wf-link {
    position: relative;
    display: flex; align-items: center; gap: .7rem;
    padding: .58rem .7rem;
    border-radius: var(--wf-radius-sm);
    color: var(--wf-muted);
    font-size: .9rem; font-weight: 600;
    white-space: nowrap;
    transition: color .2s var(--wf-ease), background .2s var(--wf-ease), transform .2s var(--wf-ease);
}
.wf-link .wf-ico {
    flex: 0 0 auto;
    width: 30px; height: 30px; display: grid; place-items: center;
    border-radius: 9px;
    background: var(--wf-surface-2);
    font-size: .95rem;
    transition: background .25s var(--wf-ease), color .25s var(--wf-ease), box-shadow .25s var(--wf-ease);
}
.wf-link span.lbl { overflow: hidden; text-overflow: ellipsis; }
.wf-link:hover { color: var(--wf-text); background: var(--wf-surface-2); transform: translateX(3px); }
.wf-link:hover .wf-ico { background: rgba(124, 92, 255, .22); color: var(--wf-text); }
.wf-link.active { color: #fff; background: var(--wf-grad); box-shadow: 0 10px 26px -14px rgba(124, 92, 255, .95); }
.wf-link.active .wf-ico { background: rgba(255, 255, 255, .18); color: #fff; }
.wf-link.active::before {
    content: ""; position: absolute; left: -.85rem; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--wf-primary-2);
    box-shadow: 0 0 12px var(--wf-primary-2);
}

.wf-side-foot { border-top: 1px solid var(--wf-border); padding-top: .7rem; display: grid; gap: .55rem; }
.wf-user { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.wf-avatar {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px;
    display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: #fff;
    background: var(--wf-grad); box-shadow: 0 8px 20px -10px rgba(124, 92, 255, .9);
}
.wf-user-name { font-size: .86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-user-role { font-size: .68rem; color: var(--wf-muted); letter-spacing: .1em; text-transform: uppercase; }

.wf-body { flex: 1 1 auto; min-width: 0; margin-left: var(--wf-side-w); display: flex; flex-direction: column; transition: margin .28s var(--wf-ease); }

.wf-top {
    position: sticky; top: 0; z-index: 1030;
    min-height: var(--wf-top-h);
    display: flex; align-items: center; gap: .7rem;
    padding: .7rem clamp(.85rem, 2vw, 1.6rem);
    background: color-mix(in srgb, var(--wf-bg) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid var(--wf-border);
}
.wf-top-title { min-width: 0; }
.wf-top-title h1 { font-size: clamp(1rem, .95rem + .35vw, 1.28rem); margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-crumb { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wf-muted); }
.wf-top-right { margin-left: auto; display: flex; align-items: center; gap: .45rem; }

.wf-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    height: 36px; padding: 0 .7rem;
    border-radius: 99px;
    background: var(--wf-surface-2);
    border: 1px solid var(--wf-border);
    font-size: .8rem; font-weight: 600; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.wf-chip .bi { color: var(--wf-primary-2); }
.wf-role { font-size: .64rem; letter-spacing: .1em; padding: .12rem .4rem; border-radius: 6px; background: var(--wf-grad); color: #fff; }

.wf-icon-btn {
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--wf-border);
    background: var(--wf-surface-2); color: var(--wf-text);
    font-size: 1rem; cursor: pointer;
    transition: transform .18s var(--wf-ease), border-color .2s, background .2s, box-shadow .2s;
}
.wf-icon-btn:hover { transform: translateY(-2px); border-color: var(--wf-primary); box-shadow: 0 10px 24px -14px rgba(124, 92, 255, .9); }
.wf-icon-btn:active { transform: translateY(0) scale(.96); }
.wf-burger { display: none; }
.wf-rail { display: none; }
.wf-signout { display: grid; }
.lbl-user { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 992px) {
    .wf-rail { display: grid; }
    .wf-signout { display: none; }
}
@media (max-width: 767.98px) {
    .lbl-user { display: none; }
}

.wf-main { flex: 1 1 auto; padding: clamp(1rem, 2vw, 1.6rem) clamp(.85rem, 2vw, 1.6rem) 3rem; width: 100%; max-width: 1680px; margin: 0 auto; }
.wf-backdrop { position: fixed; inset: 0; background: rgba(3, 6, 15, .62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 1040; opacity: 0; visibility: hidden; transition: opacity .25s var(--wf-ease), visibility .25s; }
body.side-open .wf-backdrop { opacity: 1; visibility: visible; }
.wf-side-close { display: none; }

/* desktop: collapse to icon rail */
body.side-collapsed .wf-side { width: var(--wf-side-w-collapsed); }
body.side-collapsed .wf-body { margin-left: var(--wf-side-w-collapsed); }
body.side-collapsed .wf-brand-txt,
body.side-collapsed .wf-link span.lbl,
body.side-collapsed .wf-nav-label,
body.side-collapsed .wf-user-txt { display: none; }
body.side-collapsed .wf-link { justify-content: center; padding: .5rem .3rem; }
body.side-collapsed .wf-link.active::before { display: none; }
body.side-collapsed .wf-user { justify-content: center; }
body.side-collapsed .wf-side-foot .btn span { display: none; }

/* ---------------------------------------------------------- components ---- */
.card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    box-shadow: var(--wf-shadow-1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform .25s var(--wf-ease), box-shadow .25s var(--wf-ease), border-color .25s var(--wf-ease);
}
.card-hover:hover { transform: translateY(-4px); border-color: var(--wf-border-strong); box-shadow: var(--wf-shadow-2); }

.stat-card { display: flex; align-items: center; gap: .85rem; height: 100%; overflow: hidden; position: relative; }
.stat-card::after {
    content: ""; position: absolute; inset: auto -30% -70% auto; width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, .22), transparent 70%);
    opacity: 0; transition: opacity .35s var(--wf-ease);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--wf-shadow-2); }
.stat-card:hover::after { opacity: 1; }
.stat-ico {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.25rem; color: #fff;
    background: var(--wf-grad);
    box-shadow: 0 12px 26px -14px rgba(124, 92, 255, .95);
}
.stat-txt { min-width: 0; }
.stat-num { font-size: clamp(1.15rem, 1rem + .7vw, 1.6rem); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-lbl { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wf-muted); }
.text-soft { color: var(--wf-muted) !important; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1.1rem; }
.page-head h4 { margin: 0; }
.page-sub { color: var(--wf-muted); font-size: .86rem; }

/* buttons: consistent height, centred icon+label, press feedback, ripple */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 38px; padding: .38rem .9rem;
    border-radius: var(--wf-radius-sm);
    font-weight: 650; font-size: .88rem; letter-spacing: .01em;
    border: 1px solid transparent;
    transition: transform .16s var(--wf-ease), box-shadow .22s var(--wf-ease), background .22s, border-color .22s, color .22s;
    position: relative; overflow: hidden; white-space: nowrap;
}
.btn .bi { line-height: 1; font-size: 1.02em; }
.btn-sm { min-height: 32px; padding: .2rem .65rem; font-size: .8rem; border-radius: 9px; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary {
    background: var(--wf-grad); border-color: transparent; color: #fff;
    box-shadow: 0 12px 26px -16px rgba(124, 92, 255, 1);
}
.btn-primary:hover, .btn-primary:focus { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(124, 92, 255, 1); filter: brightness(1.06); }
.btn-outline-primary { border-color: rgba(124, 92, 255, .55); color: #b9a8ff; background: rgba(124, 92, 255, .10); }
html[data-theme="light"] .btn-outline-primary { color: #4f46e5; }
.btn-outline-primary:hover { background: var(--wf-grad); border-color: transparent; color: #fff; transform: translateY(-2px); }
.btn-outline-secondary, .btn-outline-light {
    border-color: var(--wf-border-strong); color: var(--wf-text); background: var(--wf-surface-2);
}
.btn-outline-secondary:hover, .btn-outline-light:hover { background: var(--wf-surface); color: var(--wf-text); border-color: var(--wf-primary); transform: translateY(-2px); }
.btn-danger { background: linear-gradient(135deg, #f87171, #dc2626); border-color: transparent; color: #fff; }
.btn-danger:hover { color: #fff; transform: translateY(-2px); }
.btn-outline-danger { border-color: rgba(239, 68, 68, .5); color: #fca5a5; background: rgba(239, 68, 68, .10); }
html[data-theme="light"] .btn-outline-danger { color: #dc2626; }
.btn-outline-danger:hover { background: #ef4444; border-color: transparent; color: #fff; }
.btn-success { background: linear-gradient(135deg, #4ade80, #16a34a); border-color: transparent; color: #06240f; }
.btn-success:hover { color: #06240f; transform: translateY(-2px); }
.btn-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); border-color: transparent; color: #3b2400; }
.btn-warning:hover { color: #3b2400; transform: translateY(-2px); }
.btn-info { background: linear-gradient(135deg, #7dd3fc, #0ea5e9); border-color: transparent; color: #04283a; }
.btn-info:hover { color: #04283a; transform: translateY(-2px); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.wf-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); animation: wfRipple .6s var(--wf-ease) forwards; pointer-events: none; }
@keyframes wfRipple { to { transform: scale(2.6); opacity: 0; } }
.wf-press { animation: wfPress .32s var(--wf-ease); }
@keyframes wfPress { 0% { transform: scale(1); } 45% { transform: scale(.94); } 100% { transform: scale(1); } }

/* forms */
.form-label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wf-muted); margin-bottom: .3rem; }
.form-control, .form-select {
    min-height: 40px; border-radius: var(--wf-radius-sm);
    background: var(--wf-surface-2); border: 1px solid var(--wf-border);
    color: var(--wf-text); font-size: .9rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-control:focus, .form-select:focus {
    background: var(--wf-surface-solid); color: var(--wf-text);
    border-color: var(--wf-primary); box-shadow: 0 0 0 4px rgba(124, 92, 255, .18);
}
.form-control::placeholder { color: var(--wf-muted); opacity: .8; }
.form-select { background-image: none; }
.form-select option { background: var(--wf-surface-solid); color: var(--wf-text); }
.form-check-input { background-color: var(--wf-surface-2); border-color: var(--wf-border-strong); }
.form-check-input:checked { background-color: var(--wf-primary); border-color: var(--wf-primary); }
.form-check-label { font-size: .88rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--wf-primary); }

/* tables */
.table { color: var(--wf-text); --bs-table-bg: transparent; --bs-table-color: var(--wf-text); --bs-table-border-color: var(--wf-border); margin-bottom: 0; }
.table > thead th {
    position: sticky; top: 0; z-index: 2;
    background: color-mix(in srgb, var(--wf-bg-2) 92%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wf-muted);
    font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--wf-border-strong);
}
.table > tbody td, .table > tbody th { vertical-align: middle; font-size: .88rem; }
.table > tbody tr { transition: background .18s var(--wf-ease); }
.table-hover > tbody > tr:hover > * { background: var(--wf-surface-2); }
.table-sm > tbody td, .table-sm > tbody th { padding: .5rem .6rem; }
.table thead.table-light th, .table-light { --bs-table-bg: transparent; --bs-table-color: var(--wf-text); background: transparent !important; color: var(--wf-muted) !important; }
.table-responsive { border-radius: var(--wf-radius); }

/* badges, alerts, misc */
.badge { font-weight: 650; letter-spacing: .02em; border-radius: 99px; padding: .32em .6em; }
.bg-light { background-color: var(--wf-surface-2) !important; color: var(--wf-text) !important; }
.alert { border: 1px solid var(--wf-border); border-left-width: 4px; border-radius: var(--wf-radius-sm); background: var(--wf-surface-2); color: var(--wf-text); }
.alert-danger { border-left-color: var(--wf-danger); }
.alert-success { border-left-color: var(--wf-success); }
.alert-warning { border-left-color: var(--wf-warn); }
.alert-info { border-left-color: var(--wf-info); }
.progress { background: var(--wf-surface-2); border-radius: 99px; height: 8px; }
.progress-bar { background: var(--wf-grad); }
.modal-content { background: var(--wf-surface-solid); border: 1px solid var(--wf-border); border-radius: var(--wf-radius); box-shadow: var(--wf-shadow-2); color: var(--wf-text); }
.modal-header, .modal-footer { border-color: var(--wf-border); }
.modal-backdrop.show { opacity: .72; }
.dropdown-menu { background: var(--wf-surface-solid); border: 1px solid var(--wf-border); border-radius: var(--wf-radius-sm); box-shadow: var(--wf-shadow-2); }
.dropdown-item { color: var(--wf-text); border-radius: 8px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--wf-surface-2); color: var(--wf-text); }
.dropdown-header { color: var(--wf-muted); }

/* live pulse used by the monitor badges and the sidebar indicator */
.wf-pulse { position: relative; }
.wf-pulse::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    background: currentColor; opacity: .35; animation: wfPing 1.6s var(--wf-ease) infinite;
}
@keyframes wfPing { 0% { transform: scale(.6); opacity: .5 } 100% { transform: scale(1.9); opacity: 0 } }

/* skeletons + empty states */
.wf-skel { border-radius: 10px; background: linear-gradient(100deg, var(--wf-surface-2) 30%, var(--wf-surface) 50%, var(--wf-surface-2) 70%); background-size: 220% 100%; animation: wfShimmer 1.4s linear infinite; }
@keyframes wfShimmer { from { background-position: 180% 0 } to { background-position: -80% 0 } }
.wf-empty { display: grid; place-items: center; gap: .5rem; padding: 2.4rem 1rem; color: var(--wf-muted); text-align: center; }
.wf-empty .bi { font-size: 2rem; opacity: .5; }

/* reveal-on-load / on-scroll */
.wf-reveal { opacity: 0; transform: translateY(12px); }
.wf-in .wf-reveal, .wf-reveal.wf-in {
    opacity: 1; transform: none;
    transition: opacity .5s var(--wf-ease), transform .5s var(--wf-ease);
    transition-delay: var(--d, 0ms);
}

/* toast (wf.js) */
.wf-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: grid; gap: .5rem; }
.wf-toast {
    display: flex; align-items: center; gap: .6rem;
    padding: .7rem .9rem; border-radius: var(--wf-radius-sm);
    background: var(--wf-surface-solid); border: 1px solid var(--wf-border);
    box-shadow: var(--wf-shadow-2); font-size: .86rem; font-weight: 600;
    animation: wfToastIn .32s var(--wf-ease);
}
.wf-toast.out { animation: wfToastOut .28s var(--wf-ease) forwards; }
.wf-toast .bi { font-size: 1.05rem; }
@keyframes wfToastIn { from { opacity: 0; transform: translateX(24px) scale(.96) } to { opacity: 1; transform: none } }
@keyframes wfToastOut { to { opacity: 0; transform: translateX(24px) scale(.96) } }

/* ------------------------------------------------------- responsive ------ */
@media (max-width: 1199.98px) {
    .wf-chip-user .lbl-user { display: none; }
}
@media (max-width: 991.98px) {
    .wf-side { transform: translateX(-102%); box-shadow: var(--wf-shadow-2); width: min(84vw, var(--wf-side-w)); }
    body.side-open .wf-side { transform: none; }
    body.side-collapsed .wf-side { width: min(84vw, var(--wf-side-w)); }
    body.side-collapsed .wf-brand-txt, body.side-collapsed .wf-link span.lbl,
    body.side-collapsed .wf-nav-label, body.side-collapsed .wf-user-txt { display: revert; }
    body.side-collapsed .wf-link { justify-content: flex-start; padding: .58rem .7rem; }
    .wf-body, body.side-collapsed .wf-body { margin-left: 0; }
    .wf-burger { display: grid; }
    .wf-side-close { display: grid; margin-left: auto; }
    .wf-main { padding-bottom: 2.4rem; }
}
@media (max-width: 575.98px) {
    body { font-size: .95rem; }
    .wf-top { flex-wrap: wrap; row-gap: .45rem; }
    .wf-top-right { width: 100%; margin-left: 0; justify-content: space-between; }
    .stat-ico { width: 40px; height: 40px; font-size: 1.05rem; }
    .card { border-radius: 14px; }
    .btn { width: 100%; }
    .btn-group .btn, .wf-chip + .btn { width: auto; }
    h4 { font-size: 1.1rem; }
}

/* motion opt-out */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .wf-reveal { opacity: 1; transform: none; }
}

/* print: keep reports clean */
@media print {
    body { background: #fff; color: #000; }
    .wf-side, .wf-top, .wf-backdrop, .wf-chip, .btn { display: none !important; }
    .wf-body { margin-left: 0; }
    .card { border: 1px solid #ccc; box-shadow: none; }
}
