/* My Account Dashboard — /mon-compte/ (dashboard.php override) */

.mma-dashboard {
    --md-border: #e5e7eb;
    --md-border-soft: #f1f3f5;
    --md-card-bg: #ffffff;
    --md-text: #111827;
    --md-muted: #6b7280;
    --md-soft: #6B6B68;
    --md-primary: #1d8ecf;
    --md-primary-hover: #1773a8;
    --md-primary-soft: rgba(29, 142, 207, 0.10);
    --md-danger: #d92d20;
    --md-success: #16a34a;
    --md-warning: #b45309;
    --md-radius: 16px;
    --md-radius-sm: 12px;
    --md-gap: 24px;

    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1080px;
}

/* ============================================
   HERO
   ============================================ */
.mma-dashboard__hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 32px 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.mma-dashboard__hero::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(29, 142, 207, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.mma-dashboard__hero-text {
    position: relative;
    z-index: 1;
}

.mma-dashboard__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--md-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.woocommerce-MyAccount-content .mma-dashboard .mma-dashboard__title,
body.woocommerce-page .woocommerce-MyAccount-content .mma-dashboard h2.mma-dashboard__title {
    margin: 0 0 8px !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    color: var(--md-text) !important;
    line-height: 1.15 !important;
}

.mma-dashboard__subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--md-muted);
    max-width: 520px;
}

.mma-dashboard__hero-stats {
    display: flex;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.mma-stat {
    background: var(--md-card-bg);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-sm);
    padding: 16px 20px;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mma-stat__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--md-primary);
    line-height: 1.1;
}

.mma-stat__value--small {
    font-size: 16px;
    color: var(--md-text);
}

.mma-stat__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--md-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mma-stat--muted .mma-stat__value {
    color: var(--md-text);
}

/* ============================================
   ACTION CARDS GRID
   ============================================ */
.mma-dashboard__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--md-gap);
}

.mma-action {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    background: var(--md-card-bg);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 22px 24px;
    text-decoration: none !important;
    color: var(--md-text);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.18s ease;
    position: relative;
    overflow: hidden;
}

.mma-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    border-color: var(--md-primary);
    color: var(--md-text);
}

.mma-action:hover .mma-action__arrow {
    transform: translateX(4px);
    color: var(--md-primary);
}

.mma-action:hover .mma-action__icon {
    background: var(--md-primary);
    color: #ffffff;
}

.mma-action__icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--md-primary-soft);
    color: var(--md-primary);
    border-radius: 12px;
    transition: background 0.18s ease, color 0.18s ease;
    flex-shrink: 0;
}

.mma-action__icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.mma-action__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mma-action__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--md-text);
    line-height: 1.25;
}

.mma-action__desc {
    font-size: 13.5px;
    color: var(--md-muted);
    line-height: 1.45;
}

.mma-action__arrow {
    font-size: 22px;
    color: var(--md-muted);
    transition: transform 0.18s ease, color 0.18s ease;
    line-height: 1;
    flex-shrink: 0;
}

/* ============================================
   SECTION HEADER + RECENT ORDERS
   ============================================ */
.mma-dashboard__recent {
    background: var(--md-card-bg);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius);
    padding: 26px 28px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mma-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--md-border-soft);
    flex-wrap: wrap;
}

.woocommerce-MyAccount-content .mma-dashboard .mma-section-head__title,
body.woocommerce-page .woocommerce-MyAccount-content .mma-dashboard h3.mma-section-head__title {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--md-text) !important;
    line-height: 1.2 !important;
}

.mma-section-head__link {
    font-size: 14px;
    font-weight: 600;
    color: var(--md-primary);
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.mma-section-head__link:hover {
    color: var(--md-primary-hover);
    text-decoration: underline !important;
}

.mma-orders {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mma-orders__item {
    margin: 0;
    padding: 0;
}

.mma-orders__link {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-sm);
    text-decoration: none !important;
    color: var(--md-text);
    background: #ffffff;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.mma-orders__link:hover {
    border-color: var(--md-primary);
    background: #f8fbfd;
    color: var(--md-text);
}

.mma-orders__link:hover .mma-orders__arrow {
    transform: translateX(4px);
    color: var(--md-primary);
}

.mma-orders__id {
    font-size: 15px;
    font-weight: 700;
    color: var(--md-text);
    min-width: 70px;
}

.mma-orders__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--md-muted);
    flex-wrap: wrap;
}

.mma-orders__dot {
    color: #cbd5e1;
}

.mma-orders__status {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f3f4f6;
    color: var(--md-muted);
    white-space: nowrap;
}

.mma-orders__status--completed {
    background: #dcfce7;
    color: #166534;
}

.mma-orders__status--processing,
.mma-orders__status--on-hold {
    background: #fef3c7;
    color: #92400e;
}

.mma-orders__status--pending {
    background: #e0f2fe;
    color: #075985;
}

.mma-orders__status--cancelled,
.mma-orders__status--failed,
.mma-orders__status--refunded {
    background: #fee2e2;
    color: #991b1b;
}

.mma-orders__total {
    font-size: 15px;
    font-weight: 700;
    color: var(--md-text);
    white-space: nowrap;
}

.mma-orders__total bdi {
    color: inherit;
}

.mma-orders__arrow {
    font-size: 18px;
    color: var(--md-muted);
    transition: transform 0.15s ease, color 0.15s ease;
    line-height: 1;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.mma-empty {
    background: var(--md-card-bg);
    border: 1px dashed var(--md-border);
    border-radius: var(--md-radius);
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mma-empty__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--md-primary-soft);
    color: var(--md-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.mma-empty__icon svg {
    width: 32px;
    height: 32px;
}

.woocommerce-MyAccount-content .mma-empty .mma-empty__title,
body.woocommerce-page .woocommerce-MyAccount-content .mma-empty h3.mma-empty__title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--md-text) !important;
}

.mma-empty__desc {
    margin: 0 0 16px;
    font-size: 14.5px;
    color: var(--md-muted);
    max-width: 380px;
    line-height: 1.5;
}

.mma-empty__cta {
    display: inline-flex;
    align-items: center;
    background: var(--md-primary);
    color: #ffffff !important;
    padding: 12px 26px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(29, 142, 207, 0.28);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.mma-empty__cta:hover {
    background: var(--md-primary-hover);
    box-shadow: 0 4px 12px rgba(29, 142, 207, 0.32);
    color: #ffffff !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 880px) {
    .mma-dashboard__hero {
        grid-template-columns: 1fr;
        padding: 28px 24px;
        gap: 24px;
    }

    .mma-dashboard__hero-stats {
        flex-wrap: wrap;
    }

    .mma-stat {
        flex: 1 1 130px;
    }
}

@media (max-width: 640px) {
    .mma-dashboard {
        gap: 20px;
    }

    .mma-dashboard__hero {
        padding: 24px 20px;
    }

    .mma-dashboard__title {
        font-size: 24px !important;
    }

    .mma-dashboard__subtitle {
        font-size: 15px;
    }

    .mma-dashboard__actions {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mma-action {
        padding: 18px 18px;
        gap: 14px;
    }

    .mma-action__icon {
        width: 42px;
        height: 42px;
    }

    .mma-action__icon svg {
        width: 22px;
        height: 22px;
    }

    .mma-dashboard__recent {
        padding: 22px 18px;
    }

    .mma-orders__link {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "id meta arrow"
            "status status total";
        row-gap: 8px;
        padding: 14px;
    }

    .mma-orders__id { grid-area: id; }
    .mma-orders__meta { grid-area: meta; justify-content: flex-end; }
    .mma-orders__arrow { grid-area: arrow; }
    .mma-orders__status { grid-area: status; justify-self: start; }
    .mma-orders__total { grid-area: total; justify-self: end; }

    .mma-empty {
        padding: 32px 20px;
    }
}
