* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}

header .subtitle {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.step-indicator .step {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    color: #999;
    border-bottom: 3px solid #ddd;
    transition: all 0.3s;
}

.step-indicator .step.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.step-indicator .step.completed {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

/* Card */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-content h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.step-content > p {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Buttons */
.btn {
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #2563eb;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.button-group .btn-primary {
    flex: 1;
}

.button-group .btn-secondary {
    width: auto;
}

/* Invoice Details */
.invoice-details {
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-row .label {
    color: #666;
}

.detail-row .value {
    font-weight: 600;
    color: #1a1a2e;
    text-align: right;
}

.detail-row.total {
    font-size: 16px;
    padding-top: 12px;
}

.detail-row.total .value {
    color: #2563eb;
}

.invoice-details hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 8px 0;
}

/* Payment Summary */
.payment-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.pay-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

/* Confirmation */
.success-icon {
    width: 64px;
    height: 64px;
    background: #16a34a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.failure-icon {
    width: 64px;
    height: 64px;
    background: #dc2626;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

#confirmation-success,
#confirmation-failure {
    text-align: center;
}

#confirmation-success .detail-row,
#confirmation-failure .detail-row {
    justify-content: center;
    gap: 8px;
}

/* Error Message */
.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
    }

    .card {
        padding: 24px 20px;
    }

    .step-indicator .step {
        font-size: 11px;
    }
}
