/* ==========================================================
   RAJ MOCK TEST V2.0
   ADMIN PAYMENT APPROVAL
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: "Poppins", sans-serif;
    background:
        radial-gradient(circle at top left, #e0e7ff, transparent 35%),
        radial-gradient(circle at bottom right, #dbeafe, transparent 35%),
        #f5f7fb;
    color: #172033;
    min-height: 100vh;
}


/* ==========================================================
   PAGE
   ========================================================== */

.admin-payment-page {
    min-height: 100vh;
    padding: 35px 20px;
}


.admin-container {
    width: 100%;
    max-width: 1250px;
    margin: auto;
}


/* ==========================================================
   HEADER
   ========================================================== */

.page-header {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 28px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
}


.page-badge {
    display: inline-block;

    background: #eef2ff;
    color: #4f46e5;

    padding: 6px 12px;
    border-radius: 30px;

    font-size: 12px;
    font-weight: 700;

    margin-bottom: 8px;
}


.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}


.page-header p {
    color: #64748b;
    margin-top: 4px;
    font-size: 14px;
}


/* ==========================================================
   REFRESH
   ========================================================== */

.refresh-btn {
    border: none;
    background: #4f46e5;
    color: white;

    padding: 12px 20px;

    border-radius: 12px;

    font-family: inherit;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}


/* ==========================================================
   STATS
   ========================================================== */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

    margin-top: 22px;
}


.stat-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 15px;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.05);
}


.stat-icon {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    font-size: 23px;
}


.pending-card .stat-icon {
    background: #fff7ed;
}


.approved-card .stat-icon {
    background: #ecfdf5;
}


.rejected-card .stat-icon {
    background: #fef2f2;
}


.stat-card span {
    display: block;

    color: #64748b;

    font-size: 13px;
}


.stat-card strong {
    display: block;

    font-size: 25px;

    margin-top: 2px;
}


/* ==========================================================
   FILTER
   ========================================================== */

.filter-box {
    margin-top: 22px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    padding: 18px;

    display: flex;

    align-items: end;

    gap: 20px;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.04);
}


.filter-left {
    width: 220px;
}


.filter-box label {
    display: block;

    font-size: 12px;
    font-weight: 600;

    color: #64748b;

    margin-bottom: 7px;
}


.filter-box select,
.search-box input {
    width: 100%;

    height: 44px;

    border: 1px solid #dbe0e8;

    border-radius: 10px;

    padding: 0 13px;

    outline: none;

    font-family: inherit;

    background: white;
}


.filter-box select:focus,
.search-box input:focus {
    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.1);
}


.search-box {
    flex: 1;
}


/* ==========================================================
   PAYMENT LIST
   ========================================================== */

.payment-list {
    display: grid;

    gap: 16px;

    margin-top: 22px;
}


.payment-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    padding: 22px;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.05);
}


.payment-top {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-bottom: 18px;
}


.student-info {
    display: flex;

    align-items: center;

    gap: 13px;
}


.student-avatar {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #eef2ff;

    color: #4f46e5;

    font-weight: 700;

    font-size: 18px;
}


.student-info h3 {
    font-size: 16px;
}


.student-info p {
    color: #64748b;

    font-size: 12px;

    margin-top: 2px;
}


.status-badge {
    padding: 6px 11px;

    border-radius: 30px;

    font-size: 11px;

    font-weight: 700;
}


.status-pending {
    background: #fff7ed;
    color: #c2410c;
}


.status-approved {
    background: #ecfdf5;
    color: #047857;
}


.status-rejected {
    background: #fef2f2;
    color: #b91c1c;
}


/* ==========================================================
   PAYMENT DETAILS
   ========================================================== */

.payment-details {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 12px;

    background: #f8fafc;

    border-radius: 13px;

    padding: 15px;
}


.detail-item span {
    display: block;

    font-size: 11px;

    color: #64748b;

    margin-bottom: 4px;
}


.detail-item strong {
    display: block;

    font-size: 13px;

    word-break: break-word;
}


.transaction-id {
    font-family: monospace;

    color: #4338ca;
}


/* ==========================================================
   CARD BOTTOM
   ========================================================== */

.payment-bottom {
    margin-top: 18px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;
}


.submitted-time {
    color: #64748b;

    font-size: 11px;
}


.action-buttons {
    display: flex;

    gap: 9px;
}


.action-btn {
    border: none;

    padding: 10px 15px;

    border-radius: 9px;

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.action-btn:hover {
    transform: translateY(-1px);
}


.approve-btn {
    background: #dcfce7;

    color: #166534;
}


.reject-btn {
    background: #fee2e2;

    color: #991b1b;
}


/* ==========================================================
   LOADING
   ========================================================== */

.loading-box {
    text-align: center;

    padding: 60px 20px;

    color: #64748b;
}


.loader {
    width: 35px;
    height: 35px;

    margin: auto auto 12px;

    border: 4px solid #e5e7eb;

    border-top-color: #4f46e5;

    border-radius: 50%;

    animation:
        spin 0.8s linear infinite;
}


@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}


/* ==========================================================
   EMPTY
   ========================================================== */

.empty-box {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    text-align: center;

    padding: 55px 20px;

    margin-top: 22px;
}


.empty-icon {
    font-size: 42px;

    margin-bottom: 10px;
}


.empty-box h3 {
    font-size: 18px;
}


.empty-box p {
    color: #64748b;

    font-size: 13px;

    margin-top: 5px;
}


/* ==========================================================
   MODAL
   ========================================================== */

.modal-overlay {
    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    backdrop-filter: blur(5px);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 9999;
}


.modal-overlay.show {
    display: flex;
}


.modal-card {
    width: 100%;

    max-width: 450px;

    background: white;

    border-radius: 20px;

    padding: 30px;

    position: relative;

    text-align: center;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.2);
}


.modal-close {
    position: absolute;

    right: 15px;
    top: 12px;

    border: none;

    background: transparent;

    font-size: 28px;

    color: #64748b;

    cursor: pointer;
}


.modal-icon {
    font-size: 40px;

    margin-bottom: 10px;
}


.modal-card h2 {
    font-size: 21px;
}


.modal-card > p {
    color: #64748b;

    font-size: 13px;

    margin-top: 6px;
}


.modal-details {
    margin-top: 18px;

    background: #f8fafc;

    border-radius: 12px;

    padding: 14px;

    text-align: left;

    font-size: 12px;

    line-height: 1.8;
}


.modal-card textarea {
    width: 100%;

    height: 100px;

    resize: none;

    margin-top: 18px;

    border: 1px solid #dbe0e8;

    border-radius: 11px;

    padding: 12px;

    outline: none;

    font-family: inherit;
}


.modal-card textarea:focus {
    border-color: #6366f1;
}


.modal-actions {
    display: flex;

    gap: 10px;

    margin-top: 20px;
}


.modal-actions button {
    flex: 1;

    border: none;

    padding: 12px;

    border-radius: 10px;

    font-family: inherit;

    font-weight: 600;

    cursor: pointer;
}


.cancel-btn {
    background: #f1f5f9;

    color: #334155;
}


.approve-confirm-btn {
    background: #16a34a;

    color: white;
}


.reject-confirm-btn {
    background: #dc2626;

    color: white;
}


/* ==========================================================
   TOAST
   ========================================================== */

.toast {
    position: fixed;

    left: 50%;
    bottom: 25px;

    transform:
        translate(-50%, 100px);

    background: #172033;

    color: white;

    padding: 12px 20px;

    border-radius: 10px;

    font-size: 13px;

    opacity: 0;

    transition: 0.3s;

    z-index: 10000;
}


.toast.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-box {
        flex-direction: column;

        align-items: stretch;
    }

    .filter-left {
        width: 100%;
    }

    .payment-details {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .admin-payment-page {
        padding: 15px 10px;
    }

    .page-header {
        padding: 20px;

        align-items: flex-start;

        flex-direction: column;
    }

    .page-header h1 {
        font-size: 23px;
    }

    .refresh-btn {
        width: 100%;
    }

    .payment-card {
        padding: 16px;
    }

    .payment-top {
        align-items: flex-start;

        flex-direction: column;
    }

    .payment-bottom {
        align-items: stretch;

        flex-direction: column;
    }

    .action-buttons {
        width: 100%;
    }

    .action-btn {
        flex: 1;
    }

    .payment-details {
        grid-template-columns: 1fr;
    }

    .modal-card {
        padding: 24px 18px;
    }

}