﻿/* =========================================================
   PAYMENT HISTORY - ISOLATED STYLES
   (NO CONFLICT WITH DASHBOARD)
========================================================= */

/* WRAPPER */
.page-wrapper {
    max-width: 1000px;
    margin: auto;
    padding: 15px;
}

/* =========================
   HEADER
========================= */

.header-box {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: white;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-box h3 {
    margin: 0;
    font-weight: 600;
}

/* STATUS BADGE */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    color: #fff;
}

    .status-badge.green {
        background: #16a34a;
    }

    .status-badge.orange {
        background: #f59e0b;
    }

    .status-badge.red {
        background: #dc2626;
    }

/* =========================
   PROGRESS BAR (SAFE)
========================= */

.header-progress {
    margin-top: 15px;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #22c55e);
    width: 0%;
    transition: width 0.6s ease-in-out;
}

.progress-label {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.9;
}

/* =========================
   SUMMARY CARDS
========================= */

.summary-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    flex: 1;
    min-width: 220px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

    .summary-card h5 {
        margin: 0;
        font-size: 13px;
        color: #6b7280;
    }

    .summary-card h3 {
        margin-top: 5px;
        font-weight: bold;
    }

    .summary-card.paid h3 {
        color: #16a34a;
    }

    .summary-card.outstanding h3 {
        color: #dc2626;
    }

/* =========================
   EMPTY STATE
========================= */

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

    .empty-state .icon {
        font-size: 40px;
        margin-bottom: 10px;
        color: #d1d5db;
    }

/* =========================
   TIMELINE
========================= */

.timeline {
    position: relative;
    padding-left: 25px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 10px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #e5e7eb;
    }

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    position: absolute;
    left: -18px;
    top: 18px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #10b981;
}

.timeline-content {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ROW INSIDE CARD */
.top-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
    font-weight: bold;
}

.name {
    color: #111827;
}

.amount {
    color: #16a34a;
}

/* META INFO */
.date {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

.proof {
    margin-top: 8px;
}

    .proof a {
        color: #2563eb;
        text-decoration: none;
        font-weight: 500;
    }

/* =========================
   PAGINATION
========================= */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* =========================
   BACK BUTTON
========================= */

.btn-back-small {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

    .btn-back-small:hover {
        text-decoration: underline;
    }

/* =========================================================
   MOBILE RESPONSIVE FIX
========================================================= */

@media (max-width: 768px) {

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-wrapper {
        flex-direction: column;
    }

    .timeline {
        padding-left: 18px;
    }

    .top-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
