/* =========================================================================
   WorkPulse — front-end stylesheet
   ClickUp-inspired light theme. Tokens come from design-preview.html so the
   live UI matches that spec exactly.

   All component classes are namespaced under `.workpulse-app` so they cannot
   collide with the host theme. A tiny "legacy compatibility" block at the
   bottom maps the older `.workpulse-*` classes onto the new tokens so any
   template that hasn't been migrated yet still looks consistent.
   ========================================================================= */

/* ---------- Tokens ---------- */
.workpulse-app,
.workpulse-app * {
    box-sizing: border-box;
}
.workpulse-app {
    --wp-purple-50:  #F4F1FE;
    --wp-purple-100: #E8E2FD;
    --wp-purple-200: #D5CAFB;
    --wp-purple-300: #B7A5F7;
    --wp-purple-500: #7B68EE;
    --wp-purple-600: #6C57D8;
    --wp-purple-700: #5A47B8;
    --wp-pink-500:   #FF5C8A;

    --wp-bg:           #F7F8FA;
    --wp-card:         #FFFFFF;
    --wp-border:       #E5E7EB;
    --wp-border-soft:  #EEF0F4;
    --wp-border-strong:#D1D5DB;

    --wp-text:         #1F2937;
    --wp-text-strong:  #0F172A;
    --wp-text-muted:   #6B7280;
    --wp-text-subtle:  #9CA3AF;

    --wp-success:  #10B981;
    --wp-warning:  #F59E0B;
    --wp-danger:   #EF4444;
    --wp-info:     #3B82F6;

    --wp-success-soft:  #DCFCE7;
    --wp-warning-soft:  #FEF3C7;
    --wp-danger-soft:   #FEE2E2;
    --wp-info-soft:     #DBEAFE;
    --wp-purple-soft:   #EDE9FE;

    --wp-radius-sm:   6px;
    --wp-radius:      10px;
    --wp-radius-lg:   14px;
    --wp-radius-pill: 999px;

    --wp-shadow-xs: 0 1px 2px rgba(16,24,40,.04);
    --wp-shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --wp-shadow-md: 0 6px 16px rgba(16,24,40,.08), 0 2px 4px rgba(16,24,40,.05);
    --wp-shadow-lg: 0 12px 28px rgba(16,24,40,.12);

    --wp-sidebar-w:    248px;
    --wp-sidebar-w-cl: 64px;
    --wp-topbar-h:     56px;

    --wp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    font-family: var(--wp-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--wp-text);
    background: var(--wp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Theme can interfere with our typography — pin headings inside the app. */
.workpulse-app h1,
.workpulse-app h2,
.workpulse-app h3,
.workpulse-app h4,
.workpulse-app h5 {
    font-family: var(--wp-font);
    color: var(--wp-text-strong);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.workpulse-app h1 { font-size: 22px; }
.workpulse-app h2 { font-size: 18px; }
.workpulse-app h3 { font-size: 15px; }
.workpulse-app h4 { font-size: 13px; }
.workpulse-app p  { margin: 0; }
.workpulse-app a {
    color: var(--wp-purple-600);
    text-decoration: none;
}
.workpulse-app a:hover { color: var(--wp-purple-700); }
.workpulse-app button { font-family: inherit; }
.workpulse-app .muted { color: var(--wp-text-muted); }
.workpulse-app .tiny  { font-size: 12px; }

/* ---------- App shell ---------- */
.workpulse-app {
    display: grid;
    grid-template-columns: var(--wp-sidebar-w) 1fr;
    min-height: 100vh;
}

/* ---------- Full-viewport overlay mode ----------
   On any page that hosts a WorkPulse shortcode the WorkPulse_Assets class
   attaches `workpulse-fullscreen` to <body>. Below that class we lift the
   app shell out of the theme's content column and pin it to the viewport,
   covering the theme's header / page title / sidebars / footer. The WP
   admin bar (z-index 99999) sits above us at z-index 99990 — admins can
   still navigate the rest of the site through it.
*/
body.workpulse-fullscreen {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    /* hide a few common theme chrome containers behind our overlay just in
       case they paint above z-index:99990 (rare but happens with some
       sticky-header themes). */
}
body.workpulse-fullscreen .workpulse-app {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: var(--wp-bg);
    min-height: 0;
    height: 100%;
}
body.workpulse-fullscreen.admin-bar .workpulse-app { top: 32px; }
@media screen and (max-width: 782px) {
    body.workpulse-fullscreen.admin-bar .workpulse-app { top: 46px; }
}

/* ---------- Sidebar ---------- */
.workpulse-app .sidebar {
    background: #FFFFFF;
    border-right: 1px solid var(--wp-border);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}
.workpulse-app .sidebar__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
/* In fullscreen overlay mode the sidebar fills its grid column (which is
   the height of the fixed app shell) — `100vh` is wrong because the app
   may be offset by the admin bar. */
body.workpulse-fullscreen .workpulse-app .sidebar {
    position: static;
    height: 100%;
}
.sidebar__workspace {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--wp-border-soft);
}
.sidebar__logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--wp-purple-500), var(--wp-pink-500));
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.sidebar__workspace-meta { line-height: 1.2; min-width: 0; }
.sidebar__workspace-name {
    font-weight: 600;
    color: var(--wp-text-strong);
    font-size: 14px;
}
.sidebar__workspace-plan {
    font-size: 11px;
    color: var(--wp-text-muted);
}
.sidebar__chev {
    margin-left: auto;
    color: var(--wp-text-subtle);
    display: inline-flex;
}

.sidebar__search {
    margin: 12px 12px 8px;
    position: relative;
}
.sidebar__search input {
    width: 100%;
    padding: 7px 10px 7px 30px;
    border-radius: var(--wp-radius);
    border: 1px solid var(--wp-border);
    background: #FAFAFB;
    font-size: 13px;
    color: var(--wp-text);
    transition: all .15s ease;
    height: auto;
    box-shadow: none;
}
.sidebar__search input::placeholder { color: var(--wp-text-subtle); }
.sidebar__search input:focus {
    outline: none;
    border-color: var(--wp-purple-300);
    background: #fff;
    box-shadow: 0 0 0 3px var(--wp-purple-50);
}
.sidebar__search svg {
    position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
    color: var(--wp-text-subtle);
}

.sidebar__section { padding: 8px 8px 4px; }
.sidebar__section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-text-subtle);
    padding: 8px 8px 4px;
    font-weight: 600;
}
.sidebar__nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar__nav li { margin: 1px 0; padding: 0; }
.sidebar__nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px;
    border-radius: var(--wp-radius-sm);
    color: var(--wp-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: background .12s ease, color .12s ease;
    text-decoration: none;
}
.sidebar__nav a:hover {
    background: #F3F4F6;
    color: var(--wp-text-strong);
}
.sidebar__nav a.active {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    font-weight: 600;
}
.sidebar__nav .badge {
    margin-left: auto;
    background: var(--wp-border);
    color: var(--wp-text-muted);
    border-radius: var(--wp-radius-pill);
    padding: 1px 7px;
    font-size: 10.5px;
    font-weight: 600;
}
.sidebar__nav a.active .badge {
    background: rgba(123,104,238,.15);
    color: var(--wp-purple-700);
}
.sidebar__nav .icon {
    width: 18px; height: 18px;
    display: grid; place-items: center;
    color: var(--wp-text-muted);
    flex-shrink: 0;
}
.sidebar__nav a.active .icon { color: var(--wp-purple-600); }

.sidebar__footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: 10px 12px 14px;
    border-top: 1px solid var(--wp-border-soft);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
}
.workpulse-app .avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--wp-purple-500);
    color: #fff;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 600;
    flex-shrink: 0;
}
.sidebar__footer .meta { line-height: 1.2; min-width: 0; flex: 1; }
.sidebar__footer .name {
    font-weight: 600;
    color: var(--wp-text-strong);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar__footer .role {
    font-size: 11px;
    color: var(--wp-text-muted);
}

/* ---------- Topbar ---------- */
.workpulse-app .main {
    min-width: 0;
    min-height: 0;
}
/* In fullscreen overlay mode the main column is the scrolling container —
   the topbar stays pinned and the page content scrolls underneath. */
body.workpulse-fullscreen .workpulse-app .main {
    height: 100%;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.topbar {
    position: sticky; top: 0; z-index: 10;
    height: var(--wp-topbar-h);
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(140%) blur(6px);
    border-bottom: 1px solid var(--wp-border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
}
.crumbs {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px;
}
.crumbs a { color: var(--wp-text-muted); }
.crumbs .sep { color: var(--wp-text-subtle); }
.crumbs .now { color: var(--wp-text-strong); font-weight: 600; }
.topbar__spacer { flex: 1; }
.topbar__search {
    position: relative;
    width: 320px;
    max-width: 38vw;
}
.topbar__search input {
    width: 100%;
    padding: 7px 10px 7px 32px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    background: #F9FAFB;
    font-size: 13px;
    height: auto;
    box-shadow: none;
}
.topbar__search input:focus {
    outline: none; border-color: var(--wp-purple-300);
    background: #fff;
    box-shadow: 0 0 0 3px var(--wp-purple-50);
}
.topbar__search svg {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--wp-text-subtle);
}
.icon-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    display: grid; place-items: center;
    color: var(--wp-text-muted);
    cursor: pointer;
    padding: 0;
}
.icon-btn:hover { background: #F3F4F6; color: var(--wp-text-strong); }

/* ---------- Page wrapper ---------- */
.workpulse-app .page {
    padding: 24px;
    padding-bottom: 48px;
}
.page__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
    flex-wrap: wrap;
}
.page__title h1 { font-size: 22px; }
.page__title p {
    color: var(--wp-text-muted);
    margin-top: 4px;
    font-size: 13px;
}
.page__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 10px;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-radius: var(--wp-radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* ---------- Buttons ----------
   Themes overwhelmingly style raw <a> and <button> elements, so the visual
   variants below use `!important` on background / border / color to win
   against the host theme. We keep layout properties (padding, font-size)
   un-flagged so they remain easy to override per-page if ever needed.
*/
.workpulse-app .btn,
.workpulse-app a.btn,
.workpulse-app button.btn {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--wp-radius);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    background: transparent;
    color: var(--wp-text) !important;
    text-decoration: none !important;
    line-height: 1.4;
    box-shadow: none;
    font-family: inherit;
}
.workpulse-app .btn:hover,
.workpulse-app a.btn:hover,
.workpulse-app button.btn:hover { text-decoration: none !important; }

.workpulse-app .btn--primary {
    background: var(--wp-purple-500) !important;
    color: #fff !important;
    border-color: var(--wp-purple-500) !important;
    box-shadow: 0 1px 2px rgba(123,104,238,.3);
}
.workpulse-app .btn--primary:hover {
    background: var(--wp-purple-600) !important;
    border-color: var(--wp-purple-600) !important;
    color: #fff !important;
}
.workpulse-app .btn--secondary {
    background: #fff !important;
    color: var(--wp-text) !important;
    border-color: var(--wp-border) !important;
    box-shadow: var(--wp-shadow-xs);
}
.workpulse-app .btn--secondary:hover {
    background: #F9FAFB !important;
    border-color: var(--wp-border-strong) !important;
}
.workpulse-app .btn--ghost {
    background: transparent !important;
    color: var(--wp-text-muted) !important;
    border-color: transparent !important;
}
.workpulse-app .btn--ghost:hover {
    background: #F3F4F6 !important;
    color: var(--wp-text-strong) !important;
}
.workpulse-app .btn--danger {
    background: #fff !important;
    color: var(--wp-danger) !important;
    border-color: var(--wp-border) !important;
}
.workpulse-app .btn--danger:hover {
    background: var(--wp-danger-soft) !important;
    border-color: var(--wp-danger) !important;
    color: var(--wp-danger) !important;
}
.workpulse-app .btn--sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* ---------- Cards / panels ---------- */
.workpulse-app .card {
    background: var(--wp-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-xs);
}
.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wp-border-soft);
    gap: 10px;
}
.card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.card__body { padding: 16px 18px; }

/* ---------- Stat cards (My Day) ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.stat {
    background: var(--wp-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}
.stat__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-text-muted);
    font-weight: 600;
}
.stat__value {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--wp-text-strong);
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.stat__value small {
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text-muted);
}
.stat__delta { font-size: 12px; font-weight: 600; color: var(--wp-success); }
.stat__delta--neg { color: var(--wp-danger); }
.stat__sub { font-size: 11.5px; color: var(--wp-text-muted); }
.stat__sub .live { color: var(--wp-warning); font-weight: 600; }
.stat__icon {
    position: absolute;
    right: 10px; top: 10px;
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-600);
    display: grid; place-items: center;
}

/* ---------- CTA row ---------- */
.cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

/* ---------- Two-column panels ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
}

/* ---------- My Day compact + three-col ---------- */
.my-day-allocations-card {
    margin-bottom: 16px;
}
.my-day-alloc-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.alloc-form {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wp-border);
}
.alloc-plan-hint {
    margin: 0 0 12px;
}
.alloc-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #FAFAFB;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius-lg);
}
.alloc-metric__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wp-text-muted);
    margin-bottom: 4px;
}
.alloc-metric__value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--wp-text);
}
.alloc-metric__sub {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
}
.alloc-metric--billing .alloc-metric__value {
    font-size: 17px;
}
@media (max-width: 700px) {
    .alloc-metrics {
        grid-template-columns: 1fr;
    }
}
.alloc-form__row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.7fr auto;
    gap: 12px;
    align-items: end;
}
.alloc-form__submit .btn {
    width: 100%;
}
.alloc-list {
    min-height: 40px;
}
.alloc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--wp-border);
}
.alloc-item:last-child {
    border-bottom: none;
}
.alloc-item__client {
    font-weight: 600;
}
@media (max-width: 800px) {
    .alloc-form__row {
        grid-template-columns: 1fr;
    }
}

.my-day-compact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 14px;
    padding: 6px 12px;
    min-height: 36px;
    background: var(--wp-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
}
.my-day-compact-punch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}
.my-day-punch-group {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--wp-border);
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
}
.my-day-punch-group .punch-btn {
    flex: 0 0 auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.my-day-punch-group .punch-btn.in {
    border-right: 1px solid rgba(255, 255, 255, .25);
}
.my-day-punch-group .punch-btn.out {
    border-left: 0;
}
.my-day-compact-punch__warn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FEF3C7;
    color: #B45309;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.my-day-compact-punch__hint {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.my-day-compact-punch__link {
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}
.my-day-compact-punch__link:hover {
    color: var(--wp-purple-600);
}
.punch-btn--xs {
    flex: 0 0 auto;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    min-height: 0;
    border-radius: 0;
}
.my-day-compact-punch .punch-btn.in[disabled],
.my-day-compact-punch .punch-btn.in[disabled]:hover {
    opacity: .5;
    background: var(--wp-purple-300);
    color: #fff;
    cursor: not-allowed;
}
.my-day-compact-punch .punch-btn.out[disabled],
.my-day-compact-punch .punch-btn.out[disabled]:hover {
    opacity: .55;
    background: #F3F4F6;
    color: var(--wp-text-muted);
    border-color: transparent;
    cursor: not-allowed;
}
.my-day-compact-mood {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    padding-left: 10px;
    border-left: 1px solid var(--wp-border-soft);
    flex-shrink: 0;
    max-width: 42%;
}
.my-day-compact-mood__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
    flex-shrink: 0;
}
.my-day-compact-mood__chips {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}
.my-day-compact-mood__count {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.my-day-mood-chip {
    display: inline-flex;
    align-items: center;
        justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: #FAFAFB;
    border: 1px solid var(--wp-border-soft);
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
    cursor: default;
}
.my-day-three-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.my-day-three-col .card {
    min-width: 0;
}
.my-day-three-col .card__head {
    padding: 12px 14px;
}
.my-day-three-col .card__body {
    padding: 12px 14px;
}
.my-day-three-col .list-row {
    padding: 8px 0;
    font-size: 12.5px;
}
.stats--admin-summary {
    margin-bottom: 14px;
}
.stats--compact {
    margin-bottom: 14px;
}
.stats--compact .stat {
    padding: 10px 12px;
}
.stats--compact .stat__value {
    font-size: 22px;
}
.stats--compact .stat__icon {
    width: 24px;
    height: 24px;
    right: 8px;
    top: 8px;
}
.workpulse-team-day-report {
    margin-bottom: 14px;
}
.workpulse-team-day-report .card__head {
    padding: 12px 16px;
}
.card__body--flush {
    padding: 0 !important;
}
.workpulse-team-day-table .team-day-name {
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-team-day-table .team-day-hours {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.workpulse-team-day-table .team-day-hours--total {
    color: var(--wp-text-strong);
}
.workpulse-team-day-table .team-day-hours--billable {
    color: #047857;
}
.workpulse-team-day-table .team-day-hours--attendance {
    color: #5A47B8;
}
.workpulse-team-day-table .team-day-mood {
    font-size: 16px;
    line-height: 1;
}
.workpulse-app .workpulse-attendance-filter input[type="date"] {
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wp-text);
    padding: 0;
    min-width: 130px;
}
.workpulse-app .workpulse-team-attendance-table tr.is-active td {
    background: #FFFBEB !important;
}
.workpulse-app .workpulse-attendance-page--admin .att-summary {
    margin-bottom: 14px;
}
.workpulse-app .workpulse-team-day-table {
    width: 100%;
}
.workpulse-app .workpulse-team-day-table th,
.workpulse-app .workpulse-team-day-table td {
    padding: 10px 16px !important;
}
.workpulse-app .workpulse-team-day-table th.right,
.workpulse-app .workpulse-team-day-table td.right {
    text-align: right !important;
}
.workpulse-app .workpulse-team-day-table th.center,
.workpulse-app .workpulse-team-day-table td.center {
    text-align: center !important;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--wp-border-soft);
    font-size: 13px;
}
.list-row:last-child { border-bottom: none; }
.list-row .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wp-text-subtle);
    flex-shrink: 0;
}
.dot.todo { background: #94A3B8; }
.dot.in_progress { background: var(--wp-info); }
.dot.review { background: var(--wp-warning); }
.dot.done   { background: var(--wp-success); }
.list-row .title { font-weight: 500; color: var(--wp-text-strong); }
.list-row .ctx   { color: var(--wp-text-muted); font-size: 12px; }
.list-row .right { margin-left: auto; color: var(--wp-text-muted); font-size: 12px; }

/* ---------- Tables ---------- */
.workpulse-app .tbl {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff !important;
    border: 0 !important;
}
/* Many WP themes ship a global `table td, table th { border: 1px solid … }`
   rule. We must zero ALL four sides explicitly and then re-add only the
   bottom border. Using `!important` so the theme can't win. */
.workpulse-app .tbl th,
.workpulse-app .tbl td {
    text-align: left !important;
    padding: 11px 14px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--wp-border-soft) !important;
    vertical-align: middle !important;
    background-color: transparent;
}
.workpulse-app .tbl tbody tr:last-child td {
    border-bottom: 0 !important;
}
/* Defeat the host theme's `tr:nth-child(odd) { background: ... }` zebra. */
.workpulse-app .tbl tbody tr:nth-child(odd) td,
.workpulse-app .tbl tbody tr:nth-child(odd) th,
.workpulse-app .tbl tbody tr:nth-child(even) td,
.workpulse-app .tbl tbody tr:nth-child(even) th {
    background-color: transparent !important;
}
.workpulse-app .tbl tbody tr:hover td,
.workpulse-app .tbl tbody tr:hover th {
    background-color: #FAFAFB !important;
}
.workpulse-app .tbl th {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--wp-text-muted) !important;
    font-weight: 600 !important;
    background: #FAFAFB !important;
    border-bottom: 1px solid var(--wp-border) !important;
}
.workpulse-app .tbl tbody tr:hover { background: #FAFAFB; }
.workpulse-app .tbl td .num { font-variant-numeric: tabular-nums; }
.workpulse-app .tbl .right  { text-align: right; }
.workpulse-app .tbl .center { text-align: center; }

/* ---------- Pills / chips / badges ----------
   These mirror the canonical preview (.design-preview.html) exactly:
   padding: 2px 10px, no border. Selector intentionally targets both
   `.pill` and `span.pill` / `td .pill` so we beat any host-theme rule
   that ships `td span { border: 1px solid …; padding: …; }`. */
.workpulse-app .pill,
.workpulse-app span.pill,
.workpulse-app td .pill,
.workpulse-app td span.pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 2px 10px !important;
    margin: 0 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    border-radius: var(--wp-radius-pill) !important;
    border: 0 !important;
    outline: 0 !important;
    background: var(--wp-border-soft) !important;
    color: var(--wp-text) !important;
    letter-spacing: 0.01em !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    vertical-align: middle !important;
}
.workpulse-app .pill--success, .workpulse-app td .pill--success { background: var(--wp-success-soft) !important; color: #047857 !important; }
.workpulse-app .pill--warning, .workpulse-app td .pill--warning { background: var(--wp-warning-soft) !important; color: #92400E !important; }
.workpulse-app .pill--danger,  .workpulse-app td .pill--danger  { background: var(--wp-danger-soft)  !important; color: #B91C1C !important; }
.workpulse-app .pill--info,    .workpulse-app td .pill--info    { background: var(--wp-info-soft)    !important; color: #1D4ED8 !important; }
.workpulse-app .pill--purple,  .workpulse-app td .pill--purple  { background: var(--wp-purple-soft)  !important; color: var(--wp-purple-700) !important; }
.workpulse-app .pill--soft,    .workpulse-app td .pill--soft    { background: #F3F4F6 !important; color: var(--wp-text-muted) !important; }

.workpulse-app .tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-radius: var(--wp-radius-pill);
}
.workpulse-app .tag-chip.green  { background: var(--wp-success-soft); color: #047857; }
.workpulse-app .tag-chip.amber  { background: var(--wp-warning-soft); color: #92400E; }
.workpulse-app .tag-chip.blue   { background: var(--wp-info-soft);    color: #1D4ED8; }

.workpulse-app .priority {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--wp-text-strong) !important;
}
.workpulse-app .priority .flag {
    display: inline-block !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 2px !important;
    background: var(--wp-info) !important;
    flex-shrink: 0;
}
.workpulse-app .priority.urgent .flag { background: var(--wp-danger)  !important; }
.workpulse-app .priority.high   .flag { background: var(--wp-warning) !important; }
.workpulse-app .priority.normal .flag { background: var(--wp-info)    !important; }
.workpulse-app .priority.low    .flag { background: #94A3B8           !important; }

.assignees { display: inline-flex; }
.assignees .avatar {
    width: 22px; height: 22px; font-size: 10px;
    border: 2px solid #fff; margin-left: -6px;
}
.assignees .avatar:first-child { margin-left: 0; }

/* ---------- Form fields ---------- */
.workpulse-app .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.workpulse-app .field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .field .hint {
    font-size: 11.5px;
    color: var(--wp-text-muted);
}
.workpulse-app .input,
.workpulse-app .select,
.workpulse-app .textarea,
.workpulse-app input[type="text"],
.workpulse-app input[type="email"],
.workpulse-app input[type="password"],
.workpulse-app input[type="number"],
.workpulse-app input[type="date"],
.workpulse-app input[type="search"],
.workpulse-app input[type="url"],
.workpulse-app textarea,
.workpulse-app select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    background: #fff;
    font-size: 13.5px;
    color: var(--wp-text);
    transition: border .15s ease, box-shadow .15s ease;
    height: auto;
    box-shadow: none;
    font-family: inherit;
}
.workpulse-app .input:focus,
.workpulse-app .select:focus,
.workpulse-app .textarea:focus,
.workpulse-app .topbar__search input,
.workpulse-app .sidebar__search input {
    padding: 8px 12px 8px 34px;
}
.workpulse-app .topbar__search svg,
.workpulse-app .sidebar__search svg {
    pointer-events: none;
    z-index: 1;
}
.workpulse-app input:focus,
.workpulse-app textarea:focus,
.workpulse-app select:focus {
    outline: none;
    border-color: var(--wp-purple-300);
    box-shadow: 0 0 0 3px var(--wp-purple-50);
}
.workpulse-app .textarea,
.workpulse-app textarea { min-height: 84px; resize: vertical; }
.workpulse-app .field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: start;
}
.workpulse-app .field-row + .field-row,
.workpulse-app .field-row + .field,
.workpulse-app .field + .field-row,
.workpulse-app .field + .field { margin-top: 12px; }
/* Sibling fields in a grid row share one row — no extra top margin */
.workpulse-app .field-row > .field + .field { margin-top: 0; }
/* Force exactly two columns regardless of viewport width. */
.workpulse-app .field-row--2 { grid-template-columns: 1fr 1fr; }
.workpulse-app .field-row--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
    .workpulse-app .field-row--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .workpulse-app .field-row--2,
    .workpulse-app .field-row--4 { grid-template-columns: 1fr; }
}
.workpulse-app .checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
.workpulse-app .checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--wp-purple-500);
}

/* ---------- Time entry form footer ---------- */
.workpulse-app .time-entry-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.workpulse-app .time-entry-form__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ---------- Workspace 3-col layout ---------- */
.workpulse-app .ws {
    display: grid;
    grid-template-columns: 240px 280px 1fr;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
    min-height: 480px;
}
.ws__col {
    border-right: 1px solid var(--wp-border-soft);
    display: flex;
    flex-direction: column;
}
.ws__col:last-child { border-right: none; }
.ws__col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--wp-border-soft);
    background: #FAFAFB;
    gap: 8px;
}
.ws__col-head h3 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
}
.ws__list { padding: 6px; overflow-y: auto; flex: 1; }
.ws__item {
    padding: 9px 10px;
    border-radius: var(--wp-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    margin-bottom: 1px;
    color: var(--wp-text);
}
.ws__item:hover { background: #F3F4F6; }
.ws__item.active {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    font-weight: 600;
}
.ws__item .meta {
    margin-left: auto;
    font-size: 11px;
    color: var(--wp-text-muted);
}
.ws__item.active .meta { color: var(--wp-purple-600); }
.ws__empty {
    padding: 24px 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--wp-text-muted);
}

.tags-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--wp-border-soft);
    background: #FAFAFB;
    flex-wrap: wrap;
}
.tags-strip .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--wp-text-muted);
    font-weight: 600;
    margin-right: 4px;
}
.tag-chip-x {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 2px 10px;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-radius: var(--wp-radius-pill);
    font-size: 11px;
    font-weight: 600;
}
.tag-chip-x button {
    background: transparent;
    border: 0;
    color: var(--wp-purple-600);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.add-pill {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px dashed var(--wp-purple-300);
    background: transparent;
    color: var(--wp-purple-600);
    cursor: pointer;
    display: grid; place-items: center;
    font-size: 14px;
    padding: 0;
}

.task-list { padding: 8px; }
.task-card {
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.task-card:hover {
    box-shadow: var(--wp-shadow-sm);
    border-color: var(--wp-border-strong);
}
.task-card .checkbox-round {
    width: 18px; height: 18px;
    border: 1.5px solid var(--wp-border-strong);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}
.task-card .title { font-weight: 500; color: var(--wp-text-strong); }
.task-card .sub {
    display: flex; gap: 8px; align-items: center;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--wp-text-muted);
    flex-wrap: wrap;
}
.task-card .progress {
    width: 80px; height: 6px;
    background: var(--wp-border-soft);
    border-radius: var(--wp-radius-pill);
    overflow: hidden;
}
.task-card .progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--wp-purple-500), var(--wp-pink-500));
}
.task-card .right { display: flex; gap: 8px; align-items: center; }

/* ---------- Reconciliation rows ---------- */
.recon tr.over_logged  td.diff { color: #92400E; font-weight: 600; }
.recon tr.under_logged td.diff { color: #B91C1C; font-weight: 600; }
.recon tr.match        td.diff { color: #047857; font-weight: 600; }

/* ---------- Filter bar (reports / entries) ---------- */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px;
    background: #FAFAFB;
    border-bottom: 1px solid var(--wp-border-soft);
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--wp-border);
    background: #fff;
    border-radius: var(--wp-radius);
    font-size: 12.5px;
    color: var(--wp-text);
    cursor: pointer;
}
.filter-pill:hover { border-color: var(--wp-border-strong); }
.filter-pill .count {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-radius: var(--wp-radius-pill);
    padding: 0 7px;
    font-size: 10.5px;
    font-weight: 700;
}

/* ---------- Attendance summary ---------- */
.att-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.att-card {
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.att-card .lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
    font-weight: 600;
}
.att-card .val {
    font-size: 22px;
    font-weight: 700;
    color: var(--wp-text-strong);
}
.att-card .hint {
    font-size: 11.5px;
    color: var(--wp-text-muted);
}
.att-card.match  { background: #F0FDF4; border-color: #BBF7D0; }
.att-card.over   { background: #FFF7ED; border-color: #FED7AA; }
.att-card.under  { background: #FEF2F2; border-color: #FECACA; }

/* ---------- Punch buttons ---------- */
.punch-row {
    display: flex;
    gap: 12px;
}
.punch-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--wp-radius-lg);
    border: 1.5px solid var(--wp-border);
    background: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--wp-text);
    transition: all .15s ease;
    font-family: inherit;
}
.punch-btn.in {
    background: var(--wp-purple-500);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--wp-shadow-sm);
}
.punch-btn.in:hover { background: var(--wp-purple-600); }
.punch-btn.out { color: var(--wp-text); }
.punch-btn.out:hover {
    background: var(--wp-danger-soft);
    border-color: var(--wp-danger);
    color: #B91C1C;
}
.punch-btn[disabled],
.punch-btn[disabled]:hover {
    opacity: .55;
    cursor: not-allowed;
    background: var(--wp-purple-500);
    color: #fff;
    border-color: transparent;
}
.punch-clock {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--wp-text-strong);
    font-variant-numeric: tabular-nums;
    margin-bottom: 14px;
}

/* ---------- Settings layout ---------- */
.settings-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
}
.settings-nav {
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    padding: 8px;
    height: fit-content;
}
.settings-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--wp-radius-sm);
    font-size: 13px;
    color: var(--wp-text);
    font-weight: 500;
    text-decoration: none;
}
.settings-nav a:hover { background: #F3F4F6; }
.settings-nav a.active {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    font-weight: 600;
}

/* ---------- Floating toasts (success / error feedback) ----------
   Lives in body so it's not clipped by overflow:hidden ancestors. */
.workpulse-toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100050;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.workpulse-toast {
    pointer-events: auto;
    background: #0F172A;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(16,24,40,.22);
    font-size: 13px;
    line-height: 1.4;
    min-width: 220px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}
.workpulse-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.workpulse-toast__icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
}
.workpulse-toast--success { background: #047857; }
.workpulse-toast--success .workpulse-toast__icon { background: rgba(255,255,255,.18); }
.workpulse-toast--error   { background: #B91C1C; }
.workpulse-toast--error   .workpulse-toast__icon { background: rgba(255,255,255,.18); }
.workpulse-toast--info    { background: #0F172A; }

/* ---------- Inline messages (success / error toasts inside forms) ---------- */
.workpulse-app .workpulse-message {
    border-radius: var(--wp-radius);
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    border: 1px solid var(--wp-border);
    background: #fff;
}
.workpulse-app .workpulse-message-success {
    background: var(--wp-success-soft);
    border-color: #BBF7D0;
    color: #047857;
}
.workpulse-app .workpulse-message-error {
    background: var(--wp-danger-soft);
    border-color: #FECACA;
    color: #B91C1C;
}
.workpulse-app .workpulse-message p { margin: 0; }

/* ---------- Error / muted helpers ---------- */
.workpulse-app .workpulse-error,
.workpulse-error {
    background: #fff;
    border: 1px solid var(--wp-danger-soft);
    border-left: 4px solid var(--wp-danger);
    border-radius: var(--wp-radius);
    padding: 14px 18px;
    color: var(--wp-text);
    box-shadow: var(--wp-shadow-xs);
    font-size: 13.5px;
}
.workpulse-app .workpulse-error strong { color: var(--wp-text-strong); }
.workpulse-app .workpulse-error p { margin: 0 0 6px; }
.workpulse-app .workpulse-error p:last-child { margin-bottom: 0; }
.workpulse-app .workpulse-error a {
    color: var(--wp-purple-600);
    font-weight: 600;
}
.workpulse-app .workpulse-login-already {
    background: var(--wp-purple-soft);
    border: 1px solid var(--wp-purple-200);
    border-radius: var(--wp-radius);
    padding: 14px 18px;
    color: var(--wp-purple-700);
    font-size: 13.5px;
}
.workpulse-app .workpulse-muted { color: var(--wp-text-muted); }
.workpulse-app .workpulse-logout-link {
    color: var(--wp-text-muted);
    font-size: 12.5px;
}

/* ---------- Utilities ---------- */
.workpulse-app .hr {
    border: none;
    border-top: 1px solid var(--wp-border-soft);
    margin: 18px 0;
}
.workpulse-app .flex { display: flex; }
.workpulse-app .gap-8 { gap: 8px; }
.workpulse-app .between { justify-content: space-between; }
.workpulse-app .items-center { align-items: center; }

/* ---------- Login (full-viewport overlay) ----------
   The login shell is rendered INSIDE the theme's normal page content area
   (because the WP page that hosts [workpulse_login] is a regular page).
   To make sure the theme's header / page title / footer don't bleed
   through the design, we position the shell as a fixed full-viewport
   overlay and re-declare every design token locally — outside .workpulse-app
   the parent tokens don't apply.

   `!important` is used sparingly on background / border / color of inputs +
   submit because WordPress themes almost universally style raw <input> and
   <button> elements with high specificity. Without those overrides the
   fields and the purple sign-in button disappear into the theme palette.
*/
.workpulse-login-shell {
    /* Local copy of the design tokens so the gradient WP mark, soft borders,
       and purple submit work even though we're outside .workpulse-app. */
    --wp-purple-50:  #F4F1FE;
    --wp-purple-100: #E8E2FD;
    --wp-purple-200: #D5CAFB;
    --wp-purple-300: #B7A5F7;
    --wp-purple-500: #7B68EE;
    --wp-purple-600: #6C57D8;
    --wp-purple-700: #5A47B8;
    --wp-pink-500:   #FF5C8A;

    --wp-bg:           #F7F8FA;
    --wp-card:         #FFFFFF;
    --wp-border:       #E5E7EB;
    --wp-border-soft:  #EEF0F4;
    --wp-border-strong:#D1D5DB;

    --wp-text:        #1F2937;
    --wp-text-strong: #0F172A;
    --wp-text-muted:  #6B7280;
    --wp-text-subtle: #9CA3AF;

    --wp-success: #10B981;
    --wp-warning: #F59E0B;
    --wp-danger:  #EF4444;
    --wp-success-soft: #DCFCE7;
    --wp-warning-soft: #FEF3C7;
    --wp-danger-soft:  #FEE2E2;
    --wp-purple-soft:  #EDE9FE;

    --wp-radius-sm:   6px;
    --wp-radius:      10px;
    --wp-radius-lg:   14px;
    --wp-radius-pill: 999px;

    --wp-shadow-md: 0 6px 16px rgba(16,24,40,.08), 0 2px 4px rgba(16,24,40,.05);

    --wp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Cover the entire viewport — hides the theme's header, "Login" page
       title, sidebar, and footer behind our gradient. */
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow-y: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
    background:
        radial-gradient(1200px 600px at 10% -10%, #EDE9FE 0%, transparent 40%),
        radial-gradient(1000px 500px at 110% 110%, #FCE7F3 0%, transparent 40%),
        var(--wp-bg);
    font-family: var(--wp-font);
    color: var(--wp-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.workpulse-login-shell *,
.workpulse-login-shell *::before,
.workpulse-login-shell *::after {
    box-sizing: border-box;
}

.workpulse-login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: 18px;
    background: #fff !important;
    box-shadow: var(--wp-shadow-md);
    border: 1px solid var(--wp-border);
    color: var(--wp-text);
}
.workpulse-login-card .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.workpulse-login-card .brand .logo-mark {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 9px;
    background-image: linear-gradient(135deg, #7B68EE, #FF5C8A) !important;
    background-color: #7B68EE !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}
.workpulse-login-card .brand .name {
    font-weight: 700;
    color: var(--wp-text-strong);
    font-size: 16px;
    line-height: 1.2;
}
.workpulse-login-card .brand .sub {
    font-size: 12px;
    color: var(--wp-text-muted);
    line-height: 1.2;
}
.workpulse-login-card .title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wp-text-strong);
    margin: 0 0 6px;
    line-height: 1.3;
}
.workpulse-login-card .lead {
    color: var(--wp-text-muted);
    font-size: 13px;
    margin: 0 0 18px;
    line-height: 1.45;
}
.workpulse-login-card .field {
    margin-bottom: 14px;
    display: block;
}
.workpulse-login-card .field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-login-card input[type="text"],
.workpulse-login-card input[type="password"],
.workpulse-login-card input[type="email"],
.workpulse-login-card .field input {
    display: block !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--wp-border) !important;
    border-radius: var(--wp-radius) !important;
    font-size: 14px !important;
    background: #fff !important;
    color: var(--wp-text) !important;
    font-family: inherit !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.workpulse-login-card input:focus {
    border-color: var(--wp-purple-300) !important;
    box-shadow: 0 0 0 3px var(--wp-purple-50) !important;
}
.workpulse-login-card .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 18px;
    gap: 10px;
    font-size: 12.5px;
}
.workpulse-login-card .row .remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wp-text);
    cursor: pointer;
}
.workpulse-login-card .row .remember input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--wp-purple-500);
}
.workpulse-login-card .row .lost {
    color: var(--wp-purple-600);
    font-weight: 500;
    text-decoration: none;
}
.workpulse-login-card .row .lost:hover { color: var(--wp-purple-700); }

.workpulse-login-card .submit,
.workpulse-login-card button.submit,
.workpulse-login-card a.submit {
    display: block !important;
    width: 100% !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    border-radius: var(--wp-radius) !important;
    border: none !important;
    background: #7B68EE !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    cursor: pointer;
    text-align: center !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    box-shadow: 0 1px 2px rgba(123,104,238,.3) !important;
    transition: background .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.workpulse-login-card .submit:hover,
.workpulse-login-card button.submit:hover,
.workpulse-login-card a.submit:hover {
    background: #6C57D8 !important;
}

.workpulse-login-card .alert {
    border-radius: var(--wp-radius);
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 12.5px;
    line-height: 1.4;
}
.workpulse-login-card .alert--error {
    background: var(--wp-danger-soft);
    color: #B91C1C;
    border: 1px solid #FECACA;
}
.workpulse-login-card .alert--success {
    background: var(--wp-success-soft);
    color: #047857;
    border: 1px solid #BBF7D0;
}
.workpulse-login-card .footer-note {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--wp-text-muted);
}
.workpulse-login-card .footer-note a {
    color: var(--wp-purple-600);
    text-decoration: none;
}
.workpulse-login-card .footer-note a:hover { color: var(--wp-purple-700); }

/* WP admin bar sometimes renders even on the frontend for logged-in users —
   keep it out of the way when our overlay is up. */
body.admin-bar .workpulse-login-shell { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .workpulse-login-shell { top: 46px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .att-summary { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .my-day-three-col { grid-template-columns: 1fr; }
    .my-day-compact-row { flex-wrap: wrap; }
    .my-day-compact-mood {
        border-left: none;
        padding-left: 0;
        max-width: 100%;
        width: 100%;
    }
    .workpulse-app .ws { grid-template-columns: 1fr; }
    .ws__col { border-right: none; border-bottom: 1px solid var(--wp-border-soft); }
    .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .workpulse-app { grid-template-columns: 1fr; }
    .workpulse-app .sidebar { display: none; }
    .topbar { padding: 0 14px; }
    .workpulse-app .page {
        padding: 16px;
        padding-bottom: 40px;
    }
    .topbar__search { display: none; }
}

.workpulse-app .ws-client-billing textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
}
.workpulse-app .ws-client-billing .hint {
    display: block;
    margin: 4px 0 6px;
}
.workpulse-app .workpulse-workspace {
    background: var(--wp-border);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    overflow: hidden;
    box-shadow: var(--wp-shadow-xs);
}
.workpulse-workspace__columns {
    display: grid;
    grid-template-columns: 240px 280px 1fr;
    min-height: 480px;
    gap: 1px;
    background: var(--wp-border);
}
.workpulse-app .ws-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
}
.workpulse-app .ws-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #FAFAFB;
    border-bottom: 1px solid var(--wp-border);
    gap: 8px;
}
.workpulse-app .ws-col__head h3 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
}
.workpulse-app .ws-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}
.workpulse-app .ws-list .ws-row:not(.ws-empty) {
    border-bottom: 1px solid var(--wp-border-soft);
    border-radius: 0;
    margin-bottom: 0;
}
.workpulse-app .ws-list .ws-row:not(.ws-empty):last-child {
    border-bottom: none;
}
.workpulse-app .ws-row {
    padding: 10px 14px;
    border-radius: var(--wp-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--wp-text);
}
.workpulse-app .ws-row:hover { background: #F3F4F6; }
.workpulse-app .ws-row.is-active,
.workpulse-app .ws-row.is-selected,
.workpulse-app .ws-row[aria-current="true"] {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--wp-purple-500);
}
.workpulse-app .ws-row__title {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Upwork clients — 5×5 green dot, top-left of row (workspace client list only) */
.workpulse-app .ws-list--clients .ws-row {
    position: relative;
    flex-wrap: nowrap;
    padding-left: 16px;
}
.workpulse-app .ws-list--clients .ws-row--upwork::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #14A800;
    pointer-events: none;
}
.workpulse-app .ws-list--clients .ws-row__meta {
    flex-shrink: 0;
    white-space: nowrap;
}
.workpulse-app .ws-row__meta {
    margin-left: auto;
    font-size: 11px;
    color: var(--wp-text-muted);
    font-weight: 500;
}
.workpulse-app .ws-row.is-active .ws-row__meta,
.workpulse-app .ws-row.is-selected .ws-row__meta { color: var(--wp-purple-600); }

/* Per-row hover-revealed action buttons (Archive, Delete). */
.workpulse-app .ws-row__actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    opacity: 0;
    transition: opacity .12s ease;
}
.workpulse-app .ws-row:hover .ws-row__actions,
.workpulse-app .ws-row:focus-within .ws-row__actions { opacity: 1; }
.workpulse-app .ws-row__act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    border: 0;
    color: var(--wp-text-muted);
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.workpulse-app .ws-row__act:hover {
    background: rgba(0,0,0,.06);
    color: var(--wp-text-strong);
}
.workpulse-app .ws-row__act--danger:hover {
    background: var(--wp-danger-soft);
    color: #B91C1C;
}

/* Archived rows: dimmed and hidden by default. The column-level
   .show-archived class (toggled by the checkbox) reveals them. */
.workpulse-app .ws-list .ws-row.is-archived { display: none; }
.workpulse-app .ws-list.show-archived .ws-row.is-archived {
    display: flex;
    opacity: 0.6;
    font-style: italic;
}
.workpulse-app .ws-list.show-archived .ws-row.is-archived .ws-row__title::after {
    content: ' · archived';
    font-size: 11px;
    color: var(--wp-text-muted);
    font-style: normal;
}

/* "Show archived" toggle in the column header. */
.workpulse-app .ws-col__head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.workpulse-app .ws-show-archived {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--wp-text-muted);
    cursor: pointer;
    user-select: none;
}
.workpulse-app .ws-show-archived input { margin: 0; }
.workpulse-app .ws-show-archived span { text-transform: none; letter-spacing: 0; }
.workpulse-app .ws-archived-hint {
    margin: 0;
    padding: 8px 14px 10px;
    line-height: 1.4;
    border-bottom: 1px solid var(--wp-border-soft);
    background: #FAFAFB;
}
.workpulse-app .ws-empty {
    padding: 18px 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--wp-text-muted);
    list-style: none;
}
.workpulse-app .ws-btn-add {
    width: 26px; height: 26px;
    border-radius: var(--wp-radius-sm);
    background: var(--wp-purple-500);
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: grid; place-items: center;
    padding: 0;
    font-size: 14px;
    transition: background .15s ease, opacity .15s ease;
}
.workpulse-app .ws-btn-add:hover { background: var(--wp-purple-600); }
.workpulse-app .ws-btn-add[disabled] {
    opacity: .4;
    cursor: not-allowed;
}
.workpulse-app .ws-tags-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    background: #FAFAFB;
    border-bottom: 1px solid var(--wp-border);
}
.workpulse-app .ws-tags-strip__label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--wp-text-muted);
    font-weight: 600;
    margin-right: 4px;
}
.workpulse-app .ws-tags-strip__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.workpulse-app .ws-tags-strip__list li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-radius: var(--wp-radius-pill);
    font-size: 11px;
    font-weight: 600;
}
.workpulse-app .ws-tags-strip__add {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px dashed var(--wp-purple-300);
    background: transparent;
    color: var(--wp-purple-600);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}
.workpulse-app .ws-task-filters {
    display: flex;
    gap: 6px;
    align-items: center;
}
.workpulse-app .ws-task-status-filter {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: var(--wp-radius-sm);
    border: 1px solid var(--wp-border);
    background: #fff;
}

/* Workspace task cards (JS renders <li class="ws-task-row task-card …"> into .ws-list--tasks).
   The structure mirrors design-preview.html:
     [round checkbox] [title + sub-row (pill / priority / due / hours)] [progress bar + %]
*/
.workpulse-app .ws-list--tasks { padding: 0; }
.workpulse-app .ws-list--tasks .ws-task-row,
.workpulse-app .ws-list--tasks .task-card {
    list-style: none;
    background: #fff;
    padding: 12px 14px;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--wp-border-soft);
    border-radius: 0;
    transition: background .12s ease;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}
.workpulse-app .ws-list--tasks .ws-task-row:last-child,
.workpulse-app .ws-list--tasks .task-card:last-child {
    border-bottom: none;
}
.workpulse-app .ws-list--tasks .ws-task-row:hover,
.workpulse-app .ws-list--tasks .task-card:hover {
    background: #F9FAFB;
}

/* Round checkbox (filled green when status=done) */
.workpulse-app .ws-list--tasks .checkbox-round {
    width: 18px; height: 18px;
    border: 1.5px solid var(--wp-border-strong);
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease;
}
.workpulse-app .ws-list--tasks .checkbox-round.is-done,
.workpulse-app .ws-list--tasks .status-done .checkbox-round {
    background: var(--wp-success);
    border-color: var(--wp-success);
}

/* Title + sub-row (status pill, priority, due date, hours) */
.workpulse-app .ws-list--tasks .task-card__main { min-width: 0; }
.workpulse-app .ws-list--tasks .task-card__main .title {
    font-weight: 600;
    color: var(--wp-text-strong);
    font-size: 13.5px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workpulse-app .ws-list--tasks .task-card__main .title.is-done,
.workpulse-app .ws-list--tasks .status-done .task-card__main .title {
    text-decoration: line-through;
    color: var(--wp-text-muted);
}
.workpulse-app .ws-list--tasks .task-card__main .sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--wp-text-muted);
}
.workpulse-app .ws-list--tasks .task-card__main .sub .due,
.workpulse-app .ws-list--tasks .task-card__main .sub .hours {
    color: var(--wp-text-muted);
}

/* Right column: progress bar + % */
.workpulse-app .ws-list--tasks .right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.workpulse-app .ws-list--tasks .progress {
    width: 96px;
    height: 6px;
    background: var(--wp-border-soft);
    border-radius: var(--wp-radius-pill);
    overflow: hidden;
    flex-shrink: 0;
}
.workpulse-app .ws-list--tasks .progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--wp-purple-500), var(--wp-pink-500));
    border-radius: inherit;
}
.workpulse-app .ws-list--tasks .progress-pct {
    font-size: 11.5px;
    color: var(--wp-text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: right;
}

/* Variance flag for tasks where manual progress and logged-hour-based
   progress disagree — surfaced as a small amber/red exclamation chip. */
.workpulse-app .ws-list--tasks .variance-badge {
    display: inline-grid;
    place-items: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 11px;
    color: #fff;
}
.workpulse-app .ws-list--tasks .variance-ahead  { background: var(--wp-warning); }
.workpulse-app .ws-list--tasks .variance-behind { background: var(--wp-danger); }

/* Priority chip (legacy duplicate) is intentionally inert — the canonical
   rules live near the top of this file with !important so they survive
   theme cascade conflicts. Keeping a no-op comment so a future grep finds
   the section. */

/* ---------- My Tasks inline-edit table cells ----------
   The status pill in the table doubles as a native <select> for inline
   updates: the visible label is what we render, the <select> sits invisibly
   on top of the same area and triggers an AJAX update on change. */
.workpulse-app .tbl--my-tasks { table-layout: auto; }
.workpulse-app .task-status-cell {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.workpulse-app .task-status-cell .task-status-pill {
    pointer-events: none;
}
.workpulse-app .task-status-cell__select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: transparent;
}
.workpulse-app .task-status-cell:hover .task-status-pill {
    box-shadow: 0 0 0 2px rgba(123, 104, 238, 0.18);
}

/* Progress cell: percentage label with a slim slider underneath. The slider
   appears on row-hover / focus so the read-only state stays clean like the
   preview design. */
.workpulse-app .progress-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 64px;
}
.workpulse-app .progress-cell__value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .progress-cell__slider {
    width: 90px;
    height: 4px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: var(--wp-border);
    border-radius: 999px;
    outline: none;
    opacity: 0;
    transition: opacity .15s ease;
    cursor: pointer;
}
.workpulse-app .tbl--my-tasks tbody tr:hover .progress-cell__slider,
.workpulse-app .tbl--my-tasks tbody tr:focus-within .progress-cell__slider {
    opacity: 1;
}
.workpulse-app .progress-cell__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--wp-purple-500);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.18);
}
.workpulse-app .progress-cell__slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--wp-purple-500);
    cursor: pointer;
    border: 2px solid #fff;
}
.workpulse-app .workpulse-my-tasks .page__actions { align-items: center; }
.workpulse-app .workpulse-my-tasks .page__actions .tiny {
    font-size: 11.5px;
    color: var(--wp-text-muted);
}
.workpulse-app .tbl--my-tasks tbody tr.task-row { cursor: pointer; }
.workpulse-app .tbl--my-tasks tbody tr.task-row:hover { background: #FAFAFB; }

/* ---------- My Tasks task-detail modal ---------- */
.workpulse-app .mt-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: stretch;
    justify-content: flex-end;
}
.workpulse-app .mt-modal.is-open { display: flex; }
.workpulse-app .mt-modal__panel {
    background: #fff;
    width: min(560px, 92vw);
    max-width: 100%;
    height: 100%;
    display: flex;
        flex-direction: column;
    box-shadow: -16px 0 40px rgba(16,24,40,.18);
    animation: mtPanelSlide .22s ease;
}
@keyframes mtPanelSlide {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
.workpulse-app .mt-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .mt-modal__heading h3 {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--wp-text-strong);
}
.workpulse-app .mt-modal__close {
    width: 28px; height: 28px;
    border-radius: var(--wp-radius-sm);
    background: transparent;
    border: 1px solid var(--wp-border);
    color: var(--wp-text-muted);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    font-size: 18px; line-height: 1;
    padding: 0;
    font-family: inherit;
}
.workpulse-app .mt-modal__close:hover {
    background: #F3F4F6;
    color: var(--wp-text-strong);
}
.workpulse-app .mt-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 24px;
    display: flex;
        flex-direction: column;
    gap: 18px;
}
.workpulse-app .mt-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
}
.workpulse-app .mt-meta__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}
.workpulse-app .mt-meta__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
}
.workpulse-app .mt-progress {
    border-top: 1px solid var(--wp-border-soft);
    padding-top: 14px;
}
.workpulse-app .mt-progress__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.workpulse-app .mt-progress__row input[type="range"] {
    flex: 1;
    accent-color: var(--wp-purple-500);
}
.workpulse-app .mt-progress__row .progress-cell__value {
    min-width: 44px;
    text-align: right;
}
.workpulse-app .mt-section {
    border-top: 1px solid var(--wp-border-soft);
    padding-top: 14px;
}
.workpulse-app .mt-section h4 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-text-muted);
}
.workpulse-app .mt-description {
    white-space: pre-wrap;
    color: var(--wp-text);
    font-size: 13.5px;
    line-height: 1.55;
}
.workpulse-app .mt-people,
.workpulse-app .mt-tags,
.workpulse-app .mt-attachments,
.workpulse-app .mt-comments__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.workpulse-app .mt-people {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.workpulse-app .mt-person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--wp-radius-pill);
    background: var(--wp-border-soft);
    font-size: 12.5px;
    color: var(--wp-text-strong);
}
.workpulse-app .mt-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.workpulse-app .mt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.workpulse-app .mt-attachments li {
    padding: 6px 0;
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .mt-attachments li:last-child { border-bottom: 0; }
.workpulse-app .mt-attachments a {
    color: var(--wp-purple-600);
    text-decoration: none;
}
.workpulse-app .mt-attachments a:hover { text-decoration: underline; }

.workpulse-app .mt-comments__list { display: flex; flex-direction: column; gap: 12px; }
.workpulse-app .mt-comment {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.workpulse-app .mt-comment__body { flex: 1; min-width: 0; }
.workpulse-app .mt-comment__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--wp-text);
    margin-bottom: 2px;
}
.workpulse-app .mt-comment__meta strong { color: var(--wp-text-strong); }
.workpulse-app .mt-comment__meta .muted { color: var(--wp-text-muted); }
.workpulse-app .mt-comment__delete {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--wp-text-subtle);
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    line-height: 1;
    font-size: 14px;
}
.workpulse-app .mt-comment__delete:hover {
    background: var(--wp-danger-soft);
    color: var(--wp-danger);
}
.workpulse-app .mt-comment__text {
    background: #F8FAFC;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius);
    padding: 8px 12px;
    font-size: 13px;
    white-space: pre-wrap;
    color: var(--wp-text);
}
.workpulse-app .mt-comments__empty {
    color: var(--wp-text-muted);
    font-style: italic;
    font-size: 13px;
    padding: 6px 0 0;
}
.workpulse-app .mt-comments__form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.workpulse-app .mt-comments__form textarea {
    width: 100%;
    resize: vertical;
    min-height: 64px;
}
.workpulse-app .mt-comments__actions {
    display: flex;
    justify-content: flex-end;
}
.workpulse-app .btn--sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Tags strip — render the legacy .ws-tag-chip li exactly like the
   design-preview .tag-chip-x with an inline remove button. */
.workpulse-app .ws-tags-strip__list li.ws-tag-chip {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    padding: 3px 6px 3px 10px;
}
.workpulse-app .ws-tag-chip__label {
    font-size: 11px;
    font-weight: 600;
}
.workpulse-app .ws-tag-chip__remove {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    font-size: 14px;
    font-weight: 700;
    opacity: .7;
}
.workpulse-app .ws-tag-chip__remove:hover { opacity: 1; }
.workpulse-app .ws-tags-strip__empty {
    background: transparent !important;
    color: var(--wp-text-subtle) !important;
    font-weight: 500 !important;
    font-style: italic;
}

/* Slide-over (task detail) — anchored absolutely INSIDE the workspace card so
   it covers the right portion of the columns when opened, slides in/out
   from the right, and never reflows page content below it. */
.workpulse-app .workpulse-workspace { position: relative; }
/* The drawer pins to the viewport, not the workspace container, so it always
   fills the full available screen height regardless of how tall the columns
   end up. In fullscreen mode the app sits at top:0 (or +32px when the WP
   admin bar is showing). We don't try to dodge the topbar — the drawer is
   a focused full-screen editor and the topbar isn't needed while you edit. */
.workpulse-app .ws-detail {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(620px, 90vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--wp-border);
    box-shadow: -12px 0 30px rgba(15, 23, 42, 0.12);
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    z-index: 100020;
    overflow: hidden;
    pointer-events: none;
}
body.workpulse-fullscreen.admin-bar .workpulse-app .ws-detail { top: 32px; height: calc(100vh - 32px); }
@media screen and (max-width: 782px) {
    body.workpulse-fullscreen.admin-bar .workpulse-app .ws-detail { top: 46px; height: calc(100vh - 46px); }
}
.workpulse-app .ws-detail.is-open {
    transform: translateX(0);
    pointer-events: auto;
}
@media (max-width: 760px) {
    .workpulse-app .ws-detail { width: 100%; }
}

.workpulse-app .ws-detail__head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--wp-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fff;
}
.workpulse-app .ws-detail__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--wp-text-strong);
    margin: 0;
}
.workpulse-app .ws-detail__close {
    width: 28px;
    height: 28px;
    border-radius: var(--wp-radius-sm);
    background: transparent;
    border: 1px solid var(--wp-border);
    color: var(--wp-text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-family: inherit;
}
.workpulse-app .ws-detail__close:hover {
    background: #F3F4F6;
    color: var(--wp-text-strong);
}
.workpulse-app .ws-detail__form {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.workpulse-app .ws-detail__actions {
    display: flex;
    gap: 8px;
    padding-top: 6px;
    margin-top: 4px;
    border-top: 1px solid var(--wp-border-soft);
}

/* ---------- Inline-add modal (client / project / task / tag) ----------
   Fixed full-viewport overlay with a centered card. Visibility is driven
   purely by the .is-open class so it never escapes into normal document
   flow (the previous behavior dumped the form under the workspace).
*/
.workpulse-app .ws-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.45);
    padding: 24px;
    align-items: center;
    justify-content: center;
    animation: wsModalFade .15s ease;
}
.workpulse-app .ws-modal.is-open { display: flex; }
@keyframes wsModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.workpulse-app .ws-modal__panel {
    background: #fff;
    border-radius: var(--wp-radius-lg);
    border: 1px solid var(--wp-border);
    box-shadow: var(--wp-shadow-md);
        width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wsModalSlide .2s ease;
}
@keyframes wsModalSlide {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}
.workpulse-app .ws-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .ws-modal__head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .ws-modal__close {
    width: 28px;
    height: 28px;
    border-radius: var(--wp-radius-sm);
    background: transparent;
    border: 1px solid var(--wp-border);
    color: var(--wp-text-muted);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    font-family: inherit;
}
.workpulse-app .ws-modal__close:hover {
    background: #F3F4F6;
    color: var(--wp-text-strong);
}
.workpulse-app .ws-modal__body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}
.workpulse-app .ws-modal__body .workpulse-field { margin: 0; }
.workpulse-app .ws-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid var(--wp-border-soft);
    background: #FAFAFB;
}
.workpulse-app .workpulse-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}
.workpulse-app .workpulse-field > label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .workpulse-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.workpulse-app .workpulse-field-help {
    color: var(--wp-text-muted);
    font-size: 12px;
    line-height: 1.4;
}
.workpulse-app .workpulse-empty {
    color: var(--wp-text-muted);
    font-style: italic;
    font-size: 13px;
}

/* ---------- People picker (modern Assignees control) ----------
   A custom multi-select that decorates a hidden <select multiple>.
   Trigger button shows chips for selected people; clicking opens a
   searchable listbox popover. */
.workpulse-app .ws-people {
    position: relative;
    width: 100%;
}
.workpulse-app .ws-people > select[hidden] {
    display: none !important;
}
.workpulse-app .ws-people__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 40px;
    padding: 6px 36px 6px 10px;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow-xs);
    color: var(--wp-text-strong);
    text-align: left;
    font: inherit;
    cursor: pointer;
    position: relative;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.workpulse-app .ws-people__trigger:hover {
    border-color: var(--wp-border-strong);
}
.workpulse-app .ws-people.is-open .ws-people__trigger,
.workpulse-app .ws-people__trigger:focus-visible {
    outline: none;
    border-color: var(--wp-purple-500);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.18);
}
.workpulse-app .ws-people__placeholder {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wp-text-muted);
    font-size: 13px;
}
.workpulse-app .ws-people__caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wp-text-muted);
    transition: transform .15s ease;
}
.workpulse-app .ws-people.is-open .ws-people__caret {
    transform: translateY(-50%) rotate(180deg);
}
.workpulse-app .ws-people__chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.workpulse-app .ws-people-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-radius: var(--wp-radius-pill);
    padding: 3px 4px 3px 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    max-width: 100%;
}
.workpulse-app .ws-people-chip__avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}
.workpulse-app .ws-people-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
    padding-right: 2px;
}
.workpulse-app .ws-people-chip__remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: var(--wp-text-muted);
    border: 0;
    padding: 0;
    cursor: pointer;
    font: 600 14px/1 var(--wp-font);
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
}
.workpulse-app .ws-people-chip__remove:hover {
    background: rgba(15, 23, 42, 0.12);
    color: var(--wp-text-strong);
}

.workpulse-app .ws-people__popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow-md);
    overflow: hidden;
    animation: wsPeopleFade .14s ease;
}
@keyframes wsPeopleFade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.workpulse-app .ws-people__search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--wp-border-soft);
    color: var(--wp-text-muted);
}
.workpulse-app .ws-people__search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--wp-text-strong);
    padding: 4px 0;
}
.workpulse-app .ws-people__search input::placeholder {
    color: var(--wp-text-subtle);
}
.workpulse-app .ws-people__list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 240px;
    overflow-y: auto;
}
.workpulse-app .ws-people-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--wp-radius-sm);
    cursor: pointer;
    user-select: none;
    color: var(--wp-text-strong);
    font-size: 13px;
}
.workpulse-app .ws-people-option:hover,
.workpulse-app .ws-people-option.is-active {
    background: var(--wp-bg);
}
.workpulse-app .ws-people-option__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.workpulse-app .ws-people-option__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.workpulse-app .ws-people-option__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.workpulse-app .ws-people-option__sub {
    font-size: 11px;
    color: var(--wp-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workpulse-app .ws-people-option__check {
    color: var(--wp-purple-500);
    opacity: 0;
    transition: opacity .12s ease;
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.workpulse-app .ws-people-option.is-selected .ws-people-option__check { opacity: 1; }
.workpulse-app .ws-people-option.is-selected { color: var(--wp-purple-700); }
.workpulse-app .ws-people__empty {
    padding: 14px;
    text-align: center;
    color: var(--wp-text-muted);
    font-size: 13px;
}

/* ---------- Tag picker (per-task tags) ---------- */
.workpulse-app .ws-tags {
    position: relative;
}
.workpulse-app .ws-tags__chips {
    display: inline-flex;
        flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.workpulse-app .ws-tags__placeholder {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wp-text-muted);
    font-size: 13px;
}
.workpulse-app .ws-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--wp-radius-pill);
    padding: 3px 4px 3px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
}
.workpulse-app .ws-tag-chip__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}
.workpulse-app .ws-tag-chip__remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: inherit;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: 600 14px/1 var(--wp-font);
    display: inline-grid;
    place-items: center;
    opacity: .8;
}
.workpulse-app .ws-tag-chip__remove:hover {
    background: rgba(15, 23, 42, 0.14);
    opacity: 1;
}
.workpulse-app .ws-tag-option__swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.workpulse-app .ws-tag-option.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.workpulse-app .ws-tag-option.is-disabled:hover {
    background: transparent;
}
.workpulse-app .workpulse-field .hint {
    margin-left: 6px;
    color: var(--wp-text-muted);
    font-weight: 500;
    font-size: 11px;
}

/* ---------- Inline field icons (workspace drawer) ----------
   Small, color-coded SVGs prefixed to a label or value so the reader can
   scan the panel at a glance: blue for time, purple for progress, pink
   for tags, etc. Each label/legend uses `inline-flex` so the icon and
   text align on their middle baseline. */
.workpulse-app .ws-detail .workpulse-field > label,
.workpulse-app .ws-detail .ws-attachments legend,
.workpulse-app .ws-detail .ws-progress-label,
.workpulse-app .ws-detail .ws-comments__title {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}
.workpulse-app .field-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    align-items: center;
    justify-content: center;
}
.workpulse-app .field-icon--blue   { color: #2563EB; }
.workpulse-app .field-icon--purple { color: var(--wp-purple-500); }
.workpulse-app .field-icon--teal   { color: #0D9488; }
.workpulse-app .field-icon--green  { color: #047857; }
.workpulse-app .field-icon--orange { color: #EA580C; }
.workpulse-app .field-icon--pink   { color: #DB2777; }
.workpulse-app .field-icon--gray   { color: var(--wp-text-muted); }

/* Progress summary rows: icon | label | spacer | value. */
.workpulse-app .ws-detail .ws-progress-summary {
    background: var(--wp-bg);
    border: 1px solid var(--wp-border-soft);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.workpulse-app .ws-detail .ws-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.workpulse-app .ws-detail .ws-progress-value {
    font-weight: 600;
    color: var(--wp-text-strong);
    font-variant-numeric: tabular-nums;
}

/* Variance banner (replaces the old plain-text "Hours logged exceed..."
   note). Friendly amber for "behind", purple for "ahead". */
.workpulse-app .ws-detail .ws-variance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    margin-top: 2px;
}
.workpulse-app .ws-detail .ws-variance .ws-variance__icon { flex-shrink: 0; }
.workpulse-app .ws-detail .ws-variance.variance-ahead {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
}
.workpulse-app .ws-detail .ws-variance.variance-behind {
    background: var(--wp-warning-soft);
    color: #92400E;
}

/* Variance flag on a task row in the workspace task list. The exclamation
   icon means "task hours don't match reported progress" — orange for
   "hours exceed progress" (logged > computed), purple for "progress ahead
   of hours" (manager-marked done before logging). Tooltip explains. */
.workpulse-app .variance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    flex-shrink: 0;
    cursor: help;
}
.workpulse-app .variance-badge svg { display: block; }
.workpulse-app .variance-badge.variance-behind { background: #F59E0B; }
.workpulse-app .variance-badge.variance-ahead  { background: var(--wp-purple-500); }

/* ---------- Billable / non-billable toggle (project form) ---------- */
.billable-toggle {
    display: inline-flex;
    gap: 0;
    background: var(--wp-bg);
    border: 1px solid var(--wp-border);
    border-radius: 8px;
    padding: 3px;
    width: max-content;
}
.billable-toggle__opt {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.billable-toggle__opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.billable-toggle__opt span {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wp-text-muted);
    border-radius: 6px;
    transition: background .15s ease, color .15s ease;
}
.billable-toggle__opt input[type="radio"]:checked + span {
    background: #fff;
    color: var(--wp-text-strong);
    box-shadow: 0 1px 2px rgba(16,24,40,.06);
}
.billable-toggle--inline {
    margin: 8px 0;
}

/* ---------- Bandwidth chips (workspace drawer) ---------- */
.workpulse-app .ws-bandwidth {
    background: var(--wp-bg);
    border: 1px solid var(--wp-border-soft);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.workpulse-app .ws-bandwidth__title {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-strong);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.workpulse-app .ws-bandwidth__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.workpulse-app .ws-bandwidth-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--wp-border-soft);
    font-size: 12.5px;
}
.workpulse-app .ws-bandwidth-row__name {
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .ws-bandwidth-row__hours {
    color: var(--wp-text-muted);
    font-variant-numeric: tabular-nums;
}
.workpulse-app .ws-bandwidth-row__note {
    font-weight: 600;
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--wp-success-soft);
    color: #047857;
}
.workpulse-app .ws-bandwidth-row.is-full .ws-bandwidth-row__note {
    background: var(--wp-warning-soft);
    color: #92400E;
}
.workpulse-app .ws-bandwidth-row.is-over .ws-bandwidth-row__note {
    background: var(--wp-danger-soft);
    color: #B91C1C;
}
.workpulse-app .ws-bandwidth-row.is-info .ws-bandwidth-row__note {
    background: var(--wp-info-soft);
    color: #1D4ED8;
}

/* ---------- Workspace task-detail comments ---------- */
.workpulse-app .ws-detail .ws-comments {
    border-top: 1px solid var(--wp-border-soft);
    padding-top: 14px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.workpulse-app .ws-comments__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .ws-comments__count {
    margin-left: 4px;
    font-weight: 500;
    color: var(--wp-text-muted);
    font-size: 12px;
}
.workpulse-app .ws-comments__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}
.workpulse-app .ws-comments__empty {
    padding: 8px 10px;
    background: var(--wp-bg);
    border-radius: 8px;
    font-size: 12.5px;
    text-align: center;
}
.workpulse-app .ws-comment {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: var(--wp-bg);
    border-radius: 8px;
    border: 1px solid var(--wp-border-soft);
}
.workpulse-app .ws-comment__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.workpulse-app .ws-comment__body { flex: 1; min-width: 0; }
.workpulse-app .ws-comment__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 2px;
}
.workpulse-app .ws-comment__meta strong { font-size: 12.5px; color: var(--wp-text-strong); }
.workpulse-app .ws-comment__text {
    font-size: 13px;
    color: var(--wp-text);
    white-space: pre-wrap;
    word-break: break-word;
}
.workpulse-app .ws-comment__delete {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--wp-text-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    padding: 0;
}
.workpulse-app .ws-comment__delete:hover {
    background: var(--wp-danger-soft);
    color: var(--wp-danger);
}
.workpulse-app .ws-comments__form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.workpulse-app .ws-comments__form textarea {
    width: 100%;
    border: 1px solid var(--wp-border);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
    background: #fff;
}
.workpulse-app .ws-comments__form textarea:focus {
    outline: none;
    border-color: var(--wp-purple-500);
    box-shadow: 0 0 0 3px var(--wp-purple-soft);
}
.workpulse-app .ws-comments__actions {
    display: flex;
    justify-content: flex-end;
}

/* Forms: form-row helpers used by time-entry-form */
.workpulse-app .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.workpulse-app .form-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-strong);
    margin-bottom: 6px;
    display: block;
}

/* Legacy workpulse-button → btn family */
.workpulse-app .workpulse-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--wp-radius);
    border: 1px solid var(--wp-border);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: var(--wp-text);
    text-decoration: none;
    box-shadow: var(--wp-shadow-xs);
    transition: all .15s ease;
    font-family: inherit;
}
.workpulse-app .workpulse-button:hover {
    background: #F9FAFB;
    border-color: var(--wp-border-strong);
}
.workpulse-app .workpulse-button-primary {
    background: var(--wp-purple-500);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(123,104,238,.3);
}
.workpulse-app .workpulse-button-primary:hover {
    background: var(--wp-purple-600);
    color: #fff;
}
.workpulse-app .workpulse-button-secondary {
    background: #fff;
    color: var(--wp-text);
}
.workpulse-app .workpulse-button-danger {
    background: #fff;
    color: var(--wp-danger);
}
.workpulse-app .workpulse-button-danger:hover {
    background: var(--wp-danger-soft);
    border-color: var(--wp-danger);
}

/* =========================================================================
   Legacy compatibility — for templates that haven't been migrated yet.
   Maps the old `.workpulse-*` classes onto the new tokens / components so
   the UI stays consistent during the migration window.
   ========================================================================= */
.workpulse-container {
    display: grid;
    grid-template-columns: var(--wp-sidebar-w, 248px) 1fr;
    min-height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.workpulse-content {
    min-width: 0;
    padding: 24px;
    background: #F7F8FA;
}
.workpulse-content .button,
.workpulse-content button.button,
.workpulse-content a.button {
    background: #fff;
    color: #1F2937;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.workpulse-content .button-primary,
.workpulse-content button.button-primary,
.workpulse-content a.button-primary {
    background: #7B68EE;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(123,104,238,.3);
}
.workpulse-content .button-primary:hover {
    background: #6C57D8;
    color: #fff;
}
.workpulse-content .button:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}
.workpulse-content table.wp-list-table,
.workpulse-content table.widefat {
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.workpulse-content table.wp-list-table th,
.workpulse-content table.widefat th {
    background: #FAFAFB;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    font-weight: 600;
}

/* Admin wrap inside wp-admin (Plugin Settings / Time Entries data) */
.workpulse-admin-wrap {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.workpulse-admin-wrap h1,
.workpulse-admin-wrap h2,
.workpulse-admin-wrap h3 {
    font-family: inherit;
    color: #0F172A;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.workpulse-admin-wrap .wp-list-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.workpulse-admin-wrap .wp-list-table th {
    background: #FAFAFB;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    font-weight: 600;
}

/* ---------- My Tasks — active project timer panel (compact table) ---------- */
.workpulse-app .work-timer-panel {
    margin-bottom: 16px;
    border: 1px solid var(--wp-purple-200, #DDD6FE);
    background: linear-gradient(135deg, #FAFAFF 0%, #F5F3FF 100%);
    box-shadow: var(--wp-shadow-sm);
    overflow: hidden;
}
.workpulse-app .work-timer-panel__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--wp-purple-200, #E9E5FF);
    flex-wrap: wrap;
}
.workpulse-app .work-timer-panel__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
    flex: 1;
}
.workpulse-app .work-timer-panel__title .live {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-warning);
    padding: 2px 8px;
    background: var(--wp-warning-soft);
    border-radius: var(--wp-radius-pill);
}
.workpulse-app .work-timer-panel__project {
    font-size: 15px;
    font-weight: 700;
    color: var(--wp-text-strong);
    letter-spacing: -0.02em;
}
.workpulse-app .work-timer-panel__task {
    flex: 1 1 100%;
    margin: -2px 0 0;
}
@media (min-width: 640px) {
    .workpulse-app .work-timer-panel__task {
        flex: 0 1 auto;
        margin: 0;
    }
}
.workpulse-app .work-timer-panel__stop {
    flex-shrink: 0;
}
.workpulse-app .work-timer-panel__table-wrap {
    overflow-x: auto;
}
.workpulse-app .work-timer-tbl {
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.workpulse-app .work-timer-tbl th,
.workpulse-app .work-timer-tbl td {
    padding: 8px 14px !important;
    font-size: 12px;
    white-space: nowrap;
}
.workpulse-app .work-timer-tbl th {
    font-size: 10px;
    padding-top: 10px !important;
    padding-bottom: 6px !important;
}
.workpulse-app .work-timer-tbl tbody tr:hover td,
.workpulse-app .work-timer-tbl tbody tr:hover th {
    background: transparent !important;
}
.workpulse-app .work-timer-tbl td.num {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    color: var(--wp-text-strong);
    text-align: center;
}
.workpulse-app .work-timer-tbl th {
    text-align: center;
}
.workpulse-app .work-timer-tbl__session,
.workpulse-app .work-timer-tbl td.work-timer-tbl__session {
    background: rgba(123, 104, 238, 0.08) !important;
    color: var(--wp-purple-700) !important;
}
.workpulse-app .work-timer-tbl td[data-bind="timer-remaining"] {
    color: #047857;
}
.workpulse-app .tbl--assigned-work .title {
    font-weight: 600;
    font-size: 13px;
}
.workpulse-app .tbl--assigned-work tr.is-running {
    background: var(--wp-purple-soft) !important;
}
.workpulse-app .tbl--assigned-work tr.is-running td {
    background: transparent !important;
}
.workpulse-app .tbl--my-tasks tr.is-running,
.workpulse-app .tbl--timer-actions tr.is-running {
    background: var(--wp-purple-soft) !important;
}
.workpulse-app .tbl--timer-actions .col-timer-action,
.workpulse-app .tbl--assigned-work th:last-child,
.workpulse-app .tbl--assigned-work td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -6px 0 8px -6px rgba(15, 23, 42, 0.12);
    min-width: 88px;
    white-space: nowrap;
}
.workpulse-app .work-timer-start-blocked {
    opacity: 0.55;
    cursor: not-allowed;
}
.workpulse-app .work-timer-start-blocked:hover {
    opacity: 0.7;
}
.workpulse-app .tbl--assigned-work tr.is-running td:last-child,
.workpulse-app .tbl--timer-actions tr.is-running .col-timer-action {
    background: var(--wp-purple-soft);
}
.workpulse-app .card__body--flush {
    padding: 0 !important;
}
.workpulse-app .card__body--flush .tbl-wrap {
    overflow-x: auto;
}

/* ---------- Reports page (time entries report) ---------- */
.workpulse-app .report-card {
    overflow: visible;
}
.workpulse-app .report-filter-bar {
    position: relative;
    z-index: 20;
}
.workpulse-app .report-filter-bar--admin .report-currency-bar {
    margin-left: auto;
}
.workpulse-app .report-filter-bar--admin .report-filter-apply {
    margin-left: 8px;
}
.workpulse-app .report-filter-bar:not(.report-filter-bar--admin) .report-filter-apply {
    margin-left: auto;
}
.workpulse-app .report-currency-bar {
    flex-wrap: wrap;
}
.workpulse-app .filter-pill-wrap {
    position: relative;
}
.workpulse-app .filter-pill__icon {
    flex-shrink: 0;
    opacity: 0.7;
}
.workpulse-app .filter-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    min-width: 220px;
    max-width: 320px;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-md);
}
.workpulse-app .filter-dropdown__inner {
    padding: 8px;
    max-height: 280px;
    overflow-y: auto;
}
.workpulse-app .filter-dropdown__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--wp-radius-sm);
    font-size: 13px;
    cursor: pointer;
    margin: 0;
}
.workpulse-app .filter-dropdown__option:hover {
    background: #F3F4F6;
}
.workpulse-app .filter-dropdown__toggle-all {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: var(--wp-purple-600);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.workpulse-app .filter-dropdown__toggle-all:hover {
    text-decoration: underline;
}
.workpulse-app .report-custom-dates {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--wp-border-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.workpulse-app .report-custom-dates .input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-sm);
    font-size: 13px;
}
.workpulse-app .report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .report-stats .report-stat {
    padding: 12px 14px;
    background: #FAFAFB;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius-lg);
}
.workpulse-app .report-stats .stat__value {
    font-size: 22px;
}
.workpulse-app .report-stats .stat__label-hint {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--wp-text-subtle);
    letter-spacing: 0;
    text-transform: none;
}
.workpulse-app .report-stats .stat__sub {
    margin-top: 4px;
    font-size: 11px;
}
.workpulse-app .report-stat--deduction .stat__value {
    color: #b45309;
}
.workpulse-app .report-deduction {
    color: #b45309;
}
.workpulse-app .report-th-deduction {
    color: var(--wp-text-muted);
    font-size: 11px;
}
.workpulse-app .report-money-toggle.is-active {
    background: var(--wp-surface-2, #f3f4f6);
    border-color: var(--wp-border, #d1d5db);
}
.workpulse-app .workpulse-reports.report-money-hidden .report-money-metric,
.workpulse-app .workpulse-reports.report-money-hidden .report-money-col {
    display: none !important;
}
.workpulse-app .workpulse-earnings-projection.projection-money-hidden .report-money-metric {
    display: none !important;
}
.workpulse-app .report-projection-toolbar {
    padding: 16px 20px 0;
}
.workpulse-app .workpulse-earnings-projection .report-projection-card__body {
    padding-top: 12px;
}
.workpulse-app .projection-money-toggle.is-active {
    background: var(--wp-surface-2, #f3f4f6);
    border-color: var(--wp-border, #d1d5db);
}
.workpulse-app .projection-accurate-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
}
.workpulse-app .projection-accurate-check--result {
    justify-content: center;
}
.workpulse-app .report-projection-lines tr.is-highlighted {
    background: #ecfdf5;
}
.workpulse-app .report-projection-results-tbl .report-row-actions {
    white-space: nowrap;
}
.workpulse-app .report-projection-net-hint {
    margin-top: 2px;
    line-height: 1.3;
}
.workpulse-app .projection-net-hint {
    margin-top: 2px;
    line-height: 1.2;
}
.workpulse-app .report-projection-card {
    margin-bottom: 16px;
}
.workpulse-app .report-projection-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 0;
}
.workpulse-app .report-projection-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}
.workpulse-app .report-projection-card__hint {
    margin: 0;
}
.workpulse-app .report-projection-card__body {
    padding: 16px 20px 20px;
}
.workpulse-app .report-projection-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 16px;
}
.workpulse-app .report-projection-dates .field {
    min-width: 140px;
}
.workpulse-app .report-projection-lines .select,
.workpulse-app .report-projection-lines .input {
    width: 100%;
    min-width: 0;
}
.workpulse-app .report-projection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.workpulse-app .report-projection-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.workpulse-app .report-projection-stat--highlight .stat__value {
    color: #047857;
}
.workpulse-app .report-projection-results {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--wp-border, #e5e7eb);
}
.workpulse-app .report-projection-record-meta {
    margin: 10px 0 0;
}
.workpulse-app .report-projection-saved {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--wp-border, #e5e7eb);
}
.workpulse-app .report-projection-saved__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
}
.workpulse-app .report-projection-saved__head {
    margin-bottom: 12px;
}
.workpulse-app .report-projection-saved-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.workpulse-app .report-projection-saved-card {
    border: 1px solid var(--wp-border, #e5e7eb);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--wp-surface, #fff);
}
.workpulse-app .report-projection-saved-card.is-active {
    border-color: #047857;
    box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.15);
}
.workpulse-app .report-projection-saved-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.workpulse-app .report-projection-saved-card__when {
    font-weight: 600;
    font-size: 13px;
}
.workpulse-app .report-projection-saved-card__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.workpulse-app .report-projection-saved-card__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    margin-bottom: 10px;
}
.workpulse-app .report-projection-saved-card__details .tbl {
    font-size: 12px;
}
.workpulse-app .overspend-range-hint {
    margin-left: auto;
}
.workpulse-app .overspend-stat-flagged {
    color: #b91c1c;
}
.workpulse-app .stat__value--sm {
    font-size: 18px;
}
.workpulse-app .overspend-row--flagged {
    background: #fef2f2;
}
.workpulse-app .overspend-detail-head {
    padding: 18px 18px 8px;
    border-top: 1px solid var(--wp-border-soft);
}
.workpulse-app .overspend-detail-head h2 {
    margin: 0 0 4px;
    font-size: 15px;
}
.workpulse-app .report-tbl-wrap {
    overflow-x: auto;
}
.workpulse-app .report-tbl .report-notes {
    max-width: 220px;
    font-size: 12px;
    line-height: 1.4;
}
.workpulse-app .report-tbl .report-notes__text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workpulse-app .duration-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}
.workpulse-app .duration-inputs__h {
    width: 72px;
    flex-shrink: 0;
}
.workpulse-app .duration-inputs__m {
    width: 72px;
    flex-shrink: 0;
}
.workpulse-app .duration-inputs__sep {
    font-weight: 600;
    color: var(--wp-text-muted);
}
.workpulse-app .report-billable-toggle {
    border: 0;
    cursor: pointer;
}
.workpulse-app .report-billable-toggle:hover {
    opacity: 0.85;
}
.workpulse-app .report-billable-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    padding: 0;
    margin-right: 4px;
    border: 0;
    border-radius: var(--wp-radius-sm);
    background: transparent;
    vertical-align: middle;
}
.workpulse-app .report-billable-switch__track {
    display: block;
    width: 30px;
    height: 18px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: background 0.15s ease;
}
.workpulse-app .report-billable-switch.is-on .report-billable-switch__track {
    background: #22c55e;
}
.workpulse-app .report-billable-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease;
}
.workpulse-app .report-billable-switch.is-on .report-billable-switch__thumb {
    transform: translateX(12px);
}
.workpulse-app .report-row-actions {
    white-space: nowrap;
}
.workpulse-app .report-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-sm);
    background: #fff;
    color: var(--wp-text-muted);
    cursor: pointer;
    vertical-align: middle;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.workpulse-app .report-icon-btn + .report-icon-btn {
    margin-left: 6px;
}
.workpulse-app .report-icon-btn:hover {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
    border-color: var(--wp-purple-300);
}
.workpulse-app .report-icon-btn--danger:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.workpulse-app .report-entry-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.workpulse-app .report-entry-modal[hidden] {
    display: none !important;
}
.workpulse-app .report-entry-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.workpulse-app .report-entry-modal__panel--wide {
    width: min(1180px, 100%);
}
.workpulse-app .report-bulk-entries-toolbar {
    margin-bottom: 12px;
}
.workpulse-app .report-bulk-entries-scroll {
    overflow-x: auto;
    margin-bottom: 16px;
}
.workpulse-app .report-bulk-entries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.workpulse-app .report-bulk-entries-table th,
.workpulse-app .report-bulk-entries-table td {
    padding: 8px 6px;
    vertical-align: middle;
    border-bottom: 1px solid var(--wp-border, #e2e8f0);
    text-align: left;
}
.workpulse-app .report-bulk-entries-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp-muted, #64748b);
    white-space: nowrap;
}
.workpulse-app .report-bulk-cascade-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 6px;
    min-width: 360px;
}
.workpulse-app .report-bulk-entries-table .select,
.workpulse-app .report-bulk-entries-table .input {
    width: 100%;
    min-width: 0;
}
.workpulse-app .report-bulk-entries-table .duration-inputs--sm {
    min-width: 88px;
}
.workpulse-app .report-bulk-notes {
    min-width: 140px;
}
.workpulse-app .report-bulk-billable-cell {
    text-align: center;
}
.workpulse-app .checkbox--compact {
    margin: 0;
}
.workpulse-app .report-entry-modal__panel {
    position: relative;
    width: min(860px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: var(--wp-radius-lg);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    padding: 24px 28px;
}
.workpulse-app .report-entry-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--wp-border);
}
.workpulse-app .report-entry-modal__head h2 {
    margin: 0 0 4px;
    font-size: 20px;
}
.workpulse-app .report-entry-modal__sub {
    margin: 0;
    font-size: 13px;
}
.workpulse-app .report-entry-modal__loading {
    padding: 12px 0 20px;
    font-size: 13px;
}
.workpulse-app .report-quick-text-preview {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--wp-surface-muted, rgba(0, 0, 0, 0.04));
    font-size: 13px;
    line-height: 1.5;
}
.workpulse-app .report-entry-edit-section {
    margin-bottom: 18px;
}
.workpulse-app .report-entry-edit-section-title,
.workpulse-app .report-entry-edit-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp-text-muted);
    margin: 0 0 8px;
}
.workpulse-app .report-entry-edit-notes {
    min-height: 100px;
}
.workpulse-app .report-entry-edit-billable {
    margin: 4px 0 0;
}
.workpulse-app .report-entry-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--wp-border);
}
.workpulse-app .duration-inputs--lg .duration-inputs__h,
.workpulse-app .duration-inputs--lg .duration-inputs__m {
    width: 88px;
    font-size: 16px;
    text-align: center;
}
.workpulse-app .report-import-result {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--wp-radius);
    background: var(--wp-success-soft);
    color: #047857;
    font-size: 13px;
}
.workpulse-app .report-import-warnings {
    margin: 8px 0 0 18px;
    padding: 0;
    list-style: disc;
    color: var(--wp-text);
}
.workpulse-app .report-import-warnings .muted {
    color: var(--wp-text-muted);
}
.workpulse-app .time-entry-page .time-entry-form-card {
    max-width: none;
    width: 100%;
}
.workpulse-app .time-entry-page .time-entry-form-card__body {
    padding: 28px 32px 32px;
}
.workpulse-app .time-entry-form__section {
    margin-bottom: 28px;
}
.workpulse-app .time-entry-form__section:last-of-type {
    margin-bottom: 0;
}
.workpulse-app .time-entry-form__section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp-text-muted);
    margin: 0 0 10px;
    display: block;
}
.workpulse-app .time-entry-form__notes {
    min-height: 120px;
    font-size: 15px;
}
.workpulse-app .time-entry-form__grid .field label {
    font-weight: 500;
}
.workpulse-app .time-entry-form__required {
    color: var(--wp-danger, #c0392b);
    margin-left: 2px;
}
.workpulse-app .time-entry-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
    padding-top: 0;
}
.workpulse-app .ws-blocker__message {
    margin: 0 0 16px;
    color: var(--wp-text);
    line-height: 1.5;
}
.workpulse-app .ws-blocker__subtitle {
    margin: 18px 0 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp-text-muted);
}
.workpulse-app .ws-blocker__project-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.workpulse-app .ws-blocker__project-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--wp-border);
}
.workpulse-app .ws-blocker__project-list li:last-child {
    border-bottom: 0;
}
.workpulse-app .ws-blocker__project-meta {
    font-size: 13px;
    color: var(--wp-text-muted);
    white-space: nowrap;
}
.workpulse-app .ws-blocker__table-wrap {
    overflow-x: auto;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--wp-border);
    border-radius: 8px;
}
.workpulse-app .ws-blocker__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.workpulse-app .ws-blocker__table th,
.workpulse-app .ws-blocker__table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--wp-border);
    vertical-align: top;
}
.workpulse-app .ws-blocker__table th {
    background: var(--wp-surface-2, #f6f7f9);
    font-weight: 600;
    position: sticky;
    top: 0;
}
.workpulse-app .ws-blocker__table tr:last-child td {
    border-bottom: 0;
}
.workpulse-app .ws-blocker__notes {
    max-width: 200px;
    word-break: break-word;
}
.workpulse-app .ws-blocker__hint {
    margin: 10px 0 0;
}
.workpulse-app .ws-modal--blocker .ws-modal__panel {
    max-width: 720px;
}
.workpulse-app .ws-blocker__footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.workpulse-app .ws-blocker__footer-actions .ws-blocker-cascade {
    margin-right: auto;
}
.workpulse-app .time-entry-form__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.workpulse-app .report-tbl .report-loading {
    padding: 28px 14px !important;
}
.workpulse-app .workpulse-reports-page .page__head {
    margin-bottom: 18px;
}
@media (max-width: 900px) {
    .workpulse-app .report-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 520px) {
    .workpulse-app .report-stats {
        grid-template-columns: 1fr;
    }
    .workpulse-app .report-filter-bar .report-filter-apply {
        width: 100%;
        margin-left: 0;
    }
}
/* Hide legacy reports layout if old markup is cached */
.workpulse-app .workpulse-reports .report-header,
.workpulse-app .workpulse-reports .report-filters,
.workpulse-app .workpulse-reports .report-summary,
.workpulse-app .workpulse-reports .multiselect {
    display: none !important;
}
.workpulse-app .work-stop-modal .ws-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--wp-border-soft);
}
.workpulse-toast--error {
    background: #B91C1C;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.workpulse-toast--success {
    background: #047857;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.workpulse-app .progress--compact {
    height: 6px;
    min-width: 72px;
    margin-bottom: 4px;
}
.workpulse-app .progress--readonly .progress-bar__fill {
    transition: width 0.35s ease;
}
.workpulse-app .assigned-work-progress .progress-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-muted, #6B7280);
}
.workpulse-app .workpulse-field--readonly-progress .ws-progress-readonly {
    font-size: 15px;
    color: var(--wp-purple-700);
}
.workpulse-app .mt-progress--readonly .progress {
    flex: 1;
    min-width: 120px;
}

/* ---------- Team page ---------- */
.workpulse-app .workpulse-team-page .team-page__actions {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.workpulse-app .team-month-picker {
    min-width: 160px;
}
.workpulse-app .field--inline {
    gap: 4px;
}
.workpulse-app .field--inline label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
}
.workpulse-app .tbl--team .team-member-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
}
.workpulse-app .tbl--team .team-member-name strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--wp-text-strong);
}
.workpulse-app .tbl--team .team-hours-cell {
    white-space: nowrap;
}
.workpulse-app .tbl--team .team-hours-cell--short .team-hours-value {
    color: var(--wp-warning);
    font-weight: 600;
}
.workpulse-app .tbl--team .team-hours-cell--ok .team-hours-value {
    color: var(--wp-success);
    font-weight: 600;
}
.workpulse-app .tbl--team .team-hours-meta {
    display: block;
    color: var(--wp-text-muted);
}
.workpulse-app .tbl--team .team-money--pos {
    color: #047857;
    font-weight: 600;
}
.workpulse-app .tbl--team .team-money--neg {
    color: var(--wp-danger);
    font-weight: 600;
}
.workpulse-app .tbl--team .team-money--final {
    color: var(--wp-text);
}
.workpulse-app .leave-stats {
    margin-bottom: 16px;
}
.workpulse-app .leave-apply-form .field--actions-end {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.workpulse-app .leave-queue-actions {
    white-space: nowrap;
}
.workpulse-app .leave-queue-actions .btn + .btn {
    margin-left: 4px;
}
.workpulse-app .leave-status--admin_approved {
    background: #DCFCE7;
    color: #047857;
}
.workpulse-app .leave-status--pending_manager,
.workpulse-app .leave-status--pending_admin {
    background: #FEF3C7;
    color: #B45309;
}
.workpulse-app .leave-status--manager_rejected,
.workpulse-app .leave-status--admin_rejected,
.workpulse-app .leave-status--cancelled {
    background: #FEE2E2;
    color: #B91C1C;
}
.workpulse-app .leave-report-section-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}
.workpulse-app .leave-report-section-hint {
    margin: 0 0 12px;
}
.workpulse-app .leave-report-filters {
    position: relative;
    z-index: 30;
    overflow: visible;
    margin-bottom: 16px;
}
.workpulse-app .workpulse-leave-reports.report-card {
    overflow: visible;
}
.workpulse-app .filter-dropdown.is-open,
.workpulse-app .filter-dropdown:not([hidden]) {
    display: block;
}
.workpulse-app .workpulse-leave-reports-page .btn--primary,
.workpulse-app .workpulse-leave-reports-page #leave-report-apply,
.workpulse-app .workpulse-leave-reports .btn--primary,
.workpulse-app .workpulse-leave-page .btn--primary {
    color: #fff !important;
}
.workpulse-app .workpulse-leave-reports-page .btn--primary:hover,
.workpulse-app .workpulse-leave-reports-page #leave-report-apply:hover,
.workpulse-app .workpulse-leave-reports .btn--primary:hover,
.workpulse-app .workpulse-leave-page .btn--primary:hover {
    color: #fff !important;
}
.workpulse-app .workpulse-leave-reports-page .filter-pill .count,
.workpulse-app .workpulse-leave-reports .filter-pill .count {
    background: var(--wp-purple-500) !important;
    color: #fff !important;
}

/* ---------- Team chat ---------- */
.workpulse-app .workpulse-chat-page {
    font-family: var(--wp-font);
}
.workpulse-app .workpulse-chat-error {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: var(--wp-radius);
    background: #FEF2F2;
    color: #B91C1C;
    font-size: 13px;
}
.workpulse-app .workpulse-chat-error[hidden] {
    display: none !important;
}
.workpulse-app .workpulse-chat-shell {
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--wp-shadow-md);
    background: #fff;
}
.workpulse-app .workpulse-chat-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    min-height: 560px;
    align-items: stretch;
}
@media (max-width: 900px) {
    .workpulse-app .workpulse-chat-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .workpulse-app .workpulse-chat-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--wp-border-soft);
        max-height: 280px;
    }
    .workpulse-app .workpulse-chat-main {
        min-height: 420px;
    }
}
.workpulse-app .workpulse-chat-sidebar {
    border-right: 1px solid var(--wp-border-soft);
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
    gap: 14px;
}
.workpulse-app .workpulse-chat-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius-pill);
}
.workpulse-app .workpulse-chat-search svg {
    color: var(--wp-text-subtle);
    flex-shrink: 0;
}
.workpulse-app .workpulse-chat-search input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    color: var(--wp-text);
}
.workpulse-app .workpulse-chat-sidebar-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.workpulse-app .workpulse-chat-sidebar-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--wp-text-strong);
}
.workpulse-app .workpulse-chat-new-group-btn {
    border: 0;
    background: transparent;
    color: var(--wp-purple-600);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    font-family: inherit;
}
.workpulse-app .workpulse-chat-convo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.workpulse-app .workpulse-chat-convo-item {
    margin-bottom: 6px;
}
.workpulse-app .workpulse-chat-convo-btn,
.workpulse-app .workpulse-chat-peer-btn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}
.workpulse-app .workpulse-chat-convo-item.is-active .workpulse-chat-convo-btn,
.workpulse-app .workpulse-chat-convo-btn:hover,
.workpulse-app .workpulse-chat-peer-btn:hover,
.workpulse-app .workpulse-chat-peer-btn.is-active {
    background: #fff;
    box-shadow: var(--wp-shadow-xs);
}
.workpulse-app .workpulse-chat-convo-avatar,
.workpulse-app .workpulse-chat-thread-avatar,
.workpulse-app .workpulse-chat-msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wp-purple-100);
    color: var(--wp-purple-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}
.workpulse-app .workpulse-chat-convo-avatar img,
.workpulse-app .workpulse-chat-thread-avatar img,
.workpulse-app .workpulse-chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.workpulse-app .workpulse-chat-convo-body {
    flex: 1;
    min-width: 0;
}
.workpulse-app .workpulse-chat-convo-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.workpulse-app .workpulse-chat-convo-title-text {
    font-weight: 700;
    color: var(--wp-text-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workpulse-app .workpulse-chat-convo-time {
    font-size: 11px;
    color: var(--wp-text-subtle);
    flex-shrink: 0;
}
.workpulse-app .workpulse-chat-convo-preview {
    display: block;
    font-size: 12px;
    color: var(--wp-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workpulse-app .workpulse-chat-unread {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #F97316;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--wp-radius-pill);
}
.workpulse-app .workpulse-chat-convo-empty {
    padding: 8px 12px;
    font-size: 12px;
}
.workpulse-app .workpulse-chat-main {
    display: flex;
    flex-direction: column;
    min-height: 560px;
    min-width: 0;
    background: #fff;
}
.workpulse-app .workpulse-chat-thread-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .workpulse-chat-thread-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--wp-text-strong);
}
.workpulse-app .workpulse-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    min-height: 280px;
    background: #F8FAFC;
}
.workpulse-app .workpulse-chat-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 16px;
    max-width: 78%;
}
.workpulse-app .workpulse-chat-msg-row--mine {
    margin-left: auto;
    flex-direction: row-reverse;
}
.workpulse-app .workpulse-chat-msg-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.workpulse-app .workpulse-chat-msg-row--mine .workpulse-chat-msg-stack {
    align-items: flex-end;
}
.workpulse-app .workpulse-chat-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    background: #E9E9EB;
    color: var(--wp-text-strong);
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.workpulse-app .workpulse-chat-msg-row--mine .workpulse-chat-bubble {
    background: var(--wp-purple-500);
    color: #fff;
    border-bottom-right-radius: 6px;
}
.workpulse-app .workpulse-chat-msg-row--theirs .workpulse-chat-bubble {
    border-bottom-left-radius: 6px;
}
.workpulse-app .workpulse-chat-msg-time {
    font-size: 11px;
    color: var(--wp-text-subtle);
    padding: 0 4px;
}
.workpulse-app .workpulse-chat-composer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--wp-border-soft);
    background: #fff;
    flex-wrap: wrap;
}
.workpulse-app .workpulse-chat-composer.is-disabled {
    opacity: 0.65;
}
.workpulse-app .workpulse-chat-composer.is-disabled textarea,
.workpulse-app .workpulse-chat-composer.is-disabled button {
    pointer-events: none;
}
.workpulse-app .workpulse-chat-composer__input-wrap {
    flex: 1;
    min-width: 0;
}
.workpulse-app .workpulse-chat-composer textarea {
    width: 100%;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius-pill);
    font-size: 14px;
    font-family: inherit;
    background: #F8FAFC;
    line-height: 1.4;
}
.workpulse-app .workpulse-chat-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--wp-purple-500);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.workpulse-app .workpulse-chat-send-btn:hover {
    background: var(--wp-purple-600);
}
.workpulse-app .workpulse-chat-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

/* ---------- In-app notifications ---------- */
.workpulse-app .workpulse-notifications-wrap {
    position: relative;
}
.workpulse-app .workpulse-notifications-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    background: #fff;
    cursor: pointer;
    color: var(--wp-text-strong);
    flex-shrink: 0;
}
.workpulse-app .workpulse-notifications-bell svg {
    display: block;
}
.workpulse-app .topbar .workpulse-notifications-wrap {
    flex-shrink: 0;
}
.workpulse-app .workpulse-notifications-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--wp-radius-pill);
    background: var(--wp-purple-500);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.workpulse-app .workpulse-notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 360px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-md);
    z-index: 100;
}
.workpulse-app .workpulse-notifications-panel[hidden] {
    display: none !important;
}
.workpulse-app .workpulse-notifications-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--wp-border-soft);
    font-size: 13px;
}
.workpulse-app .workpulse-notifications-panel__head a {
    font-size: 12px;
    color: var(--wp-purple-600);
}
.workpulse-app .workpulse-notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}
.workpulse-app .workpulse-notifications-item {
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .workpulse-notifications-item.is-unread {
    background: var(--wp-purple-soft);
}
.workpulse-app .workpulse-notifications-link {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
}
.workpulse-app .workpulse-notifications-link:hover {
    background: #F9FAFB;
}
.workpulse-app .workpulse-notifications-item__title {
    display: block;
    font-weight: 600;
    font-size: 13px;
}
.workpulse-app .workpulse-notifications-item__body {
    display: block;
    font-size: 12px;
    color: var(--wp-text-muted);
    margin-top: 2px;
}
.workpulse-app .workpulse-notifications-item__time {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

/* ---------- Chat groups & attachments ---------- */
.workpulse-app .workpulse-chat-sidebar__actions {
    margin: 0 12px 8px;
}
.workpulse-app .workpulse-chat-new-peer {
    margin: 0 12px 8px;
    width: calc(100% - 24px);
}
.workpulse-app .workpulse-chat-roster-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    max-height: 140px;
    overflow-y: auto;
}
.workpulse-app .workpulse-chat-roster-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    border: 0;
    border-radius: var(--wp-radius-sm);
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    color: var(--wp-text);
}
.workpulse-app .workpulse-chat-roster-btn:hover {
    background: #fff;
    color: var(--wp-purple-600);
}
.workpulse-app .workpulse-chat-roster-btn.is-inactive,
.workpulse-app .workpulse-chat-roster-btn:disabled {
    color: var(--wp-text-subtle);
    font-style: italic;
    cursor: default;
    opacity: 0.72;
}
.workpulse-app .workpulse-chat-roster-btn.is-inactive:hover,
.workpulse-app .workpulse-chat-roster-btn:disabled:hover {
    background: transparent;
    color: var(--wp-text-subtle);
}
.workpulse-app .workpulse-chat-convo-item.is-inactive-peer .workpulse-chat-convo-title-text {
    color: var(--wp-text-subtle);
    font-style: italic;
}
.workpulse-app .workpulse-chat-roster-empty {
    margin: 8px 0 0;
    line-height: 1.4;
}
.workpulse-app .workpulse-chat-roster-empty a {
    color: var(--wp-purple-600);
    font-weight: 600;
}
.workpulse-app .workpulse-chat-type-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--wp-purple-600);
    margin-left: 4px;
}
.workpulse-app .workpulse-chat-composer__fields {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex: 1;
}
.workpulse-app .workpulse-chat-composer__fields textarea {
    flex: 1;
}
.workpulse-app .workpulse-chat-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.workpulse-app .workpulse-chat-attach-img {
    max-width: 220px;
    max-height: 160px;
    border-radius: var(--wp-radius);
    margin-top: 6px;
}
.workpulse-app .workpulse-chat-attach-file {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--wp-purple-600);
}
.workpulse-app .workpulse-chat-composer {
    flex-wrap: wrap;
}
.workpulse-app .workpulse-chat-file-name {
    width: 100%;
    padding: 0 18px 4px;
}
.workpulse-app .workpulse-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.workpulse-app .workpulse-chat-modal[hidden] {
    display: none !important;
}
.workpulse-app .workpulse-chat-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.workpulse-app .workpulse-chat-modal__panel {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: var(--wp-radius-lg);
    padding: 20px;
    box-shadow: var(--wp-shadow-md);
}
.workpulse-app .workpulse-chat-modal__panel h3 {
    margin: 0 0 12px;
}
.workpulse-app .workpulse-chat-modal__panel input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    margin-bottom: 12px;
}
.workpulse-app .workpulse-chat-group-members {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius);
    padding: 8px;
    margin-bottom: 14px;
}
.workpulse-app .workpulse-chat-group-member-option {
    display: block;
    padding: 6px 4px;
    font-size: 13px;
    cursor: pointer;
}
.workpulse-app .workpulse-chat-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.workpulse-app .workpulse-chat-main__members {
    padding: 0 18px 8px;
}
.workpulse-app .pill--warn {
    background: #FEF3C7;
    color: #B45309;
}
.workpulse-app .tbl--team .team-actions {
    white-space: nowrap;
}
.workpulse-app .tbl--team .team-actions .btn + .btn {
    margin-left: 4px;
}
.workpulse-app .team-empty {
    text-align: center;
    padding: 32px 18px !important;
}
.workpulse-app .team-empty .btn {
    margin-top: 12px;
}
.workpulse-app .ws-modal__panel--team {
    max-width: 520px;
}
.workpulse-app .team-member-modal form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}
.workpulse-app .team-member-modal .ws-modal__panel--team {
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}
body.workpulse-modal-open {
    overflow: hidden;
}

/* ---------- Profit & loss ---------- */
.workpulse-app .workpulse-pnl-page .page__head {
    margin-bottom: 20px;
}
.workpulse-app .pnl-card {
    margin-bottom: 20px;
}
.workpulse-app .pnl-filter-bar {
    padding: 14px 18px;
    border-bottom: 1px solid var(--wp-border-soft);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.workpulse-app .pnl-month-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}
.workpulse-app .pnl-month-select {
    min-width: 160px;
}
.workpulse-app .pnl-range-hint {
    margin-left: auto;
}
.workpulse-app .pnl-currency-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.workpulse-app .pnl-currency-bar__label {
    font-weight: 600;
}
.workpulse-app .pnl-currency-toggle {
    display: inline-flex;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-pill);
    overflow: hidden;
    background: #fff;
}
.workpulse-app .pnl-currency-toggle__btn {
    border: 0;
    background: transparent;
    color: var(--wp-text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    line-height: 1.2;
}
.workpulse-app .pnl-currency-toggle__btn.is-active {
    background: var(--wp-purple-soft);
    color: var(--wp-purple-700);
}
.workpulse-app .pnl-fx-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.workpulse-app .pnl-fx-input {
    width: 88px;
    padding: 6px 10px !important;
    font-size: 13px !important;
    text-align: right;
}
.workpulse-app .pnl-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.workpulse-app .pnl-stat {
    padding: 20px 22px;
    border-right: 1px solid var(--wp-border-soft);
}
.workpulse-app .pnl-stat:last-child {
    border-right: 0;
}
.workpulse-app .pnl-stat__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp-text-muted);
    margin-bottom: 8px;
}
.workpulse-app .pnl-stat__value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--wp-text-strong);
    line-height: 1.2;
}
.workpulse-app .pnl-stat__value--pos {
    color: #15803d;
}
.workpulse-app .pnl-stat__value--neg {
    color: #b91c1c;
}
.workpulse-app .pnl-stat__sub {
    display: block;
    font-size: 12px;
    margin-top: 6px;
}
.workpulse-app .pnl-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    margin-bottom: 20px;
}
.workpulse-app .pnl-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.workpulse-app .pnl-employee-pl-card {
    margin-top: 20px;
    margin-bottom: 0;
}
.workpulse-app .pnl-employee-pl-tbl .pnl-emp-net--pos {
    color: #15803d;
    font-weight: 600;
}
.workpulse-app .pnl-employee-pl-tbl .pnl-emp-net--neg {
    color: #b91c1c;
    font-weight: 600;
}
.workpulse-app .team-expense-share-field {
    margin-top: 4px;
}
.workpulse-app .team-expense-share-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}
.workpulse-app .team-expense-share-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
}
.workpulse-app .pnl-expense-form .btn--primary {
    margin-top: 4px;
}
.workpulse-app .pnl-expense-tbl .pill {
    font-size: 11px;
}
@media (max-width: 1100px) {
    .workpulse-app .pnl-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .workpulse-app .pnl-stat:nth-child(2) {
        border-right: 0;
    }
    .workpulse-app .pnl-stat:nth-child(1),
    .workpulse-app .pnl-stat:nth-child(2) {
        border-bottom: 1px solid var(--wp-border-soft);
    }
    .workpulse-app .pnl-grid,
    .workpulse-app .pnl-breakdown-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 540px) {
    .workpulse-app .pnl-stats {
        grid-template-columns: 1fr;
    }
    .workpulse-app .pnl-stat {
        border-right: 0;
        border-bottom: 1px solid var(--wp-border-soft);
    }
    .workpulse-app .pnl-stat:last-child {
        border-bottom: 0;
    }
}
.workpulse-app .pnl-view-toggle {
    display: inline-flex;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    overflow: hidden;
    background: #fff;
}
.workpulse-app .pnl-view-toggle__btn {
    padding: 7px 14px;
    border: 0;
    background: transparent;
    color: var(--wp-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.workpulse-app .pnl-view-toggle__btn.is-active {
    background: var(--wp-purple-50);
    color: var(--wp-purple-700);
}
.workpulse-app .pnl-monthly-panel {
    padding: 18px;
    border-top: 1px solid var(--wp-border-soft);
}
.workpulse-app .pnl-monthly-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.workpulse-app .pnl-projection-history-card {
    margin-top: 18px;
}
.workpulse-app .pnl-projection-row--today td {
    background: #F5F3FF;
}
.workpulse-app .pnl-monthly-total--projection {
    background: linear-gradient(180deg, #fff, #EDE9FE);
    border-color: #DDD6FE;
}
.workpulse-app .pnl-monthly-total--need {
    background: linear-gradient(180deg, #fff, #FEF3C7);
    border-color: #FDE68A;
}
.workpulse-app .pnl-monthly-total--management {
    background: linear-gradient(180deg, #fff, #EFF6FF);
    border-color: #BFDBFE;
}
.workpulse-app .pnl-monthly-total--upwork {
    background: linear-gradient(180deg, #fff, #FFF7ED);
    border-color: #FDBA74;
}
.workpulse-app .pnl-monthly-total--bank {
    background: linear-gradient(180deg, #fff, #F0FDF4);
    border-color: #A7F3D0;
}
.workpulse-app .pnl-monthly-total {
    padding: 14px 16px;
    background: #FAFAFB;
    border: 1px solid var(--wp-border-soft);
    border-radius: var(--wp-radius-lg);
}
.workpulse-app .pnl-monthly-total__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wp-text-muted);
    margin-bottom: 6px;
}
.workpulse-app .pnl-monthly-total__value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--wp-text);
}
.workpulse-app .pnl-monthly-total__sub {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
}
.workpulse-app #pnl-stats[hidden],
.workpulse-app #pnl-range-hint[hidden],
.workpulse-app .pnl-date-filter[hidden],
.workpulse-app #pnl-summary-sections[hidden],
.workpulse-app #pnl-breakdown-sections[hidden],
.workpulse-app #pnl-monthly-panel[hidden],
.workpulse-app #pnl-monthly-range-hint[hidden],
.workpulse-app #pnl-employee-pl-section[hidden] {
    display: none !important;
}
.workpulse-app .pnl-load-error {
    color: #B91C1C;
    padding: 12px 16px;
}
.workpulse-app .pnl-monthly-total--net .pnl-monthly-total__value.pnl-stat__value--pos {
    color: #047857;
}
.workpulse-app .pnl-monthly-total--net .pnl-monthly-total__value.pnl-stat__value--neg {
    color: #B91C1C;
}
.workpulse-app .pnl-monthly-tbl .pill.tiny {
    margin-left: 6px;
    font-size: 10px;
    vertical-align: middle;
}
.workpulse-app .pnl-monthly-pos {
    color: #047857;
}
.workpulse-app .pnl-monthly-neg {
    color: #B91C1C;
}
@media (max-width: 1100px) {
    .workpulse-app .pnl-monthly-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    .workpulse-app .pnl-monthly-totals {
        grid-template-columns: 1fr;
    }
}

/* Upwork tracking (manual) */
.workpulse-app .workpulse-upwork-page .page__head {
    align-items: flex-start;
}
.workpulse-app .upwork-toolbar-card {
    margin-bottom: 18px;
}
.workpulse-app .upwork-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
}
.workpulse-app .upwork-toolbar__price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.workpulse-app .upwork-toolbar__price-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--wp-text-muted);
}
.workpulse-app .upwork-toolbar__price-input {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.workpulse-app .upwork-tab-toggle {
    display: inline-flex;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    overflow: hidden;
    background: #fff;
    margin-bottom: 0;
}
.workpulse-app .upwork-tab-toggle__btn {
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: var(--wp-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.workpulse-app .upwork-tab-toggle__btn.is-active {
    background: var(--wp-purple-50);
    color: var(--wp-purple-700);
}
.workpulse-app .upwork-tab-panel[hidden] {
    display: none !important;
}
.workpulse-app .upwork-filter-card {
    margin-bottom: 18px;
}
.workpulse-app .upwork-filter-bar--top {
    padding: 14px 16px;
    border-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}
.workpulse-app .upwork-month-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.workpulse-app .upwork-month-label .input[type="month"] {
    min-width: 170px;
}
.workpulse-app .upwork-filter-bar--top .input[type="search"] {
    flex: 1;
    min-width: 200px;
}
.workpulse-app .upwork-table-card {
    margin-bottom: 18px;
}
.workpulse-app .upwork-entry-card {
    max-width: 640px;
}
.workpulse-app .upwork-entry-card .card__body {
    padding-bottom: 8px;
}
.workpulse-app .upwork-form-actions {
    margin-top: 12px;
    padding-top: 4px;
    padding-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}
.workpulse-app .upwork-form-actions .hint {
    flex: 1 1 100%;
    margin: 6px 0 0;
}
.workpulse-app .upwork-table-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.workpulse-app .upwork-table-type__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--wp-text-subtle);
    transition: color .15s ease;
}
.workpulse-app .upwork-table-type__label.is-active {
    color: var(--wp-purple-700);
}
.workpulse-app .upwork-type-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.workpulse-app .upwork-type-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.workpulse-app .upwork-type-switch__track {
    display: block;
    width: 44px;
    height: 24px;
    background: var(--wp-border-strong);
    border-radius: var(--wp-radius-pill);
    transition: background .2s ease;
    position: relative;
}
.workpulse-app .upwork-type-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .18);
    transition: transform .2s ease;
}
.workpulse-app .upwork-type-switch input:checked + .upwork-type-switch__track {
    background: var(--wp-purple-500);
}
.workpulse-app .upwork-type-switch input:checked + .upwork-type-switch__track::after {
    transform: translateX(20px);
}
.workpulse-app .upwork-type-switch input:focus-visible + .upwork-type-switch__track {
    outline: 2px solid var(--wp-purple-500);
    outline-offset: 2px;
}
.workpulse-app .upwork-type-switch--sm .upwork-type-switch__track {
    width: 36px;
    height: 20px;
}
.workpulse-app .upwork-type-switch--sm .upwork-type-switch__track::after {
    width: 14px;
    height: 14px;
}
.workpulse-app .upwork-type-switch--sm input:checked + .upwork-type-switch__track::after {
    transform: translateX(16px);
}
@media (max-width: 720px) {
    .workpulse-app .upwork-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .workpulse-app .upwork-toolbar__price {
        justify-content: space-between;
    }
}
.workpulse-app .upwork-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.workpulse-app .upwork-funnel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.workpulse-app .upwork-funnel .funnel__step {
    background: var(--wp-card);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    padding: 12px 14px;
}
.workpulse-app .upwork-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wp-border-soft);
}
.workpulse-app .upwork-filter-bar .input[type="month"] {
    max-width: 170px;
}
.workpulse-app .upwork-filter-bar .input[type="search"] {
    flex: 1;
    min-width: 180px;
}
.workpulse-app .upwork-job-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-purple-600);
    text-decoration: none;
}
.workpulse-app .upwork-job-link:hover {
    text-decoration: underline;
}
.workpulse-app .connects-split {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}
.workpulse-app .chk-cell {
    text-align: center;
}
.workpulse-app .chk-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}
.workpulse-app .chk-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wp-purple-500);
}
.workpulse-app .chk-label span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wp-text-subtle);
}
.workpulse-app .chk-label--reply input:checked + span { color: #047857; }
.workpulse-app .chk-label--converted input:checked + span { color: #047857; }
.workpulse-app .chk-label--not-converted input:checked + span { color: #B91C1C; }
.workpulse-app .rate-inline {
    display: none;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.workpulse-app .rate-inline.is-visible {
    display: flex;
}
.workpulse-app .rate-inline .input--xs {
    max-width: 90px;
}
.workpulse-app .upwork-form-col .radio-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.workpulse-app .upwork-form-col .radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    cursor: pointer;
    font-size: 13px;
}
.workpulse-app .upwork-form-col .radio-pill:has(input:checked) {
    border-color: var(--wp-purple-500);
    background: var(--wp-purple-50);
    color: var(--wp-purple-700);
}
.workpulse-app .upwork-help-card .detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--wp-border-soft);
    font-size: 13px;
}
.workpulse-app .upwork-help-card .detail-row span:first-child {
    color: var(--wp-text-muted);
}
.workpulse-app .upwork-tbl .icon-btn + .icon-btn {
    margin-left: 4px;
}
.workpulse-app .upwork-import-card {
    margin-bottom: 18px;
}
.workpulse-app .upwork-help-card {
    margin-bottom: 18px;
}
.workpulse-app .upwork-import-textarea {
    width: 100%;
    min-height: 120px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}
.workpulse-app .upwork-import-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.workpulse-app .upwork-import-preview-wrap {
    margin-top: 14px;
    max-height: 320px;
    overflow: auto;
}
.workpulse-app .upwork-job-title {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}
.workpulse-app .upwork-freelancer-label {
    display: block;
    margin-top: 2px;
}
@media (max-width: 1100px) {
    .workpulse-app .upwork-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .workpulse-app .upwork-funnel {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .workpulse-app .upwork-stats,
    .workpulse-app .upwork-funnel {
        grid-template-columns: 1fr 1fr;
    }
}

/* Topbar profile menu + attendance punch */
.workpulse-app .topbar__punch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-right: 8px;
}
.workpulse-app .topbar__punch-status {
    white-space: nowrap;
}
.workpulse-app .topbar__profile-menu {
    position: relative;
    margin-left: 4px;
}
.workpulse-app .topbar__profile-btn {
    cursor: pointer;
    border: 0;
    padding: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.workpulse-app .topbar__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.workpulse-app .topbar__profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    box-shadow: var(--wp-shadow-md);
    z-index: 120;
    padding: 6px 0;
}
.workpulse-app .topbar__profile-menu.is-open .topbar__profile-dropdown {
    display: block;
}
.workpulse-app .topbar__profile-dropdown-head {
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--wp-border-soft);
    font-size: 13px;
}
.workpulse-app .topbar__profile-dropdown-item {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wp-text);
    text-decoration: none;
}
.workpulse-app .topbar__profile-dropdown-item:hover {
    background: var(--wp-purple-50);
    color: var(--wp-purple-700);
}
.workpulse-app .topbar__profile-dropdown-item--danger {
    color: #B91C1C;
}
.workpulse-app .topbar__profile-dropdown-item--danger:hover {
    background: #FEF2F2;
    color: #991B1B;
}

/* Mood check-in modal */
.workpulse-app .workpulse-mood-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.workpulse-app .workpulse-mood-modal[hidden] {
    display: none !important;
}
.workpulse-app .workpulse-mood-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, .45);
}
.workpulse-app .workpulse-mood-modal__panel {
    position: relative;
    width: min(420px, 100%);
    z-index: 1;
}
.workpulse-app .workpulse-mood-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.workpulse-app .workpulse-mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-md);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.workpulse-app .workpulse-mood-btn:hover {
    border-color: var(--wp-purple-300);
    background: var(--wp-purple-50);
}
.workpulse-app .workpulse-mood-btn__emoji {
    font-size: 22px;
    line-height: 1;
}
.workpulse-app .workpulse-mood-btn__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--wp-text-muted);
}

/* Profile page */
.workpulse-app .workpulse-mood-report-table {
    margin: 0;
}
.workpulse-app .workpulse-mood-report-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}
/* Profile page — pin Inter; theme/date inputs often leak monospace */
.workpulse-app .workpulse-profile-page {
    font-family: var(--wp-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.workpulse-app .workpulse-profile-page :where(
    h1, h2, h3, h4, h5, h6,
    p, label, span, a, button, li,
    .section-label, .card__title, .hint, .tiny, .muted,
    .workpulse-message, .workpulse-chat-error
) {
    font-family: var(--wp-font);
}
.workpulse-app .workpulse-profile-page input,
.workpulse-app .workpulse-profile-page select,
.workpulse-app .workpulse-profile-page textarea,
.workpulse-app .workpulse-profile-page .input,
.workpulse-app .workpulse-profile-page .btn {
    font-family: var(--wp-font) !important;
    -webkit-appearance: none;
    appearance: none;
}
.workpulse-app .workpulse-profile-page input[type="date"] {
    min-height: 38px;
}
.workpulse-app .workpulse-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}
.workpulse-app .workpulse-profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.workpulse-app .workpulse-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--wp-purple-100);
    color: var(--wp-purple-700);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
}
.workpulse-app .workpulse-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 900px) {
    .workpulse-app .workpulse-profile-grid {
        grid-template-columns: 1fr;
    }
    .workpulse-app .workpulse-mood-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .workpulse-app .topbar__punch-status {
        display: none;
    }
}

/* Payment tracking */
.workpulse-app .workpulse-payments-page .pay-hint {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--wp-purple-50, #F4F1FE);
    border: 1px solid var(--wp-purple-100, #E8E2FD);
}
.workpulse-app .workpulse-payments-page .pay-hint__text {
    margin: 0;
    font-size: 12.5px;
    color: var(--wp-purple-700, #5A47B8);
}
.workpulse-app .pay-card .pay-filter-bar {
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.workpulse-app .pay-view-toggle {
    display: inline-flex;
    border: 1px solid var(--wp-border, #E5E7EB);
    border-radius: var(--wp-radius, 10px);
    overflow: hidden;
    background: #fff;
}
.workpulse-app .pay-view-toggle__btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 0;
    background: transparent;
    color: var(--wp-text-muted, #6B7280);
    cursor: pointer;
}
.workpulse-app .pay-view-toggle__btn.is-active {
    background: var(--wp-purple-soft, #EDE9FE);
    color: var(--wp-purple-700, #5A47B8);
}
.workpulse-app .pay-nav {
    display: inline-flex;
    gap: 4px;
}
.workpulse-app .pay-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wp-border-soft, #EEF0F4);
}
.workpulse-app .pay-stats .pnl-stat--pos .pnl-stat__value { color: #047857; }
.workpulse-app .pay-stats .pnl-stat--warn .pnl-stat__value { color: #B45309; }
.workpulse-app .pay-stats .pnl-stat--neg .pnl-stat__value { color: #B91C1C; }
.workpulse-app .pay-channel-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 14px;
    border-bottom: 1px solid var(--wp-border-soft, #EEF0F4);
}
.workpulse-app .pay-channel-card {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--wp-border-soft, #EEF0F4);
    background: #FAFAFB;
}
.workpulse-app .pay-channel-card--upwork {
    background: linear-gradient(180deg, #fff, #FFF7ED);
    border-color: #FDBA74;
}
.workpulse-app .pay-channel-card--direct {
    background: linear-gradient(180deg, #fff, #F5F3FF);
    border-color: #DDD6FE;
}
.workpulse-app .pay-channel-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.workpulse-app .pay-channel-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.workpulse-app .pay-channel-metric__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp-text-muted);
    margin-bottom: 4px;
}
.workpulse-app .pay-channel-metric__value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.workpulse-app .pay-channel-metric__value--pos { color: #047857; }
.workpulse-app .pay-channel-metric__value--warn { color: #B45309; }
.workpulse-app .pay-invoice-queue {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wp-border-soft, #EEF0F4);
    background: #FAFAFB;
}
.workpulse-app .pay-invoice-queue__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.workpulse-app .pay-invoice-queue__title {
    font-weight: 600;
    font-size: 13px;
}
.workpulse-app .pay-invoice-queue__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.workpulse-app .pay-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--wp-border, #E5E7EB);
    border-radius: var(--wp-radius, 10px);
}
.workpulse-app .pay-queue-item__meta { flex: 1; min-width: 0; }
.workpulse-app .pay-queue-item__title { font-weight: 600; font-size: 12.5px; }
.workpulse-app .pay-tabs {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    border-bottom: 1px solid var(--wp-border-soft, #EEF0F4);
}
.workpulse-app .pay-tabs__btn {
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 600;
    border: 0;
    background: transparent;
    color: var(--wp-text-muted, #6B7280);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.workpulse-app .pay-tabs__btn.is-active {
    color: var(--wp-purple-700, #5A47B8);
    border-bottom-color: var(--wp-purple-500, #7B68EE);
}
.workpulse-app .pay-tbl { margin-top: 0; }
.workpulse-app .pay-row--received { background: #F0FDF4; }
.workpulse-app .pay-row--overdue { background: #FEF2F2; }
.workpulse-app .pay-check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
}
.workpulse-app .pay-check-label.is-received {
    color: #047857;
    font-weight: 600;
}
.workpulse-app .pay-fee-col { color: #B45309; }
.workpulse-app .pay-net-col { font-weight: 600; }
.workpulse-app .pay-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.workpulse-app .pay-status-cell .btn--sm {
    padding: 3px 8px;
    font-size: 11px;
}
.workpulse-app .pay-invoice-ref {
    line-height: 1.2;
}
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--wp-border-soft, #EEF0F4);
}
.workpulse-app .pill--upwork {
    background: #D1FAE5;
    color: #047857;
}
/* Compact Upwork indicator — green circle with "U" */
.workpulse-app .upwork-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #14A800;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    letter-spacing: -0.03em;
    user-select: none;
    vertical-align: middle;
}
.workpulse-app .pill--direct {
    background: var(--wp-purple-soft, #EDE9FE);
    color: var(--wp-purple-700, #5A47B8);
}
.workpulse-app .ws-upwork-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}
.workpulse-app .ws-upwork-field { margin-top: 4px; }
@media (max-width: 900px) {
    .workpulse-app .pay-stats { grid-template-columns: repeat(2, 1fr); }
    .workpulse-app .pay-channel-breakdown { grid-template-columns: 1fr; }
    .workpulse-app .pay-channel-card__metrics { grid-template-columns: 1fr; }
    .workpulse-app .pay-invoice-queue__list { grid-template-columns: 1fr; }
}

/* Payment — in bank confirm modal */
.workpulse-app .pay-bank-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.workpulse-app .pay-bank-modal[hidden] {
    display: none !important;
}
.workpulse-app .pay-bank-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.workpulse-app .pay-bank-modal__panel {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    padding: 18px 20px;
    box-shadow: var(--wp-shadow-lg);
}
.workpulse-app .pay-bank-modal__panel h3 {
    margin: 0 0 8px;
    font-size: 16px;
}
.workpulse-app .pay-bank-modal__field {
    margin-bottom: 12px;
}
.workpulse-app .pay-bank-modal__field label {
    display: block;
    margin-bottom: 4px;
}
.workpulse-app .pay-bank-modal__net,
.workpulse-app .pay-bank-modal__remain {
    font-size: 18px;
    font-weight: 700;
    color: var(--wp-text-strong);
}
.workpulse-app .pay-bank-modal__remain {
    color: #B45309;
}
.workpulse-app .pay-bank-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.workpulse-app .pay-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 1100px) {
    .workpulse-app .pay-stats {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Cash & ledger */
.workpulse-app .cash-ledger-balances {
    margin-bottom: 16px;
}
.workpulse-app .cash-ledger-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.workpulse-app .cash-ledger-setup-hint {
    margin: 14px 0 0;
}
.workpulse-app .cash-ledger-amt--in {
    color: var(--wp-green-700, #15803d);
}
.workpulse-app .cash-ledger-amt--out {
    color: var(--wp-red-700, #b91c1c);
}
@media (min-width: 900px) {
    .workpulse-app .cash-ledger-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .workpulse-app .cash-ledger-stats { grid-template-columns: 1fr; }
}
/* Cash payouts (legacy) */
.workpulse-app .cash-payout-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
@media (min-width: 900px) {
    .workpulse-app .cash-payout-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.workpulse-app .treasury-setup-card {
    margin-bottom: 16px;
}
.workpulse-app .treasury-setup-form .field-row--3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.workpulse-app .treasury-balances-card {
    margin-bottom: 16px;
}
.workpulse-app .treasury-balances {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.workpulse-app .treasury-balances-hint {
    margin: 12px 0 0;
}
.workpulse-app .pay-treasury-setup-hint {
    margin-bottom: 16px;
}
@media (max-width: 700px) {
    .workpulse-app .cash-payout-stats { grid-template-columns: 1fr; }
    .workpulse-app .treasury-setup-form .field-row--3 { grid-template-columns: 1fr; }
    .workpulse-app .treasury-balances { grid-template-columns: 1fr; }
    .workpulse-app .cash-payout-form .field-row--2 { grid-template-columns: 1fr; }
}
.workpulse-app .cash-payout-form-card {
    margin-bottom: 16px;
}
.workpulse-app .cash-payout-form .field-row--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
