/**
 * Premium Full-Screen SaaS Portal Stylesheet - California Landlords Union
 * Hides standard theme layout frames to render a dedicated, clean portal interface.
 * 
 * DESIGN SYSTEM CONFIGURATION:
 * - Background: #F5F7FB
 * - Primary: #1B365F
 * - Accent: #F5A623
 * - Success: #17B26A
 * - Text: #1F2937
 * - Cards: White (#FFFFFF)
 * - Border Radius: 20px
 * - Shadow: 0 20px 50px rgba(0,0,0, 0.08)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   HIDE DEFAULT THEME LAYOUT (Astra Theme wrappers)
   ========================================================================== */
body.page-id-255,
body.page-id-255 #page,
body.page-id-255 .site {
    background-color: #F5F7FB !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
}

/* Header stays hidden for the full-screen portal; the sitewide FOOTER is
   intentionally visible again (client request) — the sidebar is sticky and
   stops before it instead of overlapping. */
body.page-id-255 #masthead,
body.page-id-255 .site-header,
.page-template-page-membership-account-php #masthead,
.page-template-page-membership-account-php .site-header,
.page-template-page-membership-account #masthead,
.page-template-page-membership-account .site-header {
    display: none !important;
}

body.page-id-255 .site-content,
body.page-id-255 .ast-container,
body.page-id-255 #primary,
body.page-id-255 #main,
body.page-id-255 .site-main,
body.page-id-255 article,
body.page-id-255 .entry-content,
body.page-id-255 .page-content,
body.page-id-255 .ast-article-single,
body.page-id-255 .ast-single-post,
body.page-id-255 .ast-page-builder-template,
body.page-id-255 .site-content > .ast-container,
.page-template-page-membership-account-php .site-content,
.page-template-page-membership-account-php .ast-container,
.page-template-page-membership-account-php #primary,
.page-template-page-membership-account-php #main,
.page-template-page-membership-account-php article,
.page-template-page-membership-account-php .entry-content,
.page-template-page-membership-account .site-content,
.page-template-page-membership-account .ast-container,
.page-template-page-membership-account #primary,
.page-template-page-membership-account article,
.page-template-page-membership-account .entry-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    float: none !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   SAAS SIDEBAR APP SHELL
   ========================================================================== */
.clu-app-layout {
    display: flex !important;
    align-items: stretch;
    min-height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    background-color: #F5F7FB;
    font-family: 'Inter', sans-serif !important;
    color: #1F2937 !important;
    box-sizing: border-box;
    /* overflow-x: hidden would create a scroll container and BREAK the
       sticky sidebar — clip gives the same protection without doing that */
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Styling — sticky (not fixed) so it scrolls away before the
   sitewide footer instead of overlapping it */
.clu-app-sidebar {
    width: 280px;
    flex: 0 0 280px;
    background: #1B365F;
    color: #ffffff;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.08);
    z-index: 1000;
    box-sizing: border-box;
}

.clu-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    color: #ffffff;
}

.clu-brand-icon {
    color: #F5A623;
}

.clu-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.clu-sidebar-nav {
    flex-grow: 1;
}

.clu-sidebar-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clu-sidebar-nav li {
    margin: 0 !important;
    padding: 0 !important;
}

/* Nav Item Styling */
.clu-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #a3b8cc !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.clu-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
}

.clu-nav-item.active {
    background: #F5A623 !important;
    color: #1B365F !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.25);
}

.clu-nav-item svg {
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.clu-nav-item:hover svg {
    transform: scale(1.05);
}

/* Sidebar Footer logout style */
.clu-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clu-home-link {
    display: flex;
    align-items: center;
    color: #a3b8cc !important;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.clu-home-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff !important;
}

.clu-logout-link {
    display: flex;
    align-items: center;
    color: #fca5a5 !important;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.clu-logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content Panel Frame (sidebar is in-flow/sticky, so no offset margin) */
.clu-app-main {
    margin-left: 0;
    width: auto !important;
    min-width: 0 !important;
    flex: 1 !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar Header */
.clu-app-topbar {
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
}

#clu-active-tab-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1B365F !important;
    margin: 0;
    letter-spacing: -0.02em;
}

.clu-topbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.clu-topbar-user-badge {
    border-right: 1px solid #e2e8f0;
    padding-right: 20px;
}

.clu-topbar-status {
    display: inline-block;
    background: rgba(23, 178, 106, 0.12);
    color: #17B26A;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}

.clu-topbar-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clu-topbar-user-profile img {
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #F5A623;
    transition: box-shadow 0.2s ease;
}

.clu-topbar-username {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
}

/* Scrollable Content wrapper */
.clu-app-content {
    padding: 40px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Tab Panel show/hide controls */
.clu-tab-panel {
    display: none;
}

.clu-tab-panel.active {
    display: block;
    animation: panelFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Staggered entrance reveal: direct children of the active panel rise in
   one after another every time a tab is opened (display toggle restarts it) ── */
.clu-tab-panel.active > * {
    animation: riseIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.clu-tab-panel.active > *:nth-child(1) { animation-delay: 0.05s; }
.clu-tab-panel.active > *:nth-child(2) { animation-delay: 0.14s; }
.clu-tab-panel.active > *:nth-child(3) { animation-delay: 0.23s; }
.clu-tab-panel.active > *:nth-child(4) { animation-delay: 0.32s; }
.clu-tab-panel.active > *:nth-child(5) { animation-delay: 0.41s; }

/* Quick-action cards cascade in as a second wave */
.clu-tab-panel.active .clu-quick-grid > * {
    animation: riseIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.clu-tab-panel.active .clu-quick-grid > *:nth-child(1) { animation-delay: 0.18s; }
.clu-tab-panel.active .clu-quick-grid > *:nth-child(2) { animation-delay: 0.26s; }
.clu-tab-panel.active .clu-quick-grid > *:nth-child(3) { animation-delay: 0.34s; }
.clu-tab-panel.active .clu-quick-grid > *:nth-child(4) { animation-delay: 0.42s; }
.clu-tab-panel.active .clu-quick-grid > *:nth-child(5) { animation-delay: 0.50s; }
.clu-tab-panel.active .clu-quick-grid > *:nth-child(6) { animation-delay: 0.58s; }

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hero metric cards get a gentle float-in with the hero */
.clu-tab-panel.active .clu-hero-metrics > * {
    animation: riseIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.clu-tab-panel.active .clu-hero-metrics > *:nth-child(1) { animation-delay: 0.20s; }
.clu-tab-panel.active .clu-hero-metrics > *:nth-child(2) { animation-delay: 0.28s; }
.clu-tab-panel.active .clu-hero-metrics > *:nth-child(3) { animation-delay: 0.36s; }
.clu-tab-panel.active .clu-hero-metrics > *:nth-child(4) { animation-delay: 0.44s; }

/* Sidebar nav items slide in once on page load (desktop sidebar only —
   skipped on the mobile bottom tab bar where a slide would look wrong) */
@media (min-width: 769px) {
    .clu-sidebar-nav li {
        animation: navSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .clu-sidebar-nav li:nth-child(1) { animation-delay: 0.05s; }
    .clu-sidebar-nav li:nth-child(2) { animation-delay: 0.10s; }
    .clu-sidebar-nav li:nth-child(3) { animation-delay: 0.15s; }
    .clu-sidebar-nav li:nth-child(4) { animation-delay: 0.20s; }
    .clu-sidebar-nav li:nth-child(5) { animation-delay: 0.25s; }
    .clu-sidebar-nav li:nth-child(6) { animation-delay: 0.30s; }
    .clu-sidebar-nav li:nth-child(7) { animation-delay: 0.35s; }
}

@keyframes navSlideIn {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .clu-tab-panel.active,
    .clu-tab-panel.active > *,
    .clu-tab-panel.active .clu-quick-grid > *,
    .clu-tab-panel.active .clu-hero-metrics > *,
    .clu-sidebar-nav li {
        animation: none !important;
    }
}

/* ==========================================================================
   REUSABLE PORTAL COMPONENT STYLES
   ========================================================================== */

/* Hero Banner */
.clu-premium-hero {
    background: linear-gradient(135deg, #1B365F 0%, #0d2347 100%);
    border-radius: 20px;
    padding: 40px;
    color: #ffffff !important;
    box-shadow: 0 20px 50px rgba(23, 62, 123, 0.08);
    position: relative;
    overflow: hidden;
    margin-bottom: 32px; /* consistent 32px vertical rhythm across Overview */
}

.clu-hero-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.clu-hero-info {
    flex: 7;
}

.clu-hero-badge {
    display: inline-block;
    background: rgba(245, 166, 35, 0.18);
    color: #F5A623;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 30px;
    margin-bottom: 14px;
    letter-spacing: 0.03em;
}

.clu-hero-info h1 {
    font-size: 2rem;
    color: #ffffff !important;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
}

.clu-hero-info p {
    font-size: 0.98rem;
    color: #93c5fd !important;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.clu-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.clu-metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.clu-metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.clu-metric-value {
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 700;
}

.clu-metric-status {
    display: inline-block;
    align-self: flex-start;
    margin-top: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.clu-metric-status.active {
    background: rgba(23, 178, 106, 0.2);
    color: #17B26A;
}

.clu-metric-status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.clu-hero-actions {
    flex: 3;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clu-hero-actions h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0 0 2px 0;
    text-align: center;
}

/* General Button style templates */
.clu-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 11px 22px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    box-sizing: border-box;
}

.clu-btn-block {
    display: flex;
    width: 100%;
}

.clu-btn-primary {
    background: #F5A623;
    color: #1B365F !important;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.25);
}

.clu-btn-primary:hover {
    background: #e09216;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 166, 35, 0.35);
}

.clu-btn-secondary {
    background: transparent;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.clu-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* On white cards (e.g. Union Support Details) the secondary button needs
   dark styling — the default white-on-transparent is invisible there */
.clu-support-actions .clu-btn-secondary {
    color: #1B365F !important;
    border-color: #1B365F;
}

.clu-support-actions .clu-btn-secondary:hover {
    background: rgba(27, 54, 95, 0.06);
    border-color: #1B365F;
}

/* Quick Actions Cards list */
.clu-section-subtitle-dark {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F2937 !important;
    margin-bottom: 20px;
}

.clu-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.clu-quick-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    text-decoration: none !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.clu-quick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    border-color: rgba(23, 62, 123, 0.12);
}

.clu-quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.clu-quick-card:hover .clu-quick-icon {
    transform: scale(1.08);
}

.clu-quick-icon svg {
    width: 20px;
    height: 20px;
}

.clu-quick-icon.academy { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
.clu-quick-icon.forms { background: rgba(23, 178, 106, 0.08); color: #17B26A; }
.clu-quick-icon.resources { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
.clu-quick-icon.support { background: rgba(245, 166, 35, 0.08); color: #F5A623; }
.clu-quick-icon.newsletter { background: rgba(244, 63, 94, 0.08); color: #f43f5e; }

.clu-quick-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #1F2937 !important;
}

.clu-quick-card p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Recent Activity (Overview tab) */
.clu-activity-wrapper {
    margin-top: 32px;
}

.clu-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.clu-activity-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clu-activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    border-color: rgba(23, 62, 123, 0.12);
}

.clu-activity-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.clu-activity-head .clu-quick-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 0;
    flex: 0 0 38px;
}

.clu-activity-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.clu-activity-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.clu-activity-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 14px 0;
}

.clu-activity-empty {
    margin-top: 4px;
}

.clu-activity-status {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.12);
    color: #b07407;
    font-size: 0.72rem;
    font-weight: 700;
}

.clu-activity-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.clu-activity-progress-row .clu-course-progress-bar {
    flex: 1;
    margin: 0;
}

.clu-activity-progress-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1B365F;
}

.clu-activity-link {
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1B365F !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.clu-activity-link:hover {
    color: #F5A623 !important;
}

@media (max-width: 1200px) {
    .clu-activity-grid {
        grid-template-columns: 1fr;
    }
}

/* Sections General Structure */
.clu-dashboard-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

/* Course Grid */
.clu-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.clu-course-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.clu-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
    border-color: rgba(23, 62, 123, 0.12);
}

.clu-course-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.clu-course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(23, 62, 123, 0.95);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 5px;
}

.clu-course-badge.progress {
    background: rgba(23, 178, 106, 0.95);
}

.clu-course-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.clu-course-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1F2937 !important;
    line-height: 1.4;
}

.clu-course-content p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.clu-course-meta {
    margin-top: auto;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

.clu-course-progress-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.clu-progress-fill {
    height: 100%;
    background: #17B26A;
}

.clu-course-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    background: #1B365F;
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 30px;
    transition: all 0.2s ease;
    text-align: center;
}

.clu-course-btn:hover {
    background: #0d2347;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
}

.clu-empty-state {
    text-align: center;
    padding: 56px 30px;
    background: linear-gradient(180deg, #f8fafc 0%, #F5F7FB 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.clu-empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(27, 54, 95, 0.06);
    color: #1B365F;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.clu-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 8px 0;
}

.clu-empty-state p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

.clu-empty-state .clu-btn {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
}

/* Notice/Forms Cards */
.clu-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.clu-resource-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    align-items: center;
    text-decoration: none !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 14px;
}

.clu-resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(23, 62, 123, 0.12);
}

.clu-resource-icon {
    width: 40px;
    height: 40px;
    background: rgba(23, 62, 123, 0.06);
    color: #1B365F;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.clu-resource-body h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #1F2937 !important;
}

.clu-resource-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
}

.clu-resource-action {
    color: #94a3b8;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.clu-resource-card:hover .clu-resource-action {
    color: #1B365F;
    transform: translateY(2px);
}

/* Support and Intake Grid */
.clu-support-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 30px;
}

.clu-support-info-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.clu-support-info-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.clu-support-info-card p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

.clu-contact-channels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.clu-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clu-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(23, 62, 123, 0.08);
    color: #1B365F;
    display: flex;
    justify-content: center;
    align-items: center;
}

.clu-contact-item span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.clu-contact-item strong {
    font-size: 0.9rem;
    color: #1F2937;
}

.clu-support-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.clu-support-form-card h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
}

/* Fluent Form UI Overrides — match the portal design system */
.clu-form-intro {
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.6;
    margin: -10px 0 22px 0;
}

.fluentform .ff-el-group {
    margin-bottom: 18px !important;
}

.fluentform .ff-el-input--label label {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 6px !important;
}

.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform input[type="number"],
.fluentform input[type="url"],
.fluentform input[type="date"],
.fluentform textarea,
.fluentform select {
    width: 100% !important;
    padding: 12px 16px !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-family: 'Inter', sans-serif !important;
    color: #1F2937 !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
}

.fluentform input[type="text"]:focus,
.fluentform input[type="email"]:focus,
.fluentform input[type="tel"]:focus,
.fluentform input[type="number"]:focus,
.fluentform input[type="url"]:focus,
.fluentform input[type="date"]:focus,
.fluentform textarea:focus,
.fluentform select:focus {
    background-color: #ffffff !important;
    border-color: #1B365F !important;
    box-shadow: 0 0 0 4px rgba(27, 54, 95, 0.08) !important;
}

.fluentform ::placeholder {
    color: #94a3b8 !important;
}

.fluentform textarea {
    min-height: 110px !important;
    resize: vertical !important;
}

.fluentform .ff-el-form-check-label {
    font-size: 0.88rem !important;
    color: #475569 !important;
}

.fluentform button[type="submit"] {
    background: linear-gradient(135deg, #1B365F 0%, #0d2347 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    font-family: 'Inter', sans-serif !important;
    padding: 13px 32px !important;
    border: none !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    box-shadow: 0 6px 16px rgba(27, 54, 95, 0.25) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.fluentform button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 24px rgba(27, 54, 95, 0.35) !important;
}

.fluentform button[type="submit"]:active {
    transform: translateY(0) !important;
}

/* Fluent Forms success / error messaging */
.fluentform .ff-message-success {
    background: rgba(23, 178, 106, 0.08) !important;
    border: 1px solid rgba(23, 178, 106, 0.35) !important;
    color: #0f7a48 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    font-size: 0.9rem !important;
}

.fluentform .ff-el-is-error input,
.fluentform .ff-el-is-error textarea,
.fluentform .ff-el-is-error select {
    border-color: #ef4444 !important;
}

.fluentform .error,
.fluentform .text-danger {
    font-size: 0.78rem !important;
    color: #ef4444 !important;
}

/* Newsletter Briefing */
/* "Edition" badge on briefing cards (was previously unstyled) */
.clu-date-badge {
    display: inline-block;
    flex: 0 0 auto;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.12);
    color: #b07407;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.clu-newsletter-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.clu-newsletter-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clu-newsletter-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.clu-newsletter-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.clu-newsletter-section h4 {
    font-size: 0.98rem;
    color: #1B365F !important;
    margin-bottom: 8px;
}

.clu-newsletter-section p,
.clu-newsletter-section li {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
}

/* Generic editor content inside dynamic announcement cards
   (client writes these freely in the block editor) */
.clu-newsletter-card + .clu-newsletter-card {
    margin-top: 24px;
}

.clu-newsletter-body h2,
.clu-newsletter-body h3,
.clu-newsletter-body h4 {
    font-size: 0.98rem;
    color: #1B365F !important;
    margin: 0 0 8px 0;
}

.clu-newsletter-body p,
.clu-newsletter-body li {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.clu-newsletter-body ul,
.clu-newsletter-body ol {
    padding-left: 20px;
    margin: 0 0 12px 0;
}

.clu-newsletter-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Protection Center category groups */
.clu-kb-category-block {
    margin-bottom: 36px;
}

.clu-kb-category-block .clu-section-subtitle-dark {
    margin-bottom: 16px;
}

/* ==========================================================================
   KB ARTICLE SINGLE VIEW (single-clu_kb_article.php)
   ========================================================================== */
.clu-kb-single-wrap {
    background: #F5F7FB;
    min-height: 70vh;
    padding: 48px 20px;
    font-family: 'Inter', sans-serif;
}

.clu-kb-single-card {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    padding: 40px;
}

.clu-kb-back-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1B365F !important;
    text-decoration: none !important;
    margin-bottom: 24px;
}

.clu-kb-back-link:hover {
    text-decoration: underline !important;
}

.clu-kb-single-badge {
    display: inline-block;
    background: rgba(245, 166, 35, 0.14);
    color: #b07310;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.clu-kb-single-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1B365F;
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
}

.clu-kb-single-meta {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0 0 28px 0;
}

.clu-kb-single-content p,
.clu-kb-single-content li {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.75;
}

.clu-kb-single-content h2,
.clu-kb-single-content h3,
.clu-kb-single-content h4 {
    color: #1B365F;
    margin: 24px 0 10px 0;
}

.clu-kb-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .clu-kb-single-card {
        padding: 24px;
    }
    .clu-kb-single-title {
        font-size: 1.4rem;
    }
}

/* Membership profile details */
.clu-membership-management {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 30px;
}

.clu-profile-summary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    gap: 20px;
}

.clu-profile-avatar img {
    border-radius: 50%;
}

.clu-profile-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.clu-profile-meta-grid span {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #94a3b8;
}

.clu-profile-meta-grid strong {
    font-size: 0.82rem;
}

/* Billing table */
.clu-billing-history {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.clu-billing-table th {
    background: #f8fafc;
    color: #1B365F;
    font-size: 0.78rem;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 2px solid #e2e8f0;
}

.clu-billing-table td {
    padding: 12px 14px;
    font-size: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.clu-status-badge.paid,
.clu-status-badge.success {
    background: rgba(23, 178, 106, 0.12);
    color: #17B26A;
}

/* Topbar Home Button */
.clu-topbar-home {
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    border-radius: 8px !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.clu-topbar-home:hover {
    background: #f1f5f9 !important;
    color: #1B365F !important;
    transform: scale(1.05) !important;
}

/* Topbar Logout Button */
.clu-topbar-logout {
    color: #ef4444 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 12px !important;
    padding: 6px !important;
    border-radius: 8px !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

.clu-topbar-logout:hover {
    background: #fee2e2 !important;
    transform: scale(1.05) !important;
}

.clu-topbar-logout svg {
    display: block !important;
}

/* Mobile responsive navigation shell */
@media (max-width: 1024px) {
    .clu-app-sidebar {
        width: 80px !important;
        flex-basis: 80px !important;
        padding: 30px 10px !important;
    }
    .clu-brand-name {
        display: none !important;
    }
    .clu-sidebar-brand {
        justify-content: center !important;
        margin-bottom: 30px !important;
    }
    .clu-nav-item {
        justify-content: center !important;
        padding: 14px 0 !important;
        font-size: 0 !important; /* hides text, keeps icon */
    }
    .clu-nav-item svg {
        margin: 0 !important;
        width: 22px !important;
        height: 22px !important;
    }
    .clu-logout-link {
        justify-content: center !important;
        font-size: 0 !important;
        padding: 10px 0 !important;
    }
    .clu-app-main {
        margin-left: 0 !important;
        width: auto !important;
    }
    .clu-quick-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .clu-app-layout {
        flex-direction: column !important;
    }

    /* ── Apple-Style Bottom Tab Bar ── */
    .clu-app-sidebar {
        display: flex !important;
        width: 100% !important;
        height: 56px !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        padding: 0 !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: stretch !important;
        border-top: 1px solid rgba(0,0,0,0.06) !important;
        box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.06) !important;
        border-radius: 0 !important;
        z-index: 99999 !important;
        background: #ffffff !important;
        -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
        backdrop-filter: saturate(180%) blur(20px) !important;
    }
    .clu-sidebar-brand,
    .clu-sidebar-footer {
        display: none !important;
    }
    /* Sitewide footer is visible again — keep it clear of the fixed bottom tab bar */
    .page-template-page-membership-account-php .site-footer,
    .page-template-page-membership-account-php footer.site-footer,
    body.page-id-255 .site-footer {
        padding-bottom: 72px !important;
    }
    .clu-sidebar-nav {
        display: flex !important;
        width: 100% !important;
        margin: 0 !important;
        height: 100% !important;
    }
    .clu-sidebar-nav ul {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: stretch !important;
        width: 100% !important;
        height: 100% !important;
        gap: 0 !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .clu-sidebar-nav li {
        flex: 1 !important;
        display: flex !important;
    }
    .clu-nav-item {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px 0 2px 0 !important;
        font-size: 0 !important;
        gap: 0 !important;
        border-radius: 0 !important;
        flex: 1 !important;
        color: #8e8e93 !important;
        text-align: center !important;
        background: transparent !important;
        position: relative !important;
        transition: color 0.2s ease !important;
        text-decoration: none !important;
    }
    .clu-nav-item svg {
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
        stroke-width: 1.8 !important;
        transition: transform 0.2s ease !important;
    }
    .clu-nav-item.active {
        background: transparent !important;
        color: #1B365F !important;
        box-shadow: none !important;
        font-weight: 400 !important;
    }
    .clu-nav-item.active svg {
        stroke-width: 2.4 !important;
        transform: scale(1.1) !important;
    }
    .clu-nav-item.active::after {
        content: '' !important;
        display: block !important;
        width: 5px !important;
        height: 5px !important;
        border-radius: 50% !important;
        background: #1B365F !important;
        position: absolute !important;
        bottom: 3px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    /* ── Main Content Area ── */
    .clu-app-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding-bottom: 66px !important;
    }

    /* ── Topbar Header ── */
    .clu-app-topbar {
        padding: 0 16px !important;
        height: 52px !important;
        gap: 8px !important;
    }
    #clu-active-tab-title {
        font-size: 1.05rem !important;
        white-space: nowrap !important;
    }
    .clu-topbar-user {
        gap: 10px !important;
    }
    .clu-topbar-user-badge {
        padding-right: 10px !important;
    }
    .clu-topbar-status {
        font-size: 0.6rem !important;
        padding: 3px 6px !important;
    }
    .clu-topbar-username {
        display: none !important;
    }
    .clu-topbar-user-profile img {
        width: 28px !important;
        height: 28px !important;
    }
    .clu-topbar-logout {
        margin-left: 4px !important;
        padding: 4px !important;
    }

    /* ── Content Sections ── */
    .clu-app-content {
        padding: 16px !important;
    }
    .clu-dashboard-section {
        padding: 20px !important;
        border-radius: 14px !important;
    }
    .clu-section-title {
        font-size: 1.15rem !important;
    }
    .clu-section-subtitle {
        font-size: 0.82rem !important;
    }

    /* ── Grid Collapses ── */
    .clu-quick-grid,
    .clu-courses-grid,
    .clu-resources-grid,
    .clu-support-grid,
    .clu-membership-management {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .clu-profile-summary {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 20px !important;
    }
    .clu-profile-meta-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    .clu-newsletter-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* ── Hero Card Mobile ── */
    .clu-premium-hero {
        padding: 20px !important;
        border-radius: 16px !important;
    }
    .clu-hero-main {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }
    .clu-hero-metrics {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .clu-hero-metric-item {
        padding: 10px !important;
    }
    .clu-hero-actions {
        padding: 14px !important;
        border-radius: 12px !important;
    }
    .clu-btn-support,
    .clu-btn-ai {
        font-size: 0.82rem !important;
        padding: 10px 16px !important;
    }

    /* ── Billing responsive ── */
    .clu-billing-profile-card {
        padding: 24px 16px !important;
    }
    .clu-billing-info-grid {
        grid-template-columns: 1fr !important;
    }
    .clu-billing-actions {
        flex-direction: column !important;
    }
    .clu-billing-history-card,
    .clu-property-info-card {
        padding: 20px 16px !important;
    }
    .clu-billing-table {
        min-width: 500px !important;
    }
    .clu-table-responsive {
        overflow-x: auto !important;
    }
}

/* ==========================================================================
   BILLING PROFILE CARD (Premium Redesign)
   ========================================================================== */
.clu-billing-profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.clu-billing-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.clu-billing-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.clu-billing-avatar-wrap img {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50% !important;
    border: 3px solid #e2e8f0 !important;
    box-shadow: 0 4px 16px rgba(23, 62, 123, 0.1) !important;
}

.clu-billing-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #17B26A;
    border: 3px solid #ffffff;
}

.clu-billing-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.clu-billing-email {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.clu-billing-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1B365F, #2563eb);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 16px;
    border-radius: 20px;
    margin-top: 4px;
}

.clu-billing-level-badge svg {
    stroke: #F5A623;
}

.clu-billing-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.clu-billing-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 16px;
    text-align: left;
}

.clu-billing-info-item svg {
    color: #1B365F;
    flex-shrink: 0;
}

.clu-billing-info-item span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.clu-billing-info-item strong {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
}

.clu-billing-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.clu-billing-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    color: #1B365F !important;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.clu-billing-action-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.clu-billing-action-btn.clu-billing-action-logout {
    color: #ef4444 !important;
    background: #fef2f2;
    border-color: #fecaca;
}

.clu-billing-action-btn.clu-billing-action-logout:hover {
    background: #fee2e2;
}

/* Billing History Card */
.clu-billing-history-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

/* Property Information card (Phase 2 extended profile fields) */
.clu-property-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
}

.clu-property-info-card .clu-billing-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.clu-property-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.clu-property-info-grid {
    border-top: none;
    padding-top: 0;
    margin-top: 4px;
}

.clu-property-missing {
    color: #94a3b8;
    font-style: italic;
    font-weight: 500;
}

.clu-property-info-empty {
    text-align: center;
    padding: 28px 20px 12px;
}

.clu-property-info-empty p {
    color: #64748b;
    font-size: 0.9rem;
    max-width: 480px;
    margin: 0 auto 18px;
    line-height: 1.6;
}

/* Overview nudge wrapper: same progress component, shown only while incomplete.
   Flex row — the wrapper is the card, the progress bar flexes, and the CTA is
   a normal flex item so the two can never overlap at any viewport width. */
.clu-overview-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 32px;
}

.clu-overview-progress .clu-profile-progress {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.clu-overview-progress-cta {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1B365F !important;
    text-decoration: none !important;
    background: rgba(245, 166, 35, 0.14);
    padding: 9px 16px;
    border-radius: 999px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clu-overview-progress-cta:hover {
    background: #F5A623;
    color: #1B365F !important;
    box-shadow: 0 6px 14px rgba(245, 166, 35, 0.3);
}

@media (max-width: 768px) {
    .clu-overview-progress {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .clu-overview-progress-cta {
        align-self: flex-start;
    }
}

/* Profile completion progress (Billing tab card + Member Profile Edit page) */
.clu-profile-progress {
    background: #F5F7FB;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 4px 0 22px;
}

.clu-profile-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.clu-profile-progress-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.clu-profile-progress-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1B365F;
}

.clu-profile-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.clu-profile-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1B365F 0%, #F5A623 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.clu-profile-progress-note {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 8px 0 0;
}

.clu-profile-progress-complete {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(23, 178, 106, 0.08);
    border-color: rgba(23, 178, 106, 0.25);
    color: #17B26A;
    font-weight: 700;
    font-size: 0.95rem;
}

.clu-profile-progress-complete svg {
    flex: 0 0 auto;
}

/* Red asterisks on required PMPro fields.
   Checkout: PMPro's pmpro-checkout.js injects .pmpro_asterisk spans on all
   required fields itself — we only recolor them red (rule below). Adding our
   own ::after there would double the asterisk.
   Member Profile Edit: no such JS runs, so we generate the asterisk in CSS. */
#pmpro_member_profile_edit .pmpro_form_field-required label.pmpro_form_label::after,
#pmpro_member_profile_edit .pmpro_form_field-first_name label.pmpro_form_label::after,
#pmpro_member_profile_edit .pmpro_form_field-last_name label.pmpro_form_label::after,
#pmpro_member_profile_edit .pmpro_form_field-user_email label.pmpro_form_label::after {
    content: " *";
    color: #dc2626;
    font-weight: 700;
}

.pmpro_asterisk,
.pmpro_asterisk abbr {
    color: #dc2626;
    text-decoration: none;
    border: none;
}

.clu-billing-history-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px 0;
}

.clu-billing-history-header h3 svg {
    color: #1B365F;
}

/* "View Invoice" pill in the billing history table (was previously unstyled) */
.clu-invoice-btn {
    display: inline-block;
    padding: 7px 16px;
    background: rgba(27, 54, 95, 0.06);
    color: #1B365F !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 999px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clu-invoice-btn:hover {
    background: #1B365F;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

.clu-billing-empty-state {
    text-align: center;
    padding: 48px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #F5F7FB 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.clu-billing-empty-state svg {
    margin-bottom: 16px;
}

.clu-billing-empty-state .clu-btn {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
}

.clu-billing-empty-state h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 8px 0;
}

.clu-billing-empty-state p {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   LEGAL DOCUMENT REQUEST CARDS
   ========================================================================== */
.clu-doc-request-cta {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1B365F;
}

.clu-doc-request-banner {
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.4);
    color: #7c5308;
    font-size: 0.86rem;
    line-height: 1.5;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 4px 0 16px 0;
}

/* ==========================================================================
   UNION AI ASSISTANT PANEL (structural shell — embed wired when Pro active)
   ========================================================================== */
.clu-ai-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.clu-ai-overlay.is-open {
    opacity: 1;
}

.clu-ai-panel {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 480px;
    /* Fixed height (not just max) so the embedded chatbot stretches to fill
       the panel — otherwise its natural height leaves a white void below. */
    height: min(640px, 90vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.clu-ai-overlay.is-open .clu-ai-panel {
    transform: translateY(0) scale(1);
}

.clu-ai-panel-header {
    background: linear-gradient(135deg, #1B365F 0%, #0d2347 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clu-ai-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.clu-ai-panel-title svg {
    color: #F5A623;
}

.clu-ai-tier-badge {
    background: rgba(245, 166, 35, 0.2);
    color: #F5A623;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 999px;
}

.clu-ai-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.clu-ai-close:hover {
    color: #ffffff;
}

.clu-ai-panel-body {
    flex: 1;
    overflow-y: auto;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

#clu-ai-embed-target {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ==========================================================================
   UNION AI CHATBOT RESTYLE (AI Engine "ChatGPT" theme -> dashboard design)
   Every rule is scoped to #clu-ai-embed-target so AI Engine's chatbot and
   Playground anywhere else (wp-admin, other pages) are untouched.
   The theme is CSS-variable driven, so most of the recolor happens by
   overriding its --mwai-* custom properties.
   ========================================================================== */

#clu-ai-embed-target .mwai-chatbot-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#clu-ai-embed-target .mwai-chatgpt-theme {
    /* Light palette on the dashboard design system */
    --mwai-backgroundPrimaryColor: #ffffff;
    --mwai-backgroundSecondaryColor: #ffffff;
    --mwai-backgroundHeaderColor: #ffffff;
    --mwai-conversationsBackgroundColor: #ffffff;
    --mwai-conversationsTextColor: #1F2937;
    --mwai-accentColor: #1B365F;      /* user bubble background */
    --mwai-bubbleColor: #1B365F;
    --mwai-fontColor: #1F2937;
    --mwai-headerColor: #1F2937;
    --mwai-borderColor: #e2e8f0;
    --mwai-borderRadius: 12px;
    --mwai-maxHeight: none;           /* conversation fills the panel instead of 40vh */
    --mwai-fontSize: 14.5px;
    font-family: inherit;             /* the site font, not the theme's */
    background: #ffffff;
    width: auto;
    max-width: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* .mwai-window-box is an intermediate wrapper between .mwai-chat and
   .mwai-body — it must join the flex chain or nothing below it stretches
   and the input floats mid-panel with white space underneath. */
#clu-ai-embed-target .mwai-window-box {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#clu-ai-embed-target .mwai-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

#clu-ai-embed-target .mwai-conversation {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

/* AI replies: light neutral bubble, dark text */
#clu-ai-embed-target .mwai-reply.mwai-ai .mwai-text {
    background: #F5F7FB;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 14px;
    color: #1F2937;
}

/* Member replies: navy bubble (via accentColor), white text */
#clu-ai-embed-target .mwai-reply.mwai-user .mwai-text,
#clu-ai-embed-target .mwai-reply.mwai-user .mwai-text * {
    color: #ffffff;
}

#clu-ai-embed-target .mwai-name,
#clu-ai-embed-target .mwai-name-text {
    color: #64748b;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Input row: match the dashboard's form-input pattern */
#clu-ai-embed-target .mwai-input {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 14px;
}

#clu-ai-embed-target .mwai-input textarea {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    color: #1F2937 !important;
    padding: 10px 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#clu-ai-embed-target .mwai-input textarea:focus {
    border-color: #1B365F !important;
    box-shadow: 0 0 0 4px rgba(27, 54, 95, 0.08) !important;
    outline: none !important;
}

#clu-ai-embed-target .mwai-input textarea::placeholder {
    color: #94a3b8;
}

#clu-ai-embed-target .mwai-input button.mwai-input-submit {
    background: #1B365F;
    color: #ffffff;
    transition: all 0.2s ease;
}

#clu-ai-embed-target .mwai-input button.mwai-input-submit:hover {
    background: #F5A623;
    color: #1B365F;
}

/* Hide the developer "EVENTS" chunk/debug bar in the member-facing panel */
#clu-ai-embed-target .mwai-chunks {
    display: none !important;
}

.clu-ai-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 32px;
}

.clu-ai-placeholder-icon {
    width: 72px;
    height: 72px;
    background: rgba(245, 166, 35, 0.12);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #F5A623;
    margin-bottom: 20px;
}

.clu-ai-placeholder h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1B365F;
    margin: 0 0 10px 0;
}

.clu-ai-placeholder p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px 0;
    max-width: 320px;
}

.clu-ai-live-chat-btn {
    background: #1B365F;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(27, 54, 95, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clu-ai-live-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(27, 54, 95, 0.35);
}
