/* =============================================================================
   user.css — authenticated /user/* and /signals (loads after shared + public)
   Audit: scoped duplicate .signals-table (section vs card), horizontal table scroll,
   modal z-index above header chrome; duplicate CTA / dashboard hover rules consolidated.
   Spacing/colors: prefer shared.css :root tokens (--spacing-*, --text-*, etc.).
   ============================================================================= */

/* =============================================================================
   Migrated from shared.pre-refactor.css (design-system split)
   ============================================================================= */

.signal-preview {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.signal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.signal-row:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.subscriptions-section,
.signals-table-section {
    background: var(--glass-bg);
    padding: var(--spacing-xl) var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--elevation-1), 0 1px 0 0 rgba(255,255,255,0.8) inset;
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
    backdrop-filter: blur(14px);
}

.subscriptions-section::before,
.signals-table-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s var(--ease-out-expo);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.subscriptions-section:hover,
.signals-table-section:hover {
    box-shadow: var(--elevation-2), 0 1px 0 0 rgba(255,255,255,0.9) inset;
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.subscriptions-section:hover::before,
.signals-table-section:hover::before {
    transform: scaleX(1);
}

.subscriptions-section:hover .section-header::after,
.signals-table-section:hover .section-header::after {
    display: none;
}

/* Dashboard subscriptions table (when wrapped in .signals-table-section) */
.subscriptions-table,
.signals-table-section .signals-table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
}

/* /user/signals — override min-width + nowrap from block above so table fits viewport */
.signals-page .signals-table-section .signals-table:not(.signals-table--nowrap) {
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.signals-page .signals-table-section .signals-table:not(.signals-table--nowrap) th,
.signals-page .signals-table-section .signals-table:not(.signals-table--nowrap) td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* User /signals compact single-line table (overrides sticky header padding from block below where needed) */
.signals-page .signals-table-section .signals-table--nowrap th,
.signals-page .signals-table-section .signals-table--nowrap td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: normal;
}

.subscriptions-table thead,
.signals-table-section .signals-table thead {
    background: #F8FAFC;
    border-bottom: 2px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.subscriptions-table th,
.signals-table-section .signals-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #64748B;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-display);
    white-space: nowrap;
}

.subscriptions-table td,
.signals-table-section .signals-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    vertical-align: middle;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.subscriptions-table tbody tr,
.signals-table-section .signals-table tbody tr {
    transition: background-color var(--transition-fast);
}

.subscriptions-table tbody tr:nth-child(even),
.signals-table-section .signals-table tbody tr:nth-child(even) {
    background: #FAFBFC;
}

.subscriptions-table tbody tr:hover,
.signals-table-section .signals-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.subscriptions-table tbody tr:hover td:first-child,
.signals-table-section .signals-table tbody tr:hover td:first-child {
    color: var(--text-primary);
    font-weight: 600;
}

.subscriptions-table tbody tr:last-child td,
.signals-table-section .signals-table tbody tr:last-child td {
    border-bottom: none;
}

.signals-hero {
    background: #FFFFFF;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #E2E8F0;
}

.signals-hero::before {
    display: none;
}

.signals-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    color: #111827;
}

.signals-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(11, 37, 120, 0.08);
    color: #0B2578;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(11, 37, 120, 0.12);
}

.signals-hero .hero-badge i {
    width: 16px;
    height: 16px;
    color: #0B2578;
}

.signals-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: #111827;
    letter-spacing: -0.02em;
}

.signals-hero .hero-subtitle {
    font-size: 1.125rem;
    color: #6B7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.signals-table-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 0;
    margin-bottom: var(--spacing-2xl);
    overflow: hidden;
    transition: box-shadow var(--transition-smooth);
}

.signals-table-card:hover {
    box-shadow: var(--shadow-lg);
}

.signals-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-2xl);
    border-bottom: 2px solid var(--border-light);
    background: linear-gradient(135deg, var(--bg-white) 0%, #FAFBFC 100%);
}

.signals-table-header h2 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.375rem;
    font-weight: 700;
    color: #0B2578;
    margin: 0;
}

.signals-table-header h2 i {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

/* Public /signals — table lives inside .signals-table-card */
.signals-table-card .signals-table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
}

.signals-table-card .signals-table thead {
    background: #F9FAFB;
    position: sticky;
    top: 0;
    z-index: 10;
}

.signals-table-card .signals-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: #6B7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}

.signals-table-card .signals-table th i {
    color: #9CA3AF;
    font-size: 12px;
    margin-right: 6px;
}

.signals-table-card .signals-table tbody tr {
    background: #FFFFFF;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--border-light);
}

.signals-table-card .signals-table tbody tr:hover {
    background: #F9FAFB;
}

.signals-table-card .signals-table tbody tr:last-child {
    border-bottom: none;
}

.signals-table-card .signals-table td {
    padding: 16px 16px;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

.signals-table-card .signals-table td:first-child {
    font-weight: 700;
    color: #111827;
}

/* Duration column — keep table-cell display (flex on td breaks row layout in some engines) */
.signals-table-card .signals-table td:nth-child(7) {
    font-weight: 500;
    color: #374151;
    text-align: center;
    vertical-align: middle;
    padding: 12px 16px;
    background: transparent;
    border: none;
}

.signals-table-card .signals-table td:last-child a {
    color: #0EA5E9;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}

.signals-table-card .signals-table td:last-child .subscribe-badge {
    display: inline-block;
    background: #10B981;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

@media (max-width: 520px) {
    .plan-badge {
        top: -10px;
        right: var(--spacing-md);
        font-size: 0.6875rem;
        padding: 0.35rem 0.75rem;
    }

    .price-amount {
        font-size: 2rem;
    }

    .payment-method {
        padding: var(--spacing-md);
    }

    .qr-code {
        min-width: 160px;
        min-height: 160px;
        padding: var(--spacing-lg);
    }

    
    .trust-container {
        flex-direction: column;
        padding: var(--spacing-xl) var(--spacing-lg);
        gap: var(--spacing-lg);
    }

    .trust-divider {
        display: none;
    }

    .trust-item {
        width: 100%;
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-light);
    }

    .trust-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    
    .signals-hero {
        padding: 2rem 0;
    }

    .signals-hero h1 {
        font-size: 1.5rem;
    }

    .signals-hero .hero-subtitle {
        font-size: 0.9375rem;
    }

    .signals-table-card {
        border-radius: var(--radius-lg);
    }

    .signals-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }

    .signals-table-header h2 {
        font-size: 1.125rem;
    }

    .signals-table-header .btn {
        width: 100%;
    }

    .signals-table-section .signals-table th,
    .signals-table-section .signals-table td,
    .signals-table-card .signals-table th,
    .signals-table-card .signals-table td {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8125rem;
    }

    .signal-badge,
    .status-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }

    .signal-badge i,
    .status-badge i {
        display: none;
    }

    .duration-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }

    .pnl-value {
        font-size: 0.875rem;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .cta-text h3 {
        font-size: 1rem;
    }

    .cta-content .btn {
        width: 100%;
    }

    
    .dashboard-greeting {
        padding: var(--spacing-md);
    }

    .greeting-content {
        gap: var(--spacing-md);
    }

    .greeting-text h1 {
        font-size: 1.25rem;
    }

    .greeting-subtitle {
        font-size: 0.8125rem;
    }

    .user-dashboard-page .greeting-actions .dashboard-action-btn span {
        display: none;
    }

    .user-dashboard-page .greeting-actions .dashboard-action-btn {
        padding: 0.5rem;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .greeting-actions {
        flex-direction: row;
        width: auto;
        gap: var(--spacing-xs);
    }

    
    .auth-container {
        max-width: 100%;
    }

    .auth-card {
        padding: var(--spacing-xl);
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .captcha-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .flash-messages {
        left: var(--spacing-sm);
        right: var(--spacing-sm);
        top: var(--spacing-sm);
        max-width: none;
    }

    .alert {
        border-radius: var(--radius-md);
        font-size: 0.875rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

.dashboard-container .dashboard-greeting {
    animation: dashboardCardIn 0.5s var(--ease-out-expo) both;
}

.dashboard-container .subscriptions-section,
.dashboard-container .signals-table-section {
    animation: dashboardCardIn 0.6s var(--ease-out-expo) both;
}

.dashboard-container .subscriptions-section { animation-delay: 0.08s; }

.dashboard-container .signals-table-section { animation-delay: 0.12s; }

@keyframes dashboardCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-container .dashboard-greeting,
    .dashboard-container .subscriptions-section,
    .dashboard-container .signals-table-section {
        animation: none;
    }
}

.payment-page {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(180deg, var(--bg-gray-50) 0%, #F8FAFC 100%);
    min-height: 60vh;
}

.payment-page .page-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.payment-page .page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

/* Razorpay button: center align within payment card */
.payment-page .rzp-pay-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.user-layout .payment-amount-highlight {
    color: #2563eb !important;
    font-weight: 700;
    -webkit-text-fill-color: #2563eb !important;
}

body.user-layout a.subscription-legal-link {
    color: #0b2578;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.user-layout a.subscription-legal-link:hover {
    color: #1a9464;
}

.plan-card {
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    transition:
        transform var(--transition-smooth),
        box-shadow var(--transition-smooth),
        border-color var(--transition-smooth);
    position: relative;
    overflow: visible;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.plan-card.plan-featured {
    border: 2px solid var(--primary);
    transform: scale(1.03);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.plan-card.plan-featured:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: var(--shadow-xl), 0 0 0 6px rgba(99, 102, 241, 0.1);
}

.plan-card .btn {
    margin-top: auto;
    width: 100%;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
}

body.frontend .signals-hero,
body.user-layout .signals-hero,
.signals-hero {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E2E8F0 !important;
}

.signals-hero .hero-badge {
    background: rgba(11, 37, 120, 0.08) !important;
    color: #0B2578 !important;
    border: 1px solid rgba(11, 37, 120, 0.12) !important;
}

.signals-hero .hero-subtitle {
    color: #6B7280 !important;
}

.cta-trial-info {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.trial-days {
    font-size: 2.5rem;
    font-weight: 700;
    color: #16A34A;
    margin-bottom: 0.5rem;
}

.trial-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
}

.no-credit-required {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
}

/* Single canonical CTA shell (public + user); wins over stray rules in shared/public */
html body.frontend .signals-cta-banner,
html body.user-layout .signals-cta-banner,
body.frontend .signals-cta-banner,
body.user-layout .signals-cta-banner,
.signals-cta-banner {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--radius-xl) !important;
    padding: 2.5rem 2rem !important;
    position: relative !important;
    overflow: hidden !important;
}

html body.frontend .cta-content,
html body.user-layout .cta-content,
body.frontend .cta-content,
body.user-layout .cta-content,
.cta-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 3rem !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
}

html body.frontend .cta-content > div:first-child,
html body.user-layout .cta-content > div:first-child,
body.frontend .cta-content > div:first-child,
body.user-layout .cta-content > div:first-child,
.cta-content > div:first-child {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

html body.frontend .cta-content > div:last-child,
html body.user-layout .cta-content > div:last-child,
body.frontend .cta-content > div:last-child,
body.user-layout .cta-content > div:last-child,
.cta-content > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

html body.frontend .cta-premium-badge,
html body.user-layout .cta-premium-badge,
body.frontend .cta-premium-badge,
body.user-layout .cta-premium-badge,
.cta-premium-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 2rem !important;
    padding: 0.375rem 0.875rem !important;
    margin-bottom: 1rem !important;
    color: #111827 !important;
    width: fit-content !important;
    max-width: none !important;
    align-self: flex-start !important;
}

html body.frontend .cta-premium-badge i,
html body.user-layout .cta-premium-badge i,
body.frontend .cta-premium-badge i,
body.user-layout .cta-premium-badge i,
.cta-premium-badge i {
    width: 20px !important;
    height: 20px !important;
    color: #0B2578 !important;
}

html body.frontend .cta-premium-badge span,
html body.user-layout .cta-premium-badge span,
body.frontend .cta-premium-badge span,
body.user-layout .cta-premium-badge span,
.cta-premium-badge span {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #0B2578 !important;
}

html body.frontend .cta-content h3,
html body.user-layout .cta-content h3,
body.frontend .cta-content h3,
body.user-layout .cta-content h3,
.cta-content h3 {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    margin: 0 0 0.75rem 0 !important;
    color: #111827 !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

html body.frontend .cta-content p,
html body.user-layout .cta-content p,
body.frontend .cta-content p,
body.user-layout .cta-content p,
.cta-content p {
    font-size: 1.125rem !important;
    margin: 0 0 1.5rem 0 !important;
    color: #6B7280 !important;
    line-height: 1.6 !important;
    max-width: 500px !important;
}

html body.frontend .cta-features,
html body.user-layout .cta-features,
body.frontend .cta-features,
body.user-layout .cta-features,
.cta-features {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    margin-bottom: 0 !important;
}

html body.frontend .cta-feature,
html body.user-layout .cta-feature,
body.frontend .cta-feature,
body.user-layout .cta-feature,
.cta-feature {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    transition:
        background 0.3s ease !important,
        border-color 0.3s ease !important,
        transform 0.3s ease !important,
        box-shadow 0.3s ease !important;
}

html body.frontend .cta-feature:hover,
html body.user-layout .cta-feature:hover,
body.frontend .cta-feature:hover,
body.user-layout .cta-feature:hover,
.cta-feature:hover {
    background: rgba(22, 163, 74, 0.04) !important;
    border-color: rgba(22, 163, 74, 0.1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

html body.frontend .cta-feature i,
html body.user-layout .cta-feature i,
body.frontend .cta-feature i,
body.user-layout .cta-feature i,
.cta-feature i {
    width: 16px !important;
    height: 16px !important;
    color: #0B2578 !important;
}

html body.frontend .cta-feature span,
html body.user-layout .cta-feature span,
body.frontend .cta-feature span,
body.user-layout .cta-feature span,
.cta-feature span {
    font-size: 0.875rem !important;
    color: #111827 !important;
    font-weight: 500 !important;
}

html body.frontend .cta-trial-info,
html body.user-layout .cta-trial-info,
body.frontend .cta-trial-info,
body.user-layout .cta-trial-info,
.cta-trial-info {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 1rem !important;
    padding: 2rem 2.5rem !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
}

html body.frontend .trial-days,
html body.user-layout .trial-days,
body.frontend .trial-days,
body.user-layout .trial-days,
.trial-days {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #16A34A !important;
    margin-bottom: 0.5rem !important;
    line-height: 1 !important;
}

html body.frontend .trial-label,
html body.user-layout .trial-label,
body.frontend .trial-label,
body.user-layout .trial-label,
.trial-label {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
}

html body.frontend .btn-brand,
html body.user-layout .btn-brand,
body.frontend .btn-brand,
body.user-layout .btn-brand,
.btn-brand {
    background: #16A34A !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 1rem 2.5rem !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    transition:
        background-color 0.3s ease !important,
        color 0.3s ease !important,
        transform 0.3s ease !important,
        box-shadow 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    min-width: 200px !important;
    justify-content: center !important;
    margin-bottom: 1rem !important;
}

html body.frontend .btn-brand:hover,
html body.user-layout .btn-brand:hover,
body.frontend .btn-brand:hover,
body.user-layout .btn-brand:hover,
.btn-brand:hover {
    background: #15803D !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.35) !important;
}

html body.frontend .no-credit-required,
html body.user-layout .no-credit-required,
body.frontend .no-credit-required,
body.user-layout .no-credit-required,
.no-credit-required {
    font-size: 0.875rem !important;
    color: #6B7280 !important;
    margin: 0 !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    html body.frontend .cta-content,
    html body.user-layout .cta-content,
    body.frontend .cta-content,
    body.user-layout .cta-content,
    .cta-content {
        flex-direction: column !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    html body.frontend .cta-content h3,
    html body.user-layout .cta-content h3,
    body.frontend .cta-content h3,
    body.user-layout .cta-content h3,
    .cta-content h3 {
        font-size: 1.875rem !important;
        text-align: center !important;
    }
    
    html body.frontend .cta-content p,
    html body.user-layout .cta-content p,
    body.frontend .cta-content p,
    body.user-layout .cta-content p,
    .cta-content p {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    html body.frontend .cta-features,
    html body.user-layout .cta-features,
    body.frontend .cta-features,
    body.user-layout .cta-features,
    .cta-features {
        justify-content: center !important;
    }
}

body.user-layout .heading-primary,
body.user-layout .page-header h1 .heading-primary,
body.user-layout .contact-form-section h2 .heading-primary,
body.user-layout .contact-details-section h2 .heading-primary,
body.user-layout .section-title .heading-primary,
body.user-layout .section-header h2 .heading-primary,
body.user-layout .greeting-title .heading-primary,
body.user-layout .welcome-header h1 .heading-primary,
body.user-layout .user-autotrade-broker-name .heading-primary,
body.user-layout .support-card__title .heading-primary,
body.user-layout .hero-gradient-text .heading-primary {
    color: #0B2578 !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #0B2578 !important;
}

body.user-layout .heading-accent,
body.user-layout .page-header h1 .heading-accent,
body.user-layout .contact-form-section h2 .heading-accent,
body.user-layout .contact-details-section h2 .heading-accent,
body.user-layout .section-title .heading-accent,
body.user-layout .section-header h2 .heading-accent,
body.user-layout .greeting-title .heading-accent,
body.user-layout .welcome-header h1 .heading-accent,
body.user-layout .user-autotrade-broker-name .heading-accent,
body.user-layout .support-card__title .heading-accent,
body.user-layout .hero-gradient-text .heading-accent {
    color: #1A9464 !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #1A9464 !important;
}

body.user-layout h1,
body.user-layout h2,
body.user-layout h3,
body.user-layout h4,
body.user-layout h5,
body.user-layout h6,
body.user-layout .hero-gradient-text,
body.user-layout .section-title,
body.user-layout .testimonials-title,
body.user-layout .about-hero-headline,
body.user-layout .page-header h1,
body.user-layout .section-header h2,
body.user-layout .product-header h1,
body.user-layout .plan-header h3,
body.user-layout .contact-form-section h2,
body.user-layout .contact-details-section h2,
body.user-layout .support-card__title,
body.user-layout .blue-half,
body.user-layout .green-half {
    color: #0B2578 !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #0B2578 !important;
}

body.user-layout .blue-half,
body.user-layout .hero-gradient-text .blue-half,
body.user-layout .section-title .blue-half {
    color: #0B2578 !important;
    -webkit-text-fill-color: #0B2578 !important;
}

body.user-layout .green-half,
body.user-layout .title-accent,
body.user-layout .hero-gradient-text .green-half,
body.user-layout .section-title .green-half {
    color: #1A9464 !important;
    -webkit-text-fill-color: #1A9464 !important;
}

.card,
.service-card,
.plan-card,
.feature-card {
    padding: var(--card-padding);
    margin-bottom: var(--card-margin);
}
/* ==========================================================================
   USER SURFACE CSS — TradeSignals
   Load order: shared.css → public.css → notifications.css → user.css
   Routes: /user/* and /signals only (see layout.html)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAYOUT — body shell & cross-page theme hooks
   -------------------------------------------------------------------------- */

body.user-layout {
    background: var(--bg-white, #ffffff);
    color: var(--text-primary, #0b2578);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.user-layout .btn-primary:focus-visible,
body.user-layout .btn:focus-visible {
    box-shadow: var(--ring);
}

body.user-layout .services-section::before {
    display: none;
}

body.user-layout .dashboard-container {
    background: var(--bg-gray-50);
}

body.user-layout .dashboard-container::before {
    display: none;
}

body.user-layout .signals-hero {
    background: #ffffff;
    color: #111827;
    box-shadow: none;
}

body.user-layout .filter-chip.active {
    background: #0B2578;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.user-layout .payment-method.active {
    background: rgba(11, 37, 120, 0.06);
    box-shadow: 0 0 0 2px rgba(11, 37, 120, 0.25);
}

body.user-layout .services-section .service-card.service-card--featured {
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow:
        var(--shadow-md),
        0 0 0 1px rgba(220, 38, 38, 0.2);
}

body.user-layout .plan-card.plan-featured {
    border-color: var(--primary-color, #0b2578);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
    z-index: 2;
    position: relative;
}

body.user-layout .plan-card.plan-featured:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

body.user-layout .plan-card:hover {
    border-color: rgba(11, 37, 120, 0.25);
}

body.user-layout .details-section:hover,
body.user-layout .payment-section:hover {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Signals date modal / quick filters (user signals + shared patterns) */
body.user-layout .quick-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

body.user-layout .quick-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-secondary, #475569);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    line-height: 1.4;
}

body.user-layout .quick-filter-btn:hover {
    border-color: rgba(11, 37, 120, 0.3);
    background: rgba(11, 37, 120, 0.04);
    color: #0B2578;
}

body.user-layout .quick-filter-btn.active {
    border-color: #0B2578;
    background: #0B2578;
    color: #ffffff;
}

body.user-layout .quick-filter-btn .btn-icon {
    width: 16px;
    height: 16px;
}

body.user-layout .custom-date-range {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1.5rem;
}

body.user-layout .date-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

body.user-layout .date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    body.user-layout .date-inputs {
        grid-template-columns: 1fr;
    }
}

body.user-layout .date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body.user-layout .date-input-group label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #0f172a);
    line-height: 1.4;
}

body.user-layout .date-input {
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-primary, #0f172a);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
}

body.user-layout .date-input:focus {
    outline: none;
    border-color: #0B2578;
    box-shadow: 0 0 0 2px rgba(11, 37, 120, 0.15);
}

body.user-layout .date-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

body.user-layout .date-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1.4;
    text-decoration: none;
    border: none;
}

body.user-layout .date-actions .btn-primary {
    background: #0B2578;
    color: #ffffff;
}

body.user-layout .date-actions .btn-primary:hover {
    background: #082a5c;
}

body.user-layout .date-actions .btn .btn-icon {
    width: 16px;
    height: 16px;
}

/* --------------------------------------------------------------------------
   2. DASHBOARD — container, welcome, actions
   -------------------------------------------------------------------------- */

.dashboard-container {
    background: #fafbfc;
    padding: 0 0 2.4rem;
    min-height: 60vh;
    position: relative;
}

.dashboard-container .container {
    position: relative;
    z-index: 1;
}

.dashboard-welcome {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    background: transparent;
}

.welcome-header {
    text-align: center;
    margin-bottom: 20px;
}

.welcome-header h1 {
    font-family: var(--font-display, "Plus Jakarta Sans", "Inter", sans-serif);
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-align: center;
}

.welcome-header .user-email {
    font-size: 16px;
    color: var(--text-secondary, #64748b);
    margin: 8px 0 0;
    font-weight: 400;
    text-align: center;
}

.welcome-header .user-email em {
    color: var(--primary-color, #0b2578);
    font-style: normal;
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .dashboard-welcome {
        padding: 16px 0;
    }

    .welcome-header h1 {
        font-size: 24px;
    }

    .welcome-header .user-email,
    .user-email {
        font-size: 14px;
    }

    .welcome-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .welcome-actions .dashboard-action-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .dashboard-container {
        padding: 2rem 0;
    }
}

/* --------------------------------------------------------------------------
   3. PROFILE — stats ( /user/profile )
   -------------------------------------------------------------------------- */

.stats-grid {
    display: grid;
    gap: var(--spacing-fluid-md);
    grid-template-columns: 1fr;
}

.stat-card {
    background: var(--bg-white, #ffffff);
    border-radius: var(--radius-lg);
    padding: var(--spacing-fluid-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
    transition:
        box-shadow var(--transition-smooth),
        transform var(--transition-smooth);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-value {
    font-size: var(--text-fluid-3xl);
    font-weight: 700;
    color: var(--text-primary, #0b2578);
    margin-bottom: var(--spacing-fluid-xs);
}

.stat-label {
    font-size: var(--text-fluid-sm);
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-fluid-xs);
    padding: var(--spacing-fluid-xs) var(--spacing-fluid-sm);
    border-radius: var(--radius);
    font-size: var(--text-fluid-xs);
    font-weight: 500;
    margin-top: var(--spacing-fluid-sm);
}

.stat-change.positive {
    background: var(--success-bg, #f0fdf4);
    color: var(--success, #16a34a);
}

.stat-change.negative {
    background: var(--error-bg, #fef2f2);
    color: var(--error, #dc2626);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   4. SIGNALS — page shell (/user/signals, /signals)
   -------------------------------------------------------------------------- */

.signals-page {
    padding: var(--spacing-fluid-md);
    background: linear-gradient(180deg, var(--bg-gray-50, #ffffff) 0%, #f8fafc 100%);
    min-height: calc(100vh - 80px);
}

@media (min-width: 768px) {
    .signals-page {
        padding: var(--spacing-fluid-lg);
    }
}

@media (min-width: 1024px) {
    .signals-page {
        padding: var(--spacing-fluid-xl);
    }
}

/* --------------------------------------------------------------------------
   5. AUTOTRADE — broker hub (/user/auto-trade)
   -------------------------------------------------------------------------- */

.user-autotrade-dashboard .subscriptions-section.user-autotrade-brokers-section,
.user-autotrade-dashboard .subscriptions-section.user-autotrade-orders-section {
    max-width: 1200px;
    width: 100%;
    text-align: left;
}

.user-autotrade-dashboard .user-autotrade-brokers-section .section-header,
.user-autotrade-dashboard .user-autotrade-orders-section .section-header {
    text-align: center;
}

.user-autotrade-dashboard .user-autotrade-section-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.user-autotrade-dashboard .section-header.user-autotrade-section-header-row {
    text-align: left;
}

.user-autotrade-dashboard .user-autotrade-section-header-row h2 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 200px;
}

.user-autotrade-dashboard .user-autotrade-section-lead {
    color: var(--text-muted, #64748b);
    margin-top: 0.5rem;
    margin-bottom: 0;
    width: 100%;
    text-align: center;
}

.user-autotrade-dashboard .dashboard-welcome {
    background: var(--bg-white, #ffffff);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color, #e5e7eb);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.user-autotrade-dashboard .welcome-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.user-autotrade-dashboard .welcome-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.user-autotrade-dashboard .welcome-header .user-email {
    font-size: 1.125rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
    font-weight: 500;
}

.user-autotrade-dashboard .welcome-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.user-autotrade-dashboard .welcome-actions .dashboard-action-btn:only-child {
    flex: 0 1 auto;
    max-width: 280px;
}

.user-autotrade-broker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.user-autotrade-dashboard .user-autotrade-broker-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1.35rem;
    background: #ffffff;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.user-autotrade-dashboard .user-autotrade-broker-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.user-autotrade-dashboard .user-autotrade-broker-card.is-connected {
    border: 1px solid #d1fae5;
    background: rgba(209, 250, 229, 0.12);
}

.user-autotrade-dashboard .user-autotrade-brokers-summary {
    display: flex;
    gap: 1.5rem 2rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.user-autotrade-dashboard .brokers-summary-item {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

.user-autotrade-dashboard .brokers-summary-value {
    color: #0b2578;
    font-weight: 700;
}

.user-autotrade-broker-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.user-autotrade-dashboard .user-autotrade-broker-card-head {
    margin: 0;
    padding: 0;
}

.user-autotrade-broker-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.user-autotrade-dashboard .user-autotrade-broker-card-head .user-autotrade-broker-name {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 1.125rem;
    line-height: 1.35;
}

.user-autotrade-dashboard .user-autotrade-broker-card-head .user-autotrade-broker-status-text {
    flex-shrink: 0;
    text-align: right;
    max-width: 48%;
}

.user-autotrade-dashboard .user-autotrade-broker-desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-muted, #64748b);
    text-align: left;
}

.user-autotrade-dashboard .user-autotrade-broker-status-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.user-autotrade-dashboard .user-autotrade-broker-status-text--connected {
    color: #16a34a;
}

.user-autotrade-dashboard .user-autotrade-broker-status-text--not-connected {
    color: #6b7280;
}

.user-autotrade-dashboard .user-autotrade-broker-last-connected {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    text-align: left;
}

.user-autotrade-broker-meta {
    margin-bottom: 1rem;
}

.user-autotrade-broker-status-line {
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    margin: 0.5rem 0;
}

.user-autotrade-broker-last {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin: 0.25rem 0;
}

.user-autotrade-status-active {
    color: var(--success-color, #16a34a);
}

.user-autotrade-status-inactive {
    color: var(--warning-color, #f59e0b);
}

.user-autotrade-broker-hint {
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 1rem;
}

.user-autotrade-broker-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.user-autotrade-dashboard .user-autotrade-broker-actions {
    justify-content: center;
    align-items: stretch;
    width: 100%;
    padding-top: 0.35rem;
}

.user-autotrade-broker-action-form {
    flex: 1;
    margin: 0;
}

.user-autotrade-dashboard .user-autotrade-broker-action-form {
    flex: 0 1 280px;
    width: 100%;
    max-width: 280px;
}

.user-autotrade-btn-block {
    width: 100%;
}

.user-autotrade-dashboard .user-autotrade-broker-actions > a.user-autotrade-btn-block {
    flex: 0 1 280px;
    max-width: 280px;
    width: 100%;
    justify-content: center;
}

.user-autotrade-dashboard .user-autotrade-connected-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg, 12px);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    color: #166534;
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.4);
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.user-autotrade-dashboard .user-autotrade-broker-actions > .user-autotrade-connected-pill {
    flex: 0 1 280px;
    max-width: 280px;
    width: 100%;
}

.user-autotrade-btn-flex {
    flex: 1;
    text-align: center;
}

.user-autotrade-orders-section {
    margin-top: 2rem;
}

.user-autotrade-table-wrap {
    margin-top: 1rem;
}

.user-autotrade-dashboard .badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.user-autotrade-how-it-works {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg, var(--bg-white, #ffffff));
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.user-autotrade-how-it-works h3 {
    margin: 0 0 1rem;
    color: var(--text-primary, #0b2578);
}

.user-autotrade-how-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-autotrade-how-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-secondary, #475569);
}

.user-autotrade-how-list li:last-child {
    border-bottom: none;
}

.user-autotrade-dashboard .user-autotrade-empty-cell {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #64748b);
}

.user-autotrade-dashboard .user-autotrade-log-detail {
    max-width: 280px;
    word-break: break-word;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .user-autotrade-dashboard .dashboard-welcome {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .user-autotrade-dashboard .welcome-header h1 {
        font-size: 2rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .user-autotrade-dashboard .welcome-header .user-email {
        font-size: 1rem;
    }

    .user-autotrade-dashboard .welcome-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
        width: 100%;
    }

    .user-autotrade-dashboard .dashboard-action-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        max-width: none;
        min-height: 48px;
        flex: none;
        justify-content: center;
        box-sizing: border-box;
    }

    .user-autotrade-dashboard .welcome-actions .dashboard-action-btn:only-child {
        max-width: none;
        width: 100%;
    }

    .user-autotrade-dashboard .dashboard-action-btn span {
        display: inline;
    }

    .user-autotrade-broker-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .user-autotrade-dashboard .user-autotrade-section-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .user-autotrade-dashboard .user-autotrade-section-header-row h2 {
        min-width: 0;
        width: 100%;
        text-align: center;
    }

    .user-autotrade-dashboard .user-autotrade-section-header-row .btn {
        width: 100%;
        max-width: none;
        min-height: 48px;
        box-sizing: border-box;
        justify-content: center;
    }

    .user-autotrade-dashboard .user-autotrade-brokers-summary {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .user-autotrade-dashboard .user-autotrade-how-it-works {
        padding: 1.125rem 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .user-autotrade-dashboard .user-autotrade-broker-card-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .user-autotrade-dashboard .user-autotrade-broker-card-head .user-autotrade-broker-status-text {
        max-width: none;
        width: 100%;
        text-align: left;
        margin-top: 0.25rem;
    }

    @media (min-width: 400px) {
        .user-autotrade-dashboard .user-autotrade-broker-card-head {
            flex-wrap: nowrap;
            align-items: center;
        }

        .user-autotrade-dashboard .user-autotrade-broker-card-head .user-autotrade-broker-status-text {
            width: auto;
            text-align: right;
            margin-top: 0;
            max-width: 48%;
        }
    }
}

/* --------------------------------------------------------------------------
   6. SUBSCRIPTIONS & TABLES
   -------------------------------------------------------------------------- */

.subscriptions-section {
    margin-bottom: var(--spacing-2xl, 3rem);
}

.subscriptions-section form {
    text-align: left;
}

.subscriptions-section .subscriptions-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.subscriptions-section .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius, 0.5rem);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.subscriptions-section .btn-primary {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
    border-color: var(--primary-color, #2563eb);
}

.subscriptions-section .btn-primary:hover {
    background: var(--primary-hover, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.section-header {
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.section-header h2 {
    font-family: var(--font-display, "Plus Jakarta Sans", "Inter", sans-serif);
    font-size: var(--text-2xl, clamp(1.5rem, 5vw, 2rem));
    font-weight: 700;
    margin: 0;
}

.subscriptions-table-container {
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
    border-radius: var(--radius-lg, 1rem);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
}

/* Subscription detail — page top (back link + title) */
.subscription-detail-page__top {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.subscription-detail-page__top h1 {
    margin-top: 0;
}

/* /user/subscription detail — SaaS-style billing cards (2-col → 1-col) */
.subscription-detail-page .subscription-billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .subscription-detail-page .subscription-billing-grid {
        grid-template-columns: 1fr;
    }

    .subscription-detail-page__top {
        margin-bottom: 1.25rem;
        padding-top: 0.125rem;
    }
}

.subscription-detail-page .subscription-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.375rem 1.5rem;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.06),
        0 4px 14px rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

.subscription-detail-page .subscription-panel__title {
    font-family: var(--font-display, "Plus Jakarta Sans", "Inter", sans-serif);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary, #0b2578);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    letter-spacing: -0.01em;
}

.subscription-detail-page .subscription-panel__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subscription-detail-page .subscription-detail-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.subscription-detail-page .subscription-detail-row--wrap {
    flex-wrap: wrap;
    align-items: flex-start;
}

.subscription-detail-page .subscription-detail-row--wrap .subscription-value--rejection {
    flex: 1 1 100%;
    min-width: 0;
}

.subscription-detail-page .subscription-field-label {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.subscription-detail-page .subscription-field-label::after {
    content: ':';
    margin-left: 0.0625rem;
}

body.user-layout .subscription-detail-page .subscription-panel .subscription-value:not(.subscription-value--badges):not(.subscription-value--rejection) {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    opacity: 1;
    -webkit-text-fill-color: #111827;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.subscription-detail-page .subscription-panel .subscription-value--badges {
    font-size: 0.9375rem;
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.subscription-detail-page .subscription-value--rejection {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #b91c1c !important;
    -webkit-text-fill-color: #b91c1c !important;
    padding: 0.75rem 1rem;
    background: rgba(220, 38, 38, 0.08);
    border-radius: 8px;
    border-left: 3px solid #dc2626;
    word-break: break-word;
}

/* Status & payment badges (subscription detail page + transactions table on same page) */
.subscription-detail-page .status-badge,
.subscription-detail-page .payment-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    display: inline-block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    line-height: 1.25;
}

.subscription-detail-page .status-pending {
    background: #fff4e5;
    color: #d97706;
}

.subscription-detail-page .status-approved {
    background: #dcfce7;
    color: #15803d;
}

.subscription-detail-page .status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.subscription-detail-page .status-expired {
    background: #f1f5f9;
    color: #64748b;
}

.subscription-detail-page .payment-pending {
    background: #fef3c7;
    color: #b45309;
}

.subscription-detail-page .payment-completed {
    background: #dcfce7;
    color: #15803d;
}

.subscription-detail-page .payment-failed {
    background: #fee2e2;
    color: #dc2626;
}

/* Horizontal scroll wrapper (subscription detail + reusable) */
.table-scroll {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Scope min-width to subscription detail so other pages’ tables are unchanged */
.subscription-detail-page .table-scroll table {
    min-width: 1000px;
}

.subscription-detail-callout {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg, 0.5rem);
    text-align: center;
    opacity: 1;
}

.subscription-detail-callout--neutral {
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.subscription-detail-callout--pending {
    background: rgba(245, 158, 11, 0.12);
    border-left: 3px solid #f59e0b;
}

.subscription-detail-callout--rejected {
    background: rgba(220, 38, 38, 0.08);
    border-left: 3px solid #dc2626;
}

.subscription-detail-callout__text {
    margin: 0 0 1.5rem;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
}

.subscription-detail-callout--pending .subscription-detail-callout__text,
.subscription-detail-callout--rejected .subscription-detail-callout__text {
    margin-bottom: 0;
}

.subscriptions-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    border-spacing: 0;
    /* More compact for transaction tables while keeping readability */
    font-size: 14px;
}

.subscriptions-table thead {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

.subscriptions-table th {
    padding: 0.65rem 0.9rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary, #0b2578);
    font-family: var(--font-body, "Inter", sans-serif);
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.2;
}

.subscriptions-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
    vertical-align: middle;
    transition: background var(--transition-fast, 0.2s ease);
    font-size: 14px;
    line-height: 1.25;
}

.subscriptions-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.subscriptions-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(11, 37, 120, 0.06) 0%, rgba(11, 37, 120, 0.03) 100%);
}

.subscriptions-table tbody tr:hover td:first-child {
    color: var(--text-primary, #0b2578);
    font-weight: 600;
}

.subscriptions-table td:last-child {
    vertical-align: middle;
}

.subscriptions-table td:last-child .d-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    min-height: 40px;
}

.btn-renew {
    background: var(--primary, #2563eb);
    color: var(--text-white, #ffffff);
    padding: 6px 16px;
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast, 0.2s ease);
    height: 32px;
    min-height: 32px;
    max-height: 32px;
}

.btn-renew:hover {
    background: #1d4ed8;
    color: var(--text-white, #ffffff);
    text-decoration: none;
}

.btn-renew-disabled {
    background: #e5e7eb;
    color: #9ca3af;
    padding: 6px 16px;
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    border: none;
    cursor: not-allowed;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
}

.details-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary, #2563eb);
    color: var(--text-white, #ffffff);
    border: none;
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color var(--transition-fast, 0.2s ease),
        color var(--transition-fast, 0.2s ease),
        transform var(--transition-fast, 0.2s ease),
        box-shadow var(--transition-fast, 0.2s ease);
}

.details-btn:hover {
    background: #1d4ed8;
    color: var(--text-white, #ffffff);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    text-decoration: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl, 3rem);
    color: var(--text-secondary, #6b7280);
}

.empty-state p {
    font-size: var(--text-lg, clamp(1.125rem, 3.5vw, 1.25rem));
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius, 0.75rem);
    margin-bottom: var(--spacing-lg, 1.5rem);
    border: 1px solid;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #92400e;
}

@media (max-width: 768px) {
    body.user-layout .dashboard-container {
        overflow-x: clip;
        max-width: 100%;
    }

    .user-dashboard-page .dashboard-container .container,
    .subscription-detail-page .container,
    .user-autotrade-dashboard .container {
        max-width: 100%;
        padding-left: max(1rem, var(--page-gutter, 16px));
        padding-right: max(1rem, var(--page-gutter, 16px));
        box-sizing: border-box;
    }

    /* Subscriptions, payment transactions, AutoTrade orders — stacked card rows */
    .user-dashboard-page .subscriptions-table-container,
    .subscription-detail-page .subscriptions-table-container,
    .user-autotrade-dashboard .subscriptions-table-container.user-autotrade-table-wrap {
        overflow-x: visible;
        max-width: 100%;
    }

    .subscription-detail-page .table-scroll {
        overflow-x: visible;
        max-width: 100%;
    }

    .subscription-detail-page .table-scroll .subscriptions-table {
        min-width: 0 !important;
    }

    .user-dashboard-page .subscriptions-table,
    .subscription-detail-page .subscriptions-table,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table {
        min-width: 0 !important;
        width: 100%;
        display: block;
    }

    .user-dashboard-page .subscriptions-table thead,
    .subscription-detail-page .subscriptions-table thead,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table thead {
        display: none;
    }

    .user-dashboard-page .subscriptions-table tbody,
    .subscription-detail-page .subscriptions-table tbody,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table tbody {
        display: block;
    }

    .user-dashboard-page .subscriptions-table tbody tr,
    .subscription-detail-page .subscriptions-table tbody tr,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        padding: 0.875rem 1rem;
        border: 1px solid var(--border-light, #e5e7eb);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .user-dashboard-page .subscriptions-table tbody tr:nth-child(even),
    .subscription-detail-page .subscriptions-table tbody tr:nth-child(even),
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table tbody tr:nth-child(even) {
        background: #fff;
    }

    .user-dashboard-page .subscriptions-table td,
    .subscription-detail-page .subscriptions-table td,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0.45rem 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        text-align: left !important;
        vertical-align: top;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .user-dashboard-page .subscriptions-table td:last-child,
    .subscription-detail-page .subscriptions-table td:last-child,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table td:last-child {
        border-bottom: none;
    }

    .user-dashboard-page .subscriptions-table td::before,
    .subscription-detail-page .subscriptions-table td::before,
    .user-autotrade-dashboard .user-autotrade-table-wrap .subscriptions-table td::before {
        display: block;
        content: attr(data-label);
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #64748b;
        margin-bottom: 0.2rem;
    }

    .user-autotrade-dashboard .subscriptions-table td.user-autotrade-empty-cell::before {
        content: none;
        display: none;
        margin: 0;
    }

    .user-autotrade-dashboard .subscriptions-table td.user-autotrade-empty-cell {
        text-align: center;
        padding: 1.25rem 0.5rem;
        border: none;
    }

    .user-dashboard-page .subscriptions-table td .subscription-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        width: 100%;
        min-width: 0;
    }

    .user-dashboard-page .subscriptions-table td .subscription-actions .btn,
    .user-dashboard-page .subscriptions-table td .subscription-actions .details-btn {
        width: 100%;
        max-width: none;
        min-height: 44px;
        justify-content: center;
        box-sizing: border-box;
    }

    /* Subscription detail — label above value on small screens */
    .subscription-detail-page .subscription-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .subscription-detail-page .subscription-field-label {
        white-space: normal;
    }

    .subscription-detail-page .subscription-field-label::after {
        content: none;
    }

    .subscription-detail-page .subscription-panel {
        padding: 1.125rem 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .subscription-detail-page .subscription-billing-grid {
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .subscription-detail-callout {
        margin-top: 1.25rem;
        padding: 1.125rem 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .subscription-detail-callout h3 {
        line-height: 1.3;
        overflow-wrap: anywhere;
        font-size: clamp(1rem, 4.2vw, 1.2rem);
    }

    .subscription-detail-callout__text {
        overflow-wrap: anywhere;
        font-size: 0.9375rem;
    }

    .subscription-detail-page .container > div:first-child h1 {
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    /* AutoTrade plan landing (no subscription yet) */
    .product-detail-page .autotrade-benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* --------------------------------------------------------------------------
   7. DASHBOARD CARDS (single definition)
   -------------------------------------------------------------------------- */

.dashboard-card {
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
    border-radius: var(--radius-lg, 1rem);
    padding: 1.5rem;
    transition:
        box-shadow var(--transition-smooth, 0.35s ease),
        transform var(--transition-smooth, 0.35s ease),
        border-color var(--transition-smooth, 0.35s ease);
    position: relative;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.04));
    transform: translateY(-2px);
    border-color: rgba(11, 37, 120, 0.15);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md, 1rem);
}

.dashboard-card-title {
    font-size: var(--text-xl, clamp(1.25rem, 4vw, 1.5rem));
    font-weight: 600;
    color: var(--text-primary, #0b2578);
    margin: 0;
}

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius, 0.75rem);
    background: var(--primary, #0b2578);
    color: var(--text-white, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-card-content {
    color: var(--text-secondary, #6b7280);
    font-size: var(--text-base, clamp(1rem, 3vw, 1.125rem));
    line-height: 1.6;
}

@media (max-width: 768px) {
    .dashboard-card {
        padding: 1.25rem;
    }
}

/* --------------------------------------------------------------------------
   8. FORMS — dashboard date filter modal
   -------------------------------------------------------------------------- */

#dateFilterModal.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    /* Above header (1000) and mobile menu (2000) */
    z-index: 2500;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

#dateFilterModal.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#dateFilterModal .modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 420px;
    max-width: calc(90vw - 40px);
    max-height: calc(90vh - 40px);
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: userDashboardModalFade 0.25s ease;
    margin: 0;
    position: relative;
}

@keyframes userDashboardModalFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#dateFilterModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#dateFilterModal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

#dateFilterModal .modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s ease, color 0.2s ease;
}

#dateFilterModal .modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

#dateFilterModal .form-group {
    margin-bottom: 1rem;
}

#dateFilterModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

#dateFilterModal .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

#dateFilterModal .form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#dateFilterModal .modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

#dateFilterModal .modal-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
}

#dateFilterModal .modal-actions .btn-primary {
    background: #2563eb;
    color: #ffffff;
}

#dateFilterModal .modal-actions .btn-primary:hover {
    background: #1d4ed8;
}

#dateFilterModal .modal-actions .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

#dateFilterModal .modal-actions .btn-secondary:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    #dateFilterModal.modal-overlay {
        padding: 10px;
    }

    #dateFilterModal .modal-content {
        width: calc(90vw - 20px);
        max-height: calc(90vh - 20px);
        margin: 0;
    }
}

@media (max-width: 480px) {
    #dateFilterModal.modal-overlay {
        padding: 5px;
    }

    #dateFilterModal .modal-content {
        width: calc(95vw - 10px);
        max-height: calc(90vh - 10px);
        margin: 0;
        padding: 20px;
    }

    #dateFilterModal .modal-header h3 {
        font-size: 1.125rem;
    }

    #dateFilterModal .form-control {
        padding: 0.625rem;
        font-size: 0.8125rem;
    }

    #dateFilterModal .modal-actions {
        flex-direction: column;
    }

    #dateFilterModal .modal-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #dateFilterModal .modal-actions .btn:last-child {
        margin-bottom: 0;
    }
}

/* --------------------------------------------------------------------------
   9. USER DASHBOARD PAGE — greeting & subscription badges
   -------------------------------------------------------------------------- */

.user-dashboard-page .dashboard-greeting {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.user-dashboard-page .greeting-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.user-dashboard-page .greeting-text {
    flex: 1;
}

.user-dashboard-page .greeting-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-align: left;
}

.user-dashboard-page .greeting-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-dashboard-page .greeting-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-dashboard-page .greeting-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-dashboard-page .greeting-btn i {
    width: 16px;
    height: 16px;
}

.user-dashboard-page .subscription-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    min-width: 120px;
    flex-wrap: nowrap;
}

.user-dashboard-page .subscriptions-table .status-badge,
.user-dashboard-page .subscriptions-table .payment-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.user-dashboard-page .subscriptions-table .status-badge.status-pending {
    background: #fff4e5;
    color: #f59e0b;
}

.user-dashboard-page .subscriptions-table .status-badge.status-approved {
    background: #e6f7ee;
    color: #16a34a;
}

.user-dashboard-page .subscriptions-table .status-badge.status-rejected {
    background: #feecec;
    color: #ef4444;
}

.user-dashboard-page .subscriptions-table .status-badge.status-expired {
    background: #f1f5f9;
    color: #64748b;
}

.user-dashboard-page .subscriptions-table .payment-badge.payment-pending {
    background: #fef3c7;
    color: #d97706;
}

.user-dashboard-page .subscriptions-table .payment-badge.payment-completed {
    background: #dcfce7;
    color: #15803d;
}

@media (max-width: 768px) {
    .user-dashboard-page .dashboard-greeting {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .user-dashboard-page .greeting-content {
        flex-direction: column;
        gap: 1.25rem;
        align-items: stretch;
    }

    .user-dashboard-page .greeting-title {
        font-size: 1.5rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .user-dashboard-page .greeting-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
        width: 100%;
    }

    .user-dashboard-page .greeting-btn {
        width: 100%;
        max-width: none;
        min-height: 48px;
        justify-content: center;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .user-dashboard-page .dashboard-greeting {
        padding: 1rem;
    }

    .user-dashboard-page .greeting-title {
        font-size: 1.25rem;
    }

    .user-dashboard-page .greeting-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .user-dashboard-page .greeting-btn {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;
    }
}

/* --------------------------------------------------------------------------
   10. PLANS — AutoTrade section shell + unified plan cards
   -------------------------------------------------------------------------- */

/* Shared shell for product package plans + AutoTrade plans */
.unified-pricing-section {
    padding: clamp(2.5rem, 6vw, 3.75rem) 0;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 45%, #f8f9fa 100%);
}

.product-detail-page .pricing-container,
.unified-pricing-section .pricing-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.unified-pricing-section .unified-plan-card,
.product-detail-page .unified-plan-card {
    margin: 0;
}

.unified-plan-card {
    width: 260px;
    background: #fff;
    border-radius: 14px;
    text-align: center;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 12px 28px rgba(15, 23, 42, 0.1);
    padding-bottom: 25px;
    position: relative;
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s ease;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.unified-plan-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 8px 16px rgba(15, 23, 42, 0.06),
        0 20px 40px rgba(15, 23, 42, 0.14);
    border-color: rgba(148, 163, 184, 0.35);
}

/* Featured / “Most popular” — stronger hierarchy, same on packages + AutoTrade */
.unified-plan-card.most-popular {
    z-index: 2;
    border-color: rgba(122, 63, 224, 0.35);
    box-shadow:
        0 6px 14px rgba(122, 63, 224, 0.12),
        0 18px 42px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(122, 63, 224, 0.2);
}

.unified-plan-card.most-popular:hover {
    transform: translateY(-8px);
    box-shadow:
        0 10px 22px rgba(122, 63, 224, 0.16),
        0 26px 52px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(122, 63, 224, 0.28);
}

.unified-plan-card.most-popular.blue {
    border-color: rgba(58, 168, 230, 0.4);
    box-shadow:
        0 6px 14px rgba(58, 168, 230, 0.14),
        0 18px 42px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(58, 168, 230, 0.25);
}

.unified-plan-card.most-popular.blue:hover {
    box-shadow:
        0 10px 22px rgba(58, 168, 230, 0.18),
        0 26px 52px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(58, 168, 230, 0.35);
}

.unified-plan-card.most-popular.purple {
    border-color: rgba(122, 63, 224, 0.4);
    box-shadow:
        0 6px 14px rgba(122, 63, 224, 0.14),
        0 18px 42px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(122, 63, 224, 0.25);
}

.unified-plan-card.most-popular.purple:hover {
    box-shadow:
        0 10px 22px rgba(122, 63, 224, 0.2),
        0 26px 52px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(122, 63, 224, 0.35);
}

.unified-plan-card.most-popular.red {
    border-color: rgba(231, 76, 60, 0.4);
    box-shadow:
        0 6px 14px rgba(231, 76, 60, 0.12),
        0 18px 42px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(231, 76, 60, 0.22);
}

.unified-plan-card.most-popular.red:hover {
    box-shadow:
        0 10px 22px rgba(231, 76, 60, 0.18),
        0 26px 52px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(231, 76, 60, 0.32);
}

.unified-plan-card .card-header {
    height: 120px;
    border-radius: 14px 14px 60% 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.unified-plan-card.blue .card-header {
    background: linear-gradient(135deg, #3aa8e6, #5cc6f0);
}

.unified-plan-card.purple .card-header {
    background: linear-gradient(135deg, #7a3fe0, #9c6af5);
}

.unified-plan-card.red .card-header {
    background: linear-gradient(135deg, #e74c3c, #ff6b6b);
}

/* Exclude plan-card-themed: themed cards use CSS variables (higher specificity alone was losing to :not() chain). */
.unified-plan-card:not(.blue):not(.purple):not(.red):not(.plan-card-themed) .card-header {
    background: linear-gradient(135deg, #3aa8e6, #5cc6f0);
}

.unified-plan-card .price {
    --price-circle-size: clamp(80px, 8vw, 100px);
    background: #ffffff;
    width: var(--price-circle-size);
    height: var(--price-circle-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: clamp(18px, 2.2vw, 22px);
    color: #555;
    position: absolute;
    bottom: calc(var(--price-circle-size) * -0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Alias for readability (same element) */
.unified-plan-card .price-circle {
    --price-circle-size: clamp(80px, 8vw, 100px);
    width: var(--price-circle-size);
    height: var(--price-circle-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.unified-plan-card.blue .price {
    border: 3px solid #3aa8e6;
    color: #3aa8e6;
}

.unified-plan-card.purple .price {
    border: 3px solid #7a3fe0;
    color: #7a3fe0;
}

.unified-plan-card.red .price {
    border: 3px solid #e74c3c;
    color: #e74c3c;
}

/* Pricing readability: price text should always be premium black.
   Keep the accent border colors (blue/purple/red) and all other UI intact.
*/
.unified-plan-card .price {
    color: #111827 !important;
}

.unified-plan-card h3 {
    margin-top: 50px;
    font-size: 18px;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 5px;
}

/* Plan card titles: last word accent (matches trading service cards) */
.unified-plan-card h3.card-title-dual .blue-half,
body.user-layout .unified-plan-card h3.card-title-dual .blue-half {
    color: #1e3a8a !important;
    -webkit-text-fill-color: #1e3a8a !important;
}

.unified-plan-card h3.card-title-dual .green-half,
body.user-layout .unified-plan-card h3.card-title-dual .green-half {
    color: #16a34a !important;
    -webkit-text-fill-color: #16a34a !important;
}

body.user-layout .product-header h1.card-title-dual .blue-half {
    color: #1e3a8a !important;
    -webkit-text-fill-color: #1e3a8a !important;
}

body.user-layout .product-header h1.card-title-dual .green-half {
    color: #16a34a !important;
    -webkit-text-fill-color: #16a34a !important;
}

body.user-layout .services-section .service-title.card-title-dual .blue-half {
    color: #1e3a8a !important;
    -webkit-text-fill-color: #1e3a8a !important;
}

body.user-layout .services-section .service-title.card-title-dual .green-half {
    color: #16a34a !important;
    -webkit-text-fill-color: #16a34a !important;
}

.unified-plan-card .sub {
    font-size: 11px;
    color: #888;
    margin-bottom: 20px;
}

.unified-plan-card .features {
    list-style: none;
    padding: 0;
    margin: 0 20px 25px;
    text-align: left;
}

.unified-plan-card .features li {
    font-size: 13px;
    margin: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
}

.unified-plan-card .features li.yes::before {
    content: "✔";
    color: #1abc9c;
    margin-right: 8px;
    font-weight: bold;
}

.unified-plan-card.blue .features li.yes::before {
    color: #3aa8e6;
}

.unified-plan-card.purple .features li.yes::before {
    color: #7a3fe0;
}

.unified-plan-card.red .features li.yes::before {
    color: #e74c3c;
}

.unified-plan-card .features li.no::before {
    content: "✖";
    color: #e74c3c;
    margin-right: 8px;
    font-weight: bold;
}

.unified-plan-card .unified-plan-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
    padding: 0 16px;
}

.unified-plan-card .unified-plan-learn-more {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.unified-plan-card .unified-plan-learn-more:hover {
    background: #f1f5f9;
    border-color: rgba(100, 116, 139, 0.5);
    color: #0f172a;
}

.unified-plan-card.blue .unified-plan-learn-more:hover {
    color: #1d4ed8;
    border-color: rgba(58, 168, 230, 0.45);
}

.unified-plan-card.purple .unified-plan-learn-more:hover {
    color: #5b21b6;
    border-color: rgba(122, 63, 224, 0.4);
}

.unified-plan-card.red .unified-plan-learn-more:hover {
    color: #b91c1c;
    border-color: rgba(231, 76, 60, 0.4);
}

.unified-plan-card .unified-plan-learn-more:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

.unified-plan-card .btn-select {
    border: 2px solid #ccc;
    background: #ffffff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
    font-family: inherit;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.unified-plan-card .btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.unified-plan-card.blue .btn-select {
    border-color: #3aa8e6;
    color: #3aa8e6;
}

.unified-plan-card.blue .btn-select:hover {
    background: #3aa8e6;
    color: #ffffff;
    border-color: #3aa8e6;
    box-shadow: 0 4px 14px rgba(58, 168, 230, 0.35);
}

.unified-plan-card.purple .btn-select {
    border-color: #7a3fe0;
    color: #7a3fe0;
}

.unified-plan-card.purple .btn-select:hover {
    background: #7a3fe0;
    color: #ffffff;
    border-color: #7a3fe0;
    box-shadow: 0 4px 14px rgba(122, 63, 224, 0.35);
}

.unified-plan-card.red .btn-select {
    border-color: #e74c3c;
    color: #e74c3c;
}

.unified-plan-card.red .btn-select:hover {
    background: #e74c3c;
    color: #ffffff;
    border-color: #e74c3c;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
}

.unified-plan-card .btn-select:disabled,
.unified-plan-card .btn-select.btn-current {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
    transform: none;
}

.unified-plan-card .btn-select:disabled:hover,
.unified-plan-card .btn-select.btn-current:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    transform: none;
    box-shadow: none;
}

.unified-plan-card.most-popular::before {
    content: "Most popular";
    position: absolute;
    top: 1.125rem;
    right: -2.25rem;
    color: #ffffff;
    padding: 0.3rem 3rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
    border-radius: 4px;
    pointer-events: none;
}

.unified-plan-card.most-popular.blue::before {
    background: linear-gradient(135deg, #3aa8e6, #2b8cbe);
}

.unified-plan-card.most-popular.purple::before {
    background: linear-gradient(135deg, #7a3fe0, #6b32d4);
}

.unified-plan-card.most-popular.red::before {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Themed plan cards (AutoTrade — admin-set CSS variables on the card root) */
.unified-plan-card.plan-card-themed {
    border-color: var(--plan-border, rgba(148, 163, 184, 0.2));
}

.unified-plan-card.plan-card-themed:hover {
    border-color: var(--plan-border, rgba(148, 163, 184, 0.35));
}

.unified-plan-card.plan-card-themed.most-popular {
    border-color: var(--plan-border);
}

.unified-plan-card.plan-card-themed.most-popular:hover {
    border-color: var(--plan-border);
}

.unified-plan-card.plan-card-themed .card-header {
    background: linear-gradient(
        135deg,
        var(--plan-primary, #3aa8e6),
        var(--plan-secondary, var(--plan-primary, #5cc6f0))
    );
}

.unified-plan-card.plan-card-themed .price {
    border: 3px solid var(--plan-primary, #3aa8e6);
}

.unified-plan-card.plan-card-themed .features li.yes::before {
    color: var(--plan-primary, #3aa8e6);
}

.unified-plan-card.plan-card-themed .unified-plan-learn-more:hover {
    color: var(--plan-primary, #1d4ed8);
    border-color: rgba(148, 163, 184, 0.5);
}

.unified-plan-card.plan-card-themed .btn-select {
    border-color: var(--plan-btn, var(--plan-primary));
    color: var(--plan-btn, var(--plan-primary));
}

.unified-plan-card.plan-card-themed .btn-select:hover {
    background: var(--plan-btn, var(--plan-primary));
    color: #ffffff;
    border-color: var(--plan-btn, var(--plan-primary));
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.unified-plan-card.plan-card-themed .btn-select:focus-visible {
    outline-color: var(--plan-btn, var(--plan-primary));
}

.unified-plan-card.plan-card-themed.most-popular::before {
    background: linear-gradient(
        135deg,
        var(--plan-ribbon-start, var(--plan-primary)),
        var(--plan-ribbon-end, var(--plan-secondary))
    );
    color: var(--plan-ribbon-fg, #ffffff);
}

@media (max-width: 1024px) {
    .product-detail-page .pricing-container,
    .unified-pricing-section .pricing-container {
        flex-wrap: wrap;
        gap: 30px;
    }

    .unified-plan-card {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .product-detail-page .pricing-container,
    .unified-pricing-section .pricing-container {
        flex-direction: column;
        align-items: center;
        gap: 1.75rem;
        padding: 2.25rem max(1rem, var(--page-gutter, 16px));
        max-width: 100%;
        box-sizing: border-box;
    }

    .unified-plan-card {
        width: 100%;
        max-width: min(22rem, 100%);
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    /* "Most popular" — inline pill so the rotated ribbon does not overlap price or adjacent cards */
    .unified-plan-card.most-popular {
        padding-top: 2.65rem;
        overflow: visible;
    }

    .unified-plan-card.most-popular::before {
        top: 0.65rem;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        max-width: calc(100% - 1.5rem);
        padding: 0.35rem 0.85rem;
        font-size: 0.625rem;
        letter-spacing: 0.06em;
        border-radius: 9999px;
        text-align: center;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    }

    .unified-plan-card:hover {
        transform: translateY(-3px);
    }

    .unified-plan-card.most-popular:hover {
        transform: translateY(-3px);
    }

    .unified-plan-card .card-header {
        height: 100px;
    }

    .unified-plan-card .price {
        width: 60px;
        height: 60px;
        font-size: 18px;
        bottom: -30px;
    }

    .unified-plan-card h3 {
        margin-top: 40px;
        font-size: 16px;
    }

    .unified-plan-card .features li {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .product-detail-page .pricing-container,
    .unified-pricing-section .pricing-container {
        padding: 1.75rem max(0.875rem, var(--page-gutter, 16px));
        gap: 1.25rem;
    }

    .unified-plan-card {
        width: 100%;
        max-width: min(22rem, 100%);
    }

    .unified-plan-card .card-header {
        height: 90px;
    }

    .unified-plan-card .price {
        width: 55px;
        height: 55px;
        font-size: 16px;
        bottom: -27px;
    }

    .unified-plan-card h3 {
        margin-top: 35px;
        font-size: 15px;
    }

    .unified-plan-card .features {
        margin: 0 15px 20px;
    }

    .unified-plan-card .btn-select {
        padding: 8px 15px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .unified-plan-card,
    .unified-plan-card .btn-select {
        transform: none;
    }

    .unified-plan-card:hover,
    .unified-plan-card .btn-select:hover {
        transform: none;
    }
}

.unified-plan-card .btn-select:focus-visible {
    outline: 2px solid #3aa8e6;
    outline-offset: 2px;
}

.unified-plan-card.purple .btn-select:focus-visible {
    outline-color: #7a3fe0;
}

.unified-plan-card.red .btn-select:focus-visible {
    outline-color: #e74c3c;
}

/* --------------------------------------------------------------------------
   11. UTILITIES — a11y
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .stat-card {
        transition: none;
    }

    .dashboard-card:hover,
    .stat-card:hover {
        transform: none;
    }
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--primary, #0b2578);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .dashboard-card,
    .stat-card {
        border: 2px solid var(--text-primary, #0b2578);
    }

    .form-input,
    .form-select,
    .form-textarea {
        border: 2px solid var(--text-primary, #0b2578);
    }
}

/* --------------------------------------------------------------------------
   PROFILE — /user/profile (read-only fields; change password via .dashboard-action-btn)
   -------------------------------------------------------------------------- */

.profile-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem 0;
}

.profile-container .profile-header {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

.profile-container .profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.profile-container .avatar-container {
    position: relative;
    flex-shrink: 0;
}

.profile-container .avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 9999px;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.14);
}

.profile-container .avatar-icon {
    width: 40px;
    height: 40px;
    color: #2563eb;
}

.profile-container .avatar-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #10b981;
    border: 3px solid #ffffff;
}

.profile-container .profile-info {
    min-width: 0;
}

.profile-container .profile-name {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.01em;
}

.profile-container .profile-email,
.profile-container .profile-mobile {
    color: #64748b;
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.profile-container .profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.profile-container .profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.profile-container .profile-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.14);
    background: #dbeafe;
}

.profile-container .profile-form-section {
    margin-bottom: 2rem;
}

.profile-container .form-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.profile-container .form-card-header {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.profile-container .form-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.profile-container .form-card-subtitle {
    color: #64748b;
    margin: 0;
}

.profile-container .profile-form {
    padding: 2rem;
}

.profile-container .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.profile-container .form-group {
    display: flex;
    flex-direction: column;
}

.profile-container .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.profile-container .label-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.profile-container .form-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #f8fafc;
    color: #1e293b;
}

.profile-container .form-input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.profile-container .form-input:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

.profile-container .form-input:read-only {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
    cursor: default;
}

.profile-container .form-input:read-only:focus {
    border-color: #e2e8f0;
    background: #f1f5f9;
    box-shadow: none;
}

.profile-container .form-textarea {
    resize: vertical;
    min-height: 100px;
}

.profile-container .form-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.profile-container .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .profile-container .profile-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-container .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }

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

    .profile-container .form-actions {
        flex-direction: column;
    }

    .profile-container .profile-actions {
        justify-content: center;
        width: 100%;
    }

    .profile-container .profile-actions .dashboard-action-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

/* Profile — account stats (Member Since, Email Verified, Account Status) */
.profile-container .profile-stats__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: stretch;
}

@media (min-width: 640px) {
    .profile-container .profile-stats__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.profile-container .profile-stats__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 11.5rem;
    height: 100%;
    padding: 1.25rem 1rem;
    margin: 0;
}

.profile-container .profile-stats__card:hover {
    transform: translateY(-2px);
}

.profile-container .profile-stats__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0.75rem 0;
}

.profile-container .profile-stats__icon i,
.profile-container .profile-stats__icon svg {
    width: 22px;
    height: 22px;
}

.profile-container .profile-stats__icon.stat-icon--blue {
    background: #eff6ff;
    color: #2563eb;
}

.profile-container .profile-stats__icon.stat-icon--green {
    background: #f0fdf4;
    color: #16a34a;
}

.profile-container .profile-stats__icon.stat-icon--purple {
    background: #faf5ff;
    color: #7c3aed;
}

.profile-container .profile-stats__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.375rem;
    width: 100%;
    min-width: 0;
    text-align: center;
}

.profile-container h3.profile-stats__title,
.profile-container .profile-stats__title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #64748b;
    margin: 0;
    text-align: center;
    max-width: 100%;
}

.profile-container p.profile-stats__value,
.profile-container .profile-stats__value {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    max-width: 100%;
    word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
    .profile-container .profile-stats__card:hover {
        transform: none;
    }
}

/* Hard hide: public `/signals` KPIs.
   The public signals page previously rendered a kpi-stats-bar; this rule
   guarantees it's never visible even if a stale template is served. */
#rtPublicSignalsRoot .kpi-stats-bar,
#rtPublicSignalsRoot .kpi-item,
#rtPublicSignalsRoot .metrics-container,
#rtPublicSignalsRoot .metric-card,
#rtPublicSignalsRoot [id^="rtPubKpi"] {
    display: none !important;
}

/* =============================================================================
   USER SIGNALS — /user/signals only (.user-signals-page)
   Ledger UI + modals (signals-table.css not loaded on this page).
   ============================================================================= */

/* --- Summary metrics --- */
.user-signals-page .user-signals-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
}

.user-signals-page .user-signals-metric {
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    min-width: 0;
}

.user-signals-page .user-signals-metric:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.user-signals-page .user-signals-metric__icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    box-shadow: none;
    color: #64748b;
}

.user-signals-page .user-signals-metric__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.user-signals-page .user-signals-metric__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
}

.user-signals-page .user-signals-metric__value {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.user-signals-page .user-signals-metric__value--total { color: #2563eb; }
.user-signals-page .user-signals-metric__value--active { color: #16a34a; }
.user-signals-page .user-signals-metric__value--closed { color: #64748b; }
.user-signals-page .user-signals-metric__value--winrate { color: #7c3aed; }
.user-signals-page .user-signals-metric__value--profit { color: #16a34a; }
.user-signals-page .user-signals-metric__value--loss { color: #dc2626; }

@media (max-width: 1024px) {
    .user-signals-page .user-signals-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .user-signals-page .user-signals-metrics {
        grid-template-columns: 1fr;
    }
}

/* --- Toolbar (screener-style) --- */
.user-signals-page .usl-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-sizing: border-box;
}

.user-signals-page .usl-toolbar__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    flex: 0 0 auto;
    padding-bottom: 0.125rem;
}

.user-signals-page .usl-toolbar__form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.user-signals-page .usl-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.user-signals-page .usl-field--submit {
    flex: 0 0 auto;
}

.user-signals-page .usl-field__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.user-signals-page .usl-field__label--phantom {
    visibility: hidden;
    user-select: none;
}

.user-signals-page .usl-select,
.user-signals-page .usl-input {
    font: inherit;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    min-height: 2rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    box-sizing: border-box;
    min-width: 6.5rem;
    max-width: 100%;
}

.user-signals-page .usl-select:focus,
.user-signals-page .usl-input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 1px;
    border-color: #2563eb;
}

.user-signals-page .usl-btn {
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    min-height: 2rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.user-signals-page .usl-btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.user-signals-page .usl-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

@media (max-width: 768px) {
    .user-signals-page .usl-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .user-signals-page .usl-toolbar__form {
        justify-content: stretch;
    }

    .user-signals-page .usl-field,
    .user-signals-page .usl-select,
    .user-signals-page .usl-input,
    .user-signals-page .usl-btn {
        width: 100%;
        min-width: 0;
    }
}

/* --- Table card --- */
.user-signals-page .usl-card {
    background: var(--bg-white, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.user-signals-page .usl-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.user-signals-page .usl-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    font-size: 0.75rem;
    border-spacing: 0;
}

.user-signals-page .usl-th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 0.5rem 0.4rem;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    box-shadow: 0 1px 0 #e2e8f0;
}

.user-signals-page .usl-th--muted {
    color: #94a3b8;
}

.user-signals-page .usl-th--num {
    text-align: right;
}

.user-signals-page .usl-th--center {
    text-align: center;
}

.user-signals-page .usl-td {
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.35;
    transition: background 0.12s ease;
}

.user-signals-page .usl-tr:hover .usl-td {
    background: #f8fafc;
}

.user-signals-page .usl-tr:hover .usl-td.usl-price--target {
    background: rgba(22, 163, 74, 0.14);
}

.user-signals-page .usl-tr:hover .usl-td.usl-price--sl {
    background: rgba(220, 38, 38, 0.14);
}

.user-signals-page .usl-td--product {
    max-width: 8.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-signals-page .usl-td--muted {
    color: #64748b;
}

.user-signals-page .usl-td--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.user-signals-page .usl-td--center,
.user-signals-page .usl-td--actions {
    text-align: center;
}

.user-signals-page .usl-td--status {
    vertical-align: middle;
}

.user-signals-page .usl-price--entry {
    font-weight: 700;
    color: #0f172a;
}

.user-signals-page .usl-price--target {
    color: #15803d;
    font-weight: 600;
    background: rgba(22, 163, 74, 0.08);
    border-radius: 4px;
}

.user-signals-page .usl-price--sl {
    color: #b91c1c;
    font-weight: 600;
    background: rgba(220, 38, 38, 0.08);
    border-radius: 4px;
}

.user-signals-page .usl-ltp {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #0b2578;
}

.user-signals-page .ts-live-ltp--pending {
    opacity: 0.65;
}

.user-signals-page .usl-pnl {
    font-weight: 700;
    font-size: 0.8125rem;
}

.user-signals-page .usl-pnl--profit {
    color: #059669;
}

.user-signals-page .usl-pnl--loss {
    color: #dc2626;
}

.user-signals-page .usl-badge {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
}

.user-signals-page .usl-badge--type:not(.usl-badge--buy):not(.usl-badge--sell) {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.user-signals-page .usl-badge--buy {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.user-signals-page .usl-badge--sell {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.user-signals-page .usl-badge--status.usl-badge--active {
    background: #fffbeb;
    color: #a16207;
    border: 1px solid #fcd34d;
}

.user-signals-page .usl-badge--status.usl-badge--pending {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.user-signals-page .usl-badge--status.usl-badge--neutral {
    background: #f1f5f9;
    color: #475569;
}

.user-signals-page .usl-badge--closed {
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.user-signals-page .usl-exit-meta {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.user-signals-page .usl-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.user-signals-page .usl-icon-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.user-signals-page .usl-icon-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.user-signals-page .usl-icon-btn--ghost {
    background: transparent;
    border-color: transparent;
}

.user-signals-page .usl-icon-btn--ghost:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.user-signals-page .usl-icon-btn__svg {
    width: 0.9rem;
    height: 0.9rem;
}

.user-signals-page .usl-empty-cell {
    text-align: center;
    color: #94a3b8;
    padding: 1.5rem 1rem !important;
    font-size: 0.8125rem;
}

.user-signals-page .usl-tr--empty .usl-empty-cell {
    border-bottom: none;
}

/* --- Empty state (no rows) --- */
.user-signals-page .usl-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--bg-white, #fff);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    margin-top: 0.5rem;
}

.user-signals-page .usl-empty-state__title {
    margin: 0 0 0.35rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
}

.user-signals-page .usl-empty-state__hint {
    margin: 0 0 1.25rem;
    font-size: 0.8125rem;
    color: #64748b;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* --- Mobile: stacked row cards --- */
@media (max-width: 768px) {
    .user-signals-page {
        overflow-x: clip;
        max-width: 100%;
    }

    .user-signals-page .usl-table-scroll {
        overflow-x: visible;
    }

    .user-signals-page .usl-table {
        min-width: 0 !important;
        display: block;
    }

    .user-signals-page .usl-table thead {
        display: none;
    }

    .user-signals-page .usl-table tbody {
        display: block;
        width: 100%;
    }

    .user-signals-page .usl-tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 0.625rem;
        padding: 0.5rem 0.75rem;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .user-signals-page .usl-tr:hover .usl-td {
        background: transparent;
    }

    .user-signals-page .usl-tr:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    .user-signals-page .usl-td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0.35rem 0;
        border-bottom: 1px solid #f1f5f9;
        white-space: normal;
        text-align: left !important;
    }

    .user-signals-page .usl-td:last-child {
        border-bottom: none;
    }

    .user-signals-page .usl-td::before {
        display: block;
        content: attr(data-label);
        font-size: 0.625rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #64748b;
        margin-bottom: 0.2rem;
    }

    .user-signals-page .usl-empty-cell::before {
        display: none;
    }

    .user-signals-page .usl-tr--empty {
        padding: 1rem;
    }
}

/* --- Modals: perf / note / time (body_modals on /user/signals) --- */
body.user-layout .asc-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vh, 2.5rem) 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

body.user-layout .asc-modal[hidden] {
    display: none !important;
}

body.user-layout .asc-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

body.user-layout .asc-modal__card {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: auto;
    flex: 0 0 auto;
    min-height: 0;
    max-height: min(90vh, calc(100dvh - 2 * clamp(1rem, 4vh, 2.5rem)));
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    padding: 1.25rem;
    isolation: isolate;
}

body.user-layout .asc-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

body.user-layout .asc-modal__head h3 {
    margin: 0;
    font-size: 1.1rem;
}

body.user-layout .asc-modal__x {
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

body.user-layout .asc-modal__card--time-detail {
    max-width: 420px;
    width: calc(100vw - 2rem);
}

body.user-layout .asc-time-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    padding: 0.25rem 0 0.5rem;
}

body.user-layout .asc-time-detail__row {
    display: contents;
}

body.user-layout .asc-time-detail__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

body.user-layout .asc-time-detail__val {
    font-size: 0.875rem;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

@media (max-width: 420px) {
    body.user-layout .asc-time-detail-grid {
        grid-template-columns: 1fr;
    }
}

body.user-layout .asc-modal__card--perf-detail {
    max-width: 380px;
    width: calc(100vw - 2rem);
}

body.user-layout .asc-perf-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0 0.5rem;
}

body.user-layout .asc-perf-detail__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

body.user-layout .asc-perf-detail__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    flex-shrink: 0;
}

body.user-layout .asc-perf-detail__val {
    font-size: 0.9375rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

body.user-layout .asc-perf-detail__val--profit {
    color: #059669;
    font-weight: 600;
}

body.user-layout .asc-perf-detail__val--loss {
    color: #dc2626;
    font-weight: 600;
}

body.user-layout .asc-perf-detail__val--neutral {
    color: #334155;
    font-weight: 500;
}

body.user-layout .asc-modal__card--note-detail {
    max-width: 520px;
    width: calc(100vw - 2rem);
}

body.user-layout .asc-note-detail__body {
    padding: 0.25rem 0 0.5rem;
    white-space: pre-wrap;
    max-height: 60vh;
    overflow: auto;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
    color: #0f172a;
}
