/* ============================================================
   Ecolivros — My Account  v2.0
   Design system consistente com ecolivros-loja-ui
   Verde primário #1e7f3a · Navy #1a1a2e · Fundo #f4faf6
   ============================================================ */

:root {
    --eco-green:      #1e7f3a;
    --eco-green-dark: #155d27;
    --eco-green-light:#f3f9f4;
    --eco-green-mid:  #eaf6ef;
    --eco-navy:       #1a1a2e;
    --eco-gold:       #f4c430;
    --eco-red:        #c71f1f;
    --eco-blue:       #0073aa;
    --eco-bg:         #f4faf6;
    --eco-card:       #ffffff;
    --eco-border:     #d7efde;
    --eco-border-mid: #e2e6f0;
    --eco-text:       #1a1a2e;
    --eco-muted:      #5a7060;
    --eco-radius:     14px;
    --eco-shadow:     0 6px 18px rgba(0,0,0,0.07);
    --eco-shadow-sm:  0 2px 8px rgba(0,0,0,0.05);
    --eco-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL — sidebar + conteúdo
══════════════════════════════════════════════════════════════ */

/* Fundo da página */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce {
    font-family: var(--eco-font);
}

/* Esconder a navegação e conteúdo padrão do WC quando usamos o nosso layout */
.woocommerce-account .woocommerce-MyAccount-navigation { display: none; }
.woocommerce-account .woocommerce-MyAccount-content { padding: 0 !important; border: none !important; }

/* Wrapper do nosso layout custom */
.ecla-account-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-areas: "sidebar content";
    gap: 28px;
    max-width: 1160px;
    margin: 28px auto;
    padding: 0 20px 60px;
    align-items: flex-start;
    font-family: var(--eco-font);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.ecla-account-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 24px;
}

/* ── Conteúdo principal ──────────────────────────────────── */
.ecla-account-content {
    grid-area: content;
    min-width: 0;
}

/* Identidade do utilizador */
.ecla-account-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--eco-card);
    border-radius: var(--eco-radius);
    border: 1px solid var(--eco-border);
    box-shadow: var(--eco-shadow-sm);
    margin-bottom: 12px;
}

.ecla-account-avatar img {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50%;
    border: 2px solid var(--eco-green-light);
    display: block;
}

.ecla-account-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--eco-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.ecla-account-email {
    display: block;
    font-size: 12px;
    color: var(--eco-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* Navegação */
.ecla-account-nav {
    background: var(--eco-card);
    border-radius: var(--eco-radius);
    border: 1px solid var(--eco-border);
    box-shadow: var(--eco-shadow-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.ecla-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--eco-text);
    text-decoration: none;
    border-bottom: 1px solid #f0f5f2;
    transition: background 0.15s, padding-left 0.15s, color 0.15s;
}

.ecla-nav-item:last-child { border-bottom: none; }

.ecla-nav-item:hover {
    background: var(--eco-green-light);
    padding-left: 20px;
    color: var(--eco-green);
    text-decoration: none;
}

.ecla-nav-item--active {
    background: var(--eco-green-mid);
    border-left: 3px solid var(--eco-green);
    color: var(--eco-green);
    font-weight: 700;
}

.ecla-nav-item--auction {
    background: #fafffe;
}

.ecla-nav-item--auction.ecla-nav-item--active {
    background: var(--eco-green-mid);
}

.ecla-nav-item--logout {
    color: var(--eco-red) !important;
    opacity: 0.75;
}

.ecla-nav-item--logout:hover {
    background: #fff5f5 !important;
    color: var(--eco-red) !important;
    opacity: 1;
}

.ecla-nav-icon { font-size: 18px; flex-shrink: 0; width: 22px; text-align: center; }

.ecla-nav-labels { display: flex; flex-direction: column; gap: 1px; }

.ecla-nav-label { font-size: 14px; font-weight: 500; line-height: 1.2; }

.ecla-nav-desc { font-size: 11px; color: var(--eco-muted); }

.ecla-nav-item--active .ecla-nav-desc { color: var(--eco-green-dark); }

/* Separador de secção */
.ecla-nav-separator {
    padding: 8px 16px 4px;
    background: var(--eco-green-light);
    border-bottom: 1px solid var(--eco-border);
    border-top: 2px solid var(--eco-border);
}

.ecla-nav-separator span {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--eco-green);
}

/* CTA "Leilões ao vivo" na sidebar */
.ecla-sidebar-auction-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--eco-navy), #16213e);
    color: #fff;
    text-decoration: none;
    border-radius: var(--eco-radius);
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(26,26,46,0.25);
}

.ecla-sidebar-auction-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,26,46,0.3);
    color: #fff;
    text-decoration: none;
}

.ecla-sidebar-cta-arrow { margin-left: auto; opacity: 0.7; }

/* ── Conteúdo principal (mobile override) ────────────────── */
.ecla-account-content {
    flex: 1;
    min-width: 0;
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════════════ */

.ecla-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Boas-vindas */
.ecla-dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, var(--eco-navy) 0%, #16213e 60%, #0f3460 100%);
    padding: 22px 24px;
    border-radius: var(--eco-radius);
    box-shadow: var(--eco-shadow);
}

.ecla-dash-welcome__title {
    font-size: 20px;
    font-weight: 800;
    color: #fff !important;
    margin: 0 0 4px;
}

.ecla-dash-welcome__sub {
    font-size: 13px;
    color: rgba(255,255,255,0.65) !important;
    margin: 0;
}

.ecla-dash-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--eco-green);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 3px 10px rgba(30,127,58,0.3);
}

.ecla-dash-live-btn:hover,
.ecla-dash-live-btn:visited,
.ecla-dash-live-btn:focus {
    background: var(--eco-green-dark);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.ecla-live-dot {
    width: 8px; height: 8px;
    background: #ff4d4d;
    border-radius: 50%;
    animation: live-blink 1.5s infinite;
    flex-shrink: 0;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* Secções */
.ecla-dash-section {
    background: var(--eco-card);
    border-radius: var(--eco-radius);
    border: 1px solid var(--eco-border);
    box-shadow: var(--eco-shadow-sm);
    padding: 20px 22px;
}

.ecla-dash-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ecla-dash-section__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--eco-text);
    margin: 0 0 16px;
}

.ecla-dash-section__header .ecla-dash-section__title { margin: 0; }

.ecla-dash-section__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--eco-green);
    text-decoration: none;
}

.ecla-dash-section__link:hover { text-decoration: underline; }

/* Stats grid */
.ecla-dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ecla-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--eco-green-light);
    border-radius: 12px;
    border: 1px solid var(--eco-border);
    text-decoration: none;
    color: var(--eco-text);
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ecla-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(30,127,58,0.12);
    text-decoration: none;
    color: var(--eco-text);
}

.ecla-stat--alert {
    background: #fff8ec;
    border-color: #f5d9a0;
}

.ecla-stat__icon { font-size: 26px; flex-shrink: 0; }

.ecla-stat__num {
    font-size: 28px;
    font-weight: 900;
    color: var(--eco-green);
    line-height: 1.1;
}

.ecla-stat--alert .ecla-stat__num { color: #c9980a; }

.ecla-stat__label {
    font-size: 12px;
    color: var(--eco-muted);
    font-weight: 500;
}

.ecla-stat__value {
    font-size: 13px;
    font-weight: 800;
    color: var(--eco-red);
    margin-top: 2px;
}

.ecla-stat__badge {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--eco-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.ecla-stat__badge--blue { background: var(--eco-blue); }

/* Alert bar */
.ecla-dash-alert-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff8ec;
    border: 1px solid #f5d9a0;
    border-radius: 10px;
    font-size: 14px;
    color: #7a4f00;
}

.ecla-dash-alert-bar a {
    margin-left: auto;
    font-weight: 700;
    color: var(--eco-green);
    text-decoration: none;
    white-space: nowrap;
}

.ecla-dash-alert-bar a:hover { text-decoration: underline; }

/* Encomendas recentes */
.ecla-recent-orders {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ecla-order-card {
    display: grid;
    grid-template-columns: 60px 1fr auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--eco-green-light);
    border-radius: 10px;
    border: 1px solid var(--eco-border);
    text-decoration: none;
    color: var(--eco-text);
    transition: background 0.15s, transform 0.15s;
}

.ecla-order-card:hover {
    background: var(--eco-green-mid);
    transform: translateX(3px);
    text-decoration: none;
    color: var(--eco-text);
}

.ecla-order-card__num {
    font-weight: 800;
    font-size: 14px;
    color: var(--eco-green);
}

.ecla-order-card__name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ecla-order-card__more {
    background: var(--eco-border);
    color: var(--eco-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.ecla-order-card__date { font-size: 12px; color: var(--eco-muted); white-space: nowrap; }

.ecla-order-card__total { font-weight: 700; font-size: 14px; color: var(--eco-green); white-space: nowrap; }

.ecla-order-card__status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #e9f7ee;
    color: var(--eco-green);
    white-space: nowrap;
}

.ecla-order-card__status.status-pending    { background: #fff8ec; color: #7a4f00; }
.ecla-order-card__status.status-cancelled  { background: #fff0f0; color: var(--eco-red); }
.ecla-order-card__status.status-processing { background: #e9f0fb; color: var(--eco-blue); }

/* Ações rápidas */
.ecla-quick-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.ecla-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: var(--eco-green-light);
    border-radius: 10px;
    border: 1px solid var(--eco-border);
    text-decoration: none;
    color: var(--eco-text);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: background 0.15s, transform 0.15s;
}

.ecla-quick-link:hover {
    background: var(--eco-green-mid);
    transform: translateY(-2px);
    color: var(--eco-green);
    text-decoration: none;
}

.ecla-quick-link__icon { font-size: 22px; }

/* ══════════════════════════════════════════════════════════════
   SECÇÕES: Ganhos / Pagos / Enviados
══════════════════════════════════════════════════════════════ */

.ecla-wins-section {
    font-family: var(--eco-font);
}

.ecla-wins-header { margin-bottom: 20px; }

.ecla-wins-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--eco-text);
    margin: 0 0 6px;
}

.ecla-wins-header p {
    color: var(--eco-muted);
    font-size: 14px;
    margin: 0;
}

/* Alertas */
.ecla-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}

.ecla-alert--warning {
    background: #fff8ec;
    border: 1px solid #f5d9a0;
    color: #7a4f00;
}

.ecla-info-bar {
    background: var(--eco-green-light);
    border: 1px solid var(--eco-border);
    color: #2a5c37;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 4px solid var(--eco-green);
}

/* Grid de wins */
.ecla-wins-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* Card de win */
.ecla-win-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--eco-card);
    border: 1.5px solid var(--eco-border);
    border-radius: var(--eco-radius);
    padding: 14px 16px;
    box-shadow: var(--eco-shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.ecla-win-card--urgent {
    border-color: #f87171;
    background: #fff5f5;
}

.ecla-win-card--selected {
    border-color: #a8d5b5;
    box-shadow: 0 0 0 3px rgba(30,127,58,0.08);
}

.ecla-win-card--paid {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.ecla-win-card--shipped { opacity: 0.8; }

/* Checkbox personalizado — estilo Ecolivros */
.ecla-win-card__select {
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.ecla-win-card__select input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.ecla-win-check-ui {
    display: block;
    width: 22px; height: 22px;
    border: 2px solid var(--eco-border);
    border-radius: 6px;
    background: #fff;
    transition: all 0.15s;
    position: relative;
}

.ecla-win-check-ui::after {
    content: '';
    position: absolute;
    top: 3px; left: 6px;
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s;
}

.ecla-win-card__select input:checked ~ .ecla-win-check-ui {
    background: var(--eco-green);
    border-color: var(--eco-green);
}

.ecla-win-card__select input:checked ~ .ecla-win-check-ui::after {
    transform: rotate(45deg) scale(1);
}

/* Imagem */
.ecla-win-card__img {
    width: 60px; height: 76px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--eco-green-light);
    position: relative;
}

.ecla-win-card__img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.ecla-win-no-img {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #a8d5b5;
}

.ecla-win-card__shipped-badge {
    position: absolute;
    bottom: 4px; right: 4px;
    background: var(--eco-green);
    color: #fff;
    font-size: 10px;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Body do card */
.ecla-win-card__body { flex: 1; min-width: 0; }

.ecla-win-card__title {
    font-weight: 700;
    font-size: 14px;
    color: var(--eco-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.ecla-win-card__ref { font-size: 12px; color: var(--eco-muted); margin-bottom: 4px; }

.ecla-win-card__price {
    font-size: 20px;
    font-weight: 900;
    color: var(--eco-green);
    margin-bottom: 4px;
}

.ecla-win-card__deadline { font-size: 12px; color: var(--eco-muted); }
.ecla-win-card__deadline.urgent { color: var(--eco-red); font-weight: 700; }

.ecla-win-card__trophy { font-size: 20px; flex-shrink: 0; opacity: 0.35; }

/* Badges */
.ecla-win-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
}

.ecla-badge--paid     { background: var(--eco-green-mid); color: var(--eco-green-dark); }
.ecla-badge--shipped  { background: #dbeafe; color: #1e40af; }
.ecla-badge--checkout { background: #fef3c7; color: #92400e; }

/* Card em checkout (pagamento iniciado mas não concluído) */
.ecla-win-card--in-checkout {
    border-color: #fde68a;
    background: #fffbeb;
    opacity: 0.95;
}

/* Botão completar pagamento */
.ecla-btn--complete-pay {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 6px;
    background: #d97706;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.ecla-btn--complete-pay:hover { background: #b45309; color: #fff !important; }

/* Etiqueta de secção (separador entre grupos de wins) */
.ecla-section-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 0 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

/* Footer */
.ecla-wins-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--eco-border);
}

.ecla-wins-total {
    font-size: 16px;
    color: var(--eco-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ecla-wins-total strong {
    font-size: 22px;
    font-weight: 900;
    color: var(--eco-green);
}

/* ── Botões — mesmo estilo de ecolivros-style.css ─────────── */
.ecla-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    font-family: var(--eco-font);
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    letter-spacing: 0.2px;
}

.ecla-btn:hover { transform: translateY(-2px); text-decoration: none; }
.ecla-btn:active { transform: translateY(0); }
.ecla-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.ecla-btn--pay {
    background-color: var(--eco-green);
    color: #fff;
    box-shadow: 0 6px 18px rgba(30,127,58,0.25);
}

.ecla-btn--pay:hover {
    background-color: var(--eco-green-dark);
    color: #fff;
    box-shadow: 0 8px 22px rgba(30,127,58,0.32);
}

.ecla-btn--ship {
    background-color: var(--eco-blue);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,115,170,0.22);
}

.ecla-btn--ship:hover {
    background-color: #005580;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0,115,170,0.3);
}

.ecla-btn--primary,
a.ecla-btn--primary,
a.ecla-btn--primary:link,
a.ecla-btn--primary:visited {
    background-color: var(--eco-green);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(30,127,58,0.25);
    text-decoration: none !important;
}

.ecla-btn--primary:hover,
a.ecla-btn--primary:hover,
a.ecla-btn--primary:focus,
a.ecla-btn--primary:active {
    background-color: var(--eco-green-dark);
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ── Seletor de envio — mesmo estilo que elb-painel ──────── */
.ecla-shipping-selector { margin-bottom: 24px; }

.ecla-shipping-selector h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--eco-text);
    margin: 0 0 12px;
}

.ecla-shipping-options { display: flex; flex-direction: column; gap: 8px; }

.ecla-shipping-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--eco-border-mid);
    border-radius: 10px;
    cursor: pointer;
    background: var(--eco-card);
    transition: border-color 0.15s, background 0.15s;
    box-shadow: var(--eco-shadow-sm);
}

.ecla-shipping-opt input[type="radio"] { display: none; }

.ecla-shipping-opt:hover {
    border-color: #a8d5b5;
    background: var(--eco-green-light);
}

.ecla-shipping-opt--selected {
    border-color: var(--eco-green);
    background: var(--eco-green-light);
    box-shadow: 0 0 0 3px rgba(30,127,58,0.1);
}

.ecla-shipping-opt__icon { font-size: 24px; flex-shrink: 0; }

.ecla-shipping-opt__info { display: flex; flex-direction: column; gap: 2px; }

.ecla-shipping-opt__info strong { font-size: 14px; font-weight: 700; color: var(--eco-text); }

.ecla-shipping-opt__info span { font-size: 12px; color: var(--eco-muted); }

/* ── Estado vazio ─────────────────────────────────────────── */
.ecla-empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--eco-card);
    border-radius: var(--eco-radius);
    border: 1px dashed var(--eco-border);
}

.ecla-empty-state__icon { font-size: 52px; margin-bottom: 16px; line-height: 1; }

.ecla-empty-state__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--eco-text);
    margin: 0 0 8px;
}

.ecla-empty-state__text {
    font-size: 14px;
    color: var(--eco-muted);
    margin: 0 0 24px;
}

/* ── Grid enviados (compacto) ─────────────────────────────── */
.ecla-wins-grid--shipped {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.ecla-wins-grid--shipped .ecla-win-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
}

.ecla-wins-grid--shipped .ecla-win-card__img {
    width: 100%;
    height: 150px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVO
══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    /* em mobile: flex-column → conteúdo (1.º no HTML) aparece no topo, sidebar em baixo */
    .ecla-account-wrap {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .ecla-account-sidebar { width: 100%; position: static; }
    .ecla-account-nav { display: grid; grid-template-columns: repeat(2, 1fr); }
    .ecla-nav-item { border-bottom: none; border-right: 1px solid #f0f5f2; }
    .ecla-nav-separator { grid-column: 1 / -1; }
    .ecla-nav-desc { display: none; }
    .ecla-dash-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .ecla-quick-links { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 600px) {
    .ecla-account-wrap { padding: 0 12px 40px; margin-top: 16px; }
    .ecla-account-nav { grid-template-columns: 1fr; }
    .ecla-nav-item { border-right: none; border-bottom: 1px solid #f0f5f2; }
    .ecla-dash-welcome { flex-wrap: wrap; }
    .ecla-dash-live-btn { width: 100%; justify-content: center; }
    .ecla-dash-stats-grid { grid-template-columns: 1fr; }
    .ecla-quick-links { grid-template-columns: repeat(2, 1fr); }
    .ecla-wins-footer { flex-direction: column; align-items: stretch; }
    .ecla-btn { width: 100%; }
    .ecla-order-card { grid-template-columns: 50px 1fr auto; }
    .ecla-order-card__date,
    .ecla-order-card__status { display: none; }
    .ecla-wins-grid--shipped { grid-template-columns: repeat(2, 1fr); }
}


/* ══════════════════════════════════════════════════════════════
   LOGIN / REGISTO — eco-auth-page
══════════════════════════════════════════════════════════════ */

/* Fundo a página inteira */
.eco-auth-wrap {
    min-height: 60vh;
    background: #f4f7f5;
    margin: -28px -20px 0;   /* anular padding do .woocommerce */
    padding: 0;
}

.eco-auth-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 20px 64px;
}

/* Cabeçalho */
.eco-auth-hero {
    text-align: center;
    margin-bottom: 36px;
}
.eco-auth-logo {
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: none;
}
.eco-auth-logo img {
    height: 48px;
    width: auto;
}
.eco-auth-logo-text {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1a3c2e;
    letter-spacing: -0.5px;
}

/* Logo link (v2) */
.eco-auth-logo-link {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 10px;
}
.eco-auth-logo-link img {
    height: 48px;
    width: auto;
    display: block;
}

/* Brand text fallback (v2) */
.eco-auth-brand {
    display: inline-block;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}
.eco-auth-brand-eco    { color: #2e7d52; }
.eco-auth-brand-livros { color: #1a3c2e; }

.eco-auth-tagline {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

/* Layout dos cartões */
.eco-auth-cards {
    display: grid;
    gap: 24px;
    align-items: start;
}
.eco-auth-cards--two-col {
    grid-template-columns: 1fr 1fr;
}
.eco-auth-cards--one-col {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
}

/* Cartão */
.eco-auth-card {
    background: #fff;
    border: 1px solid #e8f0eb;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 2px 16px rgba(26, 60, 46, 0.07);
}
.eco-auth-card--register {
    border-color: #d4edda;
    background: linear-gradient(180deg, #f0faf4 0%, #fff 120px);
}

/* Cabeçalho do cartão */
.eco-auth-card__header {
    text-align: center;
    margin-bottom: 28px;
}
.eco-auth-card__icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1;
}

/* Ícone SVG circular (v2) */
.eco-auth-card__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin: 0 auto 12px;
}
.eco-auth-card__icon-wrap svg {
    display: block;
}
.eco-auth-card__icon-wrap--login {
    background: #e8f5ee;
    color: #2e7d52;
    border: 1.5px solid #c3e6d0;
}
.eco-auth-card__icon-wrap--register {
    background: #1a3c2e;
    color: #fff;
    border: 1.5px solid #2e7d52;
}

.eco-auth-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a3c2e;
    margin: 0 0 6px;
}
.eco-auth-card__subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* Campos */
.eco-auth-field {
    margin-bottom: 18px;
}
.eco-auth-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}
.eco-auth-forgot {
    font-weight: 400;
    font-size: 0.82rem;
    color: #2e7d52;
    text-decoration: none;
}
.eco-auth-forgot:hover { text-decoration: underline; }

.eco-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
/* Flex-based icon approach: wrapper is the visual box, icon is a flex child */
.eco-auth-input-wrap--with-icon {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #fafafa;
    padding: 0 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.eco-auth-input-wrap--with-icon:focus-within {
    border-color: #2e7d52;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 125, 82, 0.12);
}
.eco-auth-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}
/* Override: inside --with-icon wrapper, icons are inline flex children */
.eco-auth-input-wrap--with-icon .eco-auth-input-icon {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
}
/* Input inside flex wrapper: no border/background (wrapper handles it) */
.eco-auth-input-wrap--with-icon .eco-auth-input,
.eco-auth-input-wrap--with-icon input[type="text"],
.eco-auth-input-wrap--with-icon input[type="email"],
.eco-auth-input-wrap--with-icon input[type="password"] {
    flex: 1 !important;
    min-width: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    padding: 11px 0 !important;
    width: auto !important;
}
/* Toggle-pw button: also a flex child */
.eco-auth-input-wrap--with-icon .eco-auth-toggle-pw {
    position: static !important;
    transform: none !important;
    right: auto !important;
    flex-shrink: 0;
    margin-left: auto;
}
.eco-auth-input {
    width: 100%;
    padding: 11px 42px 11px 38px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    color: #111827 !important;
    background: #fafafa !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}
.eco-auth-input:focus {
    border-color: #2e7d52 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(46, 125, 82, 0.12) !important;
}
.eco-auth-input::placeholder { color: #9ca3af !important; }

.eco-auth-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.eco-auth-toggle-pw:hover { color: #2e7d52; }
.eco-auth-toggle-pw--visible { color: #2e7d52; }

/* Manter sessão */
.eco-auth-remember {
    margin-bottom: 22px;
}
.eco-auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}
.eco-auth-checkbox { display: none; }
.eco-auth-checkbox-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    background: #fafafa;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    position: relative;
}
.eco-auth-checkbox:checked + .eco-auth-checkbox-box {
    background: #2e7d52;
    border-color: #2e7d52;
}
.eco-auth-checkbox:checked + .eco-auth-checkbox-box::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

/* Botões */
.eco-auth-btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
.eco-auth-btn--primary {
    background: #2e7d52;
    color: #fff !important;
}
.eco-auth-btn--primary:hover {
    background: #236040;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(46, 125, 82, 0.35);
}
.eco-auth-btn--secondary {
    background: #1a3c2e;
    color: #fff !important;
}
.eco-auth-btn--secondary:hover {
    background: #122a20;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 60, 46, 0.35);
}
.eco-auth-btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.2s;
}
.eco-auth-btn:hover .eco-auth-btn-arrow { transform: translateX(3px); }

/* Divisor "ou" */
.eco-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: #9ca3af;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.eco-auth-divider::before,
.eco-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Troca login/registo */
.eco-auth-switch {
    text-align: center;
    margin: 20px 0 0;
    font-size: 0.87rem;
    color: #6b7280;
}
.eco-auth-switch-link {
    color: #2e7d52;
    font-weight: 600;
    text-decoration: none;
}
.eco-auth-switch-link:hover { text-decoration: underline; }

/* Benefícios do registo */
.eco-auth-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.eco-auth-perk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #374151;
    background: #f0faf4;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 8px 10px;
}
.eco-auth-perk-icon { font-size: 1rem; flex-shrink: 0; }

/* Mensagem senha automática */
.eco-auth-auto-pw {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.87rem;
    color: #78350f;
    margin-bottom: 18px;
}

/* Privacidade */
.eco-auth-privacy {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 18px;
}
.eco-auth-privacy a { color: #2e7d52; }

/* Trust strip */
.eco-auth-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.eco-auth-trust-item {
    font-size: 0.82rem;
    color: #9ca3af;
}
.eco-auth-trust-sep { color: #d1d5db; }

/* Erros WooCommerce */
.eco-auth-page .woocommerce-error,
.eco-auth-page .woocommerce-message,
.eco-auth-page .woocommerce-info {
    border-radius: 10px;
    margin-bottom: 20px;
}

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 760px) {
    .eco-auth-cards--two-col {
        grid-template-columns: 1fr;
    }
    .eco-auth-card {
        padding: 28px 20px;
    }
    .eco-auth-perks {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .eco-auth-page { padding: 24px 12px 48px; }
    .eco-auth-card { padding: 24px 16px; }
}


/* ══════════════════════════════════════════════════════════════
   NOVOS ESTILOS v1.3.9 — fluxo pago → processing → completed
══════════════════════════════════════════════════════════════ */

/* Badge "Em preparação" */
.ecla-badge--processing {
    background: #ede9fe;
    color: #5b21b6;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    margin-top: 4px;
}

/* Card em processamento */
.ecla-win-card--processing {
    border-left: 3px solid #7c3aed;
    opacity: 0.92;
}

.ecla-win-card__sub {
    font-size: 11px;
    color: var(--eco-muted);
    margin-top: 3px;
}

/* Bloco de morada de envio */
.ecla-address-block {
    background: var(--eco-green-light);
    border: 1px solid var(--eco-border);
    border-radius: var(--eco-radius);
    padding: 20px 24px 16px;
    margin: 0 0 20px;
}

.ecla-address-block h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--eco-navy);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ecla-address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ecla-field { display: flex; flex-direction: column; gap: 4px; }
.ecla-field--full { grid-column: 1 / -1; }

.ecla-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--eco-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ecla-input {
    border: 1px solid var(--eco-border-mid);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--eco-text);
    background: #fff;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.ecla-input:focus {
    outline: none;
    border-color: var(--eco-green);
    box-shadow: 0 0 0 3px rgba(30,127,58,0.1);
}

.ecla-req { color: var(--eco-red); }
.ecla-opt { color: var(--eco-muted); font-weight: 400; font-size: 11px; }

@media (max-width: 540px) {
    .ecla-address-grid { grid-template-columns: 1fr; }
    .ecla-field--full  { grid-column: 1; }
}

/* ─── Cart merge section (v1.4.1) ─────────────────────────────────────── */

.ecla-cart-merge {
    background: #f8fafc;
    border: 1px solid var(--eco-border);
    border-radius: var(--eco-radius);
    margin: 0 0 20px;
    overflow: hidden;
}

.ecla-cart-merge__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid var(--eco-border);
    cursor: default;
    font-size: 14px;
    font-weight: 600;
    color: var(--eco-navy);
}

.ecla-cart-merge__header svg { color: var(--eco-green); flex-shrink: 0; }

.ecla-cart-merge__opt {
    font-size: 11px;
    font-weight: 400;
    color: var(--eco-muted);
    margin-left: 2px;
}

.ecla-cart-merge__toggle {
    margin-left: auto;
    background: none;
    border: 1px solid var(--eco-border-mid);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--eco-muted);
    transition: background 0.15s, color 0.15s, transform 0.2s;
    flex-shrink: 0;
}

.ecla-cart-merge__toggle:hover {
    background: var(--eco-green-light);
    color: var(--eco-green);
}

.ecla-cart-merge__toggle.ecla-cart-merge__toggle--open svg {
    transform: rotate(180deg);
}

.ecla-cart-merge__body {
    padding: 14px 18px 18px;
}

.ecla-cart-merge__info {
    font-size: 12px;
    color: var(--eco-muted);
    margin: 0 0 14px;
    line-height: 1.5;
}

/* Cart item cards */
.ecla-win-card--cart {
    border-left: 3px solid #0ea5e9;
    background: #f0f9ff;
}

.ecla-win-card--cart.ecla-win-card--selected {
    background: #e0f2fe;
    border-color: #0284c7;
}

.ecla-badge--cart {
    background: #e0f2fe;
    color: #0369a1;
}

/* Remove cart link */
.ecla-cart-remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--eco-red);
    text-decoration: none;
    margin-top: 4px;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.ecla-cart-remove:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTEÚDO EDUCATIVO — Dashboard + Tab Ganhos (v1.4.1)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Dashboard: Guia rápido ───────────────────────────────────────────────── */

.ecla-dash-guide {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid var(--eco-border);
    border-radius: var(--eco-radius);
    padding: 18px 20px;
}

.ecla-dash-guide__step {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.ecla-dash-guide__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.ecla-dash-guide__icon--1 { background: #fef9c3; border-color: #fde047; color: #92400e; }
.ecla-dash-guide__icon--2 { background: #fef9c3; border-color: #fde047; color: #92400e; }
.ecla-dash-guide__icon--3 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.ecla-dash-guide__icon--4 { background: #dcfce7; border-color: #86efac; color: #166534; }

.ecla-dash-guide__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ecla-dash-guide__text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--eco-navy);
}

.ecla-dash-guide__text span {
    font-size: 11px;
    color: var(--eco-muted);
    line-height: 1.4;
}

.ecla-dash-guide__arrow {
    font-size: 16px;
    color: #cbd5e1;
    flex-shrink: 0;
    align-self: center;
    padding-bottom: 14px;
}

/* ── Tab Ganhos: Painel de progresso ──────────────────────────────────────── */

.ecla-ganhos-guide {
    background: #fff;
    border: 1px solid var(--eco-border);
    border-radius: var(--eco-radius);
    padding: 18px 20px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.ecla-ganhos-guide__steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ecla-ganhos-guide__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 0 12px;
    opacity: .45;
}

.ecla-ganhos-guide__step--active,
.ecla-ganhos-guide__step--current {
    opacity: 1;
}

.ecla-ganhos-guide__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecla-ganhos-guide__step--active .ecla-ganhos-guide__num {
    background: #fde047;
    color: #92400e;
}

.ecla-ganhos-guide__step--current .ecla-ganhos-guide__num {
    background: var(--eco-green);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(30,127,58,.2);
}

.ecla-ganhos-guide__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--eco-navy);
    white-space: nowrap;
}

.ecla-ganhos-guide__sub {
    font-size: 10px;
    color: var(--eco-muted);
    white-space: nowrap;
}

.ecla-ganhos-guide__line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    min-width: 20px;
    margin-bottom: 20px;
}

.ecla-ganhos-guide__rules {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--eco-border);
    padding-top: 12px;
}

.ecla-ganhos-guide__rule {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--eco-text);
    line-height: 1.4;
}

.ecla-ganhos-guide__rule svg { color: var(--eco-muted); flex-shrink: 0; }

/* Responsivo */
@media (max-width: 600px) {
    .ecla-dash-guide        { flex-direction: column; align-items: flex-start; }
    .ecla-dash-guide__step  { flex-direction: row; text-align: left; min-width: unset; }
    .ecla-dash-guide__arrow { display: none; }
    .ecla-ganhos-guide__steps { justify-content: flex-start; }
}
