/**
 * CashPulse - Frontend Styles
 * Version: 4.4.0 - Dieter Rams Design
 * Simple, warm, elegant, natural
 */

/* === DESIGN TOKENS === */
:root {
    /* Brand */
    --color-brand: #060f50;
    --color-brand-hover: #0a1870;

    /* Backgrounds */
    --background: #FFFFFF;
    --background-soft: #DFDFDF;
    --secondary-gray: #DFDFDF;

    /* Text */
    --text-primary: #111;
    --text-secondary: #666;
    --text-tertiary: #888;
    --text-soft: #999;

    /* Borders */
    --border-light: #E5E5EA;
    --border-soft: #F2F2F7;

    /* Status colors */
    --success-green: #2e7d32;
    --success-green-soft: #d4f5e4;
    --error-red: #c62828;
    --error-red-soft: #fcdcdc;
    --warning-orange: #f57f17;
    --warning-orange-soft: #f5e6b8;
    --info-blue: #1565c0;
    --info-blue-soft: #d8e8f8;

    /* Shadows */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-modal: 0 8px 32px rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-relaxed: 1.6;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
}

/* === GLOBAL RESETS === */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    color: var(--text-primary);
    background-color: #DADAF1;
    background-image: radial-gradient(circle at 20% 50%, rgba(6, 15, 80, 0.04) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(6, 15, 80, 0.03) 0%, transparent 50%), linear-gradient(135deg, #D7D7EE 0%, #DADAF1 50%, #D5D5EC 100%);
    background-attachment: fixed;
    line-height: var(--line-height-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Dot pattern overlay — full viewport */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(6, 15, 80, 0.09) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

/* === LAYOUT === */
.cwpcf-page-layout {
    display: flex;
    gap: var(--space-lg);
    /*max-width: 1400px;*/
    margin: 0 auto;
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
}

.cwpcf-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.cwpcf-main-content {
    flex: 1;
    min-width: 0;
}

/* === NAVIGATION SIDEBAR === */
.cwpcf-sidebar-nav {
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: sticky;
    top: calc(32px + var(--space-lg));
}

.cwpcf-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: var(--space-xs);
}

.cwpcf-sidebar-menu li {
    margin: 0 0 2px 0;
    padding: 0;
}

.cwpcf-sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.cwpcf-sidebar-menu li a .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.cwpcf-sidebar-menu li a:hover {
    background: #F9F9FB;
}

.cwpcf-sidebar-menu li a:hover .dashicons {
    color: var(--color-brand);
}

.cwpcf-sidebar-menu li a.active {
    background: var(--color-brand);
    color: #fff;
}

.cwpcf-sidebar-menu li a.active .dashicons {
    color: #fff;
}

/* === LANDING PAGE === */
.cwpcf-landing-page {
    max-width: 1400px;
    margin: 0 auto;
    background: #F9F9FB;
}

.cwpcf-hero {
    text-align: center;
    padding: 64px var(--space-xl);
    background: #fff;
    border-radius: var(--radius-xl);
    margin-bottom: 64px;
    border: 1px solid #E5E5EA;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.cwpcf-hero::before {
    content: none;
}

.cwpcf-hero-title {
    font-size: 64px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--space-md) 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.cwpcf-hero-tagline {
    font-size: 28px;
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--space-lg) 0;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.cwpcf-hero-description {
    font-size: 19px;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
    line-height: 1.5;
    color: var(--text-tertiary);
}

.cwpcf-cta-button {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-brand);
    color: var(--background);
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.cwpcf-cta-button:hover {
    background: var(--color-brand-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    color: var(--background);
}

.cwpcf-cta-button:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.cwpcf-cta-button.cwpcf-cta-large {
    padding: 18px 48px;
    font-size: 19px;
}

.cwpcf-section-title {
    text-align: center;
    font-size: 44px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 48px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Features Grid */
.cwpcf-features {
    padding: 56px var(--space-lg);
}

.cwpcf-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.cwpcf-feature-card {
    background: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
}

.cwpcf-feature-card::before {
    content: none;
}

.cwpcf-feature-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-brand);
}

.cwpcf-feature-icon {
    width: 56px;
    height: 56px;
    background: var(--color-brand);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.cwpcf-feature-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--background);
}

.cwpcf-feature-card h3 {
    font-size: 21px;
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-primary);
}

.cwpcf-feature-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* How It Works */
.cwpcf-how-it-works {
    padding: 56px var(--space-lg);
    background: #fff;
    border-radius: var(--radius-xl);
    margin: 56px 0;
    border: 1px solid #E5E5EA;
    box-shadow: var(--shadow-card);
}

.cwpcf-steps {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.cwpcf-step {
    flex: 1;
    min-width: 260px;
    text-align: center;
}

.cwpcf-step-number {
    width: 56px;
    height: 56px;
    background: var(--color-brand);
    color: var(--background);
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.cwpcf-step h3 {
    font-size: 19px;
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-primary);
}

.cwpcf-step p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Benefits */
.cwpcf-benefits {
    padding: 56px var(--space-lg);
}

.cwpcf-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.cwpcf-benefit {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #E5E5EA;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

.cwpcf-benefit:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.cwpcf-benefit .dashicons {
    color: var(--color-brand);
    font-size: 22px;
    flex-shrink: 0;
}

.cwpcf-benefit p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Final CTA */
.cwpcf-final-cta {
    text-align: center;
    padding: 56px var(--space-lg);
    background: #F9F9FB;
    color: var(--text-primary);
    border-radius: var(--radius-xl);
    margin-top: 56px;
    border: 1px solid #E5E5EA;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.cwpcf-final-cta::before {
    content: none;
}

.cwpcf-final-cta h2 {
    font-size: 40px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--space-xl) 0;
    letter-spacing: -0.02em;
}

/* === PAGE HEADER === */
.cwpcf-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    padding: var(--space-xl);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
}

.cwpcf-page-header::before {
    content: none;
}

.cwpcf-page-header h1 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 var(--space-xs) 0;
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.cwpcf-page-header h1 .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--color-brand);
}

.cwpcf-header-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-regular);
}

/* === STYLED PAGE HEADER (v3.3.11 - Lighter tint + icon contrast) === */
.cwpcf-page-header-styled {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 40px;
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-lg);
    position: relative;
    margin-bottom: var(--space-xl);
    overflow: hidden;
}

.cwpcf-page-header-styled::before {
    content: none;
}

/* No underline needed - container provides visual boundary */

/* Typography - larger than section headers for hierarchy */
.cwpcf-page-header-styled h1 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 30px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.8px;
}

.cwpcf-page-header-styled h1 .dashicons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    width: 36px;
    height: 36px;
    color: #fff;
    background: var(--color-brand);
    border-radius: 10px;
    margin-right: var(--space-sm);
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(6, 15, 80, 0.12);
}

.cwpcf-page-header-styled .cwpcf-header-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-regular);
    opacity: 0.85;
}

/* Header with meta info (sync status) on right side */
.cwpcf-page-header-with-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.cwpcf-page-header-with-meta .cwpcf-header-main {
    flex: 1;
}

.cwpcf-page-header-with-meta .cwpcf-header-meta {
    flex-shrink: 0;
    text-align: right;
}

.cwpcf-page-header-with-meta .cwpcf-last-sync {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.cwpcf-page-header-with-meta .cwpcf-last-sync .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Sync Status */
.cwpcf-sync-status {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.cwpcf-backend-label,
.cwpcf-last-sync {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-subtle);
}

.cwpcf-sync-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--color-brand);
    color: var(--background);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
}

.cwpcf-sync-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

/* === BREADCRUMBS === */
/* Breadcrumbs navigation - purple theme (v3.3.18) */
.cwpcf-breadcrumbs {
    margin-bottom: var(--space-lg);
    font-size: 13px;
    color: var(--text-secondary);
}

.cwpcf-breadcrumbs a {
    color: var(--color-brand);
    text-decoration: none;
    transition: color var(--transition-base);
}

.cwpcf-breadcrumbs a:hover {
    color: var(--color-brand);
}

.cwpcf-breadcrumbs .separator {
    margin: 0 var(--space-xs);
    color: var(--text-tertiary);
}

.cwpcf-breadcrumbs .current {
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

/* === METRICS & CARDS === */
.cwpcf-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    justify-items: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.cwpcf-metric-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all var(--transition-base);
    /* Fixed dimensions for consistency */
    width: 100%;
    max-width: 350px;
    min-height: 140px;
    max-height: 140px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    animation: fadeSlideUp 0.5s ease-out backwards;
}

.cwpcf-metric-card:nth-child(1) { animation-delay: 0.05s; }
.cwpcf-metric-card:nth-child(2) { animation-delay: 0.10s; }
.cwpcf-metric-card:nth-child(3) { animation-delay: 0.15s; }
.cwpcf-metric-card:nth-child(4) { animation-delay: 0.20s; }
.cwpcf-metric-card:nth-child(5) { animation-delay: 0.25s; }
.cwpcf-metric-card:nth-child(6) { animation-delay: 0.30s; }

.cwpcf-metric-card::before {
    content: none;
}

.cwpcf-metric-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.cwpcf-metric-card.metric-primary {
    border-color: var(--success-green);
    background: var(--success-green-soft);
    box-shadow: var(--shadow-card);
}

.metric-icon {
    width: 44px;
    height: 44px;
    background: #F5F5F7;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cwpcf-metric-card.metric-primary .metric-icon {
    background: var(--success-green);
}

.metric-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: var(--text-primary);
}

.cwpcf-metric-card.metric-primary .metric-icon .dashicons {
    color: var(--background);
}

.metric-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.metric-content h3 {
    margin: 0 0 2px 0;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-label {
    font-size: 10px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 12px 0;
    opacity: 0.65;
}

.metric-value {
    font-size: 36px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 8px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.metric-sublabel {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.50);
    margin: 0;
    font-weight: var(--font-weight-normal);
}

/* Trend indicators (v3.3.0) */
.trend-indicator {
    display: inline-block;
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    margin-right: 4px;
    vertical-align: middle;
}

.trend-up {
    color: var(--success-green);
}

.trend-down {
    color: var(--error-red);
}

.trend-neutral {
    color: var(--text-tertiary);
    opacity: 0.6;
}

/* === IMPORTANT INSIGHTS (v2.3.7 - Widget System for Frontend) === */
.cwpcf-important-insights {
    margin-bottom: 48px;
    background: #F9F9FB;
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
}

.cwpcf-important-insights::before {
    content: none;
}

.cwpcf-insights-header {
    margin-bottom: var(--space-lg);
    padding: var(--space-md) 0;
    position: relative;
}

.cwpcf-insights-header::after {
    content: none;
}

.cwpcf-insights-header h2 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 26px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.6px;
}

.insights-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-regular);
    opacity: 0.85;
}

/* Widget System - .metric-card (v3.0.12 - Clickable with cursor only) */
.metric-card {
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
    width: 100%;
    max-width: 350px;
    min-height: 140px;
    box-sizing: border-box;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: visible;
    cursor: pointer;
    animation: fadeSlideUp 0.5s ease-out backwards;
}

/* Staggered entrance animations (v3.3.0) */
.metric-card:nth-child(1) { animation-delay: 0.05s; }
.metric-card:nth-child(2) { animation-delay: 0.10s; }
.metric-card:nth-child(3) { animation-delay: 0.15s; }
.metric-card:nth-child(4) { animation-delay: 0.20s; }
.metric-card:nth-child(5) { animation-delay: 0.25s; }
.metric-card:nth-child(6) { animation-delay: 0.30s; }

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

.metric-card::before {
    content: none;
}

.metric-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Click hint indicator (v3.3.0) */
.metric-card::after {
    content: '→';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    color: var(--color-brand);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.metric-card:hover::after {
    opacity: 0.4;
    transform: translateX(4px);
}

.metric-card-empty {
    opacity: 0.3;
    pointer-events: none;
}

/* === SEMANTIC COLOR TINTS (v3.0.8) === */
/* Positive (green) - profits, gains, increases */
.metric-card.metric-positive {
    background: #d4f5e4;
    border-left: 3px solid #2e7d32;
}

.metric-card.metric-positive:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Negative (red) - losses, deficits, declines */
.metric-card.metric-negative {
    background: #fcdcdc;
    border-left: 3px solid #c62828;
}

.metric-card.metric-negative:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Warning (amber) - caution, attention needed */
.metric-card.metric-warning {
    background: #fffbe6;
    border-left: 3px solid #f57f17;
}

.metric-card.metric-warning:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Info (blue) - informational, neutral */
.metric-card.metric-info {
    background: #eff6ff;
    border-left: 3px solid #1565c0;
}

.metric-card.metric-info:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* === HUB ACTIONS === */
.cwpcf-hub-actions {
    margin: 0 0 48px 0;
}

.cwpcf-hub-actions h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--space-lg) 0;
    color: var(--text-primary);
}

.cwpcf-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.cwpcf-action-card {
    background: #fff;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    position: relative;
    display: block;
    border: 1px solid #E5E5EA;
    overflow: hidden;
}

.cwpcf-action-card::before {
    content: none;
}

.cwpcf-action-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-brand);
}

/* Action icon - purple background with white icon (v3.3.12) */
.action-icon {
    width: 44px;
    height: 44px;
    background: var(--color-brand);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(6, 15, 80, 0.15);
}

.cwpcf-action-card:hover .action-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(6, 15, 80, 0.2);
}

.action-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #fff;
    transition: transform var(--transition-base);
}

.cwpcf-action-card:hover .action-icon .dashicons {
    transform: scale(1.1);
}

.cwpcf-action-card h3 {
    margin: 0 0 var(--space-xs) 0;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.cwpcf-action-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Arrow - purple on hover (v3.3.12) */
.action-arrow {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    font-size: 20px;
    color: var(--text-tertiary);
    font-weight: 700;
    transition: all var(--transition-base);
}

.cwpcf-action-card:hover .action-arrow {
    color: var(--color-brand);
    transform: translateX(4px);
}

/* === CHARTS & PLACEHOLDERS === */
.cwpcf-dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--space-md);
    margin: 0 0 48px 0;
    background: #F9F9FB;
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
}

.cwpcf-dashboard-charts::before {
    content: none;
}

.cwpcf-chart-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.cwpcf-chart-card::before {
    content: none;
}

.cwpcf-chart-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Chart Container (for analysis page charts) */
.cwpcf-chart-container {
    background: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: visible;
    transition: all var(--transition-base);
    animation: fadeSlideUp 0.5s ease-out backwards;
    animation-delay: 0.25s;
}

.cwpcf-chart-container::before {
    content: none;
}

.cwpcf-chart-container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.cwpcf-chart-container h2,
.cwpcf-chart-container h3 {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0 0 var(--space-lg) 0;
    font-size: 19px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.cwpcf-chart-card h3 {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0 0 var(--space-lg) 0;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.chart-placeholder {
    background: #F9F9FB;
    border: 2px dashed #E5E5EA;
    border-radius: var(--radius-md);
    padding: 56px var(--space-lg);
    text-align: center;
}

.chart-coming-soon {
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin: 0 0 var(--space-xs) 0;
}

.chart-description {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

/* === INSIGHTS === */
.cwpcf-insights-section {
    margin: 0 0 48px 0;
}

.cwpcf-insights-section h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 var(--space-lg) 0;
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.cwpcf-insights-grid {
    display: grid;
    gap: var(--space-md);
}

.cwpcf-insight-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--color-brand);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.cwpcf-insight-card::before {
    content: none;
}

.cwpcf-insight-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.cwpcf-insight-card.insight-positive {
    border-left-color: var(--success-green);
    background: var(--success-green-soft);
    border-left-width: 4px;
}

.cwpcf-insight-card.insight-warning {
    border-left-color: var(--warning-orange);
    background: var(--warning-orange-soft);
    border-left-width: 4px;
}

.cwpcf-insight-card.insight-info {
    border-left-color: var(--color-brand);
    background: var(--info-blue-soft);
    border-left-width: 4px;
}

.insight-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.insight-content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.insight-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === FILTER BAR === */
.cwpcf-filter-bar {
    background: #fff;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    border: 1px solid #E5E5EA;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.filter-group label {
    font-weight: var(--font-weight-medium);
    font-size: 13px;
    color: var(--text-primary);
}

.filter-group input[type="date"],
.filter-group select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    color: var(--text-primary);
    font-family: var(--font-system);
    transition: all var(--transition-base);
}

.filter-group input[type="date"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* === SUMMARY CARDS === */
.cwpcf-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    justify-content: center;
    max-width: 1400px; /* Prevent excessive stretching for AP/AR tabs with 4 cards */
}

.summary-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E5EA;
    transition: all var(--transition-base);
    position: relative;
    overflow: visible;
    animation: fadeSlideUp 0.5s ease-out backwards;
    width: 100%;
    max-width: 350px;
    min-height: 140px;
}

/* Staggered entrance animations for summary cards (v3.3.1) */
.summary-card:nth-child(1) { animation-delay: 0.05s; }
.summary-card:nth-child(2) { animation-delay: 0.10s; }
.summary-card:nth-child(3) { animation-delay: 0.15s; }
.summary-card:nth-child(4) { animation-delay: 0.20s; }

/* Hover effects for summary cards (v3.3.1) - only for non-semantic cards */
.summary-card:not(.metric-positive):not(.metric-negative):not(.metric-warning):not(.metric-info)::before {
    content: none;
}

.summary-card:not(.metric-positive):not(.metric-negative):not(.metric-warning):not(.metric-info):hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Old summary card icon and border-left styles removed in v3.3.2 */
/* Summary cards now use .metric-label, .metric-value, .metric-sublabel (defined earlier) */

/* === TABLES === */
.cwpcf-comparison-table,
.cwpcf-transactions-table {
    margin: var(--space-xl) 0;
}

.cwpcf-comparison-table table,
.cwpcf-transactions-table table {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    border-collapse: separate;
    border-spacing: 0;
}

.cwpcf-comparison-table th,
.cwpcf-transactions-table th {
    background: #F5F5F7;
    padding: var(--space-md);
    text-align: left;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E5E5EA;
}

.cwpcf-comparison-table td,
.cwpcf-transactions-table td {
    padding: var(--space-md);
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.cwpcf-comparison-table tr:last-child td,
.cwpcf-transactions-table tr:last-child td {
    border-bottom: none;
}

.cwpcf-comparison-table tr:hover,
.cwpcf-transactions-table tr:hover {
    background: #F9F9FB;
}

/* === LOGIN REQUIRED MESSAGE === */
.cwpcf-login-required {
    text-align: center;
    padding: 56px var(--space-lg);
    background: #fff;
    border-radius: var(--radius-lg);
    margin: var(--space-xl) 0;
    border: 1px solid #E5E5EA;
    box-shadow: var(--shadow-card);
}

.cwpcf-login-required p {
    font-size: 17px;
    color: var(--text-secondary);
}

.cwpcf-login-required a {
    color: var(--color-brand);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.cwpcf-login-required a:hover {
    text-decoration: underline;
}

/* === REPORTS PAGE === */
.cwpcf-report-types h2,
.cwpcf-report-config h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 var(--space-lg) 0;
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.report-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-lg);
    margin-bottom: 48px;
}

.report-type-card {
    background: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid #E5E5EA;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.report-type-card::before {
    content: none;
}

.report-type-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.report-icon {
    width: 64px;
    height: 64px;
    background: var(--color-brand);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.report-icon .dashicons {
    font-size: 32px;
    color: var(--background);
}

.report-type-card h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 21px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.report-type-card p {
    margin: 0 0 var(--space-lg) 0;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 15px;
}

.report-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg) 0;
    text-align: left;
}

.report-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: 14px;
    color: var(--text-primary);
}

.report-features li .dashicons {
    color: var(--success-green);
    font-size: 16px;
}

/* Report Form */
.report-form {
    background: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-xl);
    border: 1px solid #E5E5EA;
}

.form-section {
    margin-bottom: var(--space-xl);
}

.form-section h3 {
    margin: 0 0 var(--space-md) 0;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: var(--font-weight-medium);
    font-size: 13px;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    max-width: 500px;
    padding: var(--space-sm);
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-system);
    background: #fff;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}

.checkbox-label:hover {
    background: #F9F9FB;
}

.format-options {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 14px;
}

.radio-label:hover {
    border-color: var(--color-brand);
    background: #F9F9FB;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: var(--font-weight-semibold);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.form-actions .button,
.form-actions .button-primary {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
}

.form-actions .button-primary {
    background: var(--color-brand);
    border-color: var(--color-brand);
}

.form-actions .button-primary:hover {
    background: var(--color-brand-hover);
    border-color: var(--color-brand-hover);
}

/* === REPORT SECTIONS === */
.cwpcf-report-types,
.cwpcf-report-config,
.cwpcf-recent-reports,
.cwpcf-report-templates,
.cwpcf-budget-comparison,
.cwpcf-transactions-table,
.cwpcf-bills-list,
.cwpcf-invoices-list {
    background: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.cwpcf-report-types::before,
.cwpcf-report-config::before,
.cwpcf-recent-reports::before,
.cwpcf-report-templates::before,
.cwpcf-budget-comparison::before,
.cwpcf-transactions-table::before,
.cwpcf-bills-list::before,
.cwpcf-invoices-list::before {
    content: none;
}

/* Template cards grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.template-card {
    background: #fff;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: none;
}

.template-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.template-card h4 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.template-card p {
    margin: 0 0 var(--space-md) 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .cwpcf-page-layout {
        flex-direction: column;
        padding: var(--space-md);
    }

    .cwpcf-sidebar {
        width: 100%;
    }

    .cwpcf-sidebar-nav {
        position: static;
    }

    .cwpcf-sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: var(--space-xs);
        gap: var(--space-xs);
    }

    .cwpcf-sidebar-menu li {
        flex: 1;
        min-width: 100px;
        margin: 0;
    }

    .cwpcf-sidebar-menu li a {
        flex-direction: column;
        text-align: center;
        padding: var(--space-sm);
        gap: 4px;
        font-size: 12px;
    }

    .cwpcf-page-header {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-lg);
    }

    .cwpcf-hero-title {
        font-size: 40px;
    }

    .cwpcf-hero-tagline {
        font-size: 21px;
    }

    .cwpcf-section-title {
        font-size: 32px;
    }

    .cwpcf-metrics-grid,
    .cwpcf-actions-grid,
    .cwpcf-summary-cards {
        grid-template-columns: 1fr;
    }

    .cwpcf-dashboard-charts {
        grid-template-columns: 1fr;
    }

    .report-types-grid {
        grid-template-columns: 1fr;
    }

    .cwpcf-features-grid {
        grid-template-columns: 1fr;
    }

    .cwpcf-benefits-grid {
        grid-template-columns: 1fr;
    }

    .cwpcf-steps {
        flex-direction: column;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === FOCUS STATES === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* === SMOOTH SCROLLING === */
html {
    scroll-behavior: smooth;
}

/* === PRINT STYLES === */
@media print {
    .cwpcf-sidebar,
    .cwpcf-sync-button,
    .cwpcf-filter-bar,
    .action-arrow {
        display: none;
    }

    .cwpcf-page-layout {
        display: block;
    }

    .cwpcf-metric-card,
    .cwpcf-chart-card,
    .summary-card {
        break-inside: avoid;
    }
}

/* === TABBED NAVIGATION (Analysis Page) === */
.cwpcf-tabs-container {
    margin-top: 30px;
}

.cwpcf-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.cwpcf-tab-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: -2px;
}

/* Tab button hover and active - purple theme (v3.3.16) */
.cwpcf-tab-button:hover {
    color: var(--color-brand);
    background: #F9F9FB;
}

.cwpcf-tab-button.active {
    color: var(--color-brand);
    border-bottom-color: var(--color-brand);
}

.cwpcf-tab-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cwpcf-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.cwpcf-tab-content.active {
    display: block;
}

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

/* === AGING ANALYSIS BARS === */
.cwpcf-aging-bars {
    margin-top: 20px;
}

.aging-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.aging-label {
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.aging-bar {
    flex: 1;
    height: 32px;
    background: var(--background-soft);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.aging-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.aging-fill.current {
    background: linear-gradient(90deg, var(--success-green) 0%, #2DB94D 100%);
}

.aging-fill.warning {
    background: linear-gradient(90deg, var(--warning-orange) 0%, #FFB340 100%);
}

.aging-fill.alert {
    background: linear-gradient(90deg, #FF9500 0%, #FF6B00 100%);
}

.aging-fill.danger {
    background: linear-gradient(90deg, var(--error-red) 0%, #FF5046 100%);
}

.aging-value {
    min-width: 120px;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* === STATUS BADGES === */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge.overdue {
    background: var(--error-red-soft);
    color: var(--error-red);
}

.status-badge.due-soon {
    background: var(--warning-orange-soft);
    color: var(--warning-orange);
}

.status-badge.current {
    background: var(--success-green-soft);
    color: var(--success-green);
}

/* === ANALYSIS PAGE SPECIFIC === */
.cwpcf-analysis-section {
    margin-bottom: 40px;
    background: #fff;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
}

.cwpcf-analysis-section::before {
    content: none;
}

.cwpcf-analysis-section .section-header {
    margin-bottom: 25px;
    padding-bottom: var(--space-sm);
    position: relative;
}

.cwpcf-analysis-section .section-header::after {
    content: none;
}

.cwpcf-analysis-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.6px;
    color: var(--text-primary);
}

.cwpcf-analysis-section .section-description {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.cwpcf-bills-list,
.cwpcf-invoices-list {
    margin-top: 30px;
}

.cwpcf-bills-list h3,
.cwpcf-invoices-list h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--text-primary);
}

/* Table row status styling */
/* Table rows - clean white backgrounds (v3.3.13) */
/* Status indicated by badges only, not row colors */
tr.overdue,
tr.due_soon,
tr.current {
    background: transparent !important;
}

/* === TABLE STYLING (v3.3.14) === */
/* Hover lift effect for bills/invoices containers */
.cwpcf-bills-list,
.cwpcf-invoices-list {
    transition: all var(--transition-base);
}

.cwpcf-bills-list:hover,
.cwpcf-invoices-list:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

/* Table structure and formatting */
.cwpcf-bills-list table,
.cwpcf-invoices-list table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

/* Scrollable table body - max 10 rows visible (v3.3.15) */
.cwpcf-bills-list tbody,
.cwpcf-invoices-list tbody {
    display: block;
    max-height: 430px; /* ~10 rows at 43px each */
    overflow-y: auto;
}

.cwpcf-bills-list thead,
.cwpcf-invoices-list thead,
.cwpcf-bills-list tbody tr,
.cwpcf-invoices-list tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* Custom scrollbar styling */
.cwpcf-bills-list tbody::-webkit-scrollbar,
.cwpcf-invoices-list tbody::-webkit-scrollbar {
    width: 6px;
}

.cwpcf-bills-list tbody::-webkit-scrollbar-track,
.cwpcf-invoices-list tbody::-webkit-scrollbar-track {
    background: #F9F9FB;
    border-radius: 3px;
}

.cwpcf-bills-list tbody::-webkit-scrollbar-thumb,
.cwpcf-invoices-list tbody::-webkit-scrollbar-thumb {
    background: rgba(6, 15, 80, 0.15);
    border-radius: 3px;
}

.cwpcf-bills-list tbody::-webkit-scrollbar-thumb:hover,
.cwpcf-invoices-list tbody::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 15, 80, 0.25);
}

/* Table header styling */
.cwpcf-bills-list thead th,
.cwpcf-invoices-list thead th {
    background: #F5F5F7;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #E5E5EA;
}

.cwpcf-bills-list thead th:first-child,
.cwpcf-invoices-list thead th:first-child {
    border-radius: 8px 0 0 0;
}

.cwpcf-bills-list thead th:last-child,
.cwpcf-invoices-list thead th:last-child {
    border-radius: 0 8px 0 0;
}

/* Table body rows */
.cwpcf-bills-list tbody td,
.cwpcf-invoices-list tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: middle;
}

/* Alternating row colors for readability */
.cwpcf-bills-list tbody tr:nth-child(even),
.cwpcf-invoices-list tbody tr:nth-child(even) {
    background: #F9F9FB;
}

/* Row hover effect */
.cwpcf-bills-list tbody tr:hover,
.cwpcf-invoices-list tbody tr:hover {
    background: #F9F9FB !important;
}

/* Last row no border */
.cwpcf-bills-list tbody tr:last-child td,
.cwpcf-invoices-list tbody tr:last-child td {
    border-bottom: none;
}

/* Empty state styling */
.cwpcf-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #F9F9FB;
    border-radius: var(--radius-lg);
    border: 2px dashed #E5E5EA;
    box-shadow: var(--shadow-card);
}

.cwpcf-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--success-green);
    margin-bottom: 15px;
}

.cwpcf-empty-state p {
    font-size: 16px;
    color: var(--text-primary);
    margin: 10px 0;
}

.cwpcf-empty-subtitle {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
}

/* Summary cards in tabs */
.cwpcf-analysis-section .cwpcf-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cwpcf-analysis-section .summary-card.danger {
    border-left: 4px solid var(--error-red);
}

.cwpcf-analysis-section .summary-card.warning {
    border-left: 4px solid var(--warning-orange);
}

/* Budget tips section */
.cwpcf-budget-tips h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.cwpcf-budget-tips .dashicons {
    color: var(--color-brand);
}

/* Rotating animation for sync button */
@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dashicons.rotating {
    animation: rotating 1s linear infinite;
}

/* Responsive tabs */
@media (max-width: 768px) {
    .cwpcf-tabs-nav {
        flex-direction: column;
        gap: 0;
    }

    .cwpcf-tab-button {
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-light);
        border-left: 3px solid transparent;
        margin-bottom: 0;
        padding: 15px 20px;
    }

    .cwpcf-tab-button.active {
        border-bottom-color: var(--border-light);
        border-left-color: var(--color-brand);
        background: var(--background-soft);
    }

    .aging-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .aging-label,
    .aging-value {
        min-width: 0;
        text-align: left;
    }
}

/* ==========================================================================
   Strategic Advice Modal (Apple-inspired)
   ========================================================================== */

.cwpcf-advice-trigger {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 8px 14px;
    background: var(--color-brand);
    border: none;
    border-radius: 20px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    font-weight: 500;
}

.cwpcf-advice-trigger:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    opacity: 1;
}

.cwpcf-advice-trigger:active {
    transform: translateY(0);
    box-shadow: var(--shadow-card);
}

.cwpcf-advice-trigger .dashicons-info {
    width: 14px;
    height: 14px;
    font-size: 14px;
    color: #fff;
}

.advice-hint {
    font-size: 12px;
    color: #fff;
    font-weight: 400;
}

/* Modal Overlay */
.cwpcf-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none !important; /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cwpcf-modal.cwpcf-modal-open {
    display: flex !important; /* Show when open class added */
    opacity: 1;
}

/* Prevent body scroll when modal is open */
body.cwpcf-modal-active {
    overflow: hidden !important;
}

.cwpcf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Modal Content */
.cwpcf-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 85%;
    max-height: 90vh;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 50px 60px;
    animation: cwpcf-modal-slidein 0.3s ease;
}

/* Always-visible scrollbar */
.cwpcf-modal-content::-webkit-scrollbar {
    width: 12px;
}

.cwpcf-modal-content::-webkit-scrollbar-track {
    background: #f5f5f7;
    border-radius: 10px;
}

.cwpcf-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c6;
    border-radius: 10px;
    border: 2px solid #f5f5f7;
}

.cwpcf-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a6;
}

.cwpcf-modal-content {
    scrollbar-width: auto;
    scrollbar-color: #c1c1c6 #f5f5f7;
}

/* Modal Header */
.cwpcf-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.cwpcf-modal-icon {
    width: 56px;
    height: 56px;
    background: var(--color-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.cwpcf-modal-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.cwpcf-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    letter-spacing: -0.01em;
}

/* Modal Body */
.cwpcf-modal-body {
    padding: 24px;
    max-height: calc(80vh - 200px);
    overflow-y: auto;
}

.cwpcf-modal-advice {
    font-size: 15px;
    line-height: 1.6;
    color: #50575e;
    margin: 0;
}

/* Modal Footer */
.cwpcf-modal-footer {
    padding: 16px 24px 24px;
    text-align: center;
}

/* Modal close button - purple theme (v3.3.33) */
.cwpcf-modal-close {
    padding: 10px 32px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    min-width: 120px;
    background: var(--color-brand);
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.cwpcf-modal-close:hover {
    background: var(--color-brand);
}

/* Animations */
@keyframes cwpcf-modal-fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cwpcf-modal-slidein {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .cwpcf-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .cwpcf-modal-header {
        padding: 20px 20px 14px;
    }

    .cwpcf-modal-body {
        padding: 20px;
    }

    .cwpcf-modal-footer {
        padding: 14px 20px 20px;
    }
}

/* ==========================================================================
   Clickable Row Breakdowns (v3.3.48)
   Click a row to expand/collapse detail below it — no design changes
   ========================================================================== */

/* Pointer cursor on clickable rows */
.cwpcf-clickable-row {
    cursor: pointer;
}

/* Inline breakdown container — sits below the clicked row */
.cwpcf-inline-breakdown {
    padding: 4px 0 4px 12px;
    border-left: 2px solid #e2e4e7;
    margin-left: 4px;
    margin-bottom: 2px;
}

/* Individual breakdown item — matches existing account-row style */
.cwpcf-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
}

.cwpcf-breakdown-name {
    color: #50575e;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.cwpcf-breakdown-ref {
    color: #8c8f94;
    font-size: 12px;
    margin-left: 4px;
}

.cwpcf-breakdown-amount {
    font-weight: 500;
    white-space: nowrap;
    font-size: 13px;
}

.cwpcf-breakdown-empty {
    color: #8c8f94;
    font-style: italic;
}

/* ==========================================================================
   Status Color Utility Classes (v2.1.6+)
   Following the "never hardcode" principle - all colors defined in one place
   ========================================================================== */

/* Text Colors */
.cwpcf-text-positive {
    color: #00a32a !important;
}

.cwpcf-text-negative {
    color: #d63638 !important;
}

.cwpcf-text-warning {
    color: #dba617 !important;
}

.cwpcf-text-info {
    color: #2271b1 !important;
}

.cwpcf-text-info-light {
    color: #72aee6 !important;
}

.cwpcf-text-muted {
    color: #666 !important;
}

.cwpcf-text-default {
    color: #1d2327 !important;
}

/* Background Colors */
.cwpcf-bg-white {
    background: #fff !important;
}

.cwpcf-bg-light-gray {
    background: #f0f0f0 !important;
}

.cwpcf-bg-info-light {
    background: #f0f6fc !important;
}

.cwpcf-bg-warning-light {
    background: #fff3cd !important;
}

/* Border Colors */
.cwpcf-border-positive {
    border-color: #00a32a !important;
}

.cwpcf-border-negative {
    border-color: #d63638 !important;
}

.cwpcf-border-warning {
    border-color: #dba617 !important;
}

.cwpcf-border-warning-alt {
    border-color: #ffc107 !important;
}

.cwpcf-border-info {
    border-color: #2271b1 !important;
}

/* Combined Border-Left Utilities (commonly used for status indicators) */
.cwpcf-border-left-positive {
    border-left: 4px solid #00a32a !important;
}

.cwpcf-border-left-negative {
    border-left: 4px solid #d63638 !important;
}

.cwpcf-border-left-warning {
    border-left: 4px solid #dba617 !important;
}

.cwpcf-border-left-info {
    border-left: 4px solid #2271b1 !important;
}

/* Status Box Presets (complete styling for common patterns) */
.cwpcf-status-box {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
}

.cwpcf-status-box-header {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.cwpcf-status-box-value {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.cwpcf-status-box-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.cwpcf-status-box-alert {
    margin: 10px 0 0 0;
    font-size: 12px;
    font-weight: 600;
}

/* === PRESSING OBLIGATIONS GLASSMORPHISM (v3.0.0) === */
/* Wrapper section with purple tint background */
.cwpcf-pressing-obligations {
    background: #F9F9FB !important;
    padding: 40px !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid #E5E5EA;
    position: relative;
    overflow: hidden;
    margin: 0 0 48px 0 !important;
}

.cwpcf-pressing-obligations::before {
    content: none;
}

.cwpcf-pressing-obligations > h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 var(--space-lg) 0 !important;
    padding: var(--space-md) 0 var(--space-sm) 0 !important;
    font-size: 26px !important;
    font-weight: var(--font-weight-bold) !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.6px !important;
    position: relative;
}

.cwpcf-pressing-obligations > h2::after {
    content: none;
}

.cwpcf-pressing-obligations > h2 .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Override inline styles for obligation cards (v3.2.0 - Minimalist Redesign) */
.cwpcf-obligation-card {
    border: 1px solid #E5E5EA !important;
    border-radius: var(--radius-lg) !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    max-width: 350px;
    min-height: 140px;
    cursor: pointer !important;
    position: relative;
    overflow: visible;
    transition: all var(--transition-base);
    animation: fadeSlideUp 0.5s ease-out backwards;
}

.cwpcf-obligation-card:nth-child(1) { animation-delay: 0.05s; }
.cwpcf-obligation-card:nth-child(2) { animation-delay: 0.10s; }
.cwpcf-obligation-card:nth-child(3) { animation-delay: 0.15s; }

/* Semantic Color Tinting - solid backgrounds with status border */
.cwpcf-obligation-card.obligation-warning {
    background: #fffbe6 !important;
    border-left: 4px solid #f57f17 !important;
}

.cwpcf-obligation-card.obligation-danger {
    background: #fef2f2 !important;
    border-left: 4px solid #c62828 !important;
}

.cwpcf-obligation-card.obligation-positive {
    background: #f0fdf4 !important;
    border-left: 4px solid #2e7d32 !important;
}

.cwpcf-obligation-card::before {
    content: none;
}

/* Hover Effects - lift card */
.cwpcf-obligation-card.obligation-warning:hover,
.cwpcf-obligation-card.obligation-danger:hover,
.cwpcf-obligation-card.obligation-positive:hover {
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-1px);
}

/* Click hint for obligation cards (v3.3.0) */
.cwpcf-obligation-card::after {
    content: '→';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    color: var(--color-brand);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.cwpcf-obligation-card:hover::after {
    opacity: 0.4;
    transform: translateX(4px);
}

/* === GLASSMORPHISM UTILITY CLASSES (v2.7.8+) === */

/* Glass Cards */
.glass-card {
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: none;
}

.glass-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* Shimmer Border Effect — disabled in v4.4.0 */
.shimmer-border {
    position: relative;
    overflow: hidden;
}

.shimmer-border::before {
    content: none;
}

/* Tint Sections */
.purple-tint-section {
    background: #F9F9FB;
}

/* Semantic Glass Cards — solid tint backgrounds */
.glass-card-primary { color: var(--color-brand); background: var(--info-blue-soft); }
.glass-card-success { color: var(--success-green); background: var(--success-green-soft); }
.glass-card-danger { color: var(--error-red); background: var(--error-red-soft); }
.glass-card-warning { color: var(--warning-orange); background: var(--warning-orange-soft); }

.glass-card-primary::before,
.glass-card-success::before,
.glass-card-danger::before,
.glass-card-warning::before {
    content: none;
}

/* === DASHBOARD CLEANUP (v3.0.3) === */
/* Consistent spacing, typography, and card structure */

/* Obligations Grid (v3.2.2 - Better layout for 1-2 cards) */
.cwpcf-obligations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    justify-content: center;
    max-width: 1200px; /* Prevent excessive stretching */
}

/* Constrain individual cards to prevent over-stretching when fewer than 3 cards */
.cwpcf-obligations-grid .cwpcf-obligation-card {
    max-width: 380px;
    justify-self: center;
}

/* All Clear Message (v3.2.1 - When no obligations exist) */
.cwpcf-no-obligations {
    background: #fff;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--success-green);
}

.cwpcf-no-obligations .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

.cwpcf-no-obligations p {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

/* Old status classes removed in v3.2.1 - now using semantic obligation-* classes */

/* Obligation Card Inner Elements */
.obligation-header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.obligation-emoji {
    font-size: 20px;
    line-height: 1;
}

.obligation-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.obligation-date {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 0 0 var(--space-md) 0;
}

.obligation-count {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    margin: 0;
    line-height: 1.2;
}

.obligation-amount {
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    margin: 4px 0 var(--space-md) 0;
    color: var(--text-primary);
}

.obligation-details {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-sm);
    margin-top: var(--space-xs);
}

.details-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-xs) 0;
    text-transform: uppercase;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    align-items: center;
}

.detail-name {
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-value {
    font-weight: var(--font-weight-semibold);
    margin-left: var(--space-sm);
}

.obligation-action,
.obligation-alert,
.obligation-success {
    margin-top: var(--space-sm);
    font-size: 13px;
    margin-bottom: 0;
}

.obligation-action a {
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base);
}

.obligation-action a:hover {
    text-decoration: underline;
}

.obligation-alert {
    font-weight: var(--font-weight-semibold);
}

/* Utility Text Colors */
.text-warning {
    color: var(--warning-orange) !important;
}

.text-danger {
    color: var(--error-red) !important;
}

.text-success {
    color: var(--success-green) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Obligation Hint (Click for details) */
.obligation-hint {
    font-size: 12px;
    color: var(--color-brand);
    margin: var(--space-sm) 0 0 0;
    font-weight: var(--font-weight-medium);
    opacity: 0.8;
    transition: opacity var(--transition-base);
}

.cwpcf-obligation-card:hover .obligation-hint {
    opacity: 1;
}

/* === OBLIGATION MODALS (v3.0.4) === */
/* Enhanced modal styling for obligation details */

/* Modal subtitle */
.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

/* Modal summary section */
.modal-summary {
    background: var(--background-soft);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
}

.modal-summary-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

.modal-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin: var(--space-xs) 0 0 0;
}

/* Modal list of items (bills/invoices) */
.modal-list {
    margin: var(--space-lg) 0;
}

.modal-list h4 {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-sm) 0;
}

.modal-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--background-soft);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    transition: all var(--transition-base);
}

.modal-list-item:hover {
    background: var(--background);
    box-shadow: var(--shadow-card);
}

.modal-list-item.item-urgent {
    border-left: 3px solid var(--error-red);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-amount {
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    margin-left: var(--space-md);
    white-space: nowrap;
}

/* Modal alerts */
.modal-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
}

.modal-alert .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.modal-alert.alert-danger {
    background: var(--error-red-soft);
    border-left: 3px solid var(--error-red);
}

.modal-alert.alert-danger .dashicons {
    color: var(--error-red);
}

.modal-alert.alert-warning {
    background: var(--warning-orange-soft);
    border-left: 3px solid var(--warning-orange);
}

.modal-alert.alert-warning .dashicons {
    color: var(--warning-orange);
}

/* Modal success state */
.modal-success {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}

.modal-success .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--success-green);
    margin: 0 auto var(--space-md);
    display: block;
}

.modal-success p {
    font-size: 15px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
}

/* Modal actions */
.modal-actions {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.modal-actions .button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
}

.modal-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Modal icon variations */
.modal-icon-danger {
    background: var(--error-red) !important;
}

.modal-icon-success {
    background: var(--success-green) !important;
}


/* ========================================
   DASHBOARD CLUSTER LAYOUT (v4.5.0)
   Data grouped by concern: Money In / Out / Health / Explore
   ======================================== */

/* Page Header */
.cwpcf-cluster-page-header {
    margin-bottom: 28px;
}

.cwpcf-cluster-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cwpcf-cluster-page-header h1 svg {
    flex-shrink: 0;
}

.cwpcf-cluster-page-header p {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

/* Cluster = white card grouping related info */
.cwpcf-cluster {
    background: #fff;
    border: 1px solid var(--border-color, #E5E5EA);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 14px;
}

/* Cluster Header */
.cwpcf-cluster-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F2F2F0;
}

.cwpcf-cluster-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

/* Cluster Icon (36x36 tinted square) */
.cwpcf-cluster-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cwpcf-cluster-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.cwpcf-cluster-icon-money-in {
    background: #edf7ee;
}

.cwpcf-cluster-icon-money-in svg {
    stroke: #2e7d32;
}

.cwpcf-cluster-icon-money-out {
    background: #fef2f2;
}

.cwpcf-cluster-icon-money-out svg {
    stroke: #c62828;
}

.cwpcf-cluster-icon-health {
    background: #eef0f8;
}

.cwpcf-cluster-icon-health svg {
    stroke: #060f50;
}

.cwpcf-cluster-icon-explore {
    background: #F5F4F1;
}

.cwpcf-cluster-icon-explore svg {
    stroke: #555;
}

/* Cluster Summary (header right side) */
.cwpcf-cluster-summary {
    margin-left: auto;
    font-size: 24px;
    font-weight: 700;
}

.cwpcf-cluster-summary-positive {
    color: #2e7d32;
}

.cwpcf-cluster-summary-negative {
    color: #c62828;
}

.cwpcf-cluster-summary-brand {
    color: #060f50;
}

/* Cluster Grid (metric tiles) */
.cwpcf-cluster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}


/* Cluster Tile */
.cwpcf-cluster-tile {
    background: #DFDFDF;
    border: 1px solid #D0D0D0;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.2s;
}

.cwpcf-cluster-tile[data-modal-trigger] {
    cursor: pointer;
}

.cwpcf-cluster-tile:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

.cwpcf-cluster-tile h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #888;
    font-weight: 500;
    margin: 0 0 6px 0;
}

.cwpcf-tile-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cwpcf-tile-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Tile color variants */
.cwpcf-cluster-tile-positive .cwpcf-tile-value {
    color: #2e7d32;
}

.cwpcf-cluster-tile-negative .cwpcf-tile-value {
    color: #c62828;
}

.cwpcf-cluster-tile-warning .cwpcf-tile-value {
    color: #e65100;
}

.cwpcf-cluster-tile-info .cwpcf-tile-value {
    color: #1565c0;
}

/* Highlight Tile (Cash Available — full width) */
.cwpcf-cluster-highlight {
    background: #DFDFDF;
    border: 1px solid #D0D0D0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cwpcf-ch-left h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #888;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.cwpcf-ch-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cwpcf-ch-left .cwpcf-ch-label {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
}

.cwpcf-cluster-highlight-positive .cwpcf-ch-value {
    color: #2e7d32;
}

.cwpcf-cluster-highlight-negative .cwpcf-ch-value {
    color: #c62828;
}

/* Bank Account Breakdown */
.cwpcf-ch-accounts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.cwpcf-ch-account {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

.cwpcf-ch-acct-name {
    font-size: 12px;
    color: #888;
}

.cwpcf-ch-acct-val {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    min-width: 100px;
    text-align: right;
}

/* Chart inside cluster */
.cwpcf-cluster-chart {
    background: #DFDFDF;
    border: 1px solid #D0D0D0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 12px;
}

.cwpcf-cluster-chart h3 {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 0 0 12px 0;
}

/* Action Row (Explore cluster) */
.cwpcf-cluster-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #F2F2F0;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.cwpcf-cluster-action-row:last-child {
    border-bottom: none;
}

.cwpcf-cluster-action-row:hover {
    padding-left: 6px;
}

.cwpcf-ar-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #060f50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cwpcf-ar-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cwpcf-cluster-action-row h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.cwpcf-cluster-action-row p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.cwpcf-ar-arrow {
    margin-left: auto;
    color: #ccc;
    font-size: 18px;
    transition: all 0.2s;
}

.cwpcf-cluster-action-row:hover .cwpcf-ar-arrow {
    color: #060f50;
    transform: translateX(3px);
}

/* All Clear message (Money Going Out) */
.cwpcf-cluster-all-clear {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #d4edda;
    border-radius: 10px;
    margin-top: 12px;
}

.cwpcf-cluster-all-clear p {
    font-size: 14px;
    color: #2e7d32;
    margin: 0;
    font-weight: 500;
}

/* Health Insight Tiles */
.cwpcf-cluster-insight-positive {
    background: #f0fdf4 !important;
    border-color: #d4edda !important;
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
}

.cwpcf-cluster-insight-info {
    background: #eff6ff !important;
    border-color: #d5e3f5 !important;
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
}

.cwpcf-insight-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cwpcf-insight-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .cwpcf-cluster {
        padding: 16px;
    }

    .cwpcf-cluster-header {
        flex-wrap: wrap;
    }

    .cwpcf-cluster-summary {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        font-size: 20px;
    }

    .cwpcf-cluster-grid {
        grid-template-columns: 1fr;
    }

    .cwpcf-cluster-highlight {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .cwpcf-ch-accounts {
        text-align: left;
        width: 100%;
    }

    .cwpcf-ch-account {
        justify-content: space-between;
    }

    .cwpcf-ch-value {
        font-size: 24px;
    }

    .cwpcf-tile-value {
        font-size: 20px;
    }
}

