/**
 * Patient Realm Command Center — front-end client portal styles.
 *
 * Scoped under .enzo-portal / .ep-* so theme styles can't leak in.
 * Premium SaaS feel: soft cards, plenty of whitespace, brand-pink accents.
 */

.enzo-portal-shell-wrap {
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(232, 52, 122, 0.06), transparent 60%),
        radial-gradient(900px 500px at 120% -10%, rgba(244, 114, 182, 0.04), transparent 55%),
        #faf8f4;
    min-height: 100vh;
}

body.enzo-portal-shell {
    margin: 0;
    padding: 0;
    background: #faf8f4;
}

/* ─── Admin impersonation banner ─── */
.ep-impersonate-bar {
    position: sticky;
    top: 0;
    z-index: 250;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, #18181b, #2a1a20);
    color: #fde68a;
    font-size: 12.5px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ep-impersonate-bar strong {
    color: #fff;
    margin-right: 6px;
}

.ep-impersonate-exit {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}

.ep-impersonate-exit:hover {
    background: rgba(255, 255, 255, 0.22);
}

.enzo-portal {
    --ep-pink: #e8347a;
    --ep-pink-2: #f472b6;
    --ep-pink-deep: #b91c5c;
    --ep-cream: #f5f4f0;
    --ep-paper: #fafaf7;
    --ep-ink: #18181b;
    --ep-mute: rgba(24, 24, 27, 0.62);
    --ep-soft: rgba(24, 24, 27, 0.45);
    --ep-line: rgba(24, 24, 27, 0.10);
    --ep-line-soft: rgba(24, 24, 27, 0.06);
    --ep-ok: #16a34a;
    --ep-warn: #d97706;
    --ep-danger: #dc2626;

    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    color: var(--ep-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

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

@media (max-width: 900px) {
    .enzo-portal {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════════════════
   Sidebar
   ════════════════════════════════════════════════════════════ */
.ep-sidebar {
    border-right: 1px solid var(--ep-line);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    display: flex;
    flex-direction: column;
    padding: 18px 14px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}

@media (max-width: 900px) {
    .ep-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--ep-line);
    }
}

.ep-side-brand {
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--ep-line-soft);
    margin-bottom: 14px;
}

.ep-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}

.ep-brand-link:hover {
    background: rgba(24, 24, 27, 0.03);
}

/* Logo mark — uses the actual site SVG (or the client's uploaded logo).
   No tinted tile, no letter substitute — just the real brand. */
.ep-brand-mark {
    position: relative;
    width: 100%;
    max-width: 180px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ep-brand-mark-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.ep-brand-mark-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -4px;
    right: 53px;
    border-radius: 50%;
    background-image: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 3px rgba(34, 197, 94, 0.45),
        0 0 8px 0 rgba(34, 197, 94, 0.85);
    animation: epOnlinePing 2s ease-out infinite;
}

@keyframes epOnlinePing {
    0% {
        box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(34, 197, 94, 0.55), 0 0 0 3.5px rgba(34, 197, 94, 0.55), 0 0 10px 0 rgba(34, 197, 94, 0.9);
    }

    70% {
        box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(34, 197, 94, 0.30), 0 0 0 10px rgba(34, 197, 94, 0), 0 0 10px 0 rgba(34, 197, 94, 0.6);
    }

    100% {
        box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(34, 197, 94, 0.55), 0 0 0 3.5px rgba(34, 197, 94, 0), 0 0 10px 0 rgba(34, 197, 94, 0.9);
    }
}

@keyframes epPing {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 52, 122, 0.85), 0 0 12px 0 rgba(255, 255, 255, 0.6);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(232, 52, 122, 0), 0 0 12px 0 rgba(255, 255, 255, 0.4);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(232, 52, 122, 0), 0 0 12px 0 rgba(255, 255, 255, 0.6);
        transform: scale(1);
    }
}

.ep-brand-eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ep-mute);
    line-height: 1;
    text-align: center;
}

.ep-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.ep-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ep-mute);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background .15s, color .15s, transform .1s;
    border: 1px solid transparent;
}

.ep-nav-link:hover {
    background: var(--ep-cream);
    color: var(--ep-ink);
}

.ep-nav-link.is-active {
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.12), rgba(244, 114, 182, 0.06));
    color: var(--ep-pink-deep);
    border-color: rgba(232, 52, 122, 0.20);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 6px 14px -8px rgba(232, 52, 122, 0.35);
    font-weight: 600;
}

.ep-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--ep-pink);
    border-radius: 0 4px 4px 0;
}

.ep-nav-link .ep-nav-icon {
    color: currentColor;
    transition: transform .15s;
}

.ep-nav-link:hover .ep-nav-icon {
    transform: scale(1.05);
}

/* Locked state — onboarding gates the rest of the portal so we render
   the nav items as visibly disabled with a lock affordance. */
.ep-nav.is-locked .ep-nav-link.is-locked {
    color: rgba(24, 24, 27, 0.38);
    cursor: not-allowed;
    background: transparent;
    border-color: transparent;
    user-select: none;
}

.ep-nav.is-locked .ep-nav-link.is-locked:hover {
    background: transparent;
    color: rgba(24, 24, 27, 0.38);
}

.ep-nav.is-locked .ep-nav-link.is-locked:hover .ep-nav-icon {
    transform: none;
}

.ep-nav-link .ep-nav-lock {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: rgba(24, 24, 27, 0.45);
    flex: none;
}

.ep-nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.ep-nav-icon svg {
    width: 17px;
    height: 17px;
}

.ep-side-foot {
    padding-top: 14px;
    margin-top: 8px;
    border-top: 1px solid var(--ep-line-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background .15s, transform .15s;
    cursor: pointer;
}

.ep-side-user:hover {
    background: var(--ep-cream);
    transform: translateX(1px);
}

.ep-side-user:hover .ep-side-user-chevron {
    transform: translateX(2px);
    color: var(--ep-pink-deep);
}

.ep-side-user-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: var(--ep-soft);
    flex: none;
    transition: transform .15s, color .15s;
}

.ep-side-avatar img {
    border-radius: 50%;
    width: 34px;
    height: 34px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ep-line);
}

.ep-side-user-name {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-ink);
    line-height: 1.25;
    min-width: 0;
}

.ep-side-user-name small {
    font-size: 11px;
    color: var(--ep-mute);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.ep-side-foot-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ep-side-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--ep-mute);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    transition: background .15s, color .15s, transform .1s;
}

.ep-side-action svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.ep-side-action:hover {
    background: var(--ep-cream);
    color: var(--ep-ink);
}

.ep-side-action-back:hover {
    color: var(--ep-pink-deep);
}

.ep-side-action-logout:hover {
    color: var(--ep-danger);
}

button.ep-side-action {
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    width: 100%;
}

.ep-side-action-install {
    color: var(--ep-pink-deep);
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.10), rgba(244, 114, 182, 0.04));
    border: 1px solid rgba(232, 52, 122, 0.20);
    margin-bottom: 4px;
}

.ep-side-action-install:hover {
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.18), rgba(244, 114, 182, 0.08));
    color: var(--ep-pink-deep);
}

/* Hide install button when running standalone — the user already installed. */
@media (display-mode: standalone) {
    .ep-side-action-install {
        display: none !important;
    }
}

/* ─── PWA install instructions modal ─── */
/* ════════════════════════════════════════════════════════════
   PWA Install Modal — luxury iOS feel
   Frosted-glass backdrop, big squircle app icon with halo glow,
   premium type, refined step rows. Match for App Store install
   prompts.
   ════════════════════════════════════════════════════════════ */
.ep-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 15, 20, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    animation: epPwaFade .25s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 540px) {
    .ep-pwa-modal {
        align-items: center;
        padding: 24px;
    }
}

@keyframes epPwaFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ep-pwa-modal[hidden] {
    display: none;
}

.ep-pwa-modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px 28px 0 0;
    padding: 36px 26px 28px;
    box-shadow:
        0 -2px 0 rgba(255, 255, 255, 0.6) inset,
        0 32px 80px -12px rgba(15, 15, 20, 0.5),
        0 8px 24px rgba(232, 52, 122, 0.08);
    animation: epPwaSlideUp .42s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    isolation: isolate;
}

@media (min-width: 540px) {
    .ep-pwa-modal-card {
        border-radius: 32px;
        padding: 40px 32px 30px;
        animation: epPwaPop .42s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

.ep-pwa-modal-card::before {
    /* Soft warm cream-to-tan atmosphere — matches the paw icon's palette
       so the halo blends instead of fighting the icon. */
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle,
            rgba(230, 194, 164, 0.55) 0%,
            rgba(206, 161, 127, 0.25) 35%,
            transparent 70%);
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
    filter: blur(6px);
}

@keyframes epPwaSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes epPwaPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ep-pwa-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    background: rgba(15, 15, 20, 0.06);
    border-radius: 50%;
    color: rgba(15, 15, 20, 0.55);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    z-index: 2;
}

.ep-pwa-modal-close:hover {
    background: rgba(232, 52, 122, 0.12);
    color: #b91c5c;
    transform: scale(1.05);
}

/* App icon — clean iOS squircle.
   The paw PNG already has its own tan-to-brown gradient baked in, so the
   container is transparent and just provides a soft neutral drop shadow.
   No pink glow, no clashing colors — lets the artwork breathe. */
.ep-pwa-modal-icon {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 24px;
    border-radius: 22px;
    overflow: hidden;
    background: transparent;
    box-shadow:
        0 1px 2px rgba(40, 26, 18, 0.12),
        0 8px 24px -6px rgba(40, 26, 18, 0.18),
        0 18px 40px -10px rgba(40, 26, 18, 0.22);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.ep-pwa-modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.ep-pwa-modal-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-align: center;
    color: #15151a;
}

.ep-pwa-modal-deck {
    margin: 0 0 26px;
    color: rgba(15, 15, 20, 0.6);
    font-size: 14.5px;
    line-height: 1.55;
    text-align: center;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 26px;
}

/* Steps — clean iOS-style rows */
.ep-pwa-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 15, 20, 0.03);
    border-radius: 18px;
    padding: 6px;
}

.ep-pwa-steps li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px;
    background: #fff;
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 1.45;
    color: #15151a;
    box-shadow: 0 1px 0 rgba(15, 15, 20, 0.04);
}

.ep-pwa-step-num {
    flex: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8347a 0%, #cf2169 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 10px -2px rgba(232, 52, 122, 0.5);
}

.ep-pwa-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 4px;
    color: #b91c5c;
    background: rgba(232, 52, 122, 0.1);
    border-radius: 6px;
    vertical-align: -7px;
}

.ep-pwa-icon-inline svg {
    width: 14px;
    height: 14px;
}

/* Primary CTA at the bottom — premium pill.
   Uses .ep-pwa-modal-ok with extra specificity so we override .ep-btn-primary
   (the button has both classes; without this the outer pink-gradient styles
   render, but the text becomes invisible on the pink-tinted modal card.) */
.ep-pwa-modal .ep-pwa-modal-ok,
button.ep-pwa-modal-ok {
    width: 100%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px !important;
    min-height: 50px;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #15151a 0%, #2a2a30 100%) !important;
    background-image: linear-gradient(135deg, #15151a 0%, #2a2a30 100%) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .25s ease;
    box-shadow: 0 12px 28px -10px rgba(15, 15, 20, 0.45) !important;
    text-shadow: none;
    -webkit-text-fill-color: #fff;
}

.ep-pwa-modal .ep-pwa-modal-ok:hover,
button.ep-pwa-modal-ok:hover {
    background: linear-gradient(135deg, #e8347a 0%, #cf2169 100%) !important;
    background-image: linear-gradient(135deg, #e8347a 0%, #cf2169 100%) !important;
    box-shadow: 0 16px 36px -10px rgba(232, 52, 122, 0.55) !important;
    transform: translateY(-1px);
}

.ep-pwa-modal .ep-pwa-modal-ok:active,
button.ep-pwa-modal-ok:active {
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════
   Main + topbar
   ════════════════════════════════════════════════════════════ */
.ep-main {
    min-width: 0;
}

.ep-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--ep-line-soft);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 64px;
}

@media (max-width: 700px) {
    .ep-topbar {
        padding: 14px 18px;
    }
}

.ep-topbar-l {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ep-topbar-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ep-ink);
}

.ep-topbar-client {
    color: var(--ep-mute);
    font-size: 12.5px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.05);
}

.ep-topbar-r {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ep-side-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--ep-line);
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--ep-ink);
    transition: border-color .15s, background .15s;
}

.ep-side-toggle:hover {
    border-color: var(--ep-ink);
    background: var(--ep-cream);
}

@media (max-width: 900px) {
    .ep-side-toggle {
        display: inline-flex;
    }
}

.ep-side-toggle svg {
    width: 18px;
    height: 18px;
}

/* ════════════════════════════════════════════════════════════
   Content
   ════════════════════════════════════════════════════════════ */
.ep-content {
    padding: 32px 32px 64px;
    max-width: 1240px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .ep-content {
        padding: 24px 18px 64px;
    }
}

/* ─── Buttons (2026 system) ─── */
.ep-btn {
    --btn-bg: transparent;
    --btn-fg: var(--ep-ink);
    --btn-bd: transparent;
    --btn-shadow: 0 0 0 0 transparent;
    --btn-shadow-hover: 0 0 0 0 transparent;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid var(--btn-bd);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition:
        transform .18s cubic-bezier(.4, 0, .2, 1),
        background .18s cubic-bezier(.4, 0, .2, 1),
        border-color .18s cubic-bezier(.4, 0, .2, 1),
        color .18s cubic-bezier(.4, 0, .2, 1),
        box-shadow .22s cubic-bezier(.4, 0, .2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.ep-btn:focus-visible {
    outline: none;
    box-shadow: var(--btn-shadow), 0 0 0 4px rgba(232, 52, 122, 0.18);
}

.ep-btn:active {
    transform: translateY(0) scale(.99);
}

.ep-btn svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.ep-btn-sm {
    padding: 7px 12px;
    min-height: 32px;
    font-size: 12.5px;
    border-radius: 10px;
}

.ep-btn-lg {
    padding: 14px 22px;
    min-height: 48px;
    font-size: 14.5px;
    border-radius: 14px;
}

.ep-btn-primary {
    --btn-bg: var(--ep-pink);
    --btn-fg: #fff;
    --btn-bd: var(--ep-pink);
    --btn-shadow: 0 6px 14px -4px rgba(232, 52, 122, 0.45), 0 2px 4px -2px rgba(232, 52, 122, 0.30);
    --btn-shadow-hover: 0 12px 24px -6px rgba(232, 52, 122, 0.55), 0 4px 8px -3px rgba(232, 52, 122, 0.40);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0));
}

.ep-btn-primary:hover {
    --btn-bg: var(--ep-pink-deep);
    --btn-bd: var(--ep-pink-deep);
    box-shadow: var(--btn-shadow-hover);
    transform: translateY(-1px);
}

.ep-btn-ghost {
    --btn-bg: #fff;
    --btn-fg: var(--ep-ink);
    --btn-bd: var(--ep-line);
    --btn-shadow: 0 1px 0 rgba(24, 24, 27, 0.02);
}

.ep-btn-ghost:hover {
    --btn-bd: var(--ep-ink);
    box-shadow: 0 4px 12px -4px rgba(24, 24, 27, 0.08);
    transform: translateY(-1px);
}

.ep-btn-soft {
    --btn-bg: rgba(232, 52, 122, 0.08);
    --btn-fg: var(--ep-pink-deep);
    --btn-bd: transparent;
}

.ep-btn-soft:hover {
    --btn-bg: rgba(232, 52, 122, 0.14);
    transform: translateY(-1px);
}

.ep-btn-danger {
    --btn-bg: var(--ep-danger);
    --btn-fg: #fff;
    --btn-bd: var(--ep-danger);
    --btn-shadow: 0 6px 14px -4px rgba(220, 38, 38, 0.40);
}

.ep-btn-danger:hover {
    --btn-bg: #b91c1c;
    --btn-bd: #b91c1c;
    transform: translateY(-1px);
}

.ep-btn[disabled],
.ep-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.ep-btn-block {
    width: 100%;
}

/* ─── Hello row ─── */
.ep-hello {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.ep-hello-eyebrow {
    color: var(--ep-mute);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ep-hello-title {
    margin: 8px 0 4px;
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.ep-hello-title em {
    font-style: italic;
    font-weight: 400;
    font-family: "PlayfairDisplay", "Times New Roman", serif;
    background: linear-gradient(110deg, var(--ep-pink) 0%, var(--ep-pink-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ep-hello-sub {
    margin: 0;
    color: var(--ep-mute);
}

.ep-hello-actions {
    display: inline-flex;
    gap: 10px;
}

/* ─── Pending review banner (shown across portal while admin reviews) ─── */
.ep-review-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 32px 0;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #fcd34d;
    background: linear-gradient(180deg, #fffbeb, #fef3c7);
    color: #78350f;
    font-size: 13.5px;
    box-shadow: 0 4px 14px -8px rgba(217, 119, 6, 0.25);
}

@media (max-width: 700px) {
    .ep-review-banner {
        margin: 12px 18px 0;
    }
}

.ep-review-banner-icon {
    font-size: 22px;
    line-height: 1;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ep-review-banner-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.4;
}

.ep-review-banner-text strong {
    font-size: 14px;
}

/* ─── Alerts ─── */
.ep-alert {
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    border: 1px solid var(--ep-line);
    background: #fff;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.03);
}

.ep-alert::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px currentColor;
    opacity: 0.18;
}

.ep-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
}

.ep-alert-warn {
    border-color: #fed7aa;
    background: #fffbeb;
    color: #92400e;
}

.ep-alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

/* ─── Stat cards ─── */
.ep-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 22px;
}

.ep-stat {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ep-line-soft);
    border-radius: 16px;
    padding: 18px 18px 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.ep-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -22px rgba(232, 52, 122, 0.18), 0 6px 16px -10px rgba(24, 24, 27, 0.05);
}

.ep-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ep-ink);
}

.ep-stat-today::before {
    background: var(--ep-pink);
}

.ep-stat-overdue::before {
    background: var(--ep-danger);
}

.ep-stat-high::before {
    background: var(--ep-warn);
}

.ep-stat-tickets::before {
    background: var(--ep-pink-2);
}

.ep-stat-value {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
}

.ep-stat-label {
    font-size: 11px;
    color: var(--ep-mute);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── Grid + cards ─── */
.ep-grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    margin-bottom: 20px;
}

.ep-card {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(24, 24, 27, 0.06);
    border-radius: 20px;
    padding: 26px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 1px 2px rgba(24, 24, 27, 0.03),
        0 12px 24px -16px rgba(24, 24, 27, 0.06);
    transition: box-shadow .25s cubic-bezier(.4, 0, .2, 1), transform .25s cubic-bezier(.4, 0, .2, 1);
}

.ep-card-wide {
    margin-bottom: 20px;
}

.ep-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}

.ep-card-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ep-ink);
}

.ep-card-link {
    color: var(--ep-pink-deep);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s, gap .15s;
}

.ep-card-link:hover {
    color: var(--ep-pink);
    gap: 6px;
}

.ep-mute {
    color: var(--ep-mute);
    margin: 0;
    line-height: 1.55;
}

/* ─── Subscription summary ─── */
.ep-sub-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 700px) {
    .ep-sub-summary {
        grid-template-columns: 1.3fr 1fr;
    }
}

.ep-sub-summary h4 {
    margin: 6px 0 4px;
    font-size: 17px;
    font-weight: 600;
}

.ep-sub-summary p {
    margin: 0;
}

.ep-sub-summary-r {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ep-mini-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ep-soft);
    margin-top: 6px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ─── Profile hero (Settings page) ─── */
.ep-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    background:
        linear-gradient(120deg, rgba(232, 52, 122, 0.05) 0%, rgba(244, 114, 182, 0.02) 60%, transparent 100%),
        rgba(255, 255, 255, 0.86);
}

.ep-profile-hero-l {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.ep-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--ep-pink), var(--ep-pink-deep));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 0 0 1px rgba(232, 52, 122, 0.18),
        0 10px 24px -10px rgba(232, 52, 122, 0.45);
}

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

.ep-profile-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ep-ink);
    line-height: 1.15;
}

.ep-profile-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--ep-mute);
}

.ep-profile-meta-mail {
    color: var(--ep-soft);
}

.ep-mini-value {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
}

/* ─── Pills ─── */
.ep-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ep-cream);
    color: var(--ep-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ep-pill-active,
.ep-pill-paid {
    background: #ecfdf5;
    color: #166534;
}

.ep-pill-trialing,
.ep-pill-open {
    background: #eff6ff;
    color: #1d4ed8;
}

.ep-pill-past_due,
.ep-pill-payment_failed,
.ep-pill-uncollectible {
    background: #fef2f2;
    color: #991b1b;
}

.ep-pill-refunded {
    background: #fee2e2;
    color: #7f1d1d;
}

.ep-pill-partially_refunded {
    background: #fef3c7;
    color: #92400e;
}

.ep-pill-canceled,
.ep-pill-cancelled {
    background: #f1f5f9;
    color: #475569;
}

.ep-pill-new,
.ep-pill-in_review,
.ep-pill-in_progress {
    background: #fce7f3;
    color: #be185d;
}

.ep-pill-waiting_client,
.ep-pill-resolved {
    background: #fffbeb;
    color: #92400e;
}

.ep-pill-closed {
    background: #f1f5f9;
    color: #475569;
}

.ep-pill-prio-urgent {
    background: #fee2e2;
    color: #991b1b;
}

.ep-pill-prio-low {
    background: #f1f5f9;
    color: #475569;
}

.ep-pill-prio-normal {
    background: #dbeafe;
    color: #1e40af;
}

/* ─── Task list ─── */
.ep-task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-task-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px dashed var(--ep-line-soft);
}

.ep-task-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.ep-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
    display: inline-block;
}

.ep-task-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.ep-task-status {
    color: var(--ep-mute);
    font-size: 12px;
    text-transform: capitalize;
}

/* ─── Recent activity (unified feed on the client dashboard) ─── */
.ep-activity {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 24, 27, 0.18) transparent;
}

.ep-activity::-webkit-scrollbar {
    width: 8px;
}

.ep-activity::-webkit-scrollbar-thumb {
    background: rgba(24, 24, 27, 0.18);
    border-radius: 4px;
}

.ep-activity::-webkit-scrollbar-track {
    background: transparent;
}

.ep-activity-row {
    border-top: 1px dashed var(--ep-line-soft);
    position: relative;
    display: flex;
    align-items: stretch;
}

.ep-activity-row:first-child {
    border-top: 0;
}

.ep-activity-row .ep-activity-link {
    flex: 1;
    min-width: 0;
}

.ep-activity-x {
    flex: none;
    width: 28px;
    border: 0;
    background: transparent;
    color: rgba(24, 24, 27, 0.32);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    margin: 6px 4px 6px 0;
    transition: background .12s, color .12s;
}

.ep-activity-x:hover {
    background: #fef2f2;
    color: #dc2626;
}

.ep-activity-row:hover .ep-activity-x {
    color: rgba(24, 24, 27, 0.55);
}

.ep-activity-row:hover .ep-activity-x:hover {
    color: #dc2626;
}

.ep-activity-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 3px;
    height: 16px;
    border-radius: 0 3px 3px 0;
    background: rgba(148, 163, 184, 0.55);
}

.ep-activity-tone-good::before {
    background: #16a34a;
}

.ep-activity-tone-bad::before {
    background: #dc2626;
}

.ep-activity-tone-warn::before {
    background: #f59e0b;
}

.ep-activity-tone-info::before {
    background: #3b82f6;
}

.ep-activity-tone-neutral::before {
    background: rgba(148, 163, 184, 0.55);
}

.ep-activity-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 4px 10px 14px;
    color: var(--ep-ink);
    text-decoration: none;
    transition: background .12s;
}

.ep-activity-link[href]:hover {
    background: var(--ep-cream);
}

.ep-activity-link:not([href]) {
    cursor: default;
}

.ep-activity-time {
    font-size: 11px;
    color: var(--ep-mute);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ep-activity-label {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--ep-ink);
}

/* ─── Quick actions ─── */
.ep-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.ep-quick-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    background: linear-gradient(135deg, var(--ep-cream) 0%, #fff 100%);
    border: 1px solid var(--ep-line-soft);
    border-radius: 14px;
    text-decoration: none;
    color: var(--ep-ink);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ep-quick-btn:hover {
    transform: translateY(-2px);
    border-color: var(--ep-ink);
    box-shadow: 0 14px 30px -16px rgba(232, 52, 122, 0.2);
}

.ep-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(232, 52, 122, 0.10);
    color: var(--ep-pink-deep);
    font-size: 22px;
    line-height: 1;
    margin-bottom: 4px;
}

.ep-quick-icon svg {
    width: 18px;
    height: 18px;
}

.ep-quick-btn strong {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.ep-quick-btn small {
    color: var(--ep-mute);
    font-size: 12px;
}

/* ─── Toolbar / filters ─── */
.ep-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ep-search,
.ep-select {
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--ep-line);
    background: #fff;
    font-size: 13px;
}

.ep-search {
    flex: 1 1 200px;
    min-width: 200px;
    padding-left: 18px;
}

.ep-select {
    padding-right: 28px;
}

.ep-search:focus,
.ep-select:focus {
    outline: none;
    border-color: var(--ep-ink);
}

/* ─── Tables ─── */
.ep-table-wrap {
    background: #fff;
    border: 1px solid var(--ep-line-soft);
    border-radius: 14px;
    overflow: hidden;
}

.ep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.ep-table thead th {
    background: var(--ep-cream);
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
    border-bottom: 1px solid var(--ep-line-soft);
}

.ep-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ep-line-soft);
    vertical-align: middle;
}

.ep-table tbody tr:last-child td {
    border-bottom: 0;
}

.ep-table tbody tr:hover {
    background: rgba(232, 52, 122, 0.025);
}

.ep-table tbody tr.is-hidden {
    display: none;
}

.ep-task-list-name {
    display: block;
    color: var(--ep-mute);
    font-size: 11.5px;
}

.ep-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ep-cream);
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.ep-status-pill::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dot, #888);
    display: inline-block;
}

.ep-prio {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.ep-prio-urgent {
    background: #fee2e2;
    color: #991b1b;
}

.ep-prio-high {
    background: #fef3c7;
    color: #92400e;
}

.ep-prio-normal {
    background: #dbeafe;
    color: #1e40af;
}

.ep-prio-low {
    background: #f1f5f9;
    color: #475569;
}

.ep-due {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    color: var(--ep-mute);
}

.ep-due.is-today {
    color: var(--ep-pink-deep);
    font-weight: 600;
}

.ep-due.is-overdue {
    color: var(--ep-danger);
    font-weight: 600;
}

.ep-empty-row {
    padding: 30px;
    text-align: center;
    color: var(--ep-mute);
}

/* ─── Billing ─── */
.ep-billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.ep-billing-plan {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin: 4px 0 2px;
}

.ep-billing-amount {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

/* ─── Tickets ─── */
.ep-ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ep-ticket-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--ep-line-soft);
    border-radius: 12px;
}

.ep-ticket-row-head {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.ep-ticket-when {
    margin-left: auto;
    font-size: 11px;
    color: var(--ep-mute);
}

.ep-ticket-row-subject {
    font-size: 14px;
    font-weight: 600;
}

.ep-ticket-row-cat {
    margin: 0;
    font-size: 12px;
    color: var(--ep-mute);
}

/* ─── Forms ─── */
.ep-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.ep-form>.ep-btn {
    align-self: stretch;
}

.ep-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-form-row span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ep-mute);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Apply pill styling to text-like inputs only — checkboxes/radios keep their
   native control look, otherwise they balloon into full-width pills and push
   their labels outside the visible box (onboarding step 7+8). */
.ep-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.ep-form-row select,
.ep-form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--ep-line);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--ep-ink);
    line-height: 1.4;
    transition:
        border-color .15s cubic-bezier(.4, 0, .2, 1),
        box-shadow .2s cubic-bezier(.4, 0, .2, 1),
        background .15s;
    -webkit-appearance: none;
    appearance: none;
}

.ep-form-row input::placeholder,
.ep-form-row textarea::placeholder {
    color: var(--ep-soft);
}

.ep-form-row input:not([type="checkbox"]):not([type="radio"]):hover:not(:focus),
.ep-form-row select:hover:not(:focus),
.ep-form-row textarea:hover:not(:focus) {
    border-color: rgba(24, 24, 27, 0.22);
}

.ep-form-row input:not([type="checkbox"]):not([type="radio"]):focus,
.ep-form-row select:focus,
.ep-form-row textarea:focus {
    outline: none;
    border-color: var(--ep-pink);
    box-shadow: 0 0 0 4px rgba(232, 52, 122, 0.14);
}

.ep-form-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.ep-form-row textarea {
    min-height: 96px;
    resize: vertical;
}

.ep-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.ep-form-help {
    font-size: 12.5px;
    color: var(--ep-mute);
    line-height: 1.5;
}

/* Modern, custom-styled checkboxes */
.ep-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 4px;
    cursor: pointer;
    user-select: none;
}

.ep-toggle:hover span {
    color: var(--ep-ink);
}

.ep-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: none;
    margin-top: 1px;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--ep-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition:
        background .18s cubic-bezier(.4, 0, .2, 1),
        border-color .18s cubic-bezier(.4, 0, .2, 1),
        box-shadow .2s;
}

.ep-toggle input[type="checkbox"]:hover {
    border-color: var(--ep-pink);
}

.ep-toggle input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(232, 52, 122, 0.18);
}

.ep-toggle input[type="checkbox"]:checked {
    background: var(--ep-pink);
    border-color: var(--ep-pink);
    box-shadow: 0 4px 10px -2px rgba(232, 52, 122, 0.35);
}

.ep-toggle input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 13px;
}

.ep-toggle span {
    font-size: 13.5px;
    color: var(--ep-mute);
    line-height: 1.4;
    transition: color .15s;
    padding-top: 2px;
}

/* ─── Files ─── */
.ep-file-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 44px 24px;
    border: 1.5px dashed rgba(24, 24, 27, 0.15);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(232, 52, 122, 0.02), rgba(232, 52, 122, 0)),
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(24, 24, 27, 0.012) 12px 13px);
    cursor: pointer;
    text-align: center;
    transition:
        border-color .2s cubic-bezier(.4, 0, .2, 1),
        background .2s cubic-bezier(.4, 0, .2, 1),
        transform .2s cubic-bezier(.4, 0, .2, 1),
        box-shadow .25s cubic-bezier(.4, 0, .2, 1);
}

.ep-file-drop:hover {
    border-color: var(--ep-pink);
    background:
        linear-gradient(180deg, rgba(232, 52, 122, 0.05), rgba(232, 52, 122, 0.01)),
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(232, 52, 122, 0.025) 12px 13px);
    box-shadow: 0 12px 28px -16px rgba(232, 52, 122, 0.18);
    transform: translateY(-1px);
}

.ep-file-drop input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.ep-file-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.10), rgba(244, 114, 182, 0.06));
    color: var(--ep-pink-deep);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 6px 14px -8px rgba(232, 52, 122, 0.30);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.ep-file-drop:hover .ep-file-drop-icon {
    transform: translateY(-2px) scale(1.04);
}

.ep-file-drop-icon svg {
    width: 22px;
    height: 22px;
}

.ep-file-drop-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ep-file-drop-label strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ep-ink);
    letter-spacing: -0.005em;
}

.ep-file-drop-label small {
    color: var(--ep-mute);
    font-size: 12.5px;
}

.ep-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-file-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--ep-line-soft);
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s, transform .15s, box-shadow .2s;
}

.ep-file-row:hover {
    border-color: var(--ep-line);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -8px rgba(24, 24, 27, 0.08);
}

.ep-file-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.12), rgba(244, 114, 182, 0.06));
    color: var(--ep-pink-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: none;
}

.ep-file-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ep-file-name strong {
    font-size: 13.5px;
}

.ep-file-name small {
    font-size: 11.5px;
    color: var(--ep-mute);
}

/* ─── Reports ─── */
.ep-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.ep-report-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--ep-line-soft);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.ep-report-card:hover {
    transform: translateY(-2px);
    border-color: var(--ep-ink);
    box-shadow: 0 14px 30px -16px rgba(232, 52, 122, 0.18);
}

.ep-report-icon {
    font-size: 24px;
    color: var(--ep-pink-deep);
}

.ep-report-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ep-report-meta strong {
    font-size: 14px;
    font-weight: 600;
}

.ep-report-arrow {
    color: var(--ep-mute);
    font-size: 18px;
}

/* ─── Empty state ─── */
.ep-empty {
    text-align: center;
    padding: 56px 20px;
    border: 1px dashed var(--ep-line);
    border-radius: 16px;
    background: #fff;
}

.ep-empty h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}

.ep-empty p {
    margin: 0;
    color: var(--ep-mute);
}

/* ─── Book a call ─── */
.ep-book-cta {
    padding: 22px;
    text-align: center;
}

.ep-book-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ep-line-soft);
}

.ep-book-options h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

.ep-book-reasons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.ep-book-reasons li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--ep-cream);
    border-radius: 10px;
    font-size: 13px;
}

.ep-book-reasons strong {
    font-weight: 600;
}

.ep-book-reasons span {
    color: var(--ep-mute);
}

/* Event-type tiles (list view) */
.ep-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.ep-book-tile {
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none !important;
    color: var(--ep-ink);
    transition: border-color .15s, transform .1s, box-shadow .15s;
    position: relative;
    overflow: hidden;
}

.ep-book-tile:hover {
    border-color: var(--ep-pink);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 52, 122, 0.10);
}

.ep-book-tile-inactive {
    opacity: 0.78;
}

.ep-book-tile-color {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.ep-book-tile strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.ep-book-tile small {
    display: block;
    font-size: 12px;
    color: var(--ep-mute);
    margin: 4px 0 8px;
}

.ep-book-tile p {
    font-size: 13px;
    color: var(--ep-mute);
    margin: 0 0 10px;
    line-height: 1.5;
}

.ep-book-tile-cta {
    font-size: 13px;
    color: var(--ep-pink-deep);
    font-weight: 600;
}

/* ─── Calendly-style inline picker ─── */
.ep-bk {
    padding: 0;
    overflow: hidden;
}

.ep-bk-banner {
    margin: 0;
    padding: 12px 20px;
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    color: #78350f;
    font-size: 13.5px;
    line-height: 1.5;
}

.ep-bk-success {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    padding: 14px 20px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    color: #14532d;
    font-size: 13.5px;
}

.ep-bk-success a {
    margin-left: auto;
    color: #14532d;
    font-weight: 600;
    text-decoration: none;
}

.ep-bk-error {
    margin: 0;
    padding: 12px 20px;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13.5px;
}

.ep-bk-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 420px;
}

.ep-bk-info {
    position: relative;
    padding: 28px 24px;
    border-right: 1px solid var(--ep-line);
    background: var(--ep-cream);
}

.ep-bk-info-color {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    margin: 14px 0 12px;
}

.ep-bk-info h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ep-ink);
}

.ep-bk-meta {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
    color: var(--ep-mute);
}

.ep-bk-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-bk-meta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ep-bk-desc {
    margin: 14px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ep-mute);
}

.ep-bk-back {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-mute);
    text-decoration: none;
    margin-bottom: 4px;
}

.ep-bk-back:hover {
    color: var(--ep-ink);
}

.ep-bk-pick {
    padding: 28px 28px 32px;
}

.ep-bk-pick-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ep-bk-pick-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ep-ink);
    letter-spacing: -0.01em;
}

.ep-bk-pick-sub {
    margin: 0;
    font-size: 12.5px;
    color: var(--ep-mute);
}

.ep-bk-tz {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--ep-cream);
    border: 1px solid var(--ep-line);
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--ep-ink);
    white-space: nowrap;
}

.ep-bk-tz svg {
    width: 14px;
    height: 14px;
    color: var(--ep-mute);
    flex-shrink: 0;
}

.ep-bk-tz strong {
    font-weight: 600;
}

.ep-bk-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ep-mute);
}

.ep-bk-dates {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--ep-line);
    scrollbar-width: thin;
}

.ep-bk-date {
    flex: 1 0 96px;
    min-width: 96px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--ep-ink);
    transition: border-color .15s, background .15s, box-shadow .2s, transform .1s;
}

.ep-bk-date:hover {
    border-color: var(--ep-ink);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(24, 24, 27, 0.08);
}

.ep-bk-date.is-active {
    background: var(--ep-pink);
    border-color: var(--ep-pink);
    color: #fff;
    box-shadow: 0 8px 20px rgba(232, 52, 122, 0.28);
    transform: translateY(-1px);
}

.ep-bk-date.is-empty {
    background: transparent;
    border-style: dashed;
    color: var(--ep-mute);
}

.ep-bk-date.is-empty:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--ep-line);
}

.ep-bk-date.is-empty.is-active {
    background: var(--ep-cream);
    border-color: var(--ep-mute);
    color: var(--ep-ink);
    box-shadow: none;
    transform: none;
}

.ep-bk-date.is-empty.is-active .ep-bk-date-dow {
    color: var(--ep-mute);
}

.ep-bk-date-pill {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(24, 24, 27, 0.06);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
}

.ep-bk-slots-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 20px;
    background: var(--ep-cream);
    border: 1px dashed var(--ep-line);
    border-radius: 12px;
    color: var(--ep-mute);
}

.ep-bk-slots-empty strong {
    color: var(--ep-ink);
    display: block;
}

.ep-bk-date-dow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ep-mute);
    font-weight: 700;
    line-height: 1;
}

.ep-bk-date.is-active .ep-bk-date-dow {
    color: rgba(255, 255, 255, 0.85);
}

.ep-bk-date-day {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

@media (max-width: 720px) {
    .ep-bk-pick-head {
        flex-direction: column;
        gap: 8px;
    }
}

.ep-bk-slots-day {
    display: none;
}

.ep-bk-slots-day.is-active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.ep-bk-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 14px;
    background: transparent;
    border: 1px solid var(--ep-line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ep-ink);
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .2s, transform .1s;
}

.ep-bk-slot svg {
    width: 16px;
    height: 16px;
    color: var(--ep-mute);
    flex-shrink: 0;
    transition: color .15s;
}

.ep-bk-slot:hover {
    background: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(24, 24, 27, 0.07), 0 1px 3px rgba(24, 24, 27, 0.04);
    transform: translateY(-1px);
}

.ep-bk-slot.is-selected {
    background: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(24, 24, 27, 0.10), 0 2px 4px rgba(24, 24, 27, 0.05);
}

.ep-bk-slot-morning:hover svg,
.ep-bk-slot-morning.is-selected svg {
    color: #f97316;
}

.ep-bk-slot-afternoon:hover svg,
.ep-bk-slot-afternoon.is-selected svg {
    color: #eab308;
}

.ep-bk-slot-evening:hover svg,
.ep-bk-slot-evening.is-selected svg {
    color: #6366f1;
}

.ep-bk-form {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--ep-line);
}

.ep-bk-form-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 13.5px;
}

.ep-bk-form-summary strong {
    font-weight: 600;
}

.ep-bk-form-change {
    margin-left: auto;
    background: none;
    border: 0;
    padding: 0;
    color: var(--ep-pink-deep);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.ep-bk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.ep-bk-form label,
.ep-bk-form-full {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ep-bk-form span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
}

.ep-bk-form input,
.ep-bk-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--ep-line);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ep-ink);
    background: #fff;
    transition: border-color .12s, box-shadow .12s;
}

.ep-bk-form input:focus,
.ep-bk-form textarea:focus {
    outline: none;
    border-color: var(--ep-pink);
    box-shadow: 0 0 0 3px rgba(232, 52, 122, 0.12);
}

.ep-bk-form-full {
    margin-bottom: 14px;
}

.ep-bk-form-submit {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 14.5px;
    font-weight: 600;
    background: var(--ep-pink);
    border-color: var(--ep-pink);
    color: #fff;
    box-shadow: 0 8px 22px -6px rgba(232, 52, 122, 0.45);
    margin-top: 4px;
}

.ep-bk-form-submit:hover {
    background: var(--ep-pink-deep);
    border-color: var(--ep-pink-deep);
    box-shadow: 0 12px 26px -6px rgba(232, 52, 122, 0.55);
    transform: translateY(-1px);
}

.ep-bk-form-submit:active {
    transform: translateY(0);
}

@media (max-width: 720px) {
    .ep-bk-grid {
        grid-template-columns: 1fr;
    }

    .ep-bk-info {
        border-right: 0;
        border-bottom: 1px solid var(--ep-line);
    }

    .ep-bk-form-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Read-only grid (settings) ─── */
.ep-readonly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 4px 0 4px;
}

.ep-readonly-grid>div {
    padding: 14px 16px;
    background: rgba(245, 244, 240, 0.6);
    border: 1px solid var(--ep-line-soft);
    border-radius: 12px;
}

.ep-readonly-grid a {
    color: var(--ep-pink-deep);
    text-decoration: none;
    font-weight: 500;
}

.ep-readonly-grid a:hover {
    color: var(--ep-pink);
}

/* ─── Approvals ─── */
.ep-stat-approvals::before {
    background: var(--ep-pink);
}

.ep-approval-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ep-approval-row {
    padding: 0;
}

.ep-approval-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--ep-line-soft);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

.ep-approval-link:hover {
    border-color: var(--ep-ink);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -16px rgba(232, 52, 122, 0.18);
}

.ep-approval-meta {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
}

.ep-approval-when {
    margin-left: auto;
}

.ep-approval-title {
    font-size: 15px;
    font-weight: 600;
}

.ep-approval-excerpt {
    margin: 0;
    color: var(--ep-mute);
    font-size: 13.5px;
    line-height: 1.5;
}

.ep-approval-head {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 6px;
}

.ep-approval-h {
    margin: 4px 0 16px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.ep-approval-desc {
    color: var(--ep-mute);
    font-size: 14.5px;
    line-height: 1.65;
    border-left: 2px solid var(--ep-line);
    padding-left: 16px;
    margin-bottom: 18px;
}

.ep-approval-desc p {
    margin: 0 0 12px;
}

.ep-approval-preview {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* ─── Thread / messages / ticket replies ─── */
.ep-thread {
    list-style: none;
    margin: 14px 0 22px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ep-thread-msg {
    padding: 14px 16px;
    border: 1px solid var(--ep-line-soft);
    border-radius: 14px;
    background: #fff;
}

.ep-thread-msg.is-team {
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.05), rgba(244, 114, 182, 0.02));
    border-color: rgba(232, 52, 122, 0.18);
}

.ep-thread-msg.is-decision {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ep-thread-msg-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 13px;
}

.ep-thread-msg-body {
    color: var(--ep-ink);
    font-size: 14px;
    line-height: 1.6;
}

.ep-thread-msg-body p {
    margin: 0 0 10px;
}

.ep-thread-msg-body p:last-child {
    margin: 0;
}

.ep-pill-team {
    background: var(--ep-ink);
    color: #fff;
    font-size: 9.5px;
}

/* Reply / decision form */
.ep-reply-form,
.ep-decision-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--ep-line-soft);
}

.ep-decision-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ep-btn-warn {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
}

.ep-btn-warn:hover {
    background: #b45309;
    border-color: #b45309;
}

/* Back link */
.ep-back {
    margin: -8px 0 18px;
    font-size: 13px;
}

.ep-back a {
    color: var(--ep-mute);
    text-decoration: none;
    font-weight: 600;
}

.ep-back a:hover {
    color: var(--ep-ink);
}

/* Ticket detail */
.ep-ticket-detail-head {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 6px;
}

.ep-ticket-h {
    margin: 4px 0 14px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ep-ticket-original {
    background: var(--ep-cream);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.6;
}

.ep-ticket-original p {
    margin: 0 0 10px;
}

.ep-ticket-original p:last-child {
    margin: 0;
}

.ep-ticket-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    transition: background .15s;
}

.ep-ticket-link:hover {
    background: rgba(232, 52, 122, 0.04);
}

.ep-ticket-row {
    padding: 0;
    border: 1px solid var(--ep-line-soft);
    border-radius: 12px;
}

/* Threads list */
.ep-thread-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-thread-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--ep-line-soft);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, background .15s;
}

.ep-thread-link:hover {
    border-color: var(--ep-ink);
    background: rgba(232, 52, 122, 0.03);
}

.ep-thread-subject {
    font-size: 14px;
    font-weight: 600;
}

.ep-thread-meta {
    color: var(--ep-mute);
    font-size: 12px;
}

.ep-thread-h {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ─── Health card (Phase 3) ─── */
.ep-health-card {
    position: relative;
    overflow: hidden;
}

.ep-health-thriving {
    --score-color: #16a34a;
}

.ep-health-healthy {
    --score-color: #3b82f6;
}

.ep-health-needs_care {
    --score-color: #d97706;
}

.ep-health-at_risk {
    --score-color: #dc2626;
}

.ep-health-unknown {
    --score-color: #888;
}

.ep-pill-tier-thriving {
    background: #ecfdf5;
    color: #166534;
}

.ep-pill-tier-healthy {
    background: #eff6ff;
    color: #1d4ed8;
}

.ep-pill-tier-needs_care {
    background: #fffbeb;
    color: #92400e;
}

.ep-pill-tier-at_risk {
    background: #fef2f2;
    color: #991b1b;
}

.ep-pill-tier-unknown {
    background: var(--ep-cream);
    color: var(--ep-mute);
}

.ep-health-score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.ep-health-num {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--score-color);
}

.ep-health-out {
    font-size: 16px;
    color: var(--ep-mute);
    font-weight: 500;
}

.ep-health-bar {
    height: 6px;
    background: var(--ep-line-soft);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 14px;
}

.ep-health-bar>span {
    display: block;
    height: 100%;
    background: var(--score-color);
    border-radius: 999px;
    transition: width .8s cubic-bezier(.2, .7, .2, 1);
}

.ep-health-signals {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-health-signal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ep-mute);
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--ep-cream);
}

.ep-health-signal::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: none;
}

.ep-health-signal-good::before {
    background: #16a34a;
}

.ep-health-signal-info::before {
    background: #3b82f6;
}

.ep-health-signal-warn::before {
    background: #d97706;
}

.ep-health-signal-risk::before {
    background: #dc2626;
}

/* ─── AI digest card ─── */
.ep-ai-card {
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    border-color: rgba(232, 52, 122, 0.18);
}

.ep-ai-spark {
    display: inline-block;
    color: var(--ep-pink);
    font-size: 14px;
    margin-right: 4px;
}

.ep-ai-body {
    color: var(--ep-ink);
    font-size: 14px;
    line-height: 1.7;
}

.ep-ai-body p {
    margin: 0 0 12px;
}

.ep-ai-body p:last-child {
    margin: 0;
}

.ep-ai-foot {
    display: block;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--ep-line-soft);
    font-size: 11px;
}

/* ─── Bell + notifications panel ─── */
.ep-bell-wrap {
    position: relative;
}

.ep-bell {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--ep-line);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ep-ink);
    transition: border-color .15s, transform .12s, box-shadow .2s, background .15s;
    position: relative;
}

.ep-bell:hover {
    border-color: var(--ep-ink);
    background: var(--ep-cream);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -8px rgba(24, 24, 27, 0.15);
}

.ep-bell svg {
    width: 17px;
    height: 17px;
}

.ep-bell-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ep-pink);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff;
}

.ep-bell-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 14px;
    box-shadow: 0 24px 56px -16px rgba(24, 24, 27, 0.18), 0 8px 16px -8px rgba(24, 24, 27, 0.06);
    z-index: 50;
}

.ep-bell-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ep-line-soft);
    font-size: 13px;
}

.ep-bell-mark {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--ep-pink-deep);
    font-size: 12px;
    font-weight: 600;
}

.ep-bell-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-bell-empty {
    padding: 22px 16px;
    text-align: center;
    color: var(--ep-mute);
    font-size: 13px;
}

.ep-bell-item {
    border-bottom: 1px solid var(--ep-line-soft);
}

.ep-bell-item:last-child {
    border-bottom: 0;
}

.ep-bell-item.is-unread {
    background: rgba(232, 52, 122, 0.04);
}

.ep-bell-item a {
    display: block;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
}

.ep-bell-item:hover {
    background: rgba(232, 52, 122, 0.06);
}

.ep-bell-item strong {
    display: block;
    font-size: 13.5px;
    margin: 2px 0;
}

.ep-bell-item small {
    color: var(--ep-mute);
    font-size: 11.5px;
}

.ep-bell-kind {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ep-pink-deep);
    background: rgba(232, 52, 122, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.ep-bell-kind-payment_failed {
    background: #fef2f2;
    color: #991b1b;
}

.ep-bell-kind-payment_succeeded,
.ep-bell-kind-deliverable_shipped {
    background: #ecfdf5;
    color: #166534;
}

.ep-bell-kind-system {
    background: #f1f5f9;
    color: #475569;
}

/* ─── Chat modal (Ask my account) ─── */
.ep-chat-modal {
    position: fixed;
    inset: 0;
    background: rgba(24, 24, 27, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}

.ep-chat-card {
    width: 380px;
    max-width: 100%;
    height: 540px;
    max-height: 80vh;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--ep-line);
    box-shadow: 0 30px 80px -20px rgba(232, 52, 122, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ep-chat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ep-line-soft);
    background: linear-gradient(135deg, #fff, #fdf2f8);
}

.ep-chat-head button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 22px;
    color: var(--ep-mute);
    line-height: 1;
}

.ep-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-chat-msg {
    margin: 0;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word;
}

.ep-chat-msg-user {
    background: var(--ep-ink);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ep-chat-msg-bot {
    background: var(--ep-cream);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ep-chat-typing {
    opacity: 0.6;
    letter-spacing: 4px;
}

.ep-chat-form {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--ep-line-soft);
}

.ep-chat-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--ep-line);
    background: var(--ep-cream);
    font-size: 14px;
    font-family: inherit;
}

.ep-chat-form input:focus {
    outline: none;
    border-color: var(--ep-ink);
}

.ep-chat-form input:disabled {
    opacity: 0.6;
}

.ep-chat-form button {
    background: var(--ep-ink);
    color: #fff;
    border: 0;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ─── Onboarding wizard ─── */
.ep-onboard {
    max-width: 720px;
    margin: 30px auto 60px;
}

.ep-onboard-welcome {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(232, 52, 122, 0.08), rgba(244, 114, 182, 0.04));
    border: 1px solid rgba(232, 52, 122, 0.18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.ep-onboard-welcome-icon {
    flex: none;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(232, 52, 122, 0.14);
    color: var(--ep-pink-deep);
}

.ep-onboard-welcome-icon svg {
    width: 18px;
    height: 18px;
}

.ep-onboard-welcome-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13.5px;
    line-height: 1.5;
}

.ep-onboard-welcome-text strong {
    color: var(--ep-ink);
    font-weight: 600;
    font-size: 14px;
}

.ep-onboard-welcome-text span {
    color: var(--ep-mute);
}

.ep-onboard-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.ep-onboard-step-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ep-mute);
    flex: none;
}

.ep-onboard-progress {
    flex: 1;
    height: 4px;
    background: var(--ep-line-soft);
    border-radius: 999px;
    overflow: hidden;
}

.ep-onboard-progress>span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ep-pink), var(--ep-pink-2));
    border-radius: 999px;
    transition: width .6s cubic-bezier(.2, .7, .2, 1);
}

.ep-onboard-skip {
    margin: 0;
}

.ep-onboard-skip-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--ep-mute);
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
}

.ep-onboard-card {
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 22px;
    padding: 36px;
    box-shadow: 0 24px 56px -28px rgba(232, 52, 122, 0.16);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ep-onboard-card h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ep-onboard-deck {
    margin: 0;
    color: var(--ep-mute);
    font-size: 14.5px;
    line-height: 1.6;
}

/* Locations (repeating address cards) */
.ep-locations {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ep-locations-legend {
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
}

.ep-locations-help {
    margin: -4px 0 4px;
    color: var(--ep-mute);
    font-size: 13px;
}

.ep-location-row {
    position: relative;
    padding: 16px;
    border: 1px solid var(--ep-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color .15s, box-shadow .15s;
}

.ep-location-row:focus-within {
    border-color: rgba(232, 52, 122, 0.35);
    box-shadow: 0 0 0 3px rgba(232, 52, 122, 0.08);
}

.ep-location-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: -2px;
}

.ep-location-row-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ep-pink-deep);
}

.ep-location-remove {
    flex: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    color: var(--ep-mute);
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.ep-location-remove:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.ep-location-remove svg {
    width: 16px;
    height: 16px;
}

.ep-location-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 540px) {
    .ep-location-grid {
        grid-template-columns: 1fr;
    }
}

.ep-locations-add {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px dashed var(--ep-line);
    border-radius: 10px;
    color: var(--ep-pink-deep);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}

.ep-locations-add:hover {
    background: rgba(232, 52, 122, 0.06);
    border-color: rgba(232, 52, 122, 0.4);
    border-style: solid;
}

.ep-locations-add span {
    font-size: 16px;
    line-height: 1;
}

/* Multi-pick checkbox grid (channels, problems, priorities, AI) */
.ep-onboard-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.ep-onboard-checks-stacked {
    grid-template-columns: 1fr;
}

.ep-onboard-checks label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--ep-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .15s, background .15s;
}

.ep-onboard-checks label:hover {
    border-color: var(--ep-ink);
}

.ep-onboard-checks label:has(input:checked) {
    border-color: var(--ep-pink);
    background: linear-gradient(180deg, rgba(232, 52, 122, 0.06), rgba(244, 114, 182, 0.02));
}

.ep-onboard-checks input[type="checkbox"] {
    flex: none;
}

/* Confirmation timeline (step 14) */
.ep-onboard-timeline {
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--ep-cream);
    border-radius: 14px;
}

.ep-onboard-timeline strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
    margin-bottom: 12px;
}

.ep-onboard-timeline ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ep-onboard-timeline li {
    padding-left: 14px;
    border-left: 2px solid var(--ep-pink);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ep-ink);
}

.ep-onboard-timeline li strong {
    display: inline;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13.5px;
    color: var(--ep-pink-deep);
    margin: 0;
    margin-right: 4px;
}

/* Already-uploaded files list (step 12) */
.ep-onboard-files {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--ep-cream);
    border-radius: 12px;
    font-size: 13px;
}

.ep-onboard-files strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
    margin-bottom: 6px;
}

.ep-onboard-files ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.6;
}

.ep-onboard-files a {
    color: var(--ep-pink-deep);
    text-decoration: none;
}

.ep-onboard-files a:hover {
    text-decoration: underline;
}

.ep-onboard-tour {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-onboard-tour li {
    padding: 12px 14px;
    background: var(--ep-cream);
    border-radius: 10px;
    font-size: 13.5px;
}

.ep-onboard-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.ep-onboard-toggle {
    margin-top: 14px;
}

.ep-onboard-calendar {
    margin: 16px 0 8px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ep-line);
    background: #f6f3ee;
}

.ep-onboard-calendar-frame {
    display: block;
    width: 100%;
    min-height: 760px;
    border: 0;
    background: transparent;
}

.ep-onboard-logo-row {
    display: flex;
    gap: 18px;
    align-items: center;
}

.ep-onboard-logo-preview {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    background: var(--ep-cream);
    border: 1px solid var(--ep-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: none;
}

.ep-onboard-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-onboard-logo-fields {
    flex: 1;
}

.ep-onboard-done {
    text-align: center;
    padding: 50px 30px;
}

.ep-onboard-spark {
    font-size: 36px;
    color: var(--ep-pink);
    margin-bottom: 6px;
}

/* ─── Quote detail + plans + signature pad ─── */
.ep-quote-head {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
}

.ep-quote-h {
    margin: 4px 0 14px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ep-quote-desc {
    color: var(--ep-mute);
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.ep-quote-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 14px 0;
}

.ep-quote-items th {
    text-align: left;
    padding: 10px;
    background: var(--ep-cream);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-mute);
    border-radius: 8px 8px 0 0;
}

.ep-quote-items td {
    padding: 12px 10px;
    border-top: 1px solid var(--ep-line-soft);
    font-variant-numeric: tabular-nums;
}

.ep-quote-items tfoot td {
    border-top: 2px solid var(--ep-line);
    font-size: 14px;
}

.ep-quote-terms {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--ep-line-soft);
    font-size: 13.5px;
}

.ep-quote-terms strong {
    display: block;
    margin-bottom: 4px;
}

.ep-quote-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ep-quote-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--ep-line-soft);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s;
}

.ep-quote-link:hover {
    border-color: var(--ep-ink);
    transform: translateY(-1px);
}

.ep-quote-row-head {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ep-quote-total {
    color: var(--ep-pink-deep);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}

.ep-pill-quote-draft {
    background: var(--ep-cream);
    color: var(--ep-mute);
}

.ep-pill-quote-sent {
    background: #eff6ff;
    color: #1d4ed8;
}

.ep-pill-quote-accepted {
    background: #ecfdf5;
    color: #166534;
}

.ep-pill-quote-declined {
    background: #fef2f2;
    color: #991b1b;
}

.ep-pill-quote-expired {
    background: #f1f5f9;
    color: #475569;
}

.ep-sign-card {
    margin-top: 18px;
}

.ep-sign-pad {
    position: relative;
    background: #fcfcfa;
    border: 1px dashed var(--ep-line);
    border-radius: 12px;
    padding: 6px;
    margin: 14px 0;
}

.ep-sign-pad canvas {
    width: 100%;
    height: 200px;
    background: #fff;
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
    display: block;
}

.ep-sign-clear {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--ep-line);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ep-mute);
    cursor: pointer;
}

.ep-quote-actions {
    display: inline-flex;
    gap: 10px;
    margin-top: 10px;
}

.ep-quote-decline-form {
    margin-top: 10px;
}

.ep-quote-sig {
    max-width: 100%;
    border: 1px solid var(--ep-line-soft);
    border-radius: 8px;
    padding: 6px;
    background: #fff;
    margin: 8px 0;
}

/* Plans (billing tab) */
.ep-plans-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ep-plan {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--ep-line-soft);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

.ep-plan:hover {
    transform: translateY(-2px);
    border-color: var(--ep-ink);
    box-shadow: 0 18px 36px -22px rgba(232, 52, 122, 0.2);
}

.ep-plan.is-current {
    border-color: var(--ep-pink);
    background: linear-gradient(135deg, #fff, rgba(232, 52, 122, 0.04));
}

.ep-plan h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ep-plan-agents {
    font-size: 12px;
    color: var(--ep-mute);
}

.ep-plan-agents strong {
    color: var(--ep-pink-deep);
    font-weight: 700;
}

.ep-plan-blurb {
    margin: 0;
    font-size: 13px;
    color: var(--ep-mute);
}

/* ─── Print stylesheet ─── */
@media print {

    .enzo-portal .ep-sidebar,
    .enzo-portal .ep-topbar,
    .enzo-portal .ep-bell-wrap,
    .enzo-portal .ep-chat-modal,
    .enzo-portal [data-ep-chat-open],
    .enzo-portal .ep-back,
    .enzo-portal .ep-reply-form,
    .enzo-portal .ep-decision-form,
    .enzo-portal .ep-sign-card,
    .enzo-portal .ep-quote-actions,
    .enzo-portal .ep-quote-decline-form,
    .enzo-portal .ep-onboard-skip,
    .enzo-portal .ep-bell {
        display: none !important;
    }

    .enzo-portal {
        display: block;
        background: #fff;
    }

    .enzo-portal .ep-content {
        padding: 0 !important;
        max-width: none !important;
    }

    .enzo-portal .ep-card,
    .enzo-portal .ep-card-wide {
        box-shadow: none !important;
        border-color: #e5e7eb !important;
        page-break-inside: avoid;
    }

    .enzo-portal a {
        color: inherit;
        text-decoration: none;
    }

    body {
        background: #fff !important;
    }
}

.enzo-portal.is-print {
    background: #fff;
}

.enzo-portal.is-print .ep-sidebar,
.enzo-portal.is-print .ep-topbar {
    display: none !important;
}

.enzo-portal.is-print .ep-content {
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════
   Login screen
   ════════════════════════════════════════════════════════════ */
.ep-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--ep-paper, #fafaf7);
    padding: 60px 18px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    color: #18181b;
    --ep-pink: #e8347a;
    --ep-pink-2: #f472b6;
    --ep-pink-deep: #b91c5c;
    --ep-cream: #f5f4f0;
    --ep-line: rgba(24, 24, 27, 0.10);
    --ep-mute: rgba(24, 24, 27, 0.62);
}

.ep-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 30px 80px -36px rgba(232, 52, 122, 0.18), 0 8px 16px -8px rgba(24, 24, 27, 0.05);
}

.ep-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
}

.ep-login-brand-mark {
    width: auto;
    height: 72px;
    max-width: 240px;
    margin: 0 auto;
}

/* Dot sits at the top-right of the P arc — SVG viewBox 537×613, arc peaks at ≈(526,2.6) */
.ep-login-brand-mark .ep-brand-mark-dot {
    top: -5px;
    right: -4px;
}

.ep-login-sub {
    color: var(--ep-mute);
    margin-left: 0;
}

.ep-login-title {
    margin: 16px 0 6px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ep-login-deck {
    color: var(--ep-mute);
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
}

.ep-login-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin: 0 0 14px;
}

.ep-login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ep-login-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ep-login-label span {
    font-size: 12px;
    font-weight: 600;
}

.ep-login-label input {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--ep-line);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
}

.ep-login-label input:focus {
    outline: none;
    border-color: #18181b;
    box-shadow: 0 0 0 4px rgba(232, 52, 122, 0.12);
}

.ep-login-submit {
    margin-top: 6px;
    padding: 12px;
    justify-content: center;
    font-size: 14px;
}

.ep-login-help {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--ep-mute);
}

.ep-login-help a {
    color: var(--ep-pink-deep);
}

.ep-login-foot {
    margin-top: 22px;
    color: var(--ep-mute);
    font-size: 13px;
    text-align: center;
    max-width: 420px;
}

/* PWA install banner under the login card. */
.ep-pwa-banner {
    margin-top: 18px;
    width: 100%;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(232, 52, 122, 0.10), rgba(244, 114, 182, 0.04)),
        rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(232, 52, 122, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 18px 40px -22px rgba(232, 52, 122, 0.45);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    animation: epPwaBannerIn .35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes epPwaBannerIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* iOS form-zoom prevention for portal pages */
@media (max-width: 1023px) {

    .ep-portal-page input[type="text"],
    .ep-portal-page input[type="email"],
    .ep-portal-page input[type="password"],
    .ep-portal-page input[type="search"],
    .ep-portal-page input[type="number"],
    .ep-portal-page input[type="tel"],
    .ep-portal-page input[type="url"],
    .ep-portal-page input:not([type]),
    .ep-portal-page select,
    .ep-portal-page textarea,
    .ep-login input[type="text"],
    .ep-login input[type="email"],
    .ep-login input[type="password"],
    .ep-login input[type="search"],
    .ep-login input:not([type]),
    .ep-login select,
    .ep-login textarea {
        font-size: 16px !important;
    }
}

.ep-pwa-banner-icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent !important;
    border: 0 !important;
    padding: 0;
    display: block;
    box-shadow:
        0 1px 2px rgba(40, 26, 18, 0.12),
        0 8px 18px -6px rgba(40, 26, 18, 0.22);
}

.ep-pwa-banner-icon img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.ep-pwa-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
    line-height: 1.4;
}

.ep-pwa-banner-text strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ep-ink);
    letter-spacing: -0.005em;
}

.ep-pwa-banner-text span {
    font-size: 12px;
    color: var(--ep-mute);
}

.ep-pwa-banner-cta {
    flex: none;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e8347a 0%, #cf2169 100%) !important;
    background-image: linear-gradient(135deg, #e8347a 0%, #cf2169 100%) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    border: 0 !important;
    box-shadow: 0 6px 14px -4px rgba(232, 52, 122, 0.5) !important;
}

.ep-pwa-banner-cta:hover {
    background: linear-gradient(135deg, #cf2169 0%, #b91c5c 100%) !important;
    background-image: linear-gradient(135deg, #cf2169 0%, #b91c5c 100%) !important;
    transform: translateY(-1px);
}

.ep-pwa-banner-cta svg {
    width: 14px;
    height: 14px;
}

.ep-pwa-banner-x {
    flex: none;
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: rgba(24, 24, 27, 0.4);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.ep-pwa-banner-x:hover {
    background: rgba(24, 24, 27, 0.06);
    color: var(--ep-ink);
}

@media (max-width: 520px) {
    .ep-pwa-banner {
        flex-wrap: wrap;
        max-width: calc(100vw - 32px);
    }

    .ep-pwa-banner-text {
        flex: 1 0 calc(100% - 64px);
    }

    .ep-pwa-banner-cta {
        flex: 1 1 auto;
        justify-content: center;
        order: 3;
    }

    .ep-pwa-banner-x {
        order: 2;
    }
}

@media (display-mode: standalone) {
    .ep-pwa-banner {
        display: none !important;
    }
}

/* ──────────────────────────────────────────────────────────────────
   Native projects/tasks in client portal (replaces ClickUp views)
   ────────────────────────────────────────────────────────────────── */

.ep-section-title {
    margin: 24px 0 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.ep-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.ep-project-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color .15s;
}

.ep-project-card:hover {
    border-color: #e8347a;
}

.ep-project-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.ep-project-card h3 {
    font-size: 15px;
    margin: 4px 0 8px;
    letter-spacing: -0.01em;
}

.ep-project-card p {
    margin: 4px 0 12px;
    font-size: 13px;
    color: #64748b;
}

.ep-project-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
}

.ep-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0;
}

.ep-progress>span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #e8347a, #f472b6);
}

.ep-progress-num {
    color: #475569;
    font-weight: 600;
}

.ep-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.ep-pill-todo {
    background: #e2e8f0;
    color: #334155;
}

.ep-pill-in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.ep-pill-waiting {
    background: #fef3c7;
    color: #92400e;
}

.ep-pill-review {
    background: #ede9fe;
    color: #6d28d9;
}

.ep-pill-complete {
    background: #d1fae5;
    color: #065f46;
}

.ep-pill-planning {
    background: #e2e8f0;
    color: #334155;
}

.ep-pill-waiting_client {
    background: #fef3c7;
    color: #92400e;
}

.ep-pill-completed {
    background: #d1fae5;
    color: #065f46;
}

.ep-pill-paused {
    background: #f1f5f9;
    color: #64748b;
}

.ep-muted {
    color: #94a3b8;
    font-size: 12px;
}

/* ─── Calendar (portal) ─── */
.ep-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}

.ep-page-head-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ep-pill-neutral {
    background: #f1f5f9;
    color: #475569;
}

.ep-cal-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ep-cal-nav {
    display: flex;
    gap: 6px;
}

.ep-cal-arrow {
    min-width: 36px;
    padding: 6px 10px;
    font-size: 18px;
    line-height: 1;
}

.ep-cal-month {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}

.ep-cal-spacer {
    display: block;
}

.ep-cal {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

.ep-cal-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ep-cal-weekday {
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    text-align: center;
}

.ep-cal-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #e2e8f0;
}

.ep-cal-row:last-child {
    border-bottom: 0;
}

.ep-cal-cell {
    min-height: 110px;
    padding: 6px 6px 8px;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}

.ep-cal-cell:last-child {
    border-right: 0;
}

.ep-cal-cell.is-other-month {
    background: #f8fafc;
}

.ep-cal-cell.is-other-month .ep-cal-day-num {
    color: #cbd5e1;
}

.ep-cal-cell.is-today {
    background: #fef3f7;
}

.ep-cal-cell.is-today .ep-cal-day-num {
    background: #e8347a;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ep-cal-day-num {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    align-self: flex-end;
}

.ep-cal-chip {
    display: block;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    line-height: 1.25;
    text-decoration: none;
    color: #fff;
    background: #3b82f6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: filter .12s;
}

.ep-cal-chip:hover {
    filter: brightness(1.1);
    color: #fff;
}

.ep-cal-chip-todo {
    background: #64748b;
}

.ep-cal-chip-in_progress {
    background: #3b82f6;
}

.ep-cal-chip-waiting {
    background: #f59e0b;
}

.ep-cal-chip-review {
    background: #8b5cf6;
}

.ep-cal-chip-complete {
    background: #10b981;
}

.ep-cal-chip.is-overdue {
    background: #dc2626;
}

.ep-cal-more {
    background: transparent;
    border: 0;
    padding: 2px 6px;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
}

.ep-cal-more:hover {
    background: #f1f5f9;
}

.ep-cal-overflow {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}

@media (max-width: 720px) {
    .ep-cal-cell {
        min-height: 76px;
        padding: 4px;
    }

    .ep-cal-chip {
        font-size: 10.5px;
        padding: 2px 4px;
    }
}

/* ─── Task detail (portal) ─── */
.ep-back-link {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
}

.ep-back-link:hover {
    color: #e8347a;
}

.ep-task-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.ep-task-link {
    color: #0f172a;
    text-decoration: none;
}

.ep-task-link:hover {
    color: #e8347a;
}

.ep-task-list-name {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.ep-deflist {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px 12px;
    margin: 0 0 12px;
}

.ep-deflist dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    align-self: center;
}

.ep-deflist dd {
    margin: 0;
    font-size: 13px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ep-section-title-sm {
    margin: 16px 0 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
}

.ep-task-desc {
    font-size: 14px;
    line-height: 1.55;
    color: #1e293b;
}

.ep-task-desc p {
    margin: 0 0 10px;
}

.ep-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.ep-comments {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ep-comment {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fafbfc;
}

.ep-comment-head {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 4px;
    font-size: 12.5px;
}

.ep-comment-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: #1e293b;
}

.ep-comment-attach {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #e8347a;
    text-decoration: none;
}

.ep-comment-attach:hover {
    text-decoration: underline;
}

.ep-comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.ep-comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    resize: vertical;
    min-height: 60px;
}

.ep-comment-form textarea:focus {
    outline: none;
    border-color: #e8347a;
    box-shadow: 0 0 0 3px rgba(232, 52, 122, .15);
}

.ep-comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ep-comment-actions input[type="file"] {
    font-size: 12px;
    max-width: 60%;
}

.ep-alert-ok {
    background: #d1fae5;
    color: #065f46;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.ep-avatar.ep-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   Calendar v2 — month / week / day / agenda
   Mirrors admin.css block — keep these two in sync.
   ═══════════════════════════════════════════════════════════════ */

.ep-cal2 {
    --c-line: #e2e8f0;
    --c-line-soft: #eef2f7;
    --c-bg: #fff;
    --c-bg-soft: #f8fafc;
    --c-ink: #0f172a;
    --c-mute: #64748b;
    --c-accent: #e8347a;
    --c-today-bg: rgba(232, 52, 122, .06);
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

.ep-cal2-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-line);
    background: linear-gradient(180deg, #fff, #fafbfc);
}

.ep-cal2-tb-left,
.ep-cal2-tb-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ep-cal2-arrows {
    display: inline-flex;
    gap: 2px;
}

.ep-cal2-title {
    margin: 0 0 0 6px;
}

.ep-cal2-title-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 4px 8px;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    color: var(--c-ink);
    cursor: pointer;
    border-radius: 6px;
}

.ep-cal2-title-btn:hover {
    background: var(--c-bg-soft);
    color: var(--c-accent);
}

.ep-cal2-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: 8px;
    color: var(--c-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}

.ep-cal2-btn:hover {
    background: var(--c-bg-soft);
    border-color: #cbd5e1;
}

.ep-cal2-btn-primary {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}

.ep-cal2-btn-primary:hover {
    background: #c92a6a;
    border-color: #c92a6a;
    color: #fff;
}

.ep-cal2-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.ep-cal2-btn-danger {
    background: #fff;
    color: #b91c1c;
    border-color: #fecaca;
}

.ep-cal2-btn-danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

.ep-cal2 [hidden] {
    display: none !important;
}

.ep-cal2-views {
    display: inline-flex;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-line);
    border-radius: 10px;
    padding: 2px;
}

.ep-cal2-view-btn {
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-mute);
    text-decoration: none;
    border-radius: 8px;
    transition: background .12s, color .12s;
}

.ep-cal2-view-btn:hover {
    color: var(--c-ink);
}

.ep-cal2-view-btn.is-active {
    background: #fff;
    color: var(--c-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.ep-cal2-sources {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--c-line);
    background: #fff;
}

.ep-cal2-sources-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--c-mute);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-right: 4px;
}

.ep-cal2-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--c-mute);
    background: #fff;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.ep-cal2-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ep-cal2-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chip-color, #cbd5e1);
    opacity: .35;
}

.ep-cal2-chip.is-on {
    background: color-mix(in srgb, var(--chip-color, #888) 8%, #fff);
    border-color: var(--chip-color, #cbd5e1);
    color: var(--c-ink);
}

.ep-cal2-chip.is-on .ep-cal2-chip-dot {
    opacity: 1;
}

.ep-cal2-select {
    padding: 5px 8px;
    font-size: 12.5px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: #fff;
    color: var(--c-ink);
}

.ep-cal2-body {
    background: #fff;
}

.ep-cal2-month {
    display: flex;
    flex-direction: column;
}

.ep-cal2-weekrow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--c-line);
}

.ep-cal2-weekrow:last-child {
    border-bottom: 0;
}

.ep-cal2-weekrow-head {
    background: var(--c-bg-soft);
}

.ep-cal2-weekday {
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-mute);
    text-transform: uppercase;
    letter-spacing: .08em;
    text-align: center;
}

.ep-cal2-cell {
    position: relative;
    min-height: 120px;
    padding: 4px 4px 6px;
    border-right: 1px solid var(--c-line);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
}

.ep-cal2-cell:hover {
    background: var(--c-bg-soft);
}

.ep-cal2-cell:last-child {
    border-right: 0;
}

.ep-cal2-cell.is-other {
    background: #fafbfc;
}

.ep-cal2-cell.is-other .ep-cal2-cell-num {
    color: #cbd5e1;
}

.ep-cal2-cell.is-today {
    background: var(--c-today-bg);
}

.ep-cal2-cell-num {
    align-self: flex-end;
    background: transparent;
    border: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-mute);
    border-radius: 50%;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.ep-cal2-cell-num:hover {
    background: var(--c-line-soft);
    color: var(--c-ink);
}

.ep-cal2-cell.is-today .ep-cal2-cell-num {
    background: var(--c-accent);
    color: #fff;
}

.ep-cal2-event {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: color-mix(in srgb, var(--ev-color, #888) 14%, #fff);
    border-left: 3px solid var(--ev-color, #888);
    border-radius: 4px;
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--c-ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: filter .12s;
}

.ep-cal2-event:hover {
    filter: brightness(0.97);
    color: var(--c-ink);
}

.ep-cal2-event-icon {
    font-size: 11px;
}

.ep-cal2-event-time {
    font-weight: 600;
    color: var(--ev-color, var(--c-mute));
    font-size: 10.5px;
}

.ep-cal2-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-cal2-more {
    background: transparent;
    border: 0;
    padding: 2px 6px;
    color: var(--c-mute);
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
}

.ep-cal2-more:hover {
    background: var(--c-line-soft);
    color: var(--c-ink);
}

.ep-cal2-week,
.ep-cal2-day {
    display: flex;
    flex-direction: column;
}

.ep-cal2-week-head {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    background: var(--c-bg-soft);
    border-bottom: 1px solid var(--c-line);
}

.ep-cal2-week-gutter {
    border-right: 1px solid var(--c-line);
    font-size: 10.5px;
    color: var(--c-mute);
    padding: 8px 6px;
    text-align: center;
}

.ep-cal2-week-daycol-head {
    padding: 8px 6px;
    text-align: center;
    border-right: 1px solid var(--c-line);
}

.ep-cal2-week-daycol-head:last-child {
    border-right: 0;
}

.ep-cal2-week-daycol-head.is-today .ep-cal2-week-dn {
    background: var(--c-accent);
    color: #fff;
}

.ep-cal2-week-wd {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--c-mute);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ep-cal2-week-dn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: var(--c-ink);
    margin-top: 2px;
}

.ep-cal2-week-allday {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    border-bottom: 1px solid var(--c-line);
    min-height: 32px;
}

.ep-cal2-week-allday .ep-cal2-week-daycol {
    border-right: 1px solid var(--c-line);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ep-cal2-week-grid,
.ep-cal2-day-grid {
    display: grid;
    grid-template-columns: 60px repeat(var(--cols, 7), 1fr);
    position: relative;
    min-height: 720px;
}

.ep-cal2-day-grid {
    --cols: 1;
}

.ep-cal2-week-hours {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--c-line);
}

.ep-cal2-week-hour {
    flex: 1;
    min-height: 30px;
    padding: 2px 6px 0 0;
    text-align: right;
    font-size: 10.5px;
    color: var(--c-mute);
    border-bottom: 1px solid var(--c-line-soft);
}

.ep-cal2-week-daycol-timed {
    position: relative;
    border-right: 1px solid var(--c-line);
    display: flex;
    flex-direction: column;
}

.ep-cal2-week-daycol-timed:last-child {
    border-right: 0;
}

.ep-cal2-week-daycol-timed.is-today {
    background: var(--c-today-bg);
}

.ep-cal2-week-slot {
    flex: 1;
    min-height: 30px;
    border-bottom: 1px solid var(--c-line-soft);
    cursor: pointer;
}

.ep-cal2-week-slot:hover {
    background: rgba(232, 52, 122, .03);
}

.ep-cal2-event-timed {
    position: absolute;
    left: 4px;
    right: 4px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 4px 6px;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
}

.ep-cal2-event-desc {
    font-size: 10.5px;
    color: var(--c-mute);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ep-cal2-day-allday {
    display: grid;
    grid-template-columns: 60px 1fr;
    border-bottom: 1px solid var(--c-line);
    padding: 6px;
    gap: 4px;
}

.ep-cal2-agenda {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ep-cal2-agenda-day {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.ep-cal2-agenda-day header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 64px;
    flex-shrink: 0;
}

.ep-cal2-agenda-dn {
    font-size: 28px;
    font-weight: 700;
    color: var(--c-ink);
    line-height: 1;
}

.ep-cal2-agenda-day.is-today .ep-cal2-agenda-dn {
    color: var(--c-accent);
}

.ep-cal2-agenda-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4px;
}

.ep-cal2-agenda-meta strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-ink);
}

.ep-cal2-agenda-meta small {
    font-size: 10.5px;
    color: var(--c-mute);
}

.ep-cal2-agenda-day ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ep-cal2-agenda-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-left: 3px solid var(--ev-color, #888);
    border-radius: 8px;
    text-decoration: none;
    color: var(--c-ink);
    transition: border-color .12s, transform .12s;
}

.ep-cal2-agenda-item:hover {
    border-color: var(--ev-color, #cbd5e1);
    transform: translateY(-1px);
}

.ep-cal2-agenda-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-mute);
}

.ep-cal2-agenda-title {
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    gap: 6px;
}

.ep-cal2-agenda-source {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-mute);
}

.ep-cal2-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-mute);
}

.ep-cal2-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ep-cal2-modal[hidden] {
    display: none;
}

.ep-cal2-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.ep-cal2-modal-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .20);
    max-height: 90vh;
    overflow-y: auto;
    animation: ep-cal2-pop .15s ease-out;
}

@keyframes ep-cal2-pop {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ep-cal2-modal-card-sm {
    max-width: 380px;
}

.ep-cal2-modal-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--c-line-soft);
}

.ep-cal2-modal-card header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--c-ink);
}

.ep-cal2-modal-x {
    background: transparent;
    border: 0;
    width: 28px;
    height: 28px;
    font-size: 22px;
    line-height: 1;
    color: var(--c-mute);
    cursor: pointer;
    border-radius: 6px;
}

.ep-cal2-modal-x:hover {
    background: var(--c-line-soft);
    color: var(--c-ink);
}

.ep-cal2-modal-card form {
    padding: 16px 18px;
}

.ep-cal2-modal-card form label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-mute);
}

.ep-cal2-modal-card form label span {
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ep-cal2-modal-card form input[type="text"],
.ep-cal2-modal-card form input[type="datetime-local"],
.ep-cal2-modal-card form input[type="date"],
.ep-cal2-modal-card form input[type="number"],
.ep-cal2-modal-card form input[type="color"],
.ep-cal2-modal-card form select,
.ep-cal2-modal-card form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: var(--c-ink);
    background: #fff;
}

.ep-cal2-modal-card form input:focus,
.ep-cal2-modal-card form select:focus,
.ep-cal2-modal-card form textarea:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(232, 52, 122, .15);
}

.ep-cal2-modal-card form input[type="color"] {
    height: 38px;
    padding: 4px;
}

.ep-cal2-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ep-cal2-allday-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--c-bg-soft);
    border-radius: 8px;
}

.ep-cal2-allday-row input {
    width: auto !important;
}

.ep-cal2-allday-row span {
    margin-bottom: 0 !important;
    text-transform: none !important;
    font-size: 13px !important;
}

.ep-cal2-modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--c-line-soft);
}

.ep-cal2-jump-form {
    padding-top: 4px;
}

.ep-cal2-jump-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.ep-cal2-detail {
    padding: 16px 18px;
}

.ep-cal2-detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--c-mute);
    font-size: 12.5px;
    margin-bottom: 10px;
}

.ep-cal2-detail-source {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ep-cal2-overflow-list {
    list-style: none;
    padding: 8px 14px 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ep-cal2-overflow-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--ev-color, #888) 10%, #fff);
    border-left: 3px solid var(--ev-color, #888);
    border-radius: 4px;
    color: var(--c-ink);
    text-decoration: none;
    font-size: 13px;
}

.ep-cal2-overflow-item:hover {
    filter: brightness(0.97);
}

.ep-cal2-modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .ep-cal2-cell {
        min-height: 80px;
    }

    .ep-cal2-form-row {
        grid-template-columns: 1fr;
    }

    .ep-cal2-week-grid {
        min-height: 480px;
    }
}

/* ─────────── Project workspace (portal side) ─────────── */

.ep-project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .12s ease, box-shadow .12s ease;
}

.ep-project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(24, 24, 27, 0.12);
}

.ep-card-arrow {
    margin-left: auto;
    opacity: 0;
    transition: opacity .12s ease, transform .12s ease;
}

.ep-project-card:hover .ep-card-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.ep-pw {
    max-width: 1200px;
    margin: 0 auto;
}

.ep-pw-back {
    display: inline-block;
    color: var(--ep-mute, rgba(24, 24, 27, .62));
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 12px;
}

.ep-pw-back:hover {
    color: var(--ep-ink, #18181b);
}

.ep-pw-hero {
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(24, 24, 27, .04);
    flex-wrap: wrap;
}

.ep-pw-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ep-pw-hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
}

.ep-pw-deadline {
    font-weight: 500;
}

.ep-pw-deadline.is-overdue {
    color: #b91c1c;
}

.ep-pw-hero-r {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 200px;
}

.ep-pw-hero-r .ep-progress {
    width: 200px;
}

.ep-pw-progress-label {
    font-size: 12.5px;
    color: var(--ep-mute);
}

.ep-pw-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(24, 24, 27, .08);
    margin-bottom: 20px;
    padding: 0 4px;
}

.ep-pw-tab {
    padding: 10px 16px;
    color: var(--ep-mute);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .12s ease, border-color .12s ease;
}

.ep-pw-tab:hover {
    color: var(--ep-ink);
}

.ep-pw-tab.is-active {
    color: #e8347a;
    border-bottom-color: #e8347a;
}

.ep-pw-tab-n {
    background: rgba(24, 24, 27, .08);
    color: var(--ep-mute);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 600;
}

.ep-pw-tab.is-active .ep-pw-tab-n {
    background: rgba(232, 52, 122, .15);
    color: #e8347a;
}

.ep-pw-tab-n.is-unread {
    background: #e8347a;
    color: #fff;
}

.ep-pw-card {
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 22px 26px;
    box-shadow: 0 2px 8px rgba(24, 24, 27, .04);
}

.ep-pw-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
}

.ep-pw-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 760px) {
    .ep-pw-grid-2 {
        grid-template-columns: 1fr;
    }
}

.ep-pw-overview-stats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ep-pw-overview-stats li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(24, 24, 27, .06);
    font-size: 14px;
}

.ep-pw-overview-stats li:last-child {
    border-bottom: 0;
}

.ep-pw-prose {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ep-ink);
}

.ep-pw-milestone-line {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-pw-milestone-line li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(24, 24, 27, .02);
}

.ep-pw-milestone-line li.is-complete {
    opacity: 0.6;
}

.ep-pw-milestone-line li.is-complete .ep-pw-mile-name {
    text-decoration: line-through;
}

.ep-pw-mile-dot {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(232, 52, 122, .08);
    color: #e8347a;
    font-size: 13px;
    font-weight: 600;
}

.is-complete .ep-pw-mile-dot {
    background: rgba(34, 197, 94, .12);
    color: #15803d;
}

.ep-pw-mile-name {
    flex: 1;
    font-weight: 500;
}

.ep-pw-tasklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-pw-tasklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(24, 24, 27, .02);
}

.ep-pw-tasklist li:hover {
    background: rgba(24, 24, 27, .04);
}

.ep-pw-task-check {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(24, 24, 27, .08);
    color: var(--ep-mute);
    font-size: 13px;
}

.ep-pw-task-check.is-done {
    background: rgba(34, 197, 94, .18);
    color: #15803d;
}

.ep-pw-milestones {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-pw-milestones li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(24, 24, 27, .02);
}

.ep-pw-milestones li.is-complete .ep-pw-mile-name {
    text-decoration: line-through;
    opacity: 0.6;
}

.ep-pw-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(24, 24, 27, .03);
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.ep-pw-add-row input[type="text"],
.ep-pw-add-row input[type="date"],
.ep-pw-add-row input[type="file"],
.ep-pw-add-row select {
    padding: 8px 12px;
    border: 1px solid rgba(24, 24, 27, .08);
    border-radius: 8px;
    font-size: 13.5px;
    background: white;
}

.ep-pw-add-row input[type="text"] {
    flex: 1;
    min-width: 180px;
}

.ep-pw-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-pw-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(24, 24, 27, .03);
    transition: background .12s ease;
}

.ep-pw-file:hover {
    background: rgba(24, 24, 27, .05);
}

.ep-pw-file img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(24, 24, 27, .04);
}

.ep-pw-file-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(24, 24, 27, .04);
    font-size: 24px;
    text-decoration: none;
}

.ep-pw-file-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ep-pw-file-meta a {
    color: var(--ep-ink);
    text-decoration: none;
}

.ep-pw-chat {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 540px;
    overflow-y: auto;
    padding: 4px;
    margin-bottom: 16px;
}

.ep-pw-msg {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(24, 24, 27, .03);
}

.ep-pw-msg.is-team {
    background: rgba(232, 52, 122, .05);
}

.ep-pw-msg-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
}

.ep-pw-msg-avatar {
    width: 36px;
    flex-shrink: 0;
}

.ep-pw-msg-body {
    flex: 1;
    min-width: 0;
}

.ep-pw-msg-head {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 4px;
    font-size: 13px;
}

.ep-pw-msg-content {
    font-size: 14px;
    line-height: 1.5;
}

.ep-pw-msg-content p {
    margin: 0 0 6px;
}

.ep-pw-msg-att {
    display: inline-block;
    margin-top: 6px;
    font-size: 12.5px;
    color: #e8347a;
    text-decoration: none;
}

.ep-pw-chat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(24, 24, 27, .03);
    border-radius: 12px;
}

.ep-pw-chat-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(24, 24, 27, .08);
    border-radius: 10px;
    background: white;
    font-size: 14px;
    resize: vertical;
}

.ep-pw-chat-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.ep-pw-contract {
    padding: 16px 18px;
    background: rgba(24, 24, 27, .03);
    border-radius: 12px;
    margin-bottom: 12px;
}

.ep-pw-contract-head {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ep-pw-contract-link {
    display: inline-block;
    margin: 6px 0;
    color: #e8347a;
    text-decoration: none;
    font-size: 13px;
}

.ep-pw-sign-form {
    margin-top: 12px;
    padding: 14px;
    background: white;
    border-radius: 10px;
    border: 1px dashed rgba(232, 52, 122, .4);
}

.ep-pw-sign-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(24, 24, 27, .12);
    border-radius: 8px;
    margin: 8px 0;
    font-size: 14px;
    font-family: cursive;
}

.ep-pw-cal {
    width: 100%;
    border-collapse: collapse;
}

.ep-pw-cal th {
    padding: 8px;
    font-weight: 600;
    font-size: 12px;
    color: var(--ep-mute);
    text-align: center;
}

.ep-pw-cal td {
    border: 1px solid rgba(24, 24, 27, .06);
    vertical-align: top;
    padding: 6px;
    height: 80px;
    width: 14.28%;
}

.ep-pw-cal td.is-pad {
    background: rgba(24, 24, 27, .02);
}

.ep-pw-cal-day {
    font-size: 12px;
    color: var(--ep-mute);
    display: block;
    margin-bottom: 4px;
}

.ep-pw-cal-evt {
    display: block;
    padding: 2px 6px;
    margin-bottom: 2px;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-btn-link {
    background: none;
    border: 0;
    color: var(--ep-mute);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
}

.ep-btn-link:hover {
    background: rgba(24, 24, 27, .08);
    color: #b91c1c;
}


/* ─── Project locked / view-only ─── */
.ep-locked-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin: 0 0 16px;
    background: linear-gradient(180deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #78350f;
    font-size: 13.5px;
}

.ep-locked-banner .ep-locked-icon {
    flex: none;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 50%;
    font-size: 16px;
}

.ep-locked-banner strong {
    display: block;
    color: #78350f;
    font-weight: 600;
    margin-bottom: 2px;
}

.ep-locked-banner .ep-muted {
    display: block;
    color: #92400e;
    font-size: 12.5px;
    line-height: 1.45;
}

.ep-pw-chat-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    margin-top: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
}

/* ─── NPS feedback card ─── */
.ep-nps-card {
    background: linear-gradient(180deg, #fef3c7, #fff 80%);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 22px 24px;
    margin: 0 0 16px;
}

.ep-nps-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #78350f;
}

.ep-nps-card p {
    margin: 0 0 14px;
    font-size: 13px;
    color: #92400e;
}

.ep-nps-scale {
    border: 0;
    padding: 0;
    margin: 0 0 12px;
}

.ep-nps-scale legend {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

.ep-nps-scale-row {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 6px;
}

.ep-nps-score input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ep-nps-score span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    user-select: none;
    transition: background .12s, border-color .12s, color .12s, transform .06s;
}

.ep-nps-score:hover span {
    border-color: #cbd5e1;
}

.ep-nps-score input:checked+span {
    background: #18181b;
    color: #fff;
    border-color: #18181b;
    transform: scale(1.05);
}

.ep-nps-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}

.ep-nps-comment {
    display: block;
    margin: 14px 0 12px;
}

.ep-nps-comment>span {
    display: block;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 4px;
}

.ep-nps-comment textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    resize: vertical;
}

.ep-nps-share {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 14px;
}

/* ─── Help center ─── */
.ep-help {
    max-width: 1080px;
    margin: 0 auto;
}

.ep-help-hero {
    background: linear-gradient(180deg, #fff7fa 0%, #ffffff 100%);
    border: 1px solid #fbcfe8;
    border-radius: 16px;
    padding: 44px 32px 40px;
    margin: 0 0 32px;
    text-align: center;
}

.ep-help-hero h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.ep-help-hero-sub {
    margin: 0 auto 22px;
    max-width: 560px;
    font-size: 14.5px;
    line-height: 1.5;
    color: #64748b;
}

.ep-help-hero-sub a {
    color: var(--ep-pink-deep);
    text-decoration: none;
    font-weight: 600;
}

.ep-help-hero-sub a:hover {
    text-decoration: underline;
}

.ep-help-search {
    display: flex;
    align-items: stretch;
    gap: 8px;
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.ep-help-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}

.ep-help-search-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.ep-help-search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 12px 14px 12px 42px;
    border: 1px solid #fbcfe8;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s, box-shadow .15s;
}

.ep-help-search input[type="search"]::placeholder {
    color: #94a3b8;
}

.ep-help-search input[type="search"]:focus {
    outline: none;
    border-color: var(--ep-pink-deep);
    box-shadow: 0 0 0 3px rgba(232, 52, 122, 0.15);
}

.ep-help-search-btn {
    flex: 0 0 auto;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--ep-pink-deep);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .06s;
}

.ep-help-search-btn:hover {
    background: #c5286a;
}

.ep-help-search-btn:active {
    transform: translateY(1px);
}

.ep-help-result-meta {
    margin: 0 0 16px;
    font-size: 13px;
}

.ep-help-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ep-help-section {
    margin: 0;
}

.ep-help-section-title {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.ep-help-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.ep-help-list li {
    display: flex;
}

.ep-help-list li a {
    flex: 1;
    display: block;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition: border-color .14s, box-shadow .14s, transform .06s;
}

.ep-help-list li a:hover {
    border-color: #fbcfe8;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.ep-help-list li a strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #0f172a;
}

.ep-help-list li a small {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.ep-help-empty {
    padding: 32px 20px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.ep-help-empty h2 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #475569;
}

.ep-help-empty p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
}

.ep-help-doc {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 36px;
    margin-top: 12px;
}

.ep-help-doc-head {
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid #f1f5f9;
}

.ep-help-doc-cats {
    margin-bottom: 8px;
}

.ep-help-doc-head h1 {
    margin: 0 0 4px;
    font-size: 26px;
    color: #0f172a;
    line-height: 1.2;
}

.ep-help-doc-body {
    font-size: 15px;
    line-height: 1.65;
    color: #1e293b;
}

.ep-help-doc-body p {
    margin: 0 0 14px;
}

.ep-help-doc-body h2 {
    margin: 28px 0 12px;
    font-size: 18px;
    color: #0f172a;
}

.ep-help-doc-body code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.ep-help-doc-body kbd {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 4px;
    background: #f8fafc;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    vertical-align: 1px;
}

.ep-help-doc-body ul,
.ep-help-doc-body ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.ep-help-doc-body li {
    margin-bottom: 6px;
}

.ep-help-doc-body a {
    color: var(--ep-pink-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ep-help-doc-body a:hover {
    text-decoration-thickness: 2px;
}

.ep-help-figure {
    margin: 22px 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.ep-help-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.ep-help-callout {
    display: block;
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 3px solid currentColor;
    font-size: 14px;
    line-height: 1.55;
}

.ep-help-callout strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ep-help-callout p {
    margin: 0;
    color: #1e293b;
}

.ep-help-callout-tip {
    background: rgba(232, 52, 122, 0.05);
    color: var(--ep-pink-deep);
}

.ep-help-callout-note {
    background: #eff6ff;
    color: #1d4ed8;
}

.ep-help-callout-warn {
    background: #fff7ed;
    color: #c2410c;
}

.ep-help-doc-foot {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 13px;
}

/* ─── Onboarding videos ─── */
.ep-videos {
    background: linear-gradient(135deg, #fef2f7 0%, #fff 60%, #f0fdf4 100%);
    border: 1px solid #fbcfe8;
    border-radius: 16px;
    padding: 22px 24px;
    margin: 0 0 18px;
}

.ep-videos-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ep-videos-head h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #831843;
}

.ep-videos-head h3 span {
    margin-right: 6px;
}

.ep-videos-head p {
    margin: 0;
    font-size: 13px;
    color: #be185d;
}

.ep-videos-dismiss {
    margin: 0;
}

.ep-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.ep-videos-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .12s, box-shadow .12s;
}

.ep-videos-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.ep-videos-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.ep-videos-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ep-videos-meta {
    padding: 12px 14px;
}

.ep-videos-meta strong {
    display: block;
    font-size: 13.5px;
    color: #0f172a;
    margin-bottom: 2px;
}

.ep-videos-meta small {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

/* ─── Help dropdown (sidebar — simple inline submenu) ─── */
.ep-nav-help {
    display: block;
}

.ep-nav-help-toggle {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.ep-nav-help-toggle .ep-nav-help-caret {
    width: 14px;
    height: 14px;
    margin-left: auto;
    opacity: .5;
    transition: transform .18s ease, opacity .18s ease;
}

.ep-nav-help.is-open .ep-nav-help-toggle .ep-nav-help-caret {
    transform: rotate(180deg);
    opacity: 1;
}

.ep-nav-help-sub {
    list-style: none;
    margin: 4px 0 6px;
    padding: 0;
    max-width: 100%;
}

.ep-nav-help-sub li {
    margin: 0;
}

.ep-nav-help-sub a {
    display: block;
    padding: 7px 10px 7px 42px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--ep-mute);
    text-decoration: none;
    transition: background .12s, color .12s;
}

.ep-nav-help-sub a:hover {
    background: var(--ep-cream);
    color: var(--ep-ink);
}

/* ─── Help dropdown (topbar) ─── */
.ep-help-wrap {
    position: relative;
}

.ep-help-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ep-help-trigger svg {
    width: 16px;
    height: 16px;
}

.ep-help-trigger .ep-help-caret {
    width: 13px;
    height: 13px;
    opacity: .65;
    transition: transform .18s ease;
}

.ep-help-wrap.is-open .ep-help-trigger .ep-help-caret {
    transform: rotate(180deg);
    opacity: 1;
}

.ep-help-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    max-width: calc(100vw - 32px);
    padding: 6px;
    background: #fff;
    border: 1px solid var(--ep-line);
    border-radius: 14px;
    box-shadow: 0 24px 56px -16px rgba(24, 24, 27, 0.18), 0 8px 16px -8px rgba(24, 24, 27, 0.06);
    z-index: 50;
    animation: ep-help-menu-in .14s ease both;
}

@keyframes ep-help-menu-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ep-help-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .12s ease;
}

.ep-help-menu-item:hover,
.ep-help-menu-item:focus-visible {
    background: rgba(232, 52, 122, 0.06);
    outline: none;
}

.ep-help-menu-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(232, 52, 122, 0.10);
    color: var(--ep-pink-deep);
}

.ep-help-menu-icon svg {
    width: 18px;
    height: 18px;
}

.ep-help-menu-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
}

.ep-help-menu-text strong {
    font-size: 13.5px;
    color: #0f172a;
    font-weight: 600;
}

.ep-help-menu-text small {
    font-size: 11.5px;
    color: var(--ep-mute);
}