/* ═══════════════════════════════════════════════════════════════
   E-Impact Pro — Workspace (light + dark)
   Official brand: #705EC8 · #6f42c1 · #8B5CF6
   ═══════════════════════════════════════════════════════════════ */

:root {
    --eip-purple: #705ec8;
    --eip-purple-deep: #5f4dbd;
    --eip-purple-dark: #4a3d9e;
    --eip-purple-bright: #8b5cf6;
    --eip-purple-soft: #a78bfa;
    --accent-impact: #705ec8;
    --accent-teal: #14b8a6;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-sky: #0ea5e9;
    --accent-violet: #8b5cf6;
    --accent-orange: #ea580c;
    --accent-indigo: #6366f1;
    --accent-fuchsia: #d946ef;
    --accent-cyan: #06b6d4;
    --ws-radius: 14px;
    --ws-radius-sm: 10px;
    --ws-radius-xs: 7px;
    --ws-font: 'DM Sans', system-ui, -apple-system, sans-serif;
    --ws-max-width: 1400px;
    --ws-topbar-h: 60px;
    --ws-sidebar-w: 248px;
}

/* ─── Dark theme (default) ─────────────────────────────────────── */
html[data-theme='dark'],
:root:not([data-theme='light']) {
    --eip-purple-muted: rgba(112, 94, 200, 0.14);
    --eip-purple-glow: rgba(112, 94, 200, 0.35);
    --eip-purple-border: rgba(112, 94, 200, 0.28);
    --ws-bg: #09090d;
    --ws-bg-elevated: #0f0f14;
    --ws-surface: #13131a;
    --ws-surface-hover: #1a1a24;
    --ws-surface-active: #1f1f2b;
    --ws-surface-muted: #101016;
    --ws-border: rgba(255, 255, 255, 0.07);
    --ws-border-strong: rgba(255, 255, 255, 0.12);
    --ws-text: #fafafa;
    --ws-text-secondary: #d4d4d8;
    --ws-text-muted: #71717a;
    --ws-text-faint: #52525b;
    --ws-danger: #f87171;
    --ws-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 20px rgba(0, 0, 0, 0.35);
    --ws-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --ws-shadow-glow: 0 0 0 1px var(--eip-purple-border), 0 8px 32px var(--eip-purple-glow);
    --ws-topbar-bg: rgba(9, 9, 13, 0.82);
    --ws-body-gradient:
        radial-gradient(ellipse 90% 60% at 50% -30%, rgba(112, 94, 200, 0.12), transparent 65%),
        radial-gradient(ellipse 50% 40% at 100% 0%, rgba(139, 92, 246, 0.05), transparent 55%);
    --ws-gradient-text: linear-gradient(135deg, #8b5cf6 0%, #705ec8 50%, #a78bfa 100%);
}

/* ─── Light theme ────────────────────────────────────────────── */
html[data-theme='light'] {
    --eip-purple-muted: rgba(112, 94, 200, 0.1);
    --eip-purple-glow: rgba(112, 94, 200, 0.18);
    --eip-purple-border: rgba(112, 94, 200, 0.22);
    --ws-bg: #f6f7fb;
    --ws-bg-elevated: #ffffff;
    --ws-surface: #ffffff;
    --ws-surface-hover: #f8f8fc;
    --ws-surface-active: #f1f1f8;
    --ws-surface-muted: #f3f4f8;
    --ws-border: rgba(15, 23, 42, 0.08);
    --ws-border-strong: rgba(15, 23, 42, 0.14);
    --ws-text: #111827;
    --ws-text-secondary: #374151;
    --ws-text-muted: #6b7280;
    --ws-text-faint: #9ca3af;
    --ws-danger: #dc2626;
    --ws-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.06);
    --ws-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --ws-shadow-glow: 0 0 0 1px var(--eip-purple-border), 0 8px 28px var(--eip-purple-glow);
    --ws-topbar-bg: rgba(255, 255, 255, 0.88);
    --ws-body-gradient:
        radial-gradient(ellipse 90% 60% at 50% -30%, rgba(112, 94, 200, 0.06), transparent 65%),
        radial-gradient(ellipse 50% 40% at 100% 0%, rgba(139, 92, 246, 0.03), transparent 55%);
    --ws-gradient-text: linear-gradient(135deg, #5f4dbd 0%, #705ec8 50%, #8b5cf6 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-theme='light'] {
    color-scheme: light;
}

html[data-theme='dark'] {
    color-scheme: dark;
}

body.ws-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--ws-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ws-text);
    background-color: var(--ws-bg);
    background-image: var(--ws-body-gradient);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.ws-app {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
}

.ws-app__content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── App shell (sidebar + main) ─────────────────────────────── */

.ws-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

.ws-shell__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--ws-sidebar-w);
    transition: margin-left 0.25s ease;
}

.ws-mobile-bar {
    display: none;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--ws-border);
    background: var(--ws-topbar-bg);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    position: sticky;
    top: 0;
    z-index: 40;
}

.ws-mobile-bar__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-xs);
    background: var(--ws-surface);
    color: var(--ws-text-secondary);
    cursor: pointer;
}

.ws-mobile-bar__menu svg {
    width: 18px;
    height: 18px;
}

.ws-mobile-bar__title {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ws-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Sidebar ────────────────────────────────────────────────── */

.ws-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: var(--ws-sidebar-w);
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(13, 13, 18, 0.92);
    border-right: 1px solid var(--ws-border);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

html[data-theme='light'] .ws-sidebar {
    background: rgba(255, 255, 255, 0.94);
}

.ws-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--ws-border);
}

.ws-sidebar__brand-link {
    display: inline-flex;
    text-decoration: none;
    color: inherit;
}

.ws-sidebar__brand-link .ws-brand-logo {
    height: 28px;
}

.ws-sidebar__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--ws-radius-xs);
    background: transparent;
    color: var(--ws-text-muted);
    cursor: pointer;
}

.ws-sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.75rem 0.65rem;
    scrollbar-width: thin;
}

.ws-sidebar__section {
    margin-bottom: 1rem;
}

.ws-sidebar__section-label {
    display: block;
    padding: 0.35rem 0.65rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ws-text-faint);
}

.ws-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.15rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ws-text-secondary);
    text-decoration: none;
    border-radius: var(--ws-radius-sm);
    transition: background-color 0.15s, color 0.15s;
}

.ws-sidebar__link:hover {
    color: var(--ws-text);
    background: var(--ws-surface-hover);
}

.ws-sidebar__link--active {
    color: var(--ws-text);
    background: linear-gradient(135deg, rgba(112, 94, 200, 0.22), rgba(139, 92, 246, 0.12));
    box-shadow: inset 3px 0 0 var(--eip-purple-bright);
}

.ws-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--ws-surface-muted);
    color: var(--ws-text-muted);
    flex-shrink: 0;
}

.ws-sidebar__icon svg {
    width: 15px;
    height: 15px;
}

.ws-sidebar__icon--impact { color: var(--eip-purple-soft); background: var(--eip-purple-muted); }
.ws-sidebar__icon--teal { color: var(--accent-teal); background: rgba(20, 184, 166, 0.12); }
.ws-sidebar__icon--amber { color: var(--accent-amber); background: rgba(217, 119, 6, 0.12); }
.ws-sidebar__icon--blue { color: var(--accent-blue); background: rgba(59, 130, 246, 0.12); }
.ws-sidebar__icon--emerald { color: var(--accent-emerald); background: rgba(16, 185, 129, 0.12); }
.ws-sidebar__icon--sky { color: var(--accent-sky); background: rgba(14, 165, 233, 0.12); }
.ws-sidebar__icon--violet { color: var(--accent-violet); background: rgba(139, 92, 246, 0.12); }
.ws-sidebar__icon--orange { color: var(--accent-orange); background: rgba(234, 88, 12, 0.12); }
.ws-sidebar__icon--indigo { color: var(--accent-indigo); background: rgba(99, 102, 241, 0.12); }
.ws-sidebar__icon--rose { color: var(--accent-rose); background: rgba(225, 29, 72, 0.12); }

.ws-sidebar__footer {
    flex-shrink: 0;
    padding: 0.75rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ws-border);
    background: inherit;
}

.ws-sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--ws-radius-sm);
    transition: background-color 0.15s;
}

.ws-sidebar__user:hover {
    background: var(--ws-surface-hover);
}

.ws-sidebar__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    border-radius: 9px;
    flex-shrink: 0;
    overflow: hidden;
}

.ws-sidebar__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ws-sidebar__user-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ws-sidebar__user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ws-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-sidebar__user-role {
    font-size: 0.68rem;
    color: var(--ws-text-faint);
}

.ws-sidebar__footer-actions {
    display: flex;
    gap: 0.35rem;
}

.ws-sidebar__footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-xs);
    background: var(--ws-surface);
    color: var(--ws-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.ws-sidebar__footer-btn svg {
    width: 16px;
    height: 16px;
}

.ws-sidebar__footer-btn:hover {
    color: var(--ws-text);
    border-color: var(--eip-purple-border);
}

.ws-sidebar__logout-form {
    margin: 0;
}

.ws-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.ws-sidebar-backdrop.ws-sidebar-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
}

body.ws-sidebar-open {
    overflow: hidden;
}

/* ─── Dashboard header ───────────────────────────────────────── */

.ws-dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.ws-dash-header__left {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.ws-dash-header__greeting {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ws-text);
}

.ws-dash-header__greeting strong {
    font-weight: 700;
}

.ws-dash-header__sub {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: var(--ws-text-muted);
}

.ws-dash-header__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ws-dash-plan {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: var(--ws-surface);
    border: 1px solid var(--eip-purple-border);
    border-radius: var(--ws-radius-sm);
    box-shadow: var(--ws-shadow-sm);
}

.ws-dash-plan__icon {
    font-size: 0.9rem;
}

.ws-dash-plan__label {
    font-size: 0.72rem;
    color: var(--ws-text-muted);
}

.ws-dash-plan__value {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--eip-purple-soft);
}

.ws-dash-header__icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-xs);
    background: var(--ws-surface);
    color: var(--ws-text-muted);
    cursor: not-allowed;
    opacity: 0.85;
}

.ws-dash-header__icon-btn svg {
    width: 18px;
    height: 18px;
}

.ws-dash-header__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: var(--ws-danger);
    border-radius: 999px;
}

/* ─── KPI grid ───────────────────────────────────────────────── */

.ws-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.ws-kpi-card {
    position: relative;
    padding: 1rem 1rem 2.25rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    overflow: hidden;
    box-shadow: var(--ws-shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ws-kpi-card:hover {
    border-color: var(--eip-purple-border);
    box-shadow: var(--ws-shadow-glow);
}

.ws-kpi-card__top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.ws-kpi-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.ws-kpi-card__icon svg {
    width: 15px;
    height: 15px;
}

.ws-kpi-card--purple .ws-kpi-card__icon { color: var(--eip-purple-soft); background: var(--eip-purple-muted); }
.ws-kpi-card--blue .ws-kpi-card__icon { color: var(--accent-blue); background: rgba(59, 130, 246, 0.12); }
.ws-kpi-card--teal .ws-kpi-card__icon { color: var(--accent-teal); background: rgba(20, 184, 166, 0.12); }
.ws-kpi-card--sky .ws-kpi-card__icon { color: var(--accent-sky); background: rgba(14, 165, 233, 0.12); }
.ws-kpi-card--emerald .ws-kpi-card__icon { color: var(--accent-emerald); background: rgba(16, 185, 129, 0.12); }
.ws-kpi-card--amber .ws-kpi-card__icon { color: var(--accent-amber); background: rgba(217, 119, 6, 0.12); }

.ws-kpi-card--purple .ws-kpi-card__spark { color: var(--eip-purple-bright); }
.ws-kpi-card--blue .ws-kpi-card__spark { color: var(--accent-blue); }
.ws-kpi-card--teal .ws-kpi-card__spark { color: var(--accent-teal); }
.ws-kpi-card--sky .ws-kpi-card__spark { color: var(--accent-sky); }
.ws-kpi-card--emerald .ws-kpi-card__spark { color: var(--accent-emerald); }
.ws-kpi-card--amber .ws-kpi-card__spark { color: var(--accent-amber); }

.ws-kpi-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ws-text-muted);
}

.ws-kpi-card__value {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ws-text);
    line-height: 1.1;
}

.ws-kpi-card__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0.35rem 0 0;
    font-size: 0.68rem;
    font-weight: 500;
}

.ws-kpi-card__delta svg {
    width: 12px;
    height: 12px;
}

.ws-kpi-card__delta--up {
    color: var(--accent-emerald);
}

.ws-kpi-card__delta--down {
    color: var(--ws-danger);
}

.ws-kpi-card__spark {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 36px;
    opacity: 0.55;
}

/* ─── Dashboard bottom row ───────────────────────────────────── */

.ws-dash-bottom {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.ws-panel--standalone {
    margin-top: 1.75rem;
}

.ws-panel {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow-sm);
    overflow: hidden;
}

.ws-panel__head {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--ws-border);
}

.ws-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-performance {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow-sm);
    overflow: hidden;
}

.ws-performance__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--ws-border);
}

.ws-performance__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-performance__sub {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--ws-text-muted);
}

.ws-performance__filter {
    padding: 0.3rem 0.65rem;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ws-text-secondary);
    background: var(--ws-surface-muted);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-xs);
    cursor: pointer;
}

.ws-performance__filter-wrap {
    display: inline-flex;
}

.ws-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ws-performance__body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1rem 1.15rem 1.15rem;
    align-items: stretch;
}

.ws-performance__stats {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 100px;
}

.ws-performance__stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ws-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-performance__stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ws-text);
    letter-spacing: -0.02em;
}

.ws-performance__stat-value--blue { color: var(--accent-blue); }
.ws-performance__stat-value--purple { color: var(--eip-purple-soft); }
.ws-performance__stat-value--green { color: var(--accent-emerald); }

.ws-performance__chart {
    min-height: 120px;
    border-radius: var(--ws-radius-sm);
    background: var(--ws-surface-muted);
    overflow: hidden;
}

.ws-performance__chart-svg {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: block;
}

.ws-activity-list--panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-height: 280px;
    overflow-y: auto;
}

.ws-module-grid--quick {
    grid-template-columns: repeat(4, 1fr);
}

/* ─── Infrastructure atmosphere ──────────────────────────────── */

.ws-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}

.ws-atmosphere__glow {
    position: absolute;
    inset: 0;
}

.ws-atmosphere__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    will-change: transform, opacity;
}

.ws-atmosphere__orb--a {
    width: min(52vw, 520px);
    height: min(52vw, 520px);
    top: -12%;
    left: -8%;
    background: radial-gradient(circle, rgba(112, 94, 200, 0.35) 0%, transparent 70%);
    animation: ws-orb-drift-a 34s ease-in-out infinite;
}

.ws-atmosphere__orb--b {
    width: min(44vw, 440px);
    height: min(44vw, 440px);
    bottom: -18%;
    right: -6%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 72%);
    animation: ws-orb-drift-b 28s ease-in-out infinite;
}

@keyframes ws-orb-drift-a {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        opacity: 0.38;
    }
    50% {
        transform: translate3d(4vw, 3vh, 0);
        opacity: 0.5;
    }
}

@keyframes ws-orb-drift-b {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        opacity: 0.28;
    }
    50% {
        transform: translate3d(-3vw, -2vh, 0);
        opacity: 0.4;
    }
}

html[data-theme='light'] .ws-atmosphere__orb--a {
    opacity: 0.32;
    background: radial-gradient(circle, rgba(112, 94, 200, 0.18) 0%, transparent 70%);
}

html[data-theme='light'] .ws-atmosphere__orb--b {
    opacity: 0.22;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 72%);
}

.ws-atmosphere__grid {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(112, 94, 200, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 94, 200, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 20%, transparent 78%);
}

html[data-theme='light'] .ws-atmosphere__grid {
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(112, 94, 200, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 94, 200, 0.06) 1px, transparent 1px);
}

.ws-atmosphere__network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--eip-purple);
    opacity: 0.55;
}

html[data-theme='light'] .ws-atmosphere__network {
    opacity: 0.38;
}

.ws-atmosphere__links line {
    stroke: currentColor;
    stroke-width: 0.06;
    stroke-linecap: round;
    opacity: 0.22;
}

.ws-atmosphere__node {
    fill: currentColor;
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform, opacity;
    animation: ws-atmosphere-node 32s ease-in-out infinite;
}

@keyframes ws-atmosphere-node {
    0%, 100% {
        transform: scale(1);
        opacity: 0.18;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.36;
    }
}

.ws-atmosphere__pulse {
    fill: var(--eip-purple-bright);
    filter: drop-shadow(0 0 0.4px rgba(139, 92, 246, 0.8));
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform, opacity;
    animation: ws-atmosphere-flow 14s ease-in-out infinite;
}

@keyframes ws-atmosphere-flow {
    0%, 86%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    6% {
        opacity: 0.55;
    }
    48% {
        transform: translate(var(--dx, 0), var(--dy, 0));
        opacity: 0.32;
    }
    78% {
        transform: translate(var(--dx, 0), var(--dy, 0));
        opacity: 0;
    }
}

.ws-atmosphere__noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
    mix-blend-mode: overlay;
}

html[data-theme='light'] .ws-atmosphere__noise {
    opacity: 0.03;
    mix-blend-mode: multiply;
}

/* ─── Top navigation ─────────────────────────────────────────── */

.ws-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    height: var(--ws-topbar-h);
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--ws-border);
    background: var(--ws-topbar-bg);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    position: sticky;
    top: 0;
    z-index: 50;
}

.ws-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ws-topbar-center {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.ws-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    min-width: 0;
}

/* Brand */
.ws-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.ws-brand-logo {
    display: block;
    height: 32px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    object-position: left center;
}

html[data-theme='light'] .ws-brand-logo--dark {
    display: none;
}

html[data-theme='dark'] .ws-brand-logo--light {
    display: none;
}

/* Single-logo fallback: if only one variant exists, always show it */
html[data-theme='light'] .ws-brand-logo--light:only-of-type,
html[data-theme='dark'] .ws-brand-logo--dark:only-of-type,
html[data-theme='light'] .ws-brand-logo--dark:only-of-type,
html[data-theme='dark'] .ws-brand-logo--light:only-of-type {
    display: block;
}

.ws-brand-fallback {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ws-text);
    white-space: nowrap;
}

.ws-brand-mark {
    display: flex;
    filter: drop-shadow(0 2px 8px var(--eip-purple-glow));
}

.ws-brand-mark svg {
    width: 30px;
    height: 30px;
}

.ws-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ws-brand-name {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ws-text);
}

.ws-brand-tag {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--eip-purple-soft);
}

.ws-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.55rem;
    margin-left: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ws-text-muted);
    text-decoration: none;
    border-radius: var(--ws-radius-xs);
    border: 1px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.ws-back-link svg {
    width: 13px;
    height: 13px;
}

.ws-back-link:hover {
    color: var(--ws-text-secondary);
    background: var(--ws-surface);
    border-color: var(--ws-border);
}

.ws-back-link:focus-visible {
    outline: 2px solid var(--eip-purple-bright);
    outline-offset: 2px;
}

/* Search */
.ws-nav-search {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: min(320px, 100%);
    padding: 0.45rem 0.75rem;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--ws-text-muted);
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    cursor: not-allowed;
    opacity: 0.75;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-nav-search svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--ws-text-faint);
}

.ws-nav-search-text {
    flex: 1;
    text-align: left;
}

.ws-kbd {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--ws-text-faint);
    background: var(--ws-bg-elevated);
    border: 1px solid var(--ws-border);
    border-radius: 4px;
}

/* Nav buttons */
.ws-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--ws-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--ws-radius-xs);
    cursor: not-allowed;
    opacity: 0.7;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.ws-nav-btn--interactive,
.ws-theme-toggle {
    cursor: pointer;
    opacity: 1;
}

.ws-nav-btn--interactive:hover,
.ws-theme-toggle:hover {
    color: var(--ws-text-secondary);
    background: var(--ws-surface);
    border-color: var(--ws-border);
}

.ws-nav-btn--interactive:focus-visible,
.ws-theme-toggle:focus-visible {
    outline: 2px solid var(--eip-purple-bright);
    outline-offset: 2px;
}

.ws-theme-icon {
    width: 18px;
    height: 18px;
}

.ws-theme-icon[hidden] {
    display: none;
}

.ws-nav-btn svg {
    width: 18px;
    height: 18px;
}

.ws-nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.5rem 0.3rem 0.35rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ws-text-secondary);
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    cursor: not-allowed;
    opacity: 0.85;
    max-width: 180px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-nav-user--link {
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
}

.ws-nav-user--link:hover {
    color: var(--ws-text);
    background: var(--ws-surface-hover);
    border-color: var(--eip-purple-border);
    box-shadow: 0 0 0 1px var(--eip-purple-border);
}

.ws-nav-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    border-radius: 7px;
    flex-shrink: 0;
}

.ws-nav-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-nav-chevron {
    width: 14px;
    height: 14px;
    color: var(--ws-text-faint);
    flex-shrink: 0;
}

.ws-beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--eip-purple-soft);
    background: var(--eip-purple-muted);
    border: 1px solid var(--eip-purple-border);
    border-radius: 999px;
    flex-shrink: 0;
}

/* ─── Main content ───────────────────────────────────────────── */

.ws-main {
    flex: 1;
    width: 100%;
    max-width: var(--ws-max-width);
    margin: 0 auto;
    padding: 2.25rem 1.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

/* ─── Welcome ────────────────────────────────────────────────── */

.ws-welcome {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ws-welcome-greeting {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    color: var(--ws-text-secondary);
}

.ws-summary-tile,
.ws-module-card,
.ws-hub-card,
.ws-activity-list,
.ws-nav-search,
.ws-nav-user {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.ws-welcome-greeting strong {
    font-weight: 600;
    color: var(--ws-text);
}

.ws-welcome-title {
    margin: 0.1rem 0 0;
    font-size: clamp(1.65rem, 4.5vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ws-text);
}

.ws-text-gradient {
    background: var(--ws-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ws-welcome-sub {
    margin: 0.35rem 0 0;
    max-width: 52ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ws-text-muted);
}

/* ─── Summary tiles ──────────────────────────────────────────── */

.ws-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.65rem;
}

.ws-summary-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    box-shadow: var(--ws-shadow);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ws-summary-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--eip-purple), var(--eip-purple-bright));
    opacity: 0.6;
}

.ws-summary-tile:hover {
    border-color: var(--eip-purple-border);
    box-shadow: var(--ws-shadow-glow);
}

.ws-summary-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ws-text-muted);
}

.ws-summary-value {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ws-text);
}

/* ─── Sections ───────────────────────────────────────────────── */

.ws-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ws-section-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ws-text-muted);
}

/* ─── Module cards ───────────────────────────────────────────── */

.ws-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 0.75rem;
}

.ws-module-card {
    --card-accent: var(--eip-purple);
    --card-accent-bg: rgba(112, 94, 200, 0.14);
    --card-accent-glow: rgba(112, 94, 200, 0.3);

    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow);
    text-decoration: none;
    color: inherit;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.ws-module-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(ellipse at top left, var(--card-accent-bg), transparent 70%);
    transition: opacity 0.2s;
    pointer-events: none;
}

.ws-module-card:hover {
    background: var(--ws-surface-hover);
    border-color: color-mix(in srgb, var(--card-accent) 40%, transparent);
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--card-accent) 25%, transparent), 0 12px 36px var(--card-accent-glow);
}

.ws-module-card:hover::after {
    opacity: 1;
}

.ws-module-card:focus-visible {
    outline: 2px solid var(--card-accent);
    outline-offset: 3px;
}

/* Per-module accents — tuned for both themes */
html[data-theme='dark'] .ws-module-card--impact  { --card-accent-bg: rgba(112,94,200,.14);  --card-accent-glow: rgba(112,94,200,.28); }
html[data-theme='dark'] .ws-module-card--teal    { --card-accent-bg: rgba(45,212,191,.12);  --card-accent-glow: rgba(45,212,191,.22); }
html[data-theme='dark'] .ws-module-card--amber   { --card-accent-bg: rgba(251,191,36,.12);   --card-accent-glow: rgba(251,191,36,.2); }
html[data-theme='dark'] .ws-module-card--rose    { --card-accent-bg: rgba(251,113,133,.12);  --card-accent-glow: rgba(251,113,133,.22); }
html[data-theme='dark'] .ws-module-card--blue    { --card-accent-bg: rgba(96,165,250,.12);   --card-accent-glow: rgba(96,165,250,.22); }
html[data-theme='dark'] .ws-module-card--emerald { --card-accent-bg: rgba(52,211,153,.12);   --card-accent-glow: rgba(52,211,153,.22); }
html[data-theme='dark'] .ws-module-card--sky     { --card-accent-bg: rgba(56,189,248,.12);   --card-accent-glow: rgba(56,189,248,.22); }
html[data-theme='dark'] .ws-module-card--violet  { --card-accent-bg: rgba(167,139,250,.12);  --card-accent-glow: rgba(167,139,250,.22); }
html[data-theme='dark'] .ws-module-card--orange  { --card-accent-bg: rgba(251,146,60,.12);   --card-accent-glow: rgba(251,146,60,.22); }
html[data-theme='dark'] .ws-module-card--indigo  { --card-accent-bg: rgba(129,140,248,.12);  --card-accent-glow: rgba(129,140,248,.22); }
html[data-theme='dark'] .ws-module-card--fuchsia { --card-accent-bg: rgba(232,121,249,.12);  --card-accent-glow: rgba(232,121,249,.22); }
html[data-theme='dark'] .ws-module-card--cyan    { --card-accent-bg: rgba(34,211,238,.12);   --card-accent-glow: rgba(34,211,238,.22); }

html[data-theme='light'] .ws-module-card--impact  { --card-accent-bg: rgba(112,94,200,.1);   --card-accent-glow: rgba(112,94,200,.15); }
html[data-theme='light'] .ws-module-card--teal    { --card-accent-bg: rgba(20,184,166,.1);  --card-accent-glow: rgba(20,184,166,.14); }
html[data-theme='light'] .ws-module-card--amber   { --card-accent-bg: rgba(217,119,6,.1);    --card-accent-glow: rgba(217,119,6,.14); }
html[data-theme='light'] .ws-module-card--rose    { --card-accent-bg: rgba(225,29,72,.08);   --card-accent-glow: rgba(225,29,72,.12); }
html[data-theme='light'] .ws-module-card--blue    { --card-accent-bg: rgba(59,130,246,.1);   --card-accent-glow: rgba(59,130,246,.14); }
html[data-theme='light'] .ws-module-card--emerald { --card-accent-bg: rgba(16,185,129,.1);  --card-accent-glow: rgba(16,185,129,.14); }
html[data-theme='light'] .ws-module-card--sky     { --card-accent-bg: rgba(14,165,233,.1);   --card-accent-glow: rgba(14,165,233,.14); }
html[data-theme='light'] .ws-module-card--violet  { --card-accent-bg: rgba(139,92,246,.1);  --card-accent-glow: rgba(139,92,246,.14); }
html[data-theme='light'] .ws-module-card--orange  { --card-accent-bg: rgba(234,88,12,.1);   --card-accent-glow: rgba(234,88,12,.14); }
html[data-theme='light'] .ws-module-card--indigo  { --card-accent-bg: rgba(99,102,241,.1);  --card-accent-glow: rgba(99,102,241,.14); }
html[data-theme='light'] .ws-module-card--fuchsia { --card-accent-bg: rgba(217,70,239,.1);  --card-accent-glow: rgba(217,70,239,.14); }
html[data-theme='light'] .ws-module-card--cyan    { --card-accent-bg: rgba(6,182,212,.1);   --card-accent-glow: rgba(6,182,212,.14); }

.ws-module-card--impact  { --card-accent: var(--accent-impact); }
.ws-module-card--teal    { --card-accent: var(--accent-teal); }
.ws-module-card--amber   { --card-accent: var(--accent-amber); }
.ws-module-card--rose    { --card-accent: var(--accent-rose); }
.ws-module-card--blue    { --card-accent: var(--accent-blue); }
.ws-module-card--emerald { --card-accent: var(--accent-emerald); }
.ws-module-card--sky     { --card-accent: var(--accent-sky); }
.ws-module-card--violet  { --card-accent: var(--accent-violet); }
.ws-module-card--orange  { --card-accent: var(--accent-orange); }
.ws-module-card--indigo  { --card-accent: var(--accent-indigo); }
.ws-module-card--fuchsia { --card-accent: var(--accent-fuchsia); }
.ws-module-card--cyan    { --card-accent: var(--accent-cyan); }

.ws-module-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--card-accent-bg);
    color: var(--card-accent);
    border: 1px solid color-mix(in srgb, var(--card-accent) 20%, transparent);
    transition: box-shadow 0.2s;
}

.ws-module-card:hover .ws-module-icon {
    box-shadow: 0 0 16px var(--card-accent-glow);
}

.ws-module-icon svg {
    width: 22px;
    height: 22px;
}

.ws-module-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ws-module-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ws-text);
}

.ws-module-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ws-text-muted);
}

.ws-module-arrow {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
    color: var(--ws-text-faint);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.ws-module-card:hover .ws-module-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--card-accent);
}

.ws-module-arrow svg {
    width: 16px;
    height: 16px;
}

/* ─── Hub actions ────────────────────────────────────────────── */

.ws-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.65rem;
}

.ws-hub-form {
    margin: 0;
}

.ws-hub-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    padding: 1rem 1.1rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    box-shadow: var(--ws-shadow);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--ws-text);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ws-hub-card:hover {
    background: var(--ws-surface-hover);
    border-color: var(--eip-purple-border);
    box-shadow: 0 0 0 1px var(--eip-purple-border), 0 6px 24px rgba(112, 94, 200, 0.15);
    transform: translateY(-1px);
}

.ws-hub-card:focus-visible {
    outline: 2px solid var(--eip-purple-bright);
    outline-offset: 2px;
}

.ws-hub-card--danger:hover {
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2), 0 6px 24px rgba(248, 113, 113, 0.1);
}

.ws-hub-icon {
    display: flex;
    color: var(--eip-purple-soft);
}

.ws-hub-card--danger .ws-hub-icon {
    color: var(--ws-danger);
}

.ws-hub-card--link {
    text-decoration: none;
    color: inherit;
}

/* ─── Profile page ───────────────────────────────────────────── */

.ws-profile-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.ws-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ws-text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.ws-profile-back svg {
    width: 16px;
    height: 16px;
}

.ws-profile-back:hover {
    color: var(--eip-purple-soft);
}

.ws-profile-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ws-text);
}

.ws-profile-sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ws-text-secondary);
}

.ws-alert {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--ws-radius-sm);
    border: 1px solid transparent;
}

.ws-alert--success {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

html[data-theme='dark'] .ws-alert--success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
}

.ws-alert--danger {
    color: #991b1b;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.25);
}

html[data-theme='dark'] .ws-alert--danger {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.1);
}

.ws-alert-list {
    margin: 0;
    padding-left: 1.1rem;
}

.ws-profile-grid {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.ws-profile-card {
    padding: 1.35rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow-sm);
}

.ws-profile-card--hero {
    text-align: center;
}

.ws-profile-card--muted {
    background: var(--ws-surface-muted);
}

.ws-profile-card-title {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-profile-card-text {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--ws-text-secondary);
}

.ws-profile-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.25rem;
}

.ws-profile-radio {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--ws-text);
    cursor: pointer;
}

.ws-profile-radio input[type="radio"] {
    accent-color: var(--eip-purple);
}

.ws-profile-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ws-profile-avatar-wrap {
    width: 96px;
    height: 96px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--eip-purple-border);
    box-shadow: 0 8px 24px rgba(112, 94, 200, 0.2);
}

.ws-profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-profile-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-profile-role {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--eip-purple-soft);
}

.ws-profile-email {
    margin: 0.35rem 0 1rem;
    font-size: 0.8rem;
    color: var(--ws-text-secondary);
    word-break: break-word;
}

.ws-profile-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ws-profile-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--eip-purple-soft);
    background: var(--eip-purple-muted);
    border-radius: var(--ws-radius-sm);
    cursor: pointer;
    transition: background-color 0.15s;
}

.ws-profile-upload-label svg {
    width: 15px;
    height: 15px;
}

.ws-profile-upload-label:hover {
    background: rgba(112, 94, 200, 0.2);
}

.ws-profile-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ws-profile-upload-name {
    font-size: 0.72rem;
    color: var(--ws-text-faint);
}

.ws-profile-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ws-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ws-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ws-text-secondary);
}

.ws-field-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--ws-text);
    background: var(--ws-bg);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-field-input:focus {
    outline: none;
    border-color: var(--eip-purple-border);
    box-shadow: 0 0 0 3px rgba(112, 94, 200, 0.15);
}

.ws-profile-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.ws-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--ws-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.ws-profile-btn svg {
    width: 14px;
    height: 14px;
}

.ws-profile-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    border-color: transparent;
}

.ws-profile-btn--primary:hover {
    filter: brightness(1.05);
}

.ws-profile-btn--ghost {
    color: var(--ws-text-secondary);
    background: transparent;
    border-color: var(--ws-border);
}

.ws-profile-btn--ghost:hover {
    color: var(--ws-text);
    border-color: var(--eip-purple-border);
    background: var(--ws-surface-hover);
}

.ws-profile-security {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.ws-profile-security-info {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ws-profile-security-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-profile-security-desc {
    font-size: 0.78rem;
    color: var(--ws-text-secondary);
}

.ws-profile-2fa-form {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.ws-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.ws-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ws-toggle-track {
    display: inline-flex;
    width: 42px;
    height: 24px;
    padding: 2px;
    background: var(--ws-border);
    border-radius: 999px;
    transition: background-color 0.2s;
}

.ws-toggle-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.ws-toggle input:checked + .ws-toggle-track {
    background: var(--eip-purple);
}

.ws-toggle input:checked + .ws-toggle-track .ws-toggle-thumb {
    transform: translateX(18px);
}

.ws-toggle input:focus-visible + .ws-toggle-track {
    outline: 2px solid var(--eip-purple-bright);
    outline-offset: 2px;
}

.ws-profile-pill {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
}

.ws-profile-pill--on {
    color: #166534;
    background: rgba(34, 197, 94, 0.15);
}

.ws-profile-pill--off {
    color: var(--ws-text-faint);
    background: var(--ws-surface-muted);
}

html[data-theme='dark'] .ws-profile-pill--on {
    color: #86efac;
}

/* ─── Shared page header (profile + support) ─────────────────── */

.ws-page-header,
.ws-profile-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.ws-page-back,
.ws-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ws-text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.ws-page-back svg,
.ws-profile-back svg {
    width: 16px;
    height: 16px;
}

.ws-page-back:hover,
.ws-profile-back:hover {
    color: var(--eip-purple-soft);
}

.ws-page-title,
.ws-profile-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ws-text);
}

.ws-page-sub,
.ws-profile-sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ws-text-secondary);
}

.ws-alert--muted {
    color: var(--ws-text-secondary);
    background: var(--ws-surface-muted);
    border-color: var(--ws-border);
}

/* ─── Support & invoices ─────────────────────────────────────── */

.ws-support-card {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow-sm);
    overflow: hidden;
}

.ws-support-card + .ws-support-card,
.ws-page-header + .ws-support-card,
.ws-alert + .ws-support-card {
    margin-top: 1.25rem;
}

.ws-support-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ws-border);
    background: var(--ws-surface-muted);
}

.ws-support-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-support-card-meta {
    font-size: 0.78rem;
    color: var(--ws-text-muted);
}

.ws-support-card-body {
    padding: 1.25rem;
}

.ws-support-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--ws-text-muted);
}

.ws-support-empty--error {
    color: var(--ws-danger);
}

.ws-support-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ws-support-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding-top: 0.25rem;
}

.ws-profile-btn--block {
    width: 100%;
}

.ws-field-select--compact {
    min-width: 130px;
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
}

.ws-groups-search--compact {
    min-width: 160px;
    padding: 0.4rem 0.55rem;
}

/* Tickets — redesigned list */
.ws-tickets-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.ws-tickets-aside {
    position: sticky;
    top: 1rem;
}

.ws-tickets-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.ws-tickets-stat {
    padding: 0.75rem 0.9rem;
    border-radius: var(--ws-radius-sm);
    border: 1px solid var(--ws-border);
    background: var(--ws-surface);
}

.ws-tickets-stat__label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ws-text-muted);
    margin-bottom: 0.2rem;
}

.ws-tickets-stat__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ws-text);
    font-variant-numeric: tabular-nums;
}

.ws-tickets-stat--accent { border-top: 3px solid #0ea5e9; }
.ws-tickets-stat--success { border-top: 3px solid #22c55e; }
.ws-tickets-stat--muted { border-top: 3px solid var(--ws-border-strong, var(--ws-border)); }

.ws-tickets-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ws-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ws-ticket-card {
    padding: 1rem 1.05rem;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    background: var(--ws-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-ticket-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.ws-ticket-card[hidden] {
    display: none;
}

.ws-ticket-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.ws-ticket-card__id-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.ws-ticket-card__id {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ws-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ws-ticket-card__project {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    color: var(--eip-purple-soft);
    background: rgba(139, 92, 246, 0.1);
}

.ws-ticket-card__status {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    white-space: nowrap;
    text-transform: lowercase;
}

.ws-ticket-card__status--accent {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
}

.ws-ticket-card__status--info {
    color: #5b21b6;
    background: rgba(139, 92, 246, 0.15);
}

.ws-ticket-card__status--success {
    color: #166534;
    background: rgba(34, 197, 94, 0.15);
}

.ws-ticket-card__status--muted {
    color: var(--ws-text-faint);
    background: var(--ws-surface-muted);
}

html[data-theme='dark'] .ws-ticket-card__status--success { color: #86efac; }
html[data-theme='dark'] .ws-ticket-card__status--info { color: #c4b5fd; }
html[data-theme='dark'] .ws-ticket-card__status--accent { color: #7dd3fc; }

.ws-ticket-card__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.ws-ticket-card__title a {
    color: var(--ws-text);
    text-decoration: none;
    transition: color 0.15s;
}

.ws-ticket-card__title a:hover {
    color: var(--eip-purple-soft);
}

.ws-ticket-card__preview {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--ws-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ws-ticket-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ws-ticket-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--ws-text-faint);
}

.ws-ticket-card__meta-item svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.ws-ticket-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--ws-border);
}

.ws-ticket-card__client {
    min-width: 0;
}

.ws-ticket-card__client-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ws-text-secondary);
}

.ws-ticket-card__client-domain {
    display: block;
    font-size: 0.68rem;
    color: var(--ws-text-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-ticket-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--eip-purple-soft);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.ws-ticket-card__cta svg {
    width: 14px;
    height: 14px;
}

.ws-ticket-card__cta:hover {
    color: var(--eip-purple-bright);
}

.ws-tickets-empty {
    text-align: center;
    padding: 2rem 1rem;
}

.ws-tickets-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.75rem;
    color: var(--eip-purple-soft);
    background: rgba(139, 92, 246, 0.1);
    border-radius: 14px;
}

.ws-tickets-empty__icon svg {
    width: 26px;
    height: 26px;
}

.ws-tickets-empty__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-tickets-empty__sub {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ws-text-muted);
}

.ws-tickets-filter-empty {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    color: var(--ws-text-muted);
    text-align: center;
}

.ws-support-card--compose {
    border-color: rgba(139, 92, 246, 0.2);
}

.ws-support-card-head--compose {
    background: linear-gradient(180deg, var(--ws-surface-muted) 0%, var(--ws-surface) 100%);
}

.ws-compose-head {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.ws-compose-head__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    border-radius: 10px;
}

.ws-compose-head__icon svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 1024px) {
    .ws-tickets-layout {
        grid-template-columns: 1fr;
    }

    .ws-tickets-aside {
        position: static;
        order: -1;
    }
}

@media (max-width: 640px) {
    .ws-tickets-stats {
        grid-template-columns: 1fr;
    }

    .ws-support-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-tickets-filters {
        width: 100%;
    }

    .ws-groups-search--compact {
        flex: 1;
    }
}

.ws-field-select,
.ws-field-textarea {
    resize: vertical;
}

.ws-field-hint {
    font-size: 0.72rem;
    color: var(--ws-text-faint);
    line-height: 1.45;
}

.ws-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ws-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ws-data-table thead th {
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ws-text-muted);
    background: var(--ws-surface-muted);
    border-bottom: 1px solid var(--ws-border);
    white-space: nowrap;
}

.ws-data-table tbody td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--ws-border);
    vertical-align: middle;
    color: var(--ws-text-secondary);
}

.ws-data-table tbody tr:last-child td {
    border-bottom: none;
}

.ws-data-table tbody tr:hover td {
    background: var(--ws-surface-hover);
}

.ws-cell-title {
    font-weight: 600;
    color: var(--ws-text);
    font-size: 0.84rem;
}

.ws-cell-meta {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--ws-text-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ws-cell-meta--truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-cell-amount {
    font-weight: 700;
    color: var(--ws-text);
    font-variant-numeric: tabular-nums;
}

.ws-link {
    color: var(--eip-purple-soft);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.ws-link:hover {
    color: var(--eip-purple-bright);
}

.ws-link--action {
    font-size: 0.8rem;
}

.ws-badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    white-space: nowrap;
}

.ws-badge--success {
    color: #166534;
    background: rgba(34, 197, 94, 0.15);
}

.ws-badge--danger {
    color: #991b1b;
    background: rgba(248, 113, 113, 0.15);
}

.ws-badge--info {
    color: #5b21b6;
    background: rgba(139, 92, 246, 0.15);
}

.ws-badge--accent {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
}

.ws-badge--muted {
    color: var(--ws-text-faint);
    background: var(--ws-surface-muted);
}

html[data-theme='dark'] .ws-badge--success {
    color: #86efac;
}

html[data-theme='dark'] .ws-badge--danger {
    color: #fca5a5;
}

html[data-theme='dark'] .ws-badge--info {
    color: #c4b5fd;
}

.ws-profile-btn--success:hover {
    border-color: rgba(34, 197, 94, 0.35);
    color: #166534;
}

html[data-theme='dark'] .ws-profile-btn--success:hover {
    color: #86efac;
}

.ws-ticket-show-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ws-ticket-original {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ws-text-secondary);
    background: var(--ws-bg);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    white-space: pre-wrap;
}

.ws-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ws-ticket-bubble {
    max-width: 92%;
    padding: 0.85rem 1rem;
    border-radius: var(--ws-radius-sm);
    font-size: 0.86rem;
    line-height: 1.55;
}

.ws-ticket-bubble--client {
    align-self: flex-start;
    background: var(--ws-bg);
    border: 1px solid var(--ws-border);
    color: var(--ws-text-secondary);
}

.ws-ticket-bubble--staff {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--eip-purple-bright), var(--eip-purple));
    color: #fff;
}

.ws-ticket-bubble-meta {
    font-size: 0.72rem;
    margin-bottom: 0.45rem;
    opacity: 0.9;
}

.ws-ticket-bubble-body {
    white-space: pre-wrap;
}

.ws-ticket-resolve {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ws-ticket-resolve--bordered {
    padding-top: 1rem;
    border-top: 1px solid var(--ws-border);
}

.ws-ticket-resolve-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ws-invoice-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ws-invoice-sheet {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    overflow: hidden;
    box-shadow: var(--ws-shadow);
    color: var(--ws-text);
}

.ws-invoice-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--accent-sky), var(--eip-purple-bright), var(--eip-purple));
}

.ws-invoice-inner {
    padding: 1.75rem 1.5rem 2rem;
}

.ws-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.ws-invoice-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ws-text-muted);
}

.ws-invoice-number {
    margin: 0 0 0.5rem;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ws-invoice-ref {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    color: var(--ws-text-muted);
}

.ws-invoice-dates {
    text-align: right;
    font-size: 0.82rem;
    color: var(--ws-text-secondary);
    line-height: 1.7;
}

.ws-invoice-date-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ws-text-muted);
}

.ws-invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.ws-invoice-block-label {
    margin: 0 0 0.55rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ws-text-muted);
}

.ws-invoice-box {
    padding: 0.9rem 1rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--ws-text-secondary);
    background: var(--ws-bg);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    white-space: pre-wrap;
    word-break: break-word;
}

.ws-invoice-box--client {
    border-color: var(--eip-purple-border);
    background: var(--eip-purple-muted);
}

.ws-invoice-table-wrap {
    margin-bottom: 1rem;
}

.ws-invoice-table .ws-col-r,
.ws-col-r {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ws-invoice-totals {
    max-width: 360px;
    margin-left: auto;
    padding: 1rem 1.1rem;
    background: var(--ws-surface-muted);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
}

.ws-invoice-totals-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.84rem;
    color: var(--ws-text-secondary);
}

.ws-invoice-totals-row--grand {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--ws-text);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ws-text);
}

.ws-invoice-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--ws-border);
    font-size: 0.72rem;
    color: var(--ws-text-faint);
    line-height: 1.6;
}

@media (max-width: 720px) {
    .ws-invoice-parties {
        grid-template-columns: 1fr;
    }

    .ws-invoice-dates {
        text-align: left;
    }
}

@media print {
    .ws-atmosphere,
    .ws-topbar,
    .ws-invoice-toolbar,
    .no-print {
        display: none !important;
    }

    body.ws-body {
        background: #fff !important;
    }

    .ws-app__content,
    .ws-main {
        padding: 0 !important;
        max-width: none !important;
    }

    .ws-invoice-sheet {
        box-shadow: none !important;
        border: none !important;
    }
}

.ws-hub-icon svg {
    width: 20px;
    height: 20px;
}

.ws-hub-label {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ws-hub-desc {
    font-size: 0.76rem;
    color: var(--ws-text-muted);
    line-height: 1.4;
}

/* ─── Recent activity ────────────────────────────────────────── */

.ws-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    overflow: hidden;
    box-shadow: var(--ws-shadow);
}

.ws-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--ws-border);
    transition: background 0.15s;
}

.ws-activity-item:last-child {
    border-bottom: none;
}

.ws-activity-item:hover {
    background: var(--ws-surface-hover);
}

.ws-activity-dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin-top: 0.5rem;
    border-radius: 50%;
    background: var(--eip-purple);
    box-shadow: 0 0 6px var(--eip-purple-glow);
}

.ws-activity-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.ws-activity-desc {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ws-text-secondary);
}

.ws-activity-meta {
    font-size: 0.72rem;
    color: var(--ws-text-muted);
}

.ws-activity-sep {
    margin: 0 0.25rem;
    opacity: 0.5;
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .ws-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ws-module-grid--quick {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-dash-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .ws-shell__main {
        margin-left: 0;
    }

    .ws-sidebar {
        height: auto;
        max-height: 100svh;
        max-height: -webkit-fill-available;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.25s ease;
    }

    .ws-sidebar.ws-sidebar--open {
        transform: translate3d(0, 0, 0);
    }

    .ws-sidebar__close {
        display: inline-flex;
    }

    .ws-sidebar__footer {
        padding-bottom: max(1rem, calc(0.75rem + env(safe-area-inset-bottom, 0px)));
    }

    .ws-sidebar__user {
        margin-bottom: 0.45rem;
    }

    .ws-sidebar__footer-actions {
        width: 100%;
    }

    .ws-sidebar__footer-btn,
    .ws-sidebar__logout-form {
        flex: 1;
    }

    .ws-sidebar__logout-form {
        display: flex;
    }

    .ws-sidebar__footer-btn {
        height: 40px;
    }

    .ws-sidebar__logout-form .ws-sidebar__footer-btn {
        width: 100%;
    }

    .ws-mobile-bar {
        display: flex;
    }
}

@media (max-width: 900px) {
    .ws-topbar {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        height: auto;
        padding: 0.65rem 1rem;
        gap: 0.55rem;
    }

    .ws-topbar-center {
        grid-column: 1 / -1;
        order: 3;
    }

    .ws-nav-search {
        width: 100%;
    }

    .ws-nav-user-name {
        display: none;
    }

    .ws-nav-chevron {
        display: none;
    }
}

@media (max-width: 640px) {
    .ws-main {
        padding: 1.25rem 1rem 2.5rem;
        gap: 1.5rem;
    }

    .ws-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-performance__body {
        grid-template-columns: 1fr;
    }

    .ws-dash-header__greeting {
        font-size: 1.1rem;
    }

    .ws-dash-plan__label {
        display: none;
    }

    .ws-module-grid {
        grid-template-columns: 1fr;
    }

    .ws-module-grid--quick {
        grid-template-columns: 1fr;
    }

    .ws-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-brand-tag {
        display: none;
    }

    .ws-brand-logo {
        max-width: 140px;
        height: 28px;
    }

    .ws-back-link span {
        display: none;
    }

    .ws-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ws-module-card,
    .ws-hub-card,
    .ws-module-arrow,
    .ws-summary-tile {
        transition: none;
    }

    .ws-module-card:hover,
    .ws-hub-card:hover {
        transform: none;
    }

    .ws-atmosphere__orb,
    .ws-atmosphere__node,
    .ws-atmosphere__pulse {
        animation: none !important;
        will-change: auto;
    }

    .ws-atmosphere__orb--a {
        opacity: 0.32;
    }

    .ws-atmosphere__orb--b {
        opacity: 0.22;
    }

    .ws-atmosphere__node {
        opacity: 0.22;
    }
}

html.ws-reduce-motion .ws-atmosphere__orb,
html.ws-reduce-motion .ws-atmosphere__node,
html.ws-reduce-motion .ws-atmosphere__pulse,
.ws-atmosphere--paused .ws-atmosphere__orb,
.ws-atmosphere--paused .ws-atmosphere__node,
.ws-atmosphere--paused .ws-atmosphere__pulse {
    animation-play-state: paused !important;
}

/* ─── Groups ─────────────────────────────────────────────────── */

.ws-groups-toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.ws-groups-search {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    background: var(--ws-bg);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    min-width: 180px;
}

.ws-groups-search svg {
    width: 14px;
    height: 14px;
    color: var(--ws-text-faint);
    flex-shrink: 0;
}

.ws-groups-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--ws-text);
    outline: none;
}

.ws-member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ws-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem 0.2rem 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
    border-radius: 999px;
    white-space: nowrap;
}

html[data-theme='dark'] .ws-member-chip {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
}

.ws-member-chip__avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ws-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ws-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    background: var(--ws-bg);
    color: var(--ws-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.ws-icon-btn svg {
    width: 14px;
    height: 14px;
}

.ws-icon-btn--edit:hover {
    color: #166534;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.ws-icon-btn--danger:hover {
    color: #991b1b;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
}

html[data-theme='dark'] .ws-icon-btn--edit:hover {
    color: #86efac;
}

html[data-theme='dark'] .ws-icon-btn--danger:hover {
    color: #fca5a5;
}

.ws-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ws-modal:not([hidden]) .ws-modal__backdrop {
    animation: wsModalFadeIn 0.2s ease;
}

.ws-modal:not([hidden]) .ws-modal__dialog {
    animation: wsModalSlideIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes wsModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wsModalSlideIn {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

html.ws-reduce-motion .ws-modal:not([hidden]) .ws-modal__backdrop,
html.ws-reduce-motion .ws-modal:not([hidden]) .ws-modal__dialog {
    animation: none;
}

.ws-modal[hidden] {
    display: none !important;
}

body.ws-modal-open {
    overflow: hidden;
}

.ws-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ws-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow-lg, 0 24px 48px rgba(15, 23, 42, 0.2));
}

.ws-modal__dialog--group {
    width: min(100%, 580px);
}

.ws-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--ws-border);
}

.ws-modal__header--group {
    padding: 1.15rem 1.25rem;
    background: linear-gradient(180deg, var(--ws-surface-muted) 0%, var(--ws-surface) 100%);
}

.ws-modal__header-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.ws-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    color: #fff;
}

.ws-modal__icon svg {
    width: 20px;
    height: 20px;
}

.ws-modal__icon--add {
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    box-shadow: 0 8px 20px rgba(112, 94, 200, 0.28);
}

.ws-modal__icon--edit {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.22);
}

.ws-modal__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: var(--ws-text-muted);
    line-height: 1.45;
}

.ws-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ws-text-muted);
    cursor: pointer;
}

.ws-modal__close:hover {
    background: var(--ws-surface-hover);
    color: var(--ws-text);
}

.ws-modal__close svg {
    width: 16px;
    height: 16px;
}

.ws-modal__body {
    padding: 1rem 1.15rem;
}

.ws-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.15rem 1rem;
    border-top: 1px solid var(--ws-border);
}

.ws-modal-feedback {
    margin: 0;
    font-size: 0.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--ws-radius-sm);
}

.ws-modal-feedback--error {
    color: #991b1b;
    background: rgba(248, 113, 113, 0.12);
}

html[data-theme='dark'] .ws-modal-feedback--error {
    color: #fca5a5;
}

.ws-modal-feedback--success {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
}

html[data-theme='dark'] .ws-modal-feedback--success {
    color: #86efac;
}

.ws-profile-btn--loading {
    opacity: 0.75;
    pointer-events: none;
}

/* Group modal form */
.ws-group-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ws-group-form__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

/* Member picker */
.ws-group-picker {
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    background: var(--ws-bg);
    overflow: hidden;
}

.ws-group-picker__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--ws-border);
    background: var(--ws-surface-muted);
}

.ws-group-picker__search {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0.55rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: 8px;
}

.ws-group-picker__search svg {
    width: 13px;
    height: 13px;
    color: var(--ws-text-faint);
    flex-shrink: 0;
}

.ws-group-picker__search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--ws-text);
    outline: none;
}

.ws-group-picker__count {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--eip-purple-soft);
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 999px;
}

.ws-group-picker__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.55rem;
    -webkit-overflow-scrolling: touch;
}

.ws-group-picker__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    user-select: none;
}

.ws-group-picker__item:hover {
    background: var(--ws-surface-hover);
}

.ws-group-picker__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ws-group-picker__checkbox:checked + .ws-group-picker__avatar {
    box-shadow: 0 0 0 2px var(--eip-purple-bright);
}

.ws-group-picker__checkbox:checked ~ .ws-group-picker__name {
    color: var(--ws-text);
    font-weight: 600;
}

.ws-group-picker__checkbox:checked ~ .ws-group-picker__tick {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    border-color: transparent;
    color: #fff;
}

.ws-group-picker__item:has(.ws-group-picker__checkbox:checked) {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.22);
}

.ws-group-picker__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: box-shadow 0.15s;
}

.ws-group-picker__name {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    color: var(--ws-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-group-picker__tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 1px solid var(--ws-border);
    border-radius: 50%;
    color: transparent;
    opacity: 0.35;
    transform: scale(0.92);
    transition: opacity 0.15s, transform 0.15s, background-color 0.15s, border-color 0.15s;
}

.ws-group-picker__tick svg {
    width: 12px;
    height: 12px;
}

.ws-group-picker__item[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .ws-group-form__fields {
        grid-template-columns: 1fr;
    }
}

/* ─── Users workspace ────────────────────────────────────────── */

.ws-users-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ws-users-stat {
    padding: 0.85rem 1rem;
    border-radius: var(--ws-radius);
    border: 1px solid var(--ws-border);
    background: var(--ws-surface);
    box-shadow: var(--ws-shadow-sm);
}

.ws-users-stat__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ws-text-muted);
    margin-bottom: 0.25rem;
}

.ws-users-stat__value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ws-text);
    font-variant-numeric: tabular-nums;
}

.ws-users-stat--purple { border-top: 3px solid var(--eip-purple-bright); }
.ws-users-stat--teal { border-top: 3px solid #14b8a6; }
.ws-users-stat--blue { border-top: 3px solid #3b82f6; }
.ws-users-stat--emerald { border-top: 3px solid #22c55e; }

.ws-users-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.ws-field--inline {
    min-width: 130px;
}

.ws-groups-search--grow {
    flex: 1;
    min-width: 180px;
}

.ws-profile-btn--sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.76rem;
}

.ws-profile-btn--danger-text {
    color: #b91c1c;
    border-color: rgba(248, 113, 113, 0.35);
}

.ws-profile-btn--danger-text:hover {
    background: rgba(248, 113, 113, 0.08);
}

.ws-profile-btn--danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ws-user-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.ws-user-cell__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ws-users-table__check {
    width: 36px;
}

.ws-table-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--eip-purple-bright);
    cursor: pointer;
}

.ws-online-badge {
    display: inline-flex;
    padding: 0.18rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
}

.ws-online-badge--online {
    color: #166534;
    background: rgba(34, 197, 94, 0.15);
}

.ws-online-badge--offline {
    color: var(--ws-text-faint);
    background: var(--ws-surface-muted);
}

html[data-theme='dark'] .ws-online-badge--online {
    color: #86efac;
}

.ws-users-empty {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    color: var(--ws-text-muted);
    text-align: center;
}

.ws-modal-confirm-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ws-text-secondary);
}

@media (max-width: 900px) {
    .ws-users-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ws-support-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-groups-toolbar {
        width: 100%;
    }

    .ws-groups-search {
        flex: 1;
    }

    .ws-users-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-field--inline {
        width: 100%;
    }
}

/* ─── Roles workspace ──────────────────────────────────────────── */

.ws-modal__dialog--xl {
    width: min(100%, 960px);
}

.ws-field--compact {
    margin-bottom: 0.85rem;
}

.ws-member-chip--perm {
    color: #92400e;
    background: rgba(251, 191, 36, 0.15);
    padding-left: 0.55rem;
}

html[data-theme='dark'] .ws-member-chip--perm {
    color: #fcd34d;
}

.ws-dropdown {
    position: relative;
    display: inline-flex;
}

.ws-dropdown__menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 30;
    min-width: 160px;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.35rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    box-shadow: var(--ws-shadow-lg, 0 12px 32px rgba(15, 23, 42, 0.18));
}

.ws-dropdown__menu[hidden] {
    display: none !important;
}

.ws-dropdown__item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ws-text-secondary);
    text-align: left;
    cursor: pointer;
}

.ws-dropdown__item:hover {
    background: var(--ws-surface-hover);
    color: var(--ws-text);
}

.ws-dropdown__empty {
    display: block;
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
    color: var(--ws-text-faint);
}

.ws-perm-tree__search {
    width: 100%;
    margin-bottom: 0.75rem;
}

.ws-perm-tree__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.ws-perm-project {
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    background: var(--ws-bg);
    padding: 0.65rem;
}

.ws-perm-project[hidden] {
    display: none;
}

.ws-perm-project__title {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--eip-purple-soft);
}

.ws-perm-page {
    margin-bottom: 0.65rem;
}

.ws-perm-page[hidden] {
    display: none;
}

.ws-perm-page__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.ws-perm-page__name {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-perm-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ws-text-muted);
    cursor: pointer;
}

.ws-perm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ws-perm-item[hidden] {
    display: none;
}

.ws-perm-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.3rem 0.35rem;
    border-radius: 6px;
    font-size: 0.72rem;
    color: var(--ws-text-secondary);
    cursor: pointer;
}

.ws-perm-check:hover {
    background: var(--ws-surface-hover);
}

.ws-perm-checkbox {
    margin-top: 0.1rem;
    accent-color: var(--eip-purple-bright);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .ws-perm-tree__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ws-perm-tree__grid {
        grid-template-columns: 1fr;
        max-height: 45vh;
    }
}

.ws-campaign-launch-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ws-campaign-launch-card {
    background: var(--ws-surface-raised);
    border: 1px solid var(--ws-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    position: relative;
}

.ws-campaign-launch-card--featured {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.12);
}

.ws-campaign-launch-badge {
    align-self: flex-start;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 999px;
    color: var(--eip-purple-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    text-transform: uppercase;
}

.ws-campaign-launch-title {
    color: var(--ws-text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.ws-campaign-launch-desc {
    color: var(--ws-text-muted);
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.ws-campaign-launch-note {
    color: var(--ws-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 1.25rem 0 0;
}

.ws-campaign-launch-note code {
    background: var(--ws-surface-raised);
    border-radius: 6px;
    font-size: 0.78rem;
    padding: 0.1rem 0.35rem;
}

/* ─── Auth pages (login + 2FA) ─────────────────────────────────── */
.ws-auth-body {
    overflow-x: hidden;
    overflow-y: auto;
}

.ws-auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1.5rem;
}

.ws-auth-page .ws-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.ws-auth-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    margin-block: auto;
}

.ws-auth-card {
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: calc(var(--ws-radius) + 2px);
    border: 1px solid var(--ws-border);
    background: color-mix(in srgb, var(--ws-surface) 92%, transparent);
    box-shadow: var(--ws-shadow-glow);
    backdrop-filter: blur(18px);
}

.ws-auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.ws-auth-brand .ws-brand-logo {
    max-height: 42px;
    width: auto;
}

.ws-auth-title {
    margin: 0 0 0.35rem;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--ws-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ws-auth-subtitle {
    margin: 0 0 1.25rem;
    text-align: center;
    color: var(--ws-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.ws-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ws-auth-form-actions {
    display: flex;
    justify-content: stretch;
    padding-top: 0.35rem;
}

.ws-auth-submit {
    width: 100%;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.ws-auth-code-input {
    letter-spacing: 0.12em;
    font-size: 1rem;
    text-align: center;
}

.ws-auth-footnote {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--ws-text-faint);
    font-size: 0.78rem;
    line-height: 1.45;
}

.ws-auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--ws-border);
    background: color-mix(in srgb, var(--ws-surface) 88%, transparent);
    color: var(--ws-text-secondary);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.ws-auth-theme-toggle:hover {
    border-color: var(--eip-purple-border);
    color: var(--ws-text);
}

.ws-auth-theme-toggle .ws-theme-icon {
    width: 18px;
    height: 18px;
}

html[data-theme='dark'] .ws-auth-theme-toggle .ws-theme-icon--sun {
    display: none;
}

html[data-theme='light'] .ws-auth-theme-toggle .ws-theme-icon--moon {
    display: none;
}

@media (max-width: 480px) {
    .ws-auth-card {
        padding: 1.35rem 1.1rem 1.1rem;
    }

    .ws-auth-title {
        font-size: 1.25rem;
    }
}

/* ─── Auth: terms & legal ────────────────────────────────────────── */
.ws-auth-shell--wide {
    width: min(100%, 820px);
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ws-auth-card--wide {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(calc(100vh - 3rem), 920px);
    max-height: min(calc(100dvh - 3rem), 920px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5rem 1.35rem 1.25rem;
}

.ws-auth-card--wide .ws-auth-brand,
.ws-auth-card--wide .ws-auth-title,
.ws-auth-card--wide .ws-auth-subtitle {
    flex-shrink: 0;
}

.ws-auth-card--wide .ws-auth-title {
    font-size: 1.2rem;
    line-height: 1.35;
}

.ws-auth-card--wide .ws-auth-subtitle {
    margin-bottom: 1rem;
}

.ws-terms-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: scroll;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--eip-purple, #705ec8) 70%, var(--ws-text-muted)) transparent;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: calc(var(--ws-radius) - 2px);
    border: 1px solid var(--ws-border);
    background: color-mix(in srgb, var(--ws-surface-elevated, var(--ws-surface)) 70%, transparent);
}

.ws-terms-scroll::-webkit-scrollbar {
    width: 10px;
}

.ws-terms-scroll::-webkit-scrollbar-track {
    background: color-mix(in srgb, var(--ws-text-muted) 12%, transparent);
    border-radius: 999px;
}

.ws-terms-scroll::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--eip-purple, #705ec8) 75%, var(--ws-text-muted));
    border-radius: 999px;
}

.ws-legal-doc {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--ws-text-secondary);
}

.ws-legal-doc h2 {
    margin: 1.15rem 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ws-text);
    letter-spacing: -0.01em;
}

.ws-legal-doc h2:first-child {
    margin-top: 0;
}

.ws-legal-doc p {
    margin: 0 0 0.55rem;
}

.ws-legal-doc ul {
    margin: 0 0 0.55rem;
    padding-left: 1.25rem;
}

.ws-legal-doc li {
    margin-bottom: 0.15rem;
}

.ws-legal-doc strong {
    color: var(--ws-text);
    font-weight: 600;
}

.ws-terms-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
    border-top: 1px solid var(--ws-border);
}

.ws-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
}

.ws-terms-check__input {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    accent-color: var(--eip-purple, #7c3aed);
    cursor: pointer;
}

.ws-terms-check__label {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--ws-text-secondary);
    cursor: pointer;
}

.ws-terms-check__label:hover {
    color: var(--ws-text);
}

.ws-terms-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 0.5rem 0 0.25rem;
}

.ws-terms-notice__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--ws-border));
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    color: #f59e0b;
}

.ws-terms-notice__icon svg {
    width: 28px;
    height: 28px;
}

.ws-terms-notice__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ws-text);
}

.ws-terms-notice__text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ws-text-muted);
    max-width: 36ch;
}

@media (max-width: 640px) {
    .ws-auth-page {
        padding: 1rem;
        align-items: flex-start;
    }

    .ws-auth-card--wide {
        max-height: none;
        overflow: visible;
        padding: 1.15rem 1rem 1rem;
    }

    .ws-terms-scroll {
        flex: none;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding: 0.85rem 0.9rem;
    }
}

/* ─── Workspace leads analytics ────────────────────────────────── */
.ws-leads-header {
    align-items: flex-start;
}

.ws-leads-kpis .ws-users-stat__meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--ws-text-muted);
}

.ws-leads-kpi-text {
    font-size: 1rem !important;
    line-height: 1.25;
    word-break: break-word;
}

.ws-leads-toolbar-card {
    margin-bottom: 1rem;
}

.ws-leads-toolbar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ws-leads-presets {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--ws-surface-muted);
    border: 1px solid var(--ws-border);
}

.ws-leads-preset {
    border: 0;
    background: transparent;
    color: var(--ws-text-secondary);
    border-radius: 999px;
    padding: 0.38rem 0.8rem;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.ws-leads-preset:hover {
    color: var(--ws-text);
}

.ws-leads-preset.is-active {
    background: var(--ws-surface);
    color: var(--eip-purple-bright);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ws-leads-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 0.85rem 1rem;
    align-items: end;
}

.ws-leads-input {
    min-height: 2.5rem;
}

.ws-leads-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.ws-leads-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 0.65rem;
    padding: 0.58rem 1rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s, border-color 0.15s;
    text-decoration: none;
}

.ws-leads-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.ws-leads-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    box-shadow: 0 8px 18px rgba(112, 94, 200, 0.22);
}

.ws-leads-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(112, 94, 200, 0.28);
}

.ws-leads-btn--primary.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.ws-leads-btn--ghost {
    color: var(--ws-text-secondary);
    background: var(--ws-surface);
    border-color: var(--ws-border);
}

.ws-leads-btn--ghost:hover {
    color: var(--ws-text);
    border-color: var(--eip-purple-border);
}

.ws-leads-tabs-card {
    overflow: hidden;
}

.ws-leads-tabs-wrap {
    padding: 0.85rem 1rem 0;
    border-bottom: 1px solid var(--ws-border);
    background: linear-gradient(180deg, var(--ws-surface-muted), transparent);
}

.ws-leads-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
}

.ws-leads-tab {
    border: 1px solid transparent;
    background: transparent;
    color: var(--ws-text-secondary);
    border-radius: 0.55rem;
    padding: 0.48rem 0.9rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.ws-leads-tab:hover {
    color: var(--ws-text);
    background: var(--ws-surface);
    border-color: var(--ws-border);
}

.ws-leads-tab--active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--eip-purple), var(--eip-purple-bright));
    box-shadow: 0 6px 16px rgba(112, 94, 200, 0.22);
}

.ws-leads-panels {
    padding: 1rem;
}

.ws-leads-panel {
    display: none;
}

.ws-leads-panel--active {
    display: block;
}

.ws-leads-charts-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.ws-leads-chart-card {
    border: 1px solid var(--ws-border);
    border-radius: 0.9rem;
    background: var(--ws-surface);
    overflow: hidden;
}

.ws-leads-chart-card__head {
    padding: 0.9rem 1rem 0.35rem;
}

.ws-leads-chart-card__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-leads-chart-card__meta {
    margin: 0.15rem 0 0;
    font-size: 0.74rem;
    color: var(--ws-text-muted);
}

.ws-leads-chart-card__body {
    position: relative;
    height: 260px;
    padding: 0.35rem 0.75rem 0.85rem;
}

.ws-leads-chart-card__body--donut {
    height: 280px;
}

.ws-leads-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ws-leads-mini-card {
    border: 1px solid var(--ws-border);
    border-radius: 0.9rem;
    background: var(--ws-surface);
    padding: 0.95rem 1rem 1rem;
}

.ws-leads-mini-card__title {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-leads-bar-row + .ws-leads-bar-row {
    margin-top: 0.85rem;
}

.ws-leads-bar-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.ws-leads-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: rgba(112, 94, 200, 0.12);
    color: var(--eip-purple-bright);
    font-size: 0.68rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ws-leads-rank--table {
    min-width: 2rem;
    height: 2rem;
}

.ws-leads-bar-label {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ws-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-leads-bar-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--eip-purple-bright);
    white-space: nowrap;
}

.ws-leads-bar-track {
    height: 8px;
    border-radius: 999px;
    background: var(--ws-surface-muted);
    overflow: hidden;
}

.ws-leads-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.35s ease;
}

.ws-leads-bar-fill--purple { background: linear-gradient(90deg, var(--eip-purple), var(--eip-purple-bright)); }
.ws-leads-bar-fill--emerald { background: linear-gradient(90deg, #059669, var(--accent-emerald)); }
.ws-leads-bar-fill--teal { background: linear-gradient(90deg, #0d9488, var(--accent-teal)); }
.ws-leads-bar-fill--blue { background: linear-gradient(90deg, #2563eb, var(--accent-blue)); }

.ws-leads-bar-meta {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--ws-text-muted);
}

.ws-leads-panel-card {
    border: 1px solid var(--ws-border);
    border-radius: 0.9rem;
    background: var(--ws-surface);
    padding: 1rem;
}

.ws-leads-panel-chart {
    position: relative;
    height: 280px;
    margin-bottom: 1rem;
    border: 1px solid var(--ws-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--ws-surface-muted);
}

.ws-leads-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ws-leads-table-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ws-text);
}

.ws-leads-table-count {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ws-text-muted);
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--ws-surface-muted);
}

.ws-leads-table-wrap {
    max-height: 520px;
    overflow: auto;
    border: 1px solid var(--ws-border);
    border-radius: 0.75rem;
}

.ws-leads-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--ws-surface-muted);
}

.ws-leads-table tbody td {
    vertical-align: middle;
}

.ws-leads-amount-cell {
    min-width: 8.5rem;
}

.ws-cell-amount {
    display: block;
    font-weight: 700;
    color: var(--eip-purple-bright);
}

.ws-cell-title {
    display: block;
    font-weight: 600;
    color: var(--ws-text);
}

.ws-cell-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--ws-text-muted);
}

.ws-leads-share {
    display: block;
    margin-top: 0.35rem;
    height: 4px;
    border-radius: 999px;
    background: var(--ws-surface-muted);
    overflow: hidden;
}

.ws-leads-share__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eip-purple), var(--eip-purple-bright));
}

.ws-leads-empty {
    margin: 0;
    text-align: center;
    color: var(--ws-text-muted);
    padding: 1.5rem 0.5rem;
}

@media (max-width: 1100px) {
    .ws-leads-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ws-leads-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 960px) {
    .ws-leads-grid,
    .ws-leads-charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ws-leads-filters {
        grid-template-columns: 1fr;
    }

    .ws-leads-filter-actions {
        width: 100%;
    }

    .ws-leads-btn {
        flex: 1;
    }
}

.ws-fsi-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.25rem;
    align-items: start;
}

.ws-fsi-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.ws-fsi-projects {
    max-height: 280px;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
}

.ws-fsi-logs {
    margin: 0.75rem 0 0;
    padding: 0.85rem 1rem;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ws-text-secondary);
    background: var(--ws-bg);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
}

.si-run-row {
    cursor: pointer;
}

@media (max-width: 960px) {
    .ws-fsi-grid {
        grid-template-columns: 1fr;
    }
}

.ws-fc-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ws-fc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.ws-fc-grid > .ws-support-card + .ws-support-card {
    margin-top: 0;
}

.ws-fc-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ws-fc-card > .ws-support-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ws-fc-card .ws-support-form {
    flex: 1;
}

.ws-fc-card .ws-support-form-actions {
    margin-top: auto;
}

.ws-fc-submit {
    width: 100%;
    justify-content: center;
}

.ws-fc-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ws-fc-table {
    flex: 1;
    min-height: 220px;
    max-height: 280px;
}

textarea.ws-fc-json {
    min-height: 96px;
    max-height: 160px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
}

@media (max-width: 960px) {
    .ws-fc-grid,
    .ws-fc-fields-row {
        grid-template-columns: 1fr;
    }
}
