/* ===============================
   INVOICE PAGE WRAPPER
================================ */
.invoice-page {
    max-width: 760px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

/* ===============================
   HEADER
================================ */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.invoice-header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

.invoice-header p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* ===============================
   STATUS BADGE
================================ */
.status {
    display: flex;
    gap: 8px;
}

.status span {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.status .waiting_payment { background: #f59e0b; }
.status .pending         { background: #3b82f6; }
.status .success         { background: #22c55e; }
.status .completed         { background: #22c55e; }
.status .paid         { background: #22c55e; }
.status .failed          { background: #ef4444; }
.status .cancelled          { background: #ef4444; }
.status .expired          { background: #ef4444; }

/* ===============================
   BOX
================================ */
.invoice-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    background: #fafafa;
}

/* ===============================
   USER BOX
================================ */
.user-box {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #f9fafb;
}

.user-box strong {
    font-size: 15px;
    font-weight: 700;
    color: #050505;
}

.user-box p {
    font-size: 15px;
    font-weight: 700;
    color: #141111;
}

.user-box img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.user-box p {
    margin: 5px 0;
    font-size: 14px;
}

/* ===============================
   TITLE
================================ */
.invoice-box h3 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.invoice-box strong {
    font-size: 15px;
    font-weight: 700;
    color: #050505;
}

.invoice-box p {
    font-size: 15px;
    font-weight: 700;
    color: #141111;
}

/* ===============================
   TABLE
================================ */
.invoice-box table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-box td {
    padding: 10px 0;
    font-size: 14px;
}

.invoice-box td:first-child {
    color: #374151;
}

.invoice-box td:last-child {
    text-align: right;
    font-weight: 600;
    color: #111827;
}

/* ===============================
   TOTAL
================================ */
.invoice-box .total td {
    border-top: 1px dashed #d1d5db;
    padding-top: 14px;
    font-size: 17px;
    font-weight: 800;
    color: #2563eb;
}

/* ===============================
   PAYMENT METHOD
================================ */
.invoice-box p {
    margin: 6px 0;
    font-size: 14px;
}

/* ===============================
   PAYMENT GENERAL
================================ */
.payment-box {
    background: #ffffff;
}

.pay-wrapper {
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.pay-info strong {
    font-size: 16px;
}

.pay-info p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* ===============================
   QRIS
================================ */
.pay-qr {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.pay-qr img {
    width: 180px;
    height: 180px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* ===============================
   VA
================================ */
.va-box {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.va-box input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.va-box button {
    padding: 0 16px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* ===============================
   BUTTON (EWALLET / RETAIL)
================================ */
.pay-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 20px;
    background: #16a34a;
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.pay-btn.secondary {
    background: #2563eb;
}

/* ===============================
   NOTE
================================ */
.pay-note {
    margin-top: 12px;
    font-size: 13px;
    color: #374151;
}

.pay-note.success {
    color: #059669;
}



.retail-box {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.retail-box input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.retail-box button {
    padding: 0 16px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
/* ===============================
   MOBILE
================================ */
@media (max-width: 600px) {
    .va-box {
        flex-direction: column;
    }

    .va-box button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .retail-box {
        flex-direction: column;
    }

    .retail-box button {
        width: 100%;
    }
}


/* ===============================
   MOBILE
================================ */
@media (max-width: 600px) {
    .qris-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .qris-qr {
        margin-left: 0;
    }
}


/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 640px) {
    .invoice-page {
        padding: 18px;
    }

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .user-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-direction: row !important; /* ⛔ cegah column di mobile */
}

/* AVATAR */
.user-box img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0; /* ⛔ jangan mengecil di mobile */
    border: 1px solid #e5e7eb;
}

/* TEXT */
.user-info p,
.user-box p {
    margin: 4px 0;
    font-size: 14px;
    word-break: break-word;
}

/* ===============================
   MOBILE TWEAK (TETAP KIRI)
================================ */
@media (max-width: 600px) {
    .user-box {
        flex-direction: row !important;
        align-items: flex-start;
    }

    .user-box img {
        width: 56px;
        height: 56px;
    }
}

    .invoice-box td:last-child {
        text-align: left;
        margin-top: 4px;
    }
}


/* ===============================
   INVOICE COUNTDOWN
================================ */
.invoice-countdown {
    margin: 16px 0 20px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.countdown-label {
    font-size: 14px;
}

.countdown-time {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* WARNING */
.invoice-countdown.warning {
    background: #fee2e2;
    color: #991b1b;
}

/* EXPIRED */
.invoice-countdown.expired {
    background: #f3f4f6;
    color: #6b7280;
}

