* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a3d2e 0%, #2d5a47 100%);
    min-height: 100vh;
    padding: 10px;
    line-height: 1.4;
}

.form-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #FFC107, #FF9800);
}

.form-header {
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    color: white;
    padding: 20px 30px 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.2; }
}

.logo-container {
    position: relative;
    z-index: 2;
}

.form-header h1 {
    font-size: 24px;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 2px 0;
}

.form-header p:last-child {
    font-style: italic;
    font-size: 12px;
    margin-top: 4px;
}

.progress-container {
    padding: 0 30px;
    margin-top: -10px;
    position: relative;
    z-index: 3;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.progress-fill {
    background: linear-gradient(90deg, #FFC107, #FF9800);
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4);
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    margin: 15px 30px 0;
    position: relative;
}

.step-indicators::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #9ca3af;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    font-size: 14px;
}

.step-circle.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.step-circle.completed {
    background: #2E7D32;
    border-color: #2E7D32;
    color: white;
}

.step-circle.completed::before {
    content: '✓';
    font-size: 12px;
}

.step-label {
    font-size: 11px;
    text-align: center;
    color: #6b7280;
    font-weight: 600;
    max-width: 70px;
    line-height: 1.2;
}

.step-indicator.active .step-label {
    color: #4CAF50;
}

.form-content {
    padding: 25px 30px 20px;
    min-height: auto;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.step-title {
    font-size: 22px;
    color: #1f2937;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.step-subtitle {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
    position: relative;
}

.form-group.full-width {
    flex: 100%;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    letter-spacing: 0.025em;
}

.required {
    color: #ef4444;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

input:hover, select:hover, textarea:hover {
    border-color: #d1d5db;
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.radio-group input[type="radio"] {
    width: auto;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 0;
    cursor: pointer;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    background: #ffffff;
    position: relative;
    font-size: 13px;
}

.radio-group label:hover {
    border-color: #4CAF50;
    background: #f0f9ff;
}

.radio-group input[type="radio"]:checked + label {
    border-color: #4CAF50;
    background: #f0f9ff;
    color: #4CAF50;
    font-weight: 600;
}

.radio-group label::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.radio-group input[type="radio"]:checked + label::before {
    border-color: #4CAF50;
    background: #4CAF50;
    box-shadow: inset 0 0 0 2px white;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #4CAF50;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.4;
    font-size: 13px;
}

.terms-content {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 3px solid #4CAF50;
    max-height: 300px;
    overflow-y: auto;
}

.terms-content h3 {
    color: #2E7D32;
    margin-bottom: 8px;
    font-size: 16px;
}

.terms-content p {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.declaration-group {
    max-height: 250px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.declaration-group h3 {
    color: #2E7D32;
    margin-bottom: 8px;
    font-size: 16px;
    position: sticky;
    top: 0;
    background: white;
    padding-bottom: 4px;
}

.declaration-group p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

h3 {
    color: #2E7D32;
    margin: 20px 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #4CAF50;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    gap: 12px;
    background: white;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    letter-spacing: 0.025em;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    font-weight: 500;
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.success-message {
    text-align: center;
    padding: 40px 30px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 36px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.success-message h2 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 12px;
    font-weight: 700;
}

.success-message p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

#referenceNumber {
    color: #4CAF50;
    font-weight: 700;
    background: #f0f9ff;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Compact layout for better space utilization */
@media (min-width: 1024px) {
    .form-row.triple {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px;
    }
    
    .compact-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .compact-grid.triple {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* File upload styling */
.file-upload-label {
    display: inline-block;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
    color: #6b7280;
    margin-top: 4px;
}

.file-upload-label:hover {
    border-color: #4CAF50;
    background: #f0f9ff;
    color: #4CAF50;
}

input[type="file"] {
    display: none;
}

/* Tablet Styles */
@media (max-width: 1023px) and (min-width: 769px) {
    .form-container {
        max-width: 95%;
    }
    
    .form-content {
        padding: 20px 25px 15px;
    }
    
    .radio-group {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .form-container {
        border-radius: 12px;
        max-width: 100%;
    }

    .form-header {
        padding: 15px 15px 10px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .progress-container,
    .step-indicators,
    .form-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .form-content {
        padding-top: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .radio-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .radio-group label {
        justify-content: flex-start;
        padding: 8px 12px;
    }

    .step-indicators {
        margin: 10px 15px 0;
    }

    .step-label {
        font-size: 10px;
        max-width: 50px;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .button-group {
        flex-direction: column-reverse;
        gap: 10px;
        padding-top: 15px;
        margin-top: 15px;
    }

    .btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .terms-content {
        max-height: 200px;
        padding: 12px;
    }
    
    .declaration-group {
        max-height: 180px;
        padding: 10px;
    }
    
    input, select, textarea {
        padding: 10px 12px;
    }
    
    textarea {
        min-height: 60px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .step-indicators {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .step-indicator {
        min-width: 60px;
    }
    
    .form-header h1 {
        font-size: 18px;
    }
    
    .step-title {
        font-size: 20px;
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
.terms-content::-webkit-scrollbar,
.declaration-group::-webkit-scrollbar {
    width: 6px;
}

.terms-content::-webkit-scrollbar-track,
.declaration-group::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb,
.declaration-group::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb:hover,
.declaration-group::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}