/**
 * Withdraw Profit — Premium Fintech UI
 * Location: /assets/css/withdraw-profit-premium.css
 */

.wp-page {
    --wp-emerald: #10B981;
    --wp-emerald-dark: #059669;
    --wp-emerald-soft: #ecfdf5;
    --wp-radius: 18px;
    --wp-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --wp-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
}

.wp-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.wp-header h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: #0f172a;
}

.wp-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    max-width: 32rem;
}

.wp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--wp-shadow);
}

.wp-back-btn:hover {
    border-color: var(--wp-emerald);
    color: var(--wp-emerald-dark);
    transform: translateY(-1px);
}

/* KPI cards */
.wp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wp-kpi {
    background: #fff;
    border-radius: var(--wp-radius);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--wp-shadow);
    border: 1px solid #f1f5f9;
    opacity: 0;
    transform: translateY(12px);
    animation: wpFadeUp 0.5s ease forwards;
}

.wp-kpi:nth-child(1) { animation-delay: 0.05s; }
.wp-kpi:nth-child(2) { animation-delay: 0.1s; }
.wp-kpi:nth-child(3) { animation-delay: 0.15s; }
.wp-kpi:nth-child(4) { animation-delay: 0.2s; }

@keyframes wpFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.wp-kpi__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.wp-kpi__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.wp-kpi__icon--green { background: #ecfdf5; color: var(--wp-emerald); }
.wp-kpi__icon--blue { background: #eff6ff; color: #3b82f6; }
.wp-kpi__icon--orange { background: #fff7ed; color: #f97316; }
.wp-kpi__icon--purple { background: #f5f3ff; color: #8b5cf6; }

.wp-kpi__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.wp-kpi__label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
}

.wp-kpi__hint {
    font-size: 0.72rem;
    color: var(--wp-emerald);
    font-weight: 600;
    margin-top: 0.35rem;
}

/* Layout */
.wp-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.25rem;
    align-items: start;
}

/* Cards */
.wp-card {
    background: #fff;
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    animation: wpFadeUp 0.55s ease forwards;
}

.wp-card__head {
    padding: 1.25rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wp-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.wp-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.wp-badge-instant {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: var(--wp-emerald-dark);
    font-size: 0.75rem;
    font-weight: 700;
}

.wp-info-strip {
    display: flex;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

.wp-info-strip i {
    color: var(--wp-emerald);
    margin-top: 0.15rem;
}

.wp-balance-display {
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(145deg, #ecfdf5 0%, #f0fdf4 50%, #fff 100%);
    border-radius: 16px;
    border: 1px solid #a7f3d0;
    margin-bottom: 1.25rem;
}

.wp-balance-display__label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wp-balance-display__amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--wp-emerald-dark);
    margin: 0.25rem 0 0;
    letter-spacing: -0.03em;
}

/* Amount input */
.wp-amount-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}

.wp-amount-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #64748b;
    font-size: 1rem;
    pointer-events: none;
}

.wp-amount-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.wp-amount-input:focus {
    outline: none;
    border-color: var(--wp-emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.wp-quick-amounts {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wp-quick-btn {
    flex: 1;
    min-width: 4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wp-quick-btn:hover,
.wp-quick-btn:focus {
    border-color: var(--wp-emerald);
    color: var(--wp-emerald-dark);
    background: var(--wp-emerald-soft);
}

.wp-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.wp-calc-grid dt {
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

.wp-calc-grid dd {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.wp-calc-grid dd.is-highlight {
    color: var(--wp-emerald-dark);
}

/* Network cards */
.wp-network-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.wp-network-card {
    position: relative;
    cursor: pointer;
}

.wp-network-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wp-network-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.wp-network-card input:checked + .wp-network-card__inner,
.wp-network-card__inner.is-selected {
    border-color: var(--wp-emerald);
    background: var(--wp-emerald-soft);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.wp-network-card__logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
}

.wp-network-card__logo--mtn { background: #ffcc00; color: #1a1a1a; }
.wp-network-card__logo--telecel { background: #e60000; }
.wp-network-card__logo--at { background: #0066b3; }

.wp-network-card__name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.2;
}

.wp-network-card__tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--wp-emerald-dark);
    background: #d1fae5;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

/* Recipient */
.wp-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
    display: block;
}

.wp-phone-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wp-country-code {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    flex-shrink: 0;
}

.wp-phone-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.wp-phone-input:focus {
    outline: none;
    border-color: var(--wp-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.wp-verify-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.wp-verify-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.wp-verify-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.wp-momo-verified {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--wp-emerald-dark);
    margin-bottom: 1rem;
}

.wp-momo-verified.is-visible {
    display: flex;
}

.wp-momo-verified.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.momo-verify-status {
    font-size: 0.82rem;
    padding: 0.5rem 0;
}

.momo-verify-status.is-success { color: var(--wp-emerald-dark); font-weight: 600; }
.momo-verify-status.is-error { color: #dc2626; font-weight: 600; }

/* Security strip */
.wp-security {
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 14px;
    margin-bottom: 1.25rem;
    border: 1px solid #e2e8f0;
}

.wp-security__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem;
}

.wp-security__text {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 0 0.75rem;
}

.wp-security__icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
}

.wp-security__icons span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.wp-security__icons i {
    color: var(--wp-emerald);
}

/* Submit */
.wp-submit-btn {
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.wp-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.wp-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.wp-submit-btn.is-loading {
    pointer-events: none;
}

/* History */
.wp-history-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 1rem;
}

.wp-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wp-filter-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.wp-filter-pill.is-active,
.wp-filter-pill:hover {
    border-color: var(--wp-emerald);
    background: var(--wp-emerald-soft);
    color: var(--wp-emerald-dark);
}

.wp-search-input {
    flex: 1;
    min-width: 140px;
    padding: 0.45rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.82rem;
}

.wp-export-btn {
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.wp-export-btn:hover {
    border-color: var(--wp-emerald);
    color: var(--wp-emerald-dark);
}

.wp-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.wp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.wp-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.wp-table td {
    padding: 0.85rem 1rem;
    border-top: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.wp-table tr:hover td {
    background: #fafbfc;
}

.wp-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wp-status--completed { background: #ecfdf5; color: #059669; }
.wp-status--processing { background: #eff6ff; color: #2563eb; }
.wp-status--pending { background: #fff7ed; color: #ea580c; }
.wp-status--failed { background: #fef2f2; color: #dc2626; }
.wp-status--held { background: #fef3c7; color: #b45309; }

.wp-row-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.wp-action-btn {
    padding: 0.3rem 0.55rem;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.wp-action-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Mobile history cards */
.wp-history-cards {
    display: none;
}

.wp-history-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.wp-history-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.65rem;
}

.wp-history-card__amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.wp-history-card__meta {
    font-size: 0.78rem;
    color: #64748b;
    display: grid;
    gap: 0.25rem;
}

/* Footer banner */
.wp-footer-banner {
    margin-top: 1.5rem;
    padding: 1.15rem 1.35rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: var(--wp-radius);
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.wp-footer-banner i {
    font-size: 1.25rem;
    color: var(--wp-emerald-dark);
    margin-top: 0.1rem;
}

.wp-footer-banner p {
    margin: 0;
    font-size: 0.88rem;
    color: #065f46;
    line-height: 1.5;
}

/* Detail modal */
.wp-modal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.wp-modal__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.wp-modal__body {
    padding: 1.25rem 1.5rem;
}

.wp-detail-grid {
    display: grid;
    gap: 0.75rem;
}

.wp-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
}

.wp-detail-row span:first-child {
    color: #64748b;
}

.wp-detail-row strong {
    color: #0f172a;
    text-align: right;
}

.wp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}

.wp-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Skeleton */
.wp-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: wpShimmer 1.2s infinite;
    border-radius: 8px;
    height: 1rem;
}

@keyframes wpShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 1100px) {
    .wp-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wp-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wp-kpi-grid {
        grid-template-columns: 1fr;
    }
    .wp-network-grid {
        grid-template-columns: 1fr;
    }
    .wp-phone-row {
        flex-direction: column;
    }
    .wp-table-wrap {
        display: none;
    }
    .wp-history-cards {
        display: block;
    }
    .wp-calc-grid {
        grid-template-columns: 1fr;
    }
    .wp-calc-grid dd {
        text-align: left;
    }
}

[data-theme="dark"] .wp-page .wp-kpi,
[data-theme="dark"] .wp-page .wp-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .wp-page .wp-header h1,
[data-theme="dark"] .wp-page .wp-kpi__value,
[data-theme="dark"] .wp-page .wp-card__title {
    color: #f1f5f9;
}
