/* Withdraw flow (verify + pending + status) — attaches AFTER the friend's
   confirm dialog. All classes namespaced `wflow-` to avoid collisions with
   `brasa-*`, `withdraw-*`, `auth-*`. */

.wflow-dialog {
    width: min(448px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    border: 1px solid #334155;
    border-radius: 14px;
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    font: inherit;
}
.wflow-dialog::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); }
.wflow-body { padding: 24px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }

/* ===== Verify (loading) ===== */
.wflow-verify-spinner {
    width: 72px;
    height: 72px;
    display: block;
    animation: wflowSpin 1.1s linear infinite;
}
@keyframes wflowSpin { to { transform: rotate(360deg); } }
.wflow-verify-title {
    margin: 2px 0 0;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wflow-verify-sub {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}
.wflow-verify-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    overflow: hidden;
    margin-top: 6px;
}
.wflow-verify-progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Pending (Liberação Pendente!) ===== */
.wflow-pending-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #1e293b;
    color: #cbd5e1;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 15px;
}
.wflow-pending-close:hover { background: #334155; color: #fff; }

.wflow-pending-alert {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    position: relative;
    margin-top: 4px;
    animation: wflowAlertFloat 2.6s ease-in-out infinite;
}
.wflow-pending-alert::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.28) 0%, rgba(234, 179, 8, 0) 70%);
    z-index: 0;
}
.wflow-pending-alert svg { position: relative; z-index: 1; width: 100%; height: 100%; }
@keyframes wflowAlertFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.wflow-pending-title {
    margin: 2px 0 0;
    color: #fff;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.wflow-pending-body {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    max-width: 36ch;
}
.wflow-pending-body strong { color: #e2e8f0; }

.wflow-pending-info {
    width: 100%;
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: grid;
    gap: 10px;
}
.wflow-pending-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.wflow-pending-info-label {
    color: #94a3b8;
    font-size: 13px;
}
.wflow-pending-info-value {
    color: #38bdf8;
    font-size: 1.12rem;
    font-weight: 800;
}
.wflow-pending-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(234, 179, 8, 0.08));
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fde68a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.wflow-pending-info-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fde047;
    box-shadow: 0 0 6px rgba(253, 224, 71, 0.6);
}

.wflow-pending-actions {
    width: 100%;
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
}
.wflow-pending-btn {
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 8px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wflow-pending-btn-ghost {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #334155;
}
.wflow-pending-btn-ghost:hover { background: #1e293b; color: #fff; }
.wflow-pending-btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 14px rgba(14, 165, 233, 0.3);
}
.wflow-pending-btn-primary:hover { filter: brightness(1.08); }

/* ===== Status list ===== */
.wflow-status-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #1e293b;
}
.wflow-status-head h2 {
    flex: 1;
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.wflow-status-head h2 i { color: #38bdf8; }
.wflow-status-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #1e293b;
    color: #cbd5e1;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 14px;
}
.wflow-status-close:hover { background: #334155; color: #fff; }

.wflow-status-list {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
}
.wflow-status-empty {
    padding: 24px 12px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}
.wflow-status-item {
    padding: 13px 14px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    display: grid;
    gap: 6px;
}
.wflow-status-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.wflow-status-item-amount {
    color: #38bdf8;
    font-size: 17px;
    font-weight: 800;
}
.wflow-status-item-chip {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}
.wflow-status-item-chip.is-pending {
    background: rgba(234, 179, 8, 0.14);
    border-color: rgba(234, 179, 8, 0.4);
    color: #fde68a;
}
.wflow-status-item-chip.is-paid {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
}
.wflow-status-item-chip.is-failed {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.wflow-status-item-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #cbd5e1;
    font-size: 13px;
}
.wflow-status-item-meta strong { color: #e2e8f0; }
.wflow-status-item-meta small { color: #64748b; font-size: 11px; }

/* ===== Confirmation (Confirmação da solicitação) ===== */
.wflow-conf-icon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 10px;
    animation: wflowConfPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
@keyframes wflowConfPop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.wflow-conf-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170px;
    height: 170px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0) 65%);
    pointer-events: none;
    z-index: 0;
}
.wflow-conf-icon svg {
    position: relative;
    width: 84px;
    height: 84px;
    display: block;
    z-index: 1;
    filter: drop-shadow(0 10px 24px rgba(14, 165, 233, 0.45));
}
.wflow-conf-title {
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}
.wflow-conf-body {
    color: #e5e7eb;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    max-width: 36ch;
}
.wflow-conf-sub {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 4px;
    max-width: 36ch;
}
.wflow-conf-info {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px 14px;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 10px rgba(0, 0, 0, 0.22);
}
.wflow-conf-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}
.wflow-conf-info-row + .wflow-conf-info-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.wflow-conf-info-label {
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 500;
}
.wflow-conf-info-value {
    color: #38bdf8;
    font-weight: 800;
    font-size: 1.02rem;
    max-width: 60%;
    text-align: right;
    word-break: break-all;
}
.wflow-conf-info-value--mono {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.95rem;
}
.wflow-conf-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}
.wflow-conf-info-chip.is-pending {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(234, 179, 8, 0.08));
    border: 1px solid rgba(250, 204, 21, 0.4);
    color: #fde047;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(250, 204, 21, 0.15);
}
.wflow-conf-info-chip.is-paid {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.08));
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #86efac;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(74, 222, 128, 0.15);
}
.wflow-conf-info-chip.is-failed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(239, 68, 68, 0.15);
}
.wflow-conf-info-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    opacity: 0.9;
}
.wflow-conf-info-chip.is-pending .wflow-conf-info-chip-dot {
    animation: wflowDotPulse 1.5s ease-in-out infinite;
}
@keyframes wflowDotPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.4; }
}
.wflow-conf-actions {
    width: 100%;
    margin-top: 4px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
}
.wflow-conf-close-btn {
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #e5e7eb;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}
.wflow-conf-close-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}
.wflow-conf-cta {
    padding: 14px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 6px 20px rgba(14, 165, 233, 0.42);
}
.wflow-conf-cta:hover { filter: brightness(1.08); }

@media (max-width: 420px) {
    .wflow-pending-title { font-size: 1.4rem; }
    .wflow-pending-alert { width: 76px; height: 76px; }
    .wflow-pending-actions { grid-template-columns: 1fr; }
    .wflow-conf-icon svg { width: 72px; height: 72px; }
    .wflow-conf-icon::before { width: 140px; height: 140px; }
    .wflow-conf-title { font-size: 1.25rem; }
    .wflow-conf-actions { grid-template-columns: 1fr 1.4fr; }
}
