/* ═══════════════════════════════════════════
   FUNGIVERSE — Panels & Forms CSS
   Estilos para dashboards de embajadores,
   terapeutas, formularios de registro y
   panel de administración.
   ═══════════════════════════════════════════ */

/* ── Registration Forms ──────────────── */

.fv-registration-form {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--fv-space-lg);
    background: var(--fv-white);
    border-radius: var(--fv-radius-lg);
    box-shadow: var(--fv-shadow-lg);
}

.fv-form__title {
    font-family: var(--fv-font-heading);
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--fv-primary);
    margin-bottom: var(--fv-space-xs);
    text-align: center;
}

.fv-form__subtitle {
    font-family: var(--fv-font-body);
    color: var(--fv-text-muted);
    text-align: center;
    margin-bottom: var(--fv-space-lg);
}

.fv-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--fv-space-md);
}

.fv-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fv-form__field--full {
    grid-column: 1 / -1;
}

.fv-form__field label {
    font-family: var(--fv-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fv-text);
}

.fv-form__field input,
.fv-form__field textarea,
.fv-form__field select {
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--fv-radius-sm);
    font-family: var(--fv-font-body);
    font-size: 0.9rem;
    color: var(--fv-text);
    background: #fafafa;
    transition: var(--fv-transition);
}

.fv-form__field input:focus,
.fv-form__field textarea:focus,
.fv-form__field select:focus {
    outline: none;
    border-color: var(--fv-primary-light);
    background: var(--fv-white);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.fv-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: var(--fv-space-lg);
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--fv-primary), var(--fv-primary-dark));
    color: var(--fv-white);
    font-family: var(--fv-font-heading);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--fv-radius-md);
    cursor: pointer;
    transition: var(--fv-transition);
}

.fv-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--fv-shadow-md);
}

.fv-form-error,
.fv-form-success {
    padding: 12px 16px;
    border-radius: var(--fv-radius-sm);
    margin-bottom: var(--fv-space-md);
    font-family: var(--fv-font-body);
    font-size: 0.9rem;
}

.fv-form-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.fv-form-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}


/* ── Dashboard ───────────────────────── */

.fv-dashboard {
    max-width: 900px;
    margin: 0 auto;
    font-family: var(--fv-font-body);
}

.fv-dashboard__header {
    margin-bottom: var(--fv-space-lg);
}

.fv-dashboard__welcome h2 {
    font-family: var(--fv-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fv-primary-dark);
    margin-bottom: 4px;
}

.fv-dashboard__welcome p {
    color: var(--fv-text-muted);
    font-size: 1rem;
}


/* ── Referral Card ───────────────────── */

.fv-referral-card {
    background: linear-gradient(135deg, var(--fv-primary-dark), var(--fv-primary));
    color: var(--fv-white);
    padding: var(--fv-space-lg);
    border-radius: var(--fv-radius-lg);
    margin-bottom: var(--fv-space-lg);
}

.fv-referral-card__label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.fv-referral-card__code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--fv-space-md);
}

.fv-referral-card__code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: var(--fv-radius-sm);
    flex-grow: 1;
    color: var(--fv-white);
}

.fv-referral-card__link {
    font-family: var(--fv-font-body);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: var(--fv-radius-sm);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fv-white);
}

.fv-referral-card__copy {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--fv-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--fv-radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--fv-font-body);
    transition: var(--fv-transition);
    white-space: nowrap;
}

.fv-referral-card__copy:hover {
    background: rgba(255, 255, 255, 0.35);
}

.fv-referral-card__link-row {
    padding-top: var(--fv-space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}


/* ── Stats Grid ──────────────────────── */

.fv-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--fv-space-md);
    margin-bottom: var(--fv-space-lg);
}

.fv-stat-card {
    background: var(--fv-white);
    border-radius: var(--fv-radius-md);
    padding: var(--fv-space-lg) var(--fv-space-md);
    text-align: center;
    box-shadow: var(--fv-shadow-sm);
    border: 1px solid #f0f0f0;
    transition: var(--fv-transition);
}

.fv-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fv-shadow-md);
}

.fv-stat-card__icon {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.fv-stat-card__value {
    display: block;
    font-family: var(--fv-font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--fv-primary-dark);
    line-height: 1.2;
}

.fv-stat-card__label {
    display: block;
    font-size: 0.8rem;
    color: var(--fv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}


/* ── Data Table ──────────────────────── */

.fv-dashboard__section {
    margin-bottom: var(--fv-space-xl);
}

.fv-dashboard__section h3 {
    font-family: var(--fv-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fv-text);
    margin-bottom: var(--fv-space-md);
    padding-bottom: var(--fv-space-sm);
    border-bottom: 2px solid var(--fv-bg-alt);
}

.fv-table-wrapper {
    overflow-x: auto;
    border-radius: var(--fv-radius-md);
    box-shadow: var(--fv-shadow-sm);
}

.fv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fv-table thead {
    background: var(--fv-primary-dark);
    color: var(--fv-white);
}

.fv-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fv-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--fv-text);
}

.fv-table tbody tr:nth-child(even) {
    background: var(--fv-bg);
}

.fv-table tbody tr:hover {
    background: var(--fv-bg-alt);
}

.fv-table code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--fv-primary);
}

.fv-empty-state {
    text-align: center;
    padding: var(--fv-space-xl);
    color: var(--fv-text-muted);
    font-size: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius-md);
}


/* ── Program Info ────────────────────── */

.fv-program-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--fv-space-md);
}

.fv-program-info__block {
    background: var(--fv-bg);
    padding: var(--fv-space-md) var(--fv-space-lg);
    border-radius: var(--fv-radius-md);
    border-left: 4px solid var(--fv-primary);
}

.fv-program-info__block h4 {
    font-family: var(--fv-font-heading);
    font-size: 1rem;
    color: var(--fv-primary-dark);
    margin-bottom: var(--fv-space-sm);
}

.fv-program-info__block ul {
    padding-left: var(--fv-space-md);
    margin: 0;
}

.fv-program-info__block li {
    margin-bottom: 6px;
    line-height: 1.5;
    color: var(--fv-text);
    font-size: 0.9rem;
}


/* ══════════════════════════════════════════════
   My Account — Integrated Panel Design
   Header → Tabs → Content. One cohesive block.
   ══════════════════════════════════════════════ */

/* ── Hide page title ─────────────────── */

.woocommerce-account .entry-title,
.woocommerce-account .page-title,
.woocommerce-account .entry-header,
.woocommerce-account header.entry-header {
    display: none !important;
}


/* ── Main wrapper ────────────────────── */

.fv-account {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: var(--fv-font-body);
}


/* ── Header — Dark branded bar ───────── */

.fv-account__header {
    background: linear-gradient(135deg, #1a2e1a 0%, #2d5a3d 100%);
    border-radius: 18px 18px 0 0;
    padding: 28px 32px;
}

.fv-account__welcome {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fv-account__avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    object-fit: cover;
}

.fv-account__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fv-account__name {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--fv-font-heading);
    margin: 0;
    line-height: 1.2;
}

.fv-account__role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
}


/* ── Navigation Tabs ─────────────────── */

.fv-account__tabs {
    display: flex;
    background: #1e3a1e;
    padding: 0 16px;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 3px solid #2d5a3d;
}

.fv-account__tab {
    padding: 13px 18px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.fv-account__tab:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

/* Active tab — glowing green underline */
.fv-account__tab--active {
    color: #fff;
    font-weight: 600;
    border-bottom-color: #4ade80;
}

.fv-account__tab--active:hover {
    color: #fff;
}

/* Logout tab */
.fv-account__tab--logout {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.fv-account__tab--logout:hover {
    color: #f87171;
}


/* ── Content Area ────────────────────── */

.fv-account__content {
    background: #fff;
    border-radius: 0 0 18px 18px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8ece8;
    border-top: none;
    min-height: 300px;
}


/* ── Tables ───────────────────────────── */

.fv-account__content table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.88rem;
    border: none;
}

.fv-account__content table thead th {
    background: #f8faf8;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border: none;
    border-bottom: 2px solid #e8ece8;
}

.fv-account__content table td {
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid #f3f5f3;
    color: var(--fv-text);
}

.fv-account__content table tbody tr:hover {
    background: #f8faf8;
}


/* ── Forms ────────────────────────────── */

.fv-account__content label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--fv-text);
}

.fv-account__content input[type="text"],
.fv-account__content input[type="email"],
.fv-account__content input[type="password"],
.fv-account__content input[type="tel"],
.fv-account__content select,
.fv-account__content textarea {
    padding: 11px 15px;
    border: 1.5px solid #dde3dd;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--fv-font-body);
    background: #fafbfa;
    transition: all 0.2s ease;
    width: 100%;
}

.fv-account__content input:focus,
.fv-account__content select:focus,
.fv-account__content textarea:focus {
    border-color: #3d8b4f;
    box-shadow: 0 0 0 3px rgba(61, 139, 79, 0.12);
    outline: none;
    background: #fff;
}


/* ── Buttons ──────────────────────────── */

.fv-account__content .woocommerce-Button,
.fv-account__content .button,
.fv-account__content button[type="submit"] {
    background: linear-gradient(135deg, #3d8b4f, #2d6e3c);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--fv-font-body);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
}

.fv-account__content .woocommerce-Button:hover,
.fv-account__content .button:hover,
.fv-account__content button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 139, 79, 0.3);
    color: #fff;
    text-decoration: none;
}


/* ── Addresses ────────────────────────── */

.fv-account__content .woocommerce-Addresses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.fv-account__content .woocommerce-Address {
    background: #f8faf8;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e8ece8;
}


/* ── Responsive ───────────────────────── */

@media (max-width: 768px) {
    .fv-account {
        padding: 12px 8px 32px;
    }

    .fv-account__header {
        padding: 20px;
        border-radius: 14px 14px 0 0;
    }

    .fv-account__name {
        font-size: 1.1rem;
    }

    .fv-account__avatar img {
        width: 44px;
        height: 44px;
    }

    .fv-account__tabs {
        padding: 0 8px;
    }

    .fv-account__tab {
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .fv-account__tab--logout {
        margin-left: 0;
    }

    .fv-account__content {
        padding: 20px;
        border-radius: 0 0 14px 14px;
    }
}

/* ── Panel Notice ────────────────────── */

.fv-panel-notice {
    padding: var(--fv-space-lg);
    text-align: center;
    background: var(--fv-bg);
    border-radius: var(--fv-radius-md);
    font-size: 1rem;
    color: var(--fv-text-muted);
}

.fv-panel-notice a {
    color: var(--fv-primary);
    font-weight: 600;
}


/* ── Admin Buttons ───────────────────── */

.fv-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-family: var(--fv-font-body);
    font-weight: 600;
    border-radius: var(--fv-radius-sm);
    text-decoration: none;
    transition: var(--fv-transition);
    cursor: pointer;
    border: none;
}

.fv-btn--sm {
    padding: 4px 10px;
    font-size: 0.75rem;
}

.fv-btn--success {
    background: #dcfce7;
    color: #166534;
}

.fv-btn--success:hover {
    background: #bbf7d0;
}

.fv-btn--danger {
    background: #fef2f2;
    color: #991b1b;
}

.fv-btn--danger:hover {
    background: #fecaca;
}


/* ── Admin Email Form ────────────────── */

.fv-admin-email-form {
    max-width: 600px;
}

.fv-admin-email-form .fv-form__field {
    margin-bottom: var(--fv-space-md);
}

.fv-admin-email-form select {
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--fv-radius-sm);
    font-family: var(--fv-font-body);
    font-size: 0.9rem;
    width: 100%;
    background: #fafafa;
}


/* ── Responsive ──────────────────────── */

@media (max-width: 768px) {
    .fv-form__grid {
        grid-template-columns: 1fr;
    }

    .fv-dashboard__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .fv-referral-card__code {
        font-size: 1.1rem;
    }

    .fv-referral-card__code-row {
        flex-direction: column;
        align-items: stretch;
    }

    .fv-program-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .fv-dashboard__stats {
        grid-template-columns: 1fr;
    }
}


/* ── Customer Dashboard ─────────────── */

.fv-user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--fv-space-md);
}

.fv-user-info-item {
    background: var(--fv-bg);
    padding: var(--fv-space-md);
    border-radius: var(--fv-radius-md);
    border: 1px solid #f0f0f0;
}

.fv-user-info-item__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fv-text-muted);
    margin-bottom: 4px;
}

.fv-user-info-item__value {
    display: block;
    font-weight: 600;
    color: var(--fv-text);
    font-size: 0.95rem;
}

/* Order Status Badges */
.fv-order-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.fv-order-status--completed {
    background: #dcfce7;
    color: #166534;
}

.fv-order-status--processing {
    background: #dbeafe;
    color: #1e40af;
}

.fv-order-status--on-hold {
    background: #fef3c7;
    color: #92400e;
}

.fv-order-status--pending {
    background: #fff7ed;
    color: #9a3412;
}

/* Program CTA Cards */
.fv-programs-cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--fv-space-md);
}

.fv-program-cta {
    background: var(--fv-bg);
    border-radius: var(--fv-radius-lg);
    padding: var(--fv-space-lg);
    text-align: center;
    border: 2px solid transparent;
    transition: var(--fv-transition);
}

.fv-program-cta:hover {
    border-color: var(--fv-primary-light);
    transform: translateY(-3px);
    box-shadow: var(--fv-shadow-md);
}

.fv-program-cta__icon {
    font-size: 2.5rem;
    margin-bottom: var(--fv-space-sm);
}

.fv-program-cta h4 {
    font-family: var(--fv-font-heading);
    font-size: 1.1rem;
    color: var(--fv-primary-dark);
    margin-bottom: var(--fv-space-sm);
}

.fv-program-cta p {
    font-size: 0.9rem;
    color: var(--fv-text-muted);
    line-height: 1.5;
    margin-bottom: var(--fv-space-md);
}

.fv-program-cta__btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--fv-primary), var(--fv-primary-dark));
    color: var(--fv-white);
    font-family: var(--fv-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--fv-radius-md);
    text-decoration: none;
    transition: var(--fv-transition);
}

.fv-program-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--fv-shadow-sm);
    color: var(--fv-white);
    text-decoration: none;
}