/**
 * Flow Client Area visual refresh
 * Styles scoped to the member portal without touching structure or logic.
 */

:root {
    --flow-color-primary: #5A41F4;
    --flow-color-secondary: #E10B6F;
    --flow-color-surface: #FFFFFF;
    --flow-color-shell: #EBEBFB;
    --flow-color-text: #261451;
    --flow-radius-lg: 16px;
    --flow-radius-full: 999px;
    --flow-shadow-card: 0 4px 18px rgba(18, 7, 49, 0.08);
    --flow-transition: all 0.3s ease-in-out;
}

body {
    font-family: 'DM Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', sans-serif;
    color: var(--flow-color-text);
    background: var(--flow-color-shell);
}

.flow-shell {
    background: var(--flow-color-shell);
    min-height: 100vh;
}

.flow-header,
.flow-card {
    border-radius: var(--flow-radius-lg);
    background: var(--flow-color-surface);
    box-shadow: var(--flow-shadow-card);
}

.flow-header h1,
.flow-header p {
    color: var(--flow-color-text);
}

.flow-sidebar-link span,
.flow-sidebar-link-child span {
    color: inherit;
}

.flow-main {
    padding: 40px 32px 60px;
}

.flow-sidebar {
    background: #1c0f3d;
    border-radius: var(--flow-radius-lg);
    padding: 28px 20px 32px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.flow-sidebar-link,
.flow-sidebar-link-child {
    color: #ffffff !important;
    transition: var(--flow-transition);
}

.flow-sidebar-link i,
.flow-sidebar-link-child i {
    color: #ffffff !important;
}

.flow-sidebar-link:hover,
.flow-sidebar-link-child:hover {
    background: #ffffff !important;
    color: #2d1c8f !important;
    opacity: 1 !important;
}

.flow-sidebar-link:hover i {
    color: #2d1c8f !important;
}

.flow-sidebar-link.is-active,
.flow-sidebar-link-child.is-active {
    background: #ffffff !important;
    color: #2d1c8f !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.flow-sidebar-link.is-active i,
.flow-sidebar-link-child.is-active i {
    color: #2d1c8f !important;
}

.flow-btn,
.afv-btn,
.afvsp-button-primary,
.flow-icon-btn {
    border-radius: var(--flow-radius-full);
    transition: var(--flow-transition);
    font-family: inherit;
}

.flow-btn-primary,
.afvsp-button-primary,
.afv-btn.afv-btn-primary {
    background: var(--flow-color-primary);
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px rgba(90, 65, 244, 0.25);
}

.flow-btn-primary:hover,
.afvsp-button-primary:hover,
.afv-btn.afv-btn-primary:hover {
    background: var(--flow-color-secondary);
}

.flow-btn-outline,
.flow-sidebar-footer .flow-btn {
    border-radius: var(--flow-radius-full);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
}

.flow-search input:focus,
.afvsp-form input:focus,
.afvsp-form select:focus,
.afvsp-form textarea:focus,
.afvsp-upload input:focus {
    outline: 2px solid var(--flow-color-primary);
    outline-offset: 2px;
}

.afvsp-journey-board .afvsp-checklist-container,
#afv-checklist {
    width: 100%;
    margin: 0 auto 48px;
}

#afv-checklist .afv-card.afv-span-2,
.afvsp-journey-board {
    width: 100%;
    margin: 0 auto 48px;
}

.afvsp-checklist-header,
.afv-hero,
.afv-card,
.afvsp-upload .afv-portal-card {
    background: var(--flow-color-surface);
    border-radius: var(--flow-radius-lg);
    box-shadow: var(--flow-shadow-card);
    padding: 32px;
}

.afv-progress-wrapper {
    background: var(--flow-color-surface);
    border-radius: var(--flow-radius-lg);
    box-shadow: var(--flow-shadow-card);
    padding: 24px;
    margin-bottom: 32px;
}

.afv-progress-bar {
    background: #d9d5fb;
    border-radius: var(--flow-radius-full);
    height: 10px;
    position: relative;
}

.afv-progress-fill {
    background: var(--flow-color-primary) !important;
    border-radius: var(--flow-radius-full);
    transition: width 0.4s ease;
}

.afv-progress-percentage {
    color: var(--flow-color-primary);
    font-weight: 600;
}

.afv-phase-card,
.afv-section-card {
    background: var(--flow-color-surface);
    border-radius: var(--flow-radius-lg);
    box-shadow: var(--flow-shadow-card);
    padding: 24px;
    border: none;
}

.afv-phase-header,
.afv-section-header {
    gap: 16px;
}

.afv-phase-number,
.afv-section-badge {
    background: var(--flow-color-shell);
    color: var(--flow-color-primary);
    border-radius: var(--flow-radius-full);
    padding: 4px 12px;
    font-weight: 600;
}

.afv-phase-card .afv-phase-pin svg {
    color: var(--flow-color-primary);
}

.afv-section-title,
.afv-phase-title,
.afv-card-title h2,
.afv-card-title h3 {
    color: var(--flow-color-text);
    font-weight: 700;
}

.afv-items-list .afv-item {
    border: 1px solid rgba(38, 20, 81, 0.08);
    border-radius: var(--flow-radius-lg);
    padding: 18px 20px;
    transition: var(--flow-transition);
}

.afv-items-list .afv-item:hover {
    border-color: var(--flow-color-primary);
    box-shadow: 0 6px 16px rgba(38, 20, 81, 0.08);
}

.afv-items-list .afv-item.is-checked {
    border-color: var(--flow-color-primary);
    background: rgba(90, 65, 244, 0.08);
}

.afv-checkbox-chip {
    background: #f4f2ff;
    border-radius: 12px;
    border: 1px solid rgba(90, 65, 244, 0.25);
}

.afv-checkbox:checked + .afv-checkbox-chip {
    background: var(--flow-color-primary);
    border-color: var(--flow-color-primary);
}

.afv-checkbox:checked + .afv-checkbox-chip svg {
    stroke: #fff;
}

.flow-search,
.flow-search-results {
    border-radius: var(--flow-radius-full);
}

.flow-search {
    background: rgba(90, 65, 244, 0.08);
    padding: 8px 18px;
}

.flow-search input {
    background: transparent;
    color: var(--flow-color-text);
}

.flow-avatar-img {
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 18px rgba(7, 4, 27, 0.2);
}

.flow-notifications[data-flow-badge]:after {
    background: var(--flow-color-secondary);
}

.afvsp-chip,
.afv-chip {
    background: rgba(90, 65, 244, 0.12);
    color: var(--flow-color-primary);
    border-radius: var(--flow-radius-full);
    padding: 6px 14px;
    font-weight: 600;
}

.flow-sidebar-footer p {
    color: rgba(255, 255, 255, 0.65);
}

.flow-sidebar-footer .flow-btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
}

.flow-sidebar-footer .flow-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.afv-card,
.afvsp-upload .afv-portal-card,
.afvsp-upload .afv-portal-status-card {
    margin-bottom: 32px;
}

.afvsp-upload .afv-portal-card,
.afvsp-upload .afv-portal-status-card,
.afvsp-upload .afvsp-upload-info {
    background: var(--flow-color-surface);
    border-radius: var(--flow-radius-lg);
    box-shadow: var(--flow-shadow-card);
}

.afvsp-upload .afv-portal-card h3,
.afvsp-upload .afv-portal-status-card h3 {
    color: var(--flow-color-text);
}

.afvsp-upload .afvsp-section-icon {
    background: rgba(90, 65, 244, 0.12);
    color: var(--flow-color-primary);
    border-radius: 12px;
}

.afvsp-upload .afv-portal-table th,
.afvsp-upload .afv-portal-table td {
    padding: 16px 20px;
}

.afvsp-upload .afv-portal-table th {
    background: rgba(90, 65, 244, 0.08);
    color: var(--flow-color-text);
}

.afvsp-upload .afv-portal-table tr {
    border-bottom: 1px solid rgba(38, 20, 81, 0.08);
}

.flow-shell a,
.flow-shell button,
.flow-shell input,
.flow-shell select,
.flow-shell textarea {
    transition: var(--flow-transition);
}
