/* =========================================================
   LIFFY — MODERN ADMIN WITHDRAWAL MANAGEMENT
========================================================= */

:root {
    --bg: var(--lf-paper);
    --card: var(--lf-panel);
    --text: var(--lf-text);
    --muted: var(--lf-muted);
    --border: var(--lf-line);

    --primary: var(--lf-volt);
    --primary-dark: #4a3fe0;

    --success: var(--lf-success);
    --success-bg: var(--lf-success-bg);

    --danger: var(--lf-danger);
    --danger-bg: var(--lf-danger-bg);

    --warning: var(--lf-warning);
    --warning-bg: var(--lf-warning-bg);

    --shadow: var(--lf-shadow);

    --radius: var(--lf-radius);
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--lf-font-body);

    background: var(--bg);

    color: var(--text);
}


/* =========================================================
   PAGE
========================================================= */

.admin-withdrawals-page {
    min-height: 100vh;
    padding: 30px 18px 60px;
}

.admin-withdrawals-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}


/* =========================================================
   TOP BAR
========================================================= */

.admin-withdrawals-topbar {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.admin-back-btn {
    width: 48px;
    height: 48px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--card);
    color: var(--text);

    font-size: 22px;
    cursor: pointer;

    box-shadow: var(--shadow);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.admin-back-btn:hover {
    transform: translateY(-2px);
    background: #f8f9ff;
}

.admin-page-title h1 {
    margin: 0;

    font-size: clamp(25px, 4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.8px;
}

.admin-page-title p {
    margin: 6px 0 0;

    color: var(--muted);
    font-size: 14px;
}


/* =========================================================
   MESSAGE
========================================================= */

.admin-withdrawal-message {
    display: none;

    padding: 14px 17px;
    margin-bottom: 20px;

    border-radius: 14px;

    font-size: 14px;
    font-weight: 600;
}

.admin-withdrawal-message.show {
    display: block;
}

.admin-withdrawal-message.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.admin-withdrawal-message.error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecaca;
}


/* =========================================================
   ADMIN STATUS
========================================================= */

.admin-status-card {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 20px;

    margin-bottom: 25px;

    background: var(--card);
    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.admin-status-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: linear-gradient(
        135deg,
        var(--primary),
        #8b5cf6
    );

    color: white;

    font-size: 21px;
    font-weight: 800;

    box-shadow:
        0 8px 20px rgba(99, 91, 255, 0.25);
}

.admin-status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-status-info strong {
    font-size: 15px;
}

.admin-status-info span {
    color: var(--muted);
    font-size: 13px;
}


/* =========================================================
   SUMMARY
========================================================= */

.withdrawal-summary-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 28px;
}

.withdrawal-summary-card {
    position: relative;

    overflow: hidden;

    padding: 23px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.withdrawal-summary-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 16px 35px rgba(15, 23, 42, 0.09);
}

.withdrawal-summary-card::after {
    content: "";

    position: absolute;

    width: 80px;
    height: 80px;

    right: -25px;
    bottom: -25px;

    border-radius: 50%;

    opacity: 0.08;
}

.withdrawal-summary-card.pending::after {
    background: var(--warning);
}

.withdrawal-summary-card.approved::after {
    background: var(--success);
}

.withdrawal-summary-card.rejected::after {
    background: var(--danger);
}

.summary-label {
    color: var(--muted);

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 10px;
}

.summary-value {
    font-size: 31px;
    font-weight: 800;

    letter-spacing: -1px;
}

.withdrawal-summary-card.pending
.summary-value {
    color: var(--warning);
}

.withdrawal-summary-card.approved
.summary-value {
    color: var(--success);
}

.withdrawal-summary-card.rejected
.summary-value {
    color: var(--danger);
}


/* =========================================================
   SECTION
========================================================= */

.admin-withdrawal-section {
    margin-top: 28px;

    background: rgba(255, 255, 255, 0.78);

    border: 1px solid var(--border);
    border-radius: 22px;

    padding: 24px;

    box-shadow: var(--shadow);

    backdrop-filter: blur(10px);
}

.section-heading-row,
.section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 22px;
}

.section-heading h2,
.section-heading-row h2 {
    margin: 0;

    font-size: 20px;
    letter-spacing: -0.3px;
}

.section-heading p,
.section-heading-row p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   REFRESH BUTTON
========================================================= */

.refresh-withdrawals-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 10px 15px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: #fff;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.refresh-withdrawals-button:hover {
    background: #f5f6ff;
    transform: translateY(-1px);
}

.refresh-withdrawals-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* =========================================================
   STATUS
========================================================= */

.admin-withdrawal-status {
    padding: 38px 20px;

    text-align: center;

    color: var(--muted);

    background: #fafbfc;

    border: 1px dashed #dfe3ea;

    border-radius: 15px;

    font-size: 14px;
}

.admin-withdrawal-status.error {
    color: var(--danger);

    background: var(--danger-bg);

    border-color: #fecaca;
}


/* =========================================================
   PENDING WITHDRAWAL CARD
========================================================= */

.admin-withdrawal-card {
    padding: 22px;

    margin-bottom: 15px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 18px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.admin-withdrawal-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.07);
}

.withdrawal-card-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 18px;

    border-bottom: 1px solid var(--border);
}

.withdrawal-request-label {
    display: inline-flex;

    padding: 5px 9px;

    margin-bottom: 8px;

    border-radius: 8px;

    background: var(--warning-bg);
    color: var(--warning);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.5px;
}

.withdrawal-card-header h3 {
    margin: 0;

    font-size: 17px;
}

.withdrawal-card-header p {
    margin: 4px 0 0;

    color: var(--muted);

    font-size: 13px;
}

.withdrawal-amount {
    white-space: nowrap;

    color: var(--primary);

    font-size: 22px;
    font-weight: 800;
}


/* =========================================================
   WITHDRAWAL DETAILS
========================================================= */

.withdrawal-details {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;

    padding: 18px 0;
}

.withdrawal-detail {
    padding: 13px;

    background: #f8f9fc;

    border-radius: 12px;
}

.withdrawal-detail span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.withdrawal-detail strong {
    display: block;

    font-size: 13px;

    word-break: break-word;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.withdrawal-card-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding-top: 4px;
}

.withdrawal-approve-button,
.withdrawal-reject-button {
    min-height: 42px;

    padding: 10px 18px;

    border: none;
    border-radius: 11px;

    font-size: 13px;
    font-weight: 750;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.withdrawal-approve-button {
    background: linear-gradient(
        135deg,
        #16a34a,
        #22c55e
    );

    color: white;

    box-shadow:
        0 7px 18px rgba(22, 163, 74, 0.2);
}

.withdrawal-reject-button {
    background: #fff;

    color: var(--danger);

    border: 1px solid #fecaca;
}

.withdrawal-approve-button:hover,
.withdrawal-reject-button:hover {
    transform: translateY(-2px);
}

.withdrawal-approve-button:active,
.withdrawal-reject-button:active {
    transform: scale(0.97);
}

.withdrawal-approve-button:disabled,
.withdrawal-reject-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* =========================================================
   HISTORY
========================================================= */

.admin-withdrawal-history-card {
    display: grid;

    grid-template-columns:
        1.4fr 1fr auto;

    align-items: center;

    gap: 18px;

    padding: 17px;

    margin-bottom: 10px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 14px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.admin-withdrawal-history-card:hover {
    background: #fafbff;
    transform: translateX(2px);
}

.admin-withdrawal-history-card > div {
    min-width: 0;
}

.admin-withdrawal-history-card strong {
    display: block;

    font-size: 14px;
}

.admin-withdrawal-history-card span {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 12px;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   HISTORY STATUS
========================================================= */

.withdrawal-history-status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 88px;

    padding: 7px 11px;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 800;

    text-transform: capitalize;
}

.withdrawal-history-status.approved {
    color: var(--success);
    background: var(--success-bg);
}

.withdrawal-history-status.rejected {
    color: var(--danger);
    background: var(--danger-bg);
}

.withdrawal-history-status.pending {
    color: var(--warning);
    background: var(--warning-bg);
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 850px) {

    .withdrawal-details {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .admin-withdrawal-history-card {
        grid-template-columns:
            1fr 1fr auto;
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 600px) {

    .admin-withdrawals-page {
        padding:
            18px
            12px
            40px;
    }


    .admin-withdrawals-topbar {
        gap: 12px;
        margin-bottom: 20px;
    }


    .admin-back-btn {
        width: 43px;
        height: 43px;

        border-radius: 12px;
    }


    .admin-page-title h1 {
        font-size: 23px;
    }


    .admin-page-title p {
        font-size: 12px;
    }


    .admin-status-card {
        padding: 16px;
        border-radius: 16px;
    }


    .admin-status-icon {
        width: 43px;
        height: 43px;
        border-radius: 13px;
    }


    .withdrawal-summary-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }


    .withdrawal-summary-card {
        padding: 18px;
        border-radius: 16px;
    }


    .summary-value {
        font-size: 27px;
    }


    .admin-withdrawal-section {
        padding: 17px;
        border-radius: 18px;
    }


    .section-heading-row,
    .section-heading {
        align-items: flex-start;
    }


    .section-heading-row h2,
    .section-heading h2 {
        font-size: 18px;
    }


    .refresh-withdrawals-button {
        padding: 9px 11px;
        font-size: 12px;
    }


    .admin-withdrawal-card {
        padding: 17px;
        border-radius: 16px;
    }


    .withdrawal-card-header {
        flex-direction: column;
        gap: 10px;
    }


    .withdrawal-amount {
        font-size: 21px;
    }


    .withdrawal-details {
        grid-template-columns: 1fr;
    }


    .withdrawal-detail {
        padding: 12px;
    }


    .withdrawal-card-actions {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 9px;
    }


    .withdrawal-approve-button,
    .withdrawal-reject-button {
        width: 100%;
    }


    .admin-withdrawal-history-card {
        grid-template-columns: 1fr;

        gap: 12px;

        padding: 15px;
    }


    .withdrawal-history-status {
        width: fit-content;
    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .admin-withdrawals-page {
        padding-left: 9px;
        padding-right: 9px;
    }


    .admin-withdrawal-section {
        padding: 13px;
    }


    .withdrawal-card-actions {
        grid-template-columns: 1fr;
    }

}