/**
 * Dashboard Home — layout tweaks only; cards, stats, badges from components.css.
 * Progress bars follow Vuexy (4px, flat primary/info fills).
 */

/* KPI row — 6 blocks (CEO layout: col-lg-2 col-6) */
.webisport-dashboard .webisport-home .webisport-stat-cards-row.memberships-stats-grid,
.webisport-dashboard .webisport-home .webisport-stat-cards-row.webisport-home-kpi-row {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* KPI cards — vertical layout with colored bottom accent */
.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.25rem 0.75rem 1rem;
    border-bottom: 3px solid transparent;
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-icon {
    width: 2.75rem;
    height: 2.75rem;
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-content {
    align-items: center;
    gap: 0.25rem;
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-value {
    font-size: 1.375rem;
    line-height: 1.2;
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-label {
    font-size: 0.6875rem;
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-primary,
.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-import {
    border-bottom-color: var(--ws-primary-border);
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-success {
    border-bottom-color: var(--ws-success);
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-warning {
    border-bottom-color: var(--ws-warning);
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-info {
    border-bottom-color: var(--ws-info);
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-danger {
    border-bottom-color: var(--ws-danger);
}

.webisport-dashboard .webisport-home .webisport-home-kpi-row .webisport-stat-card-secondary {
    border-bottom-color: var(--ws-sidebar-bg);
}

@media (max-width: 992px) {
    .webisport-dashboard .webisport-home .webisport-stat-cards-row.memberships-stats-grid,
    .webisport-dashboard .webisport-home .webisport-stat-cards-row.webisport-home-kpi-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .webisport-dashboard .webisport-home .webisport-stat-cards-row.memberships-stats-grid,
    .webisport-dashboard .webisport-home .webisport-stat-cards-row.webisport-home-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Import Footclub KPI card — clickable, date + relative badge */
.webisport-dashboard .webisport-stat-card-import {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.webisport-dashboard .webisport-stat-card-import:hover {
    color: inherit;
}

.webisport-dashboard .webisport-stat-card-import .webisport-stat-icon {
    background: var(--ws-primary-alpha-16);
}

.webisport-dashboard .webisport-stat-card-import .webisport-stat-icon .dashicons {
    color: var(--ws-primary-ink);
}

.webisport-dashboard .webisport-stat-card-import .webisport-stat-card-badge {
    align-self: center;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.webisport-dashboard .webisport-stat-card-import-empty .webisport-stat-subtitle {
    font-style: italic;
}

/* Subtitle under section title (Vuexy card-subtitle tone) */
.webisport-dashboard .webisport-home-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--ws-text-secondary);
    line-height: 1.5;
}

.webisport-dashboard .webisport-home-season-range {
    font-size: 0.8125rem;
    color: var(--ws-text-muted);
    font-weight: 400;
}

.webisport-dashboard .webisport-home-section-header {
    align-items: flex-start;
}

/* Vuexy progress (earning reports pattern: height 4px) */
.webisport-dashboard .webisport-progress {
    height: 4px;
    width: 100%;
    background: var(--ws-gray-100);
    border-radius: var(--ws-radius-full);
    overflow: hidden;
}

/* Funnel step colors (CEO mockup — grey track, coloured fill per step).
   Scoped under .webisport-progress-funnel so projects.css track styles
   (.webisport-progress-bar as container) do not override fill colors. */
.webisport-dashboard .webisport-progress-funnel {
    background: var(--ws-gray-100);
}

.webisport-dashboard .webisport-progress-funnel .webisport-progress-bar {
    height: 100%;
    width: auto;
    background: var(--ws-primary);
    border-radius: inherit;
    transition: width var(--ws-transition-slow);
}

.webisport-dashboard .webisport-progress-funnel .webisport-progress-bar-funnel-base {
    background: var(--ws-primary);
}

.webisport-dashboard .webisport-progress-funnel .webisport-progress-bar-funnel-step-1 {
    background: #7367f0;
}

.webisport-dashboard .webisport-progress-funnel .webisport-progress-bar-funnel-step-2 {
    background: #28c76f;
}

.webisport-dashboard .webisport-progress-funnel .webisport-progress-bar-funnel-step-3 {
    background: #ff9f43;
}

.webisport-dashboard .webisport-progress-funnel .webisport-progress-bar-funnel-step-4 {
    background: var(--ws-primary);
}

/* Funnel / category metric rows */
.webisport-dashboard .webisport-home-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.webisport-dashboard .webisport-home-metric-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.webisport-dashboard .webisport-home-metric-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ws-text);
}

.webisport-dashboard .webisport-home-metric-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ws-text);
    flex-shrink: 0;
}

.webisport-dashboard .webisport-home-metric-pct {
    font-weight: 500;
    color: var(--ws-text-muted);
}

/* À traiter — list inside card (no extra card chrome per row) */
.webisport-dashboard .webisport-home-todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.webisport-dashboard .webisport-home-todo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(47, 43, 61, 0.08);
    text-decoration: none;
    color: inherit;
    transition: background var(--ws-transition-fast);
}

.webisport-dashboard .webisport-home-todo-list li:last-child .webisport-home-todo-item {
    border-bottom: none;
    padding-bottom: 0;
}

.webisport-dashboard .webisport-home-todo-list li:first-child .webisport-home-todo-item {
    padding-top: 0;
}

.webisport-dashboard a.webisport-home-todo-item:hover {
    color: inherit;
}

.webisport-dashboard a.webisport-home-todo-item:hover .webisport-home-todo-title {
    color: var(--ws-primary-ink);
}

.webisport-dashboard .webisport-home-todo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.webisport-dashboard .webisport-home-todo-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ws-text);
    transition: color var(--ws-transition-fast);
}

.webisport-dashboard .webisport-home-todo-desc {
    font-size: 0.8125rem;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-todo-chevron {
    color: var(--ws-text-muted);
    flex-shrink: 0;
}

.webisport-dashboard .webisport-home-all-clear {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.webisport-dashboard .webisport-home-all-clear .dashicons {
    color: var(--ws-success);
}

/* Quick links — full-width buttons like section actions */
.webisport-dashboard .webisport-home-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.webisport-dashboard .webisport-home-links .webisport-btn {
    width: 100%;
    justify-content: center;
}

/* Compact widget tables */
.webisport-dashboard .webisport-home-widget-table {
    margin: 0;
}

.webisport-dashboard .webisport-home-payments-table th,
.webisport-dashboard .webisport-home-payments-table td {
    font-size: 0.8125rem;
    padding: 0.625rem 0.5rem;
    vertical-align: middle;
}

.webisport-dashboard .webisport-home-payments-table thead th {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ws-text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(47, 43, 61, 0.08);
}

.webisport-dashboard .webisport-home-col-amount {
    text-align: right;
    white-space: nowrap;
}

/* Payment method distribution — circular rings */
.webisport-dashboard .webisport-home-payment-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.webisport-dashboard .webisport-home-payment-method-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.webisport-dashboard .webisport-home-progress-ring {
    --ring-color: var(--ws-primary-border);
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(var(--ring-color) calc(var(--pct, 0) * 1%), var(--ws-gray-100) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.webisport-dashboard .webisport-home-progress-ring::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--ws-card-bg, #fff);
}

.webisport-dashboard .webisport-home-progress-ring-label {
    position: relative;
    z-index: 1;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ws-text);
}

.webisport-dashboard .webisport-home-ring-online {
    --ring-color: #7367f0;
}

.webisport-dashboard .webisport-home-ring-cb {
    --ring-color: #28c76f;
}

.webisport-dashboard .webisport-home-ring-especes {
    --ring-color: #ff9f43;
}

.webisport-dashboard .webisport-home-ring-cheque {
    --ring-color: #00cfe8;
}

.webisport-dashboard .webisport-home-ring-autres {
    --ring-color: var(--ws-text-muted);
}

.webisport-dashboard .webisport-home-payment-method-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.webisport-dashboard .webisport-home-payment-method-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ws-text);
}

.webisport-dashboard .webisport-home-payment-method-subtitle {
    font-size: 0.8125rem;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-payment-method-chevron {
    color: var(--ws-text-muted);
    flex-shrink: 0;
}

/* Outstanding amounts list */
.webisport-dashboard .webisport-home-outstanding-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.webisport-dashboard .webisport-home-outstanding-item {
    border-bottom: 1px solid rgba(47, 43, 61, 0.08);
}

.webisport-dashboard .webisport-home-outstanding-list li:last-child {
    border-bottom: none;
}

.webisport-dashboard .webisport-home-outstanding-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    text-decoration: none;
    color: inherit;
}

.webisport-dashboard .webisport-home-outstanding-list li:first-child .webisport-home-outstanding-link {
    padding-top: 0;
}

.webisport-dashboard .webisport-home-outstanding-list li:last-child .webisport-home-outstanding-link {
    padding-bottom: 0;
}

.webisport-dashboard a.webisport-home-outstanding-link:hover .webisport-home-outstanding-name {
    color: var(--ws-primary-ink);
}

.webisport-dashboard .webisport-home-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.webisport-dashboard .webisport-home-member-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ws-gray-100);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-outstanding-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.webisport-dashboard .webisport-home-outstanding-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ws-text);
    transition: color var(--ws-transition-fast);
}

.webisport-dashboard .webisport-home-outstanding-category {
    font-size: 0.8125rem;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-outstanding-amount {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ws-text);
    flex-shrink: 0;
}

/* Treasury row — collected total + scheduled payments (50/50) */
.webisport-dashboard .webisport-home-row-treasury {
    margin-bottom: 1.5rem;
}

.webisport-dashboard .webisport-home-row-treasury > .webisport-card {
    height: 100%;
}

.webisport-dashboard .webisport-home-scheduled-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.5rem;
    margin-top: 2px;
}

.webisport-dashboard .webisport-home-scheduled-method {
    font-size: 0.8125rem;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-scheduled-meta .webisport-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
}

@media (max-width: 992px) {
    .webisport-dashboard .webisport-home-row-treasury {
        grid-template-columns: 1fr;
    }
}

.webisport-dashboard .webisport-home-collected {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.webisport-dashboard .webisport-home-collected-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.webisport-dashboard .webisport-home-collected-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: rgba(40, 199, 111, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.webisport-dashboard .webisport-home-collected-icon .dashicons,
.webisport-dashboard .webisport-home-collected-icon .ti {
    font-size: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
    color: #28c76f;
}

.webisport-dashboard .webisport-home-collected-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.webisport-dashboard .webisport-home-collected-amount {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ws-text);
}

.webisport-dashboard .webisport-home-collected-caption {
    font-size: 0.9375rem;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-collected-progress {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.webisport-dashboard .webisport-home-collected-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.webisport-dashboard .webisport-home-collected-progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ws-text);
}

.webisport-dashboard .webisport-home-collected-progress-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #28c76f;
}

.webisport-dashboard .webisport-home-collected-progress-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.8125rem;
    color: var(--ws-text-secondary);
}

.webisport-dashboard .webisport-home-collected-progress-foot strong {
    color: var(--ws-text);
    font-weight: 600;
}

/* CEO grid rows */
.webisport-dashboard .webisport-home-row-inscriptions,
.webisport-dashboard .webisport-home-row-funnel,
.webisport-dashboard .webisport-home-row-payments {
    margin-bottom: 1.5rem;
}

.webisport-dashboard .webisport-home-row-payments {
    margin-bottom: 0;
}

/* Spec list inside card: no nested panel background */
.webisport-dashboard .webisport-card-body > .webisport-spec-list {
    margin: 0;
}

@media (max-width: 768px) {
    .webisport-dashboard .webisport-home-section-header {
        flex-direction: column;
        gap: 1rem;
    }

    .webisport-dashboard .webisport-home-section-header .webisport-section-actions {
        width: 100%;
    }
}
