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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #F1F2F5 0%, #F1F2F5 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1E293B 0%, #324054 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: white;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
}

.service-selector {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.service-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.service-btn {
    padding: 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    color: #495057;
}

.service-btn:hover {
    border-color: #d33a3a;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.service-btn.active {
    border-color: #d33a3a;
    background: #d33a3a;
    color: white;
}

.form-container {
    padding: 20px;
}   

.form-section {
    margin-bottom: 35px;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    background: #fafbfc;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d33a3a;
}

.section-subheader {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.required {
    color: #dc3545;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #d33a3a;
    box-shadow: 0 0 0 3px rgba(211, 50, 50, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(135deg, #d33a3a 0%, #b32d2d 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(211, 50, 50, 0.3);
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.service-form {
    display: block;
}

.service-form.hidden {
    display: none;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin: 0;
}

.repeating-row {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
}

.add-row-btn,
.remove-row-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.add-row-btn {
    background: #28a745;
    color: white;
}

.add-row-btn:hover {
    background: #218838;
}

.remove-row-btn {
    background: #dc3545;
    color: white;
}

.remove-row-btn:hover {
    background: #c82333;
}

.surface-area-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.area-name-group {
    width: 100%;
}

.dimensions-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 5px;
    width: 100%;
}

.dimension-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.dimension-group label {
    font-size: 12px;
    margin-bottom: 5px;
    text-align: center;
    white-space: nowrap;
}

.size-result {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: bold;
    color: #1976d2;
    text-align: center;
    min-width: 80px;
    font-size: 14px;
    margin-left: 10px;
}

.dimension-input {
    width: 100%;
    min-width: 40px;
    max-width: 80px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.file-upload {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload.dragover {
    border-color: #667eea;
    background: #e3f2fd;
    transform: scale(1.02);
}

.file-upload-area {
    text-align: center;
    padding: 20px;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    cursor: pointer;
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
}

.file-upload-hint {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-list {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8f9fa;
}

.file-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin-bottom: 2px;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.file-remove:hover {
    background: #c82333;
}

.upload-progress {
    margin-top: 15px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #495057;
}

.file-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #dee2e6;
}

.pricing-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.pricing-breakdown {
    margin-bottom: 20px;
}

.pricing-breakdown h4 {
    margin-bottom: 15px;
    color: #333;
}

.pricing-total {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.total-label {
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.total-value {
    font-weight: 700;
    font-size: 20px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    min-width: 100px;
    text-align: center;
}

.pricing-item {
    display: none;
}

.pricing-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.conditional-field {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.checkbox-item label {
    margin-bottom: 0;
}

.multiselect-dropdown {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    min-height: 38px;
    max-height: 200px;
    overflow-y: auto;
}

.multiselect-dropdown option {
    padding: 8px;
    margin: 2px 0;
    display: block;
}

.network-status {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 8px 0;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

.network-status.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-left: 4px solid #047857;
}

.network-status.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-left: 4px solid #b91c1c;
}

.network-status.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-left: 4px solid #b45309;
}

.network-status.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-left: 4px solid #1d4ed8;
}

.network-status button {
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.network-status button:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-1px);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.upload-progress {
    position: relative;
    overflow: hidden;
}

.upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.retry-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.retry-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.retry-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.retry-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .pricing-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .dimensions-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .dimension-group {
        min-width: 80px;
        flex: 1;
    }
    
    .dimension-input, .size-result {
        font-size: 12px;
        padding: 6px;
    }
    
    .dimension-group label {
        font-size: 11px;
    }
}
