/**
 * Elo do Bem — Abas Premium no Single & Painel do Organizador Mobile-First
 * Visual Apple Liquid Glass com Badges, Animações e Cards Responsivos
 */

.elo-single-tabs-section { margin-top: 24px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.elo-single-tabs-nav-wrap {
    margin-bottom: 20px; position: sticky; top: 12px; z-index: 40;
    width: 100%; display: flex; justify-content: center; align-items: center;
}

.elo-single-tabs-nav {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--elo-radius-pill, 9999px);
    padding: 6px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    touch-action: pan-x; flex-wrap: nowrap; overscroll-behavior-x: contain;
    max-width: 100%; margin: 0 auto; box-sizing: border-box;
}
.elo-single-tabs-nav::-webkit-scrollbar { display: none; }

.elo-single-tab-btn {
    flex: 0 0 auto !important; min-width: max-content;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 14px; border-radius: var(--elo-radius-pill, 9999px);
    border: none; background: transparent; color: #94a3b8;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap; user-select: none;
}
.elo-single-tab-btn:hover { color: #f8fafc; background: rgba(255, 255, 255, 0.05); }
.elo-single-tab-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399; box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.elo-tab-icon { font-size: 1rem; line-height: 1; }
.elo-tab-label { font-weight: 700; }
.elo-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 9999px; background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1; font-size: 0.72rem; font-weight: 700;
}
.elo-single-tab-btn.active .elo-tab-badge { background: rgba(16, 185, 129, 0.3); color: #a7f3d0; }

.elo-single-tabs-panes { position: relative; width: 100%; }
.elo-single-tab-pane { animation: eloTabFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes eloTabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Floating CTA de Doação no Scroll */
.elo-floating-wrapper {
    position: fixed; bottom: 16px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    z-index: 999; pointer-events: none; width: calc(100% - 32px); max-width: 480px;
}
.elo-floating-wrapper > * { pointer-events: auto; }

.elo-floating-cta-wrap {
    width: 100%; opacity: 0; transform: translateY(20px) scale(0.95); visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}
.elo-floating-cta-wrap.visible { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }

.elo-floating-donate-bar {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: var(--elo-radius-pill, 9999px);
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid rgba(255, 255, 255, 0.25); color: #ffffff;
    font-size: 0.95rem; font-weight: 800; cursor: pointer;
    box-shadow: 0 10px 25px -3px rgba(16, 185, 129, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.elo-floating-donate-bar:hover { transform: translateY(-2px) scale(1.02); color: #ffffff; }
.elo-floating-donate-sparkle { animation: eloSparklePulse 1.8s infinite ease-in-out; }

@keyframes eloSparklePulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3) rotate(15deg); opacity: 1; }
}

.elo-floating-wrapper .elo-floating-pill {
    position: relative; bottom: auto; left: auto; transform: none; margin: 0 auto;
}

/* Header de Ações da Campanha no Painel */
.elo-project-actions-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px; margin-top: 16px; width: 100%;
}
.elo-project-actions-grid .elo-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; font-size: 0.88rem; font-weight: 700; border-radius: 10px;
    text-decoration: none; transition: all 0.2s ease; white-space: nowrap;
}

/* Cards Mobile de Minhas Campanhas */
.elo-dash-campaign-cards-mobile { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.elo-dash-campaign-card {
    padding: 16px; background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
    backdrop-filter: blur(16px);
}
.elo-camp-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.elo-camp-card-thumb {
    width: 52px; height: 52px; border-radius: 10px;
    object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.1); flex-shrink: 0;
}
.elo-camp-card-info { flex: 1; min-width: 0; }
.elo-camp-card-title { margin: 0 0 6px 0; font-size: 0.98rem; line-height: 1.3; }
.elo-camp-card-title a { color: #f8fafc; text-decoration: none; }
.elo-camp-card-title a:hover { color: #34d399; }
.elo-camp-card-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.elo-camp-card-church { font-size: 0.75rem; color: #94a3b8; }

.elo-camp-card-stats-grid {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px;
    background: rgba(15, 23, 42, 0.55); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.elo-camp-stat-box { display: flex; flex-direction: column; }
.elo-camp-stat-label { font-size: 0.72rem; color: #94a3b8; margin-bottom: 2px; }
.elo-camp-stat-val { font-size: 0.9rem; color: #f8fafc; }
.elo-val-gold { color: #fbbf24; }

.elo-camp-card-progress { margin-bottom: 12px; }
.elo-camp-progress-bg { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.elo-camp-progress-bar { height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: 999px; }
.elo-camp-progress-text { font-size: 0.72rem; color: #94a3b8; display: block; text-align: right; }

.elo-camp-card-actions-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 6px; }
.elo-camp-action-btn {
    padding: 8px 6px; font-size: 0.78rem; font-weight: 700; text-align: center;
    border-radius: 8px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}

/* Edição Rápida de Nome de Doador no Hover/Touch */
.elo-donor-inline-wrap { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.elo-donor-name-text { color: #f8fafc; font-weight: 700; transition: color 0.25s ease; }
.elo-btn-edit-donor-name {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 6px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fbbf24; font-size: 0.76rem; cursor: pointer;
    opacity: 0; transform: scale(0.85); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0; line-height: 1;
}
tr:hover .elo-btn-edit-donor-name,
.elo-donor-inline-wrap:hover .elo-btn-edit-donor-name,
.elo-dash-donation-card:hover .elo-btn-edit-donor-name {
    opacity: 1; transform: scale(1);
}
.elo-btn-edit-donor-name:hover {
    background: rgba(245, 158, 11, 0.25); border-color: #f59e0b; transform: scale(1.15);
}

/* Células da Tabela com nowrap para Telefone, Valor e Data */
.elo-nowrap-cell { white-space: nowrap !important; }

/* Badge de Status WhatsApp com Check Duplo e Tooltip no Hover */
.elo-status-cell { text-align: center; width: 44px; white-space: nowrap !important; }
.elo-badge-notify-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 9999px;
    font-weight: 800; font-size: 0.78rem; position: relative;
    cursor: default; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.elo-badge-notify-icon.sent {
    background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}
.elo-badge-notify-icon.pending {
    background: rgba(245, 158, 11, 0.16); border: 1px solid rgba(245, 158, 11, 0.4); color: #fbbf24;
}
.elo-badge-notify-icon:hover { transform: scale(1.15); }
.elo-notify-tooltip-text {
    position: absolute; bottom: calc(100% + 7px); left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a; border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc; font-size: 0.72rem; font-weight: 700;
    padding: 3px 8px; border-radius: 6px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); z-index: 99;
}
.elo-notify-tooltip-text::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%); border: 4px solid transparent; border-top-color: #0f172a;
}
.elo-badge-notify-icon:hover .elo-notify-tooltip-text { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Barra Superior de Navegação no Painel */
.elo-dash-breadcrumbs-wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.elo-dash-breadcrumbs a {
    display: inline-flex; align-items: center; gap: 6px;
    color: #94a3b8; font-size: 0.82rem; font-weight: 600; text-decoration: none;
    padding: 6px 12px; border-radius: var(--elo-radius-pill, 9999px);
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}
.elo-dash-breadcrumbs a:hover {
    color: #ffffff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22);
}
.elo-status-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    font-size: 0.72rem; font-weight: 700; border-radius: var(--elo-radius-pill, 9999px);
    text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px;
}
.elo-status-badge.active {
    background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3);
}
.elo-status-badge.closed, .elo-status-badge.paused {
    background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3);
}
.elo-dash-topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.elo-topbar-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--elo-radius-pill, 9999px); color: #f8fafc; font-size: 0.78rem;
    font-weight: 700; text-decoration: none; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); backdrop-filter: blur(12px); white-space: nowrap;
}
.elo-topbar-btn:hover {
    background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff; transform: translateY(-1px);
}
.elo-topbar-btn.elo-status-close {
    background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); color: #f87171;
}
.elo-topbar-btn.elo-status-close:hover { background: #ef4444; color: #ffffff; }
.elo-topbar-btn.elo-status-reopen {
    background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: #34d399;
}
.elo-topbar-btn.elo-status-reopen:hover { background: #10b981; color: #ffffff; }
.elo-topbar-logout { background: rgba(239, 68, 68, 0.08); color: #cbd5e1; }
.elo-topbar-logout:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Menu Pílula Suspenso & CTA Flutuante de Gestão */
.elo-dash-floating-wrapper {
    position: fixed !important; bottom: 16px !important; left: 50% !important;
    transform: translateX(-50%) !important; width: auto !important;
    max-width: calc(100vw - 24px) !important; display: flex !important;
    flex-direction: column !important; align-items: center !important; gap: 8px !important;
    z-index: 99999 !important; pointer-events: none !important; margin: 0 !important; padding: 0 !important;
}
.elo-dash-floating-wrapper .elo-floating-cta-wrap {
    pointer-events: auto !important; display: flex !important; justify-content: center !important;
    width: 100% !important; opacity: 1 !important; transform: none !important; margin-bottom: 0 !important;
}
.elo-dash-floating-wrapper .elo-floating-donate-bar {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    gap: 8px !important; padding: 10px 24px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important; font-weight: 800 !important; font-size: 0.92rem !important;
    border-radius: 9999px !important; border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
    cursor: pointer !important; text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important; white-space: nowrap !important;
}
.elo-dash-floating-wrapper .elo-floating-donate-bar:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6) !important;
}
.elo-dash-floating-pill {
    pointer-events: auto !important; display: inline-flex !important; align-items: center !important;
    justify-content: center !important; gap: 4px !important; padding: 5px 8px !important;
    background: rgba(15, 23, 42, 0.92) !important; border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 9999px !important; backdrop-filter: blur(24px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    margin: 0 auto !important; overflow-x: auto !important; max-width: 100% !important; scrollbar-width: none !important;
}
.elo-dash-floating-pill::-webkit-scrollbar { display: none; }
.elo-dash-floating-pill .elo-pill-btn {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    gap: 6px !important; padding: 7px 14px !important; border-radius: 9999px !important;
    border: none !important; background: transparent !important; color: #94a3b8 !important;
    font-size: 0.82rem !important; font-weight: 700 !important; cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important; white-space: nowrap !important; text-decoration: none !important;
}
.elo-dash-floating-pill .elo-pill-btn:hover { color: #f8fafc !important; background: rgba(255, 255, 255, 0.06) !important; }
.elo-dash-floating-pill .elo-pill-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}
.elo-dash-floating-pill .elo-pill-btn.active .elo-tab-badge { background: rgba(255, 255, 255, 0.25) !important; color: #ffffff !important; }
.elo-dash-floating-pill .elo-tab-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9999px; background: rgba(255, 255, 255, 0.12); color: #cbd5e1; font-size: 0.68rem; font-weight: 800;
}

/* Regras de Visualização Responsiva */
.elo-desktop-only { display: block; }
.elo-mobile-only { display: none; }

@media (max-width: 768px) {
    .elo-desktop-only { display: none !important; }
    .elo-mobile-only { display: flex !important; }
    .elo-project-actions-grid { grid-template-columns: 1fr 1fr; }
    .elo-btn-edit-donor-name { opacity: 0.75; transform: scale(1); }
    .elo-dash-floating-pill .elo-pill-btn { padding: 6px 10px !important; font-size: 0.76rem !important; }
    .elo-dash-topbar-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 480px) {
    .elo-single-tab-btn { padding: 8px 10px; font-size: 0.78rem; gap: 4px; }
    .elo-tab-icon { font-size: 0.88rem; }
    .elo-floating-donate-bar { padding: 9px 16px !important; font-size: 0.84rem !important; }
    .elo-dash-floating-pill { padding: 3px 5px !important; }
    .elo-dash-floating-pill .elo-pill-btn { padding: 5px 8px !important; font-size: 0.72rem !important; gap: 4px !important; }
    .elo-camp-card-actions-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
