
        /* Loader Styles */
.loader-small {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    left: 50%;
    top: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(150%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: var(--success);
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: var(--primary);
}
        :root {
            --primary: #1cb4dc;
            --primary-light: #6366f1;
            --dark: #1e293b;
            --light: #f8fafc;
            --gray: #94a3b8;
            --success: #10b981;
        }

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

        body {
            font-family: 'Inter', sans-serif;
            color: var(--dark);
            background-color: #ffffff;
            overflow-x: hidden;
            scroll-behavior: smooth;
            line-height: 1.5;
            font-size: 14px;
            min-height: 100vh;
            padding: 30px 0 20px 0;
        }

        .header {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .logo {
            width: 100px;
            height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Main Container */
        .main-container {
            width: 100%;
            max-width: 1000px;
            margin: 0 auto;
            padding: 0 10px 8px 10px;
        }

        h2 {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            font-size: 1.5rem;
            color: var(--gray);
            font-weight: 500;
            letter-spacing: 2px;
            margin: -5px 0 0 0;
            padding-bottom: 8px;
        }

        /* Progress Steps */
        .progress-steps {
            display: flex;
            justify-content: space-between;
            position: relative;
            margin-top: 20px;
            padding-bottom: 30px;
        }

        .progress-steps::before {
            content: '';
            position: absolute;
            top: 25px;
            left: 0;
            right: 0;
            height: 3px;
            background-color: var(--gray);
            z-index: 1;
        }

        .progress-bar {
            position: absolute;
            top: 25px;
            left: 0;
            height: 3px;
            background-color: var(--primary);
            z-index: 2;
            transition: width 0.4s ease;
            width: 0%;
        }

        .step {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            z-index: 3;
            flex: 1;
        }

        .step-circle {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: var(--gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            margin-bottom: 10px;
            transition: all 0.3s ease;
            font-size: 1.2rem;
        }

        .step.active .step-circle {
            background-color: var(--primary);
            transform: scale(1.1);
        }

        .step-label {
            font-size: 15px;
            color: var(--gray);
            text-align: center;
            font-weight: 500;
            max-width: 150px;
        }

        .step.active .step-label {
            color: var(--primary);
            font-weight: 600;
        }

        /* Improved Progress Bar */
        .progress-bar-container {
            width: 100%;
            height: 20px;
            background-color: #f1f5f9;
            overflow: hidden;
            position: relative;
            border-radius: 4px;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(
                45deg,
                var(--primary) 0%,
                var(--primary) 25%,
                #bae6fd 25%,
                #bae6fd 50%,
                var(--primary) 50%,
                var(--primary) 75%,
                #bae6fd 75%,
                #bae6fd 100%
            );
            background-size: 32px 32px;
            transition: width 0.4s ease;
            width: 0%;
            animation: diagonalMove 1.5s linear infinite;
        }

        @keyframes diagonalMove {
            0% {
                background-position: 32px 0;
            }
            100% {
                background-position: 0 0;
            }
        }

        /* Step Content */
        .step-content {
            display: none;
        }

        .step-content.active {
            display: block;
            padding-bottom: 20px;
        }

        .step-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding-top: 20px;
        }

        .step-info h3 {
            font-size: 1.5rem;
            color: var(--dark);
            margin-bottom: 15px;
            font-weight: 600;
        }

        .step-info p {
            color: var(--gray);
            font-size: 1rem;
            margin-bottom: 16px;
        }

        .step-counter {
            font-size: 1.5rem;
            color: var(--gray);
            font-weight: 600;
            padding: 0;
            background: none;
            border-radius: 0;
            margin-top: 0;
        }

        .step-content .form-group label {
            display: block;
            font-weight: 500;
            color: var(--dark);
            font-size: 1rem;
            margin-bottom: 8px;
        }

        /* Step 1 specific styles */
        .step-content[data-step-content="1"] .reference-container {
            width: 100%;
            position: relative;
        }

        .step-content[data-step-content="1"] .form-control {
            width: 100%;
            padding: 8px 15px;
            border: 1px solid var(--gray);
            font-size: 1rem;
            transition: all 0.3s ease;
            height: 59px;
            background-color: var(--light);
            letter-spacing: 2px;
            font-weight: 600;
            display: flex;
            align-items: center;
        }

        .step-content[data-step-content="1"] .form-control::placeholder {
            color: var(--gray);
            letter-spacing: 16px;
            opacity: 1;
            font-weight: 500;
            font-size: 1.2rem;
            line-height: 1;
        }

        .step-content[data-step-content="1"] .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(28, 180, 220, 0.1);
        }

        .reference-hint {
            font-size: 0.875rem;
            color: var(--gray);
            margin-top: 8px;
            text-align: center;
        }

        .btn-container {
            display: flex;
            justify-content: flex-end;
            margin-top: 30px;
        }

        .btn {
            width: 100px;
            height: 45px;
            background-color: var(--primary);
            color: white;
            border: none;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 10px 0 10px 5px; 
        }

        .btn:not(.disabled):hover {
            background-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .btn.active {
            background-color: var(--primary);
        }

        .btn.disabled {
            background-color: var(--gray);
            cursor: not-allowed;
            opacity: 0.6;
            pointer-events: none; 
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            overflow-y: auto; 
        }

        .modal-content {
            background-color: white;
            margin: 50px auto; 
            padding: 0;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center; 
            position: relative; 
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid var(--gray);
            background-color: var(--light);
            border-radius: 8px 8px 0 0;
        }

        .modal-header h3 {
            margin: 0;
            color: var(--dark);
            text-align: center; 
        }

        .modal-body {
            padding: 20px;
            max-height: 60vh;
            overflow-y: auto; 
        }

        .modal-body p {
            margin: 0;
            color: var(--dark);
            text-align: center; 
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid var(--gray);
            text-align: center; 
            background-color: var(--light);
            border-radius: 0 0 8px 8px;
            display: flex;
            justify-content: center; 
            align-items: center; 
        }

        .modal-footer .btn {
            width: 120px; 
        }

        /* Add this for better mobile experience */
        @media (max-height: 600px) {
            .modal-content {
                margin: 20px auto;
            }
        }

        /* Step 2 Verification Methods */
        .verification-methods {
            margin-bottom: 30px;
        }

        .method-option {
            margin-bottom: 15px;
        }

        .method-option input[type="radio"] {
            display: none;
        }

        .method-option label {
            display: flex;
            align-items: center;
            padding: 20px;
            border: 1px solid var(--gray);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            background-color: var(--light);
        }

        .method-option input[type="radio"]:checked + label {
            border-color: var(--primary);
            background-color: rgba(28, 180, 220, 0.05);
        }

        .method-option label:hover {
            border-color: var(--primary);
        }

        .method-icon {
            font-size: 1.5rem;
            margin-right: 20px;
            width: 40px;
            text-align: center;
        }

        .method-content {
            flex: 1;
        }

        .method-title {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 6px;
            font-size: 1.1rem;
        }

        .method-desc {
            font-size: 0.9rem;
            color: var(--gray);
            margin-bottom: 6px;
            line-height: 1.4;
        }

        .method-info {
            font-size: 0.85rem;
            color: var(--primary);
            font-weight: 500;
        }

        /* Authentication Code Inputs */
        .auth-code-container {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin: 20px 0 10px 0;
        }

        .auth-code-input {
            width: 55px;
            height: 65px;
            border: 1px solid var(--gray);
            border-radius: 8px;
            text-align: center;
            font-size: 1.5rem;
            font-weight: 600;
            background-color: var(--light);
            transition: all 0.3s ease;
            color: var(--dark);
        }

        .auth-code-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(28, 180, 220, 0.1);
        }

        .auth-code-input.filled {
            border-color: var(--primary);
            background-color: rgba(28, 180, 220, 0.05);
        }

        .code-hint {
            font-size: 0.875rem;
            color: var(--gray);
            margin-top: 8px;
            text-align: center;
        }

        /* Resend Section */
        .resend-section {
            text-align: center;
            margin: 25px 0 30px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .resend-link {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--primary);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .resend-link:hover {
            color: var(--primary-light);
        }

        .resend-link:disabled {
            color: var(--gray);
            cursor: not-allowed;
            opacity: 0.6;
        }

        .resend-timer {
            font-size: 0.875rem;
            color: var(--gray);
            font-weight: 500;
        }

        /* Navigation Buttons */
        .navigation-buttons {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
        }

        .btn-secondary {
            background-color: var(--light);
            color: var(--dark);
            border: 1px solid var(--gray);
            width: 100px;
            height: 45px;
        }

        .btn-secondary:hover {
            background-color: #e2e8f0;
            border-color: var(--gray);
            color: white;
        }

        .btn-skip {
            background-color: #6b7280;
            color: white;
            border: none;
            width: 100px;
            height: 45px;
        }

        .btn-skip:hover {
            background-color: #4b5563;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        #verify-btn {
            width: 100px;
            height: 45px;
        }

        .step-content[data-step-content="2b"] {
            display: none;
        }

        .step-content[data-step-content="2b"].active {
            display: block;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loader {
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        /* ===== STEP 3 INVOICE STYLES ===== */
        .invoice-details {
            margin-bottom: 30px;
        }

        .invoice-section {
            background: var(--light);
            border: 1px solid var(--gray);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .invoice-section.highlight {
            border-color: var(--primary);
            background: rgba(28, 180, 220, 0.05);
        }

        .invoice-section h4 {
            color: var(--dark);
            margin-bottom: 15px;
            font-weight: 600;
            font-size: 1.1rem;
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #e2e8f0;
        }

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

        .detail-row.total {
            border-top: 2px solid var(--primary);
            margin-top: 8px;
            padding-top: 12px;
            font-weight: 600;
        }

        .detail-label {
            color: var(--gray);
            font-weight: 500;
        }

        .detail-value {
            color: var(--dark);
            font-weight: 600;
        }

        .detail-value.amount {
            color: var(--primary);
            font-size: 1.1rem;
        }

        .detail-value.total-amount {
            color: var(--primary);
            font-size: 1.2rem;
            font-weight: 700;
        }

        /* ===== STATUS BADGE STYLES ===== */
        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-badge.active {
            background: #d1fae5;
            color: #065f46;
        }

        .status-badge.overdue {
            background: #fef3c7;
            color: #92400e;
        }

        .status-badge.deactivated {
            background: #fee2e2;
            color: #991b1b;
        }

        /* ===== INVOICE ACTIONS ===== */
        .invoice-actions {
            margin-top: 20px;
        }

        .btn-action {
            display: flex;
            align-items: center;
            padding: 20px;
            border: 1px solid var(--gray);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            background-color: var(--light);
            width: 100%;
            text-align: left;
        }

        .btn-action:hover {
            border-color: var(--primary);
            background-color: rgba(28, 180, 220, 0.05);
        }

        .action-icon {
            font-size: 1.5rem;
            margin-right: 20px;
            width: 40px;
            text-align: center;
        }

        .action-content {
            flex: 1;
        }

        .action-title {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 6px;
            font-size: 1.1rem;
        }

        .action-desc {
            font-size: 0.9rem;
            color: var(--gray);
            line-height: 1.4;
        }

        /* ===== CLEAN TRANSACTION STYLES ===== */
        .transaction-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .transaction-item {
            padding: 16px;
            background: white;
            border-radius: 8px;
            border: 2px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: all 0.2s ease;
        }

        .transaction-item:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .transaction-main {
            display: grid;
            grid-template-columns: 1fr auto;
            grid-template-rows: auto auto;
            gap: 4px 12px;
            align-items: center;
        }

        .transaction-date {
            color: var(--dark);
            font-weight: 600;
            font-size: 0.95rem;
            grid-column: 1;
            grid-row: 1;
        }

        .transaction-amount {
            color: var(--primary);
            font-weight: 700;
            font-size: 1.1rem;
            grid-column: 2;
            grid-row: 1;
            text-align: right;
        }

        .transaction-plan {
            color: var(--gray);
            font-size: 0.9rem;
            grid-column: 1;
            grid-row: 2;
        }

        .transaction-method {
            color: var(--gray);
            font-size: 0.8rem;
            font-weight: 600;
            grid-column: 2;
            grid-row: 2;
            text-align: right;
        }

        .next-due {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            padding: 8px 12px;
            background: #f0f9ff;
            border-radius: 6px;
            border: 1px solid #e0f2fe;
            margin: 4px 0;
        }

        .next-due-label {
            color: #0369a1;
            font-weight: 500;
        }

        .next-due-date {
            color: var(--dark);
            font-weight: 600;
        }

        .transaction-id {
            color: var(--gray);
            font-size: 0.7rem;
            font-family: monospace;
            background: #f8fafc;
            padding: 6px 8px;
            border-radius: 4px;
            border: 1px solid #e2e8f0;
            word-break: break-all;
            line-height: 1.3;
        }

        /* Payment Label Border Colors */
        .label-early {
            border-left: 4px solid #10b981;
        }

        .label-ontime {
            border-left: 4px solid #3b82f6;
        }

        .label-grace {
            border-left: 4px solid #f59e0b;
        }

        .label-late {
            border-left: 4px solid #f97316;
        }

        .label-very-late {
            border-left: 4px solid #ef4444;
        }

        .label-default {
            border-left: 4px solid #6b7280;
        }

        /* ===== COMPACT PAYMENT LEGEND STYLES ===== */
        .payment-legend {
            display: flex;
            justify-content: space-between;
            margin-top: 8px;
            padding: 8px 0;
            border-top: 1px solid #e2e8f0;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            color: var(--gray);
        }

        .legend-color {
            width: 12px;
            height: 3px;
            border-radius: 2px;
        }

        .legend-color.early {
            background: #10b981;
        }

        .legend-color.ontime {
            background: #3b82f6;
        }

        .legend-color.grace {
            background: #f59e0b;
        }

        .legend-color.late {
            background: #f97316;
        }

        .legend-color.very-late {
            background: #ef4444;
        }

        /* ===== ACCOUNT INFORMATION MODAL STYLES ===== */
        .account-details {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .account-section {
            background: var(--light);
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 15px;
        }

        .account-section h4 {
            color: var(--dark);
            margin-bottom: 12px;
            font-weight: 600;
            font-size: 1rem;
            border-bottom: 1px solid #e2e8f0;
            padding-bottom: 8px;
        }

        /* ===== STEP 4 PAYMENT STYLES ===== */
        .redirect-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 300px;
            padding: 40px 20px;
        }

        .redirect-message {
            text-align: center;
            max-width: 400px;
        }

        .loading-icon {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            color: var(--primary);
        }

        .loading-icon svg {
            width: 100%;
            height: 100%;
            animation: spin 1.5s linear infinite;
        }

        .redirect-message h3 {
            color: var(--dark);
            margin-bottom: 15px;
            font-size: 1.3rem;
        }

        .redirect-message p {
            color: var(--gray);
            margin-bottom: 10px;
            line-height: 1.5;
        }

        #manual-redirect-link {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }

        #manual-redirect-link:hover {
            text-decoration: underline;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* ===== STEP 5 SUCCESS STYLES ===== */
        .success-message {
            text-align: center;
            max-width: 400px;
            margin: 0 auto;
        }

        .success-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            color: var(--success);
        }

        .success-icon svg {
            width: 100%;
            height: 100%;
        }

        .success-message h3 {
            color: var(--success);
            margin-bottom: 15px;
            font-size: 1.5rem;
        }

        .success-message p {
            color: var(--gray);
            margin-bottom: 10px;
            line-height: 1.5;
        }

        .reference-number {
            font-weight: 600;
            color: var(--dark) !important;
            margin: 20px 0 !important;
        }

        .success-actions {
            margin-top: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .success-actions .btn {
            width: 150px;
            margin: 0 auto;
        }

        /* Payment Status Styles */
        .status-loading {
            color: var(--primary);
            font-weight: 500;
        }

        .status-success {
            color: var(--success);
            font-weight: 500;
        }

        .status-error {
            color: #ef4444;
            font-weight: 500;
        }

        #payment-status {
            min-height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 15px;
        }

        .redirect-message a:hover {
            background-color: var(--primary);
            color: white;
            transition: all 0.3s ease;
        }

        /* Step 4b specific styles */
        .step-content[data-step-content="4b"] {
            display: none;
        }

        .step-content[data-step-content="4b"].active {
            display: block;
        }