* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7fb;
    color: #1f2937;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===========================
   BACKGROUND
=========================== */

.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}

.bg-1 {
    width: 350px;
    height: 350px;
    background: #60a5fa55;
    top: -120px;
    left: -120px;
}

.bg-2 {
    width: 300px;
    height: 300px;
    background: #3b82f655;
    right: -80px;
    bottom: -100px;
}

/* ===========================
   CONTAINER
=========================== */

.container {
    width: min(1200px, 95%);
    margin: auto;
    padding: 35px 0 50px;
}

/* ===========================
   HEADER
=========================== */

.header {
    margin-bottom: 25px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    font-size: 28px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .3);
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
}

.header p {
    color: #6b7280;
    margin-top: 5px;
}

/* ===========================
   CARD
=========================== */

.card {
    background: white;
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .06);
}

/* ===========================
   CARD TITLE
=========================== */

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.card-title i {
    color: #2563eb;
    font-size: 22px;
}

.card-title h2 {
    font-size: 22px;
}

/* ===========================
   FORM
=========================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    height: 54px;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    padding: 0 18px;
    font-size: 15px;
    outline: none;
    transition: .3s;
    background: white;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-group input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12) !important;
}

.input-ok {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .10) !important;
}

/* ===========================
   ERROR MESSAGE
=========================== */

.error-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 500;
    display: none;
    border: 1px solid #fecaca;
}

/* ===========================
   BUTTON
=========================== */

.btn-primary {
    margin-top: 28px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 14px;
    height: 56px;
    padding: 0 35px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: .35s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .35);
}

/* ===========================
   CUSTOMER INFO
=========================== */

.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.customer-item {
    display: flex;
    flex-direction: column;
}

.customer-item .label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-item .value {
    font-weight: 600;
    color: #2c3e50;
}

/* ===========================
   TABLE
=========================== */

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

thead {
    background: #2563eb;
    color: white;
}

th {
    padding: 16px;
    text-align: left;
}

td {
    padding: 16px;
    border-bottom: 1px solid #ececec;
}

tbody tr {
    transition: .25s;
}

tbody tr:hover {
    background: #f4f8ff;
}

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status.lunas {
    background: #d4edda;
    color: #155724;
}

.status.belum-bayar {
    background: #f8d7da;
    color: #721c24;
}

/* ===========================
   GOLONGAN DISPLAY
=========================== */

.golongan-display{
    height:54px;
    border:1px solid #d6dce5;
    border-radius:14px;
    padding:0 18px;
    font-size:15px;
    font-weight:500;
    color:#1f2937;
    background:#f8fafc;
    display:flex;
    align-items:center;
}

.golongan-display.input-ok{
    border-color:#22c55e;
    box-shadow:0 0 0 4px rgba(34,197,94,.10);
    background:#f0fdf4;
}

.golongan-display.input-error{
    border-color:#ef4444;
    box-shadow:0 0 0 4px rgba(239,68,68,.12);
    background:#fef2f2;
    color:#b91c1c;
}

.golongan-wrapper{
    position:relative;
}

.golongan-loading{
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    color:#6b7280;
    font-size:16px;
}

/* ===========================
   TUTORIAL MODAL
=========================== */

#modal-tutorial .modal-box {
    max-width: 640px;
    width: min(640px, calc(100% - 40px));
    max-height: 85vh;
}

#modal-tutorial .modal-header h3 i {
    color: #059669;
}

#modal-tutorial .modal-body {
    padding: 22px 26px 18px;
    overflow-y: auto;
}

#modal-tutorial .tutorial-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

#modal-tutorial .tutorial-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    transition: .2s;
}

#modal-tutorial .tutorial-list li:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

#modal-tutorial .tutorial-list li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #059669;
    font-size: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

#modal-tutorial .modal-footer {
    justify-content: center;
    padding: 16px 26px;
    background: #f8fafc;
}

#modal-tutorial .modal-footer .btn-primary {
    background: linear-gradient(135deg, #059669, #047857);
    min-width: 160px;
    justify-content: center;
}

#modal-tutorial .modal-close {
    color: #64748b;
    background: transparent;
}

#modal-tutorial .modal-close:hover {
    background: #f1f5f9;
    color: #1f2937;
}

/* ===========================
   FOOTER
=========================== */

.footer {
    margin-top: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ===========================
   UTILITY
=========================== */

.hidden {
    display: none !important;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }

    .logo-icon {
        width: 58px;
        height: 58px;
        font-size: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .metode-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .container {
        width: 94%;
    }

    .header {
        text-align: center;
    }

    .logo-box {
        flex-direction: column;
    }
}

/* ===========================
   TELEPON INPUT & KETERANGAN
=========================== */

.telepon-input {
    height: 54px;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    padding: 0 18px;
    font-size: 15px;
    outline: none;
    transition: .3s;
    background: white;
    width: 100%;
}

.telepon-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.keterangan-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 18px 20px;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.7;
}

.keterangan-box p {
    margin: 0 0 6px;
}

.keterangan-box p:last-child {
    margin-bottom: 0;
}

/* ===========================
   MODAL AFIRMASI
=========================== */

.afirmasi-box .modal-body {
    padding: 0 24px 10px;
}

.afirmasi-help {
    font-size: 14px;
    color: #374151;
    margin-bottom: 14px;
    line-height: 1.6;
}

.afirmasi-box .form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.afirmasi-box .form-group input {
    height: 54px;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    padding: 0 18px;
    font-size: 15px;
    outline: none;
    transition: .3s;
    background: white;
    width: 100%;
}

.afirmasi-box .form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.afirmasi-box .error-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 500;
    display: none;
    border: 1px solid #fecaca;
}

/* ===========================
   MODAL PEMBAYARAN
=========================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.modal-box {
    background: white;
    border-radius: 22px;
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
}

.modal-header h3 i {
    color: #2563eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: .2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.modal-body {
    padding: 22px 26px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 18px 26px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 0 22px 22px;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    height: 48px;
    padding: 0 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: .2s;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

/* ===========================
   METODE PEMBAYARAN
=========================== */

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #1f2937;
}

.info-row.total-row .info-value {
    color: #2563eb;
    font-size: 1.05rem;
}

.metode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: .2s;
}

.metode-btn i {
    font-size: 22px;
    color: #94a3b8;
    transition: .2s;
}

.metode-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.metode-btn:hover i {
    color: #2563eb;
}

.metode-btn.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.metode-btn.selected i {
    color: #2563eb;
}

.detail-metode {
    margin-top: 18px;
}

.detail-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
}

.detail-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.detail-text {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 4px;
}

.detail-catatan {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
}

.countdown-text {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #dc2626;
}

.detail-extra {
    margin-top: 14px;
}

.va-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.va-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.va-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.qris-box {
    text-align: center;
}

.qris-image {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 8px;
    background: white;
    max-width: 220px;
}

.qris-catatan {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 8px;
}

.action-box {
    margin-top: 14px;
}

.btn-small {
    height: 38px;
    padding: 0 16px;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.payment-status {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.payment-pending {
    color: #6b7280;
    font-size: 0.9rem;
}

.payment-success {
    color: #16a34a;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-meta {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ===========================
   STRUK PEMBAYARAN
=========================== */

.struk-box {
    max-width: 400px;
}

.struk-header {
    text-align: center;
    margin-bottom: 8px;
}

.struk-header h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.struk-header p {
    font-size: 0.8rem;
    color: #6b7280;
}

.struk-divider {
    border-top: 2px dashed #e2e8f0;
    margin: 12px 0;
}

.struk-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
    color: #374151;
}

.struk-row.total-row {
    font-weight: 700;
    color: #2563eb;
    font-size: 1rem;
}

/* ===========================
   AKSI BAYAR DI TABLE
=========================== */

.btn-bayar {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: .2s;
}

.btn-bayar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.btn-bayar:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.status.lunas {
    background: #d4edda;
    color: #155724;
}

.status.belum-bayar {
    background: #f8d7da;
    color: #721c24;
}

/* ===========================
   SWEETALERT CUSTOM
=========================== */

.swal-popup-custom {
    border-radius: 20px !important;
    padding: 28px 32px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal-title-custom {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #1f2937 !important;
}

.swal-content-custom {
    color: #4b5563 !important;
    font-size: 0.95rem !important;
}

.swal-confirm-custom {
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3) !important;
    transition: .2s !important;
}

.swal-confirm-custom:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4) !important;
}
