* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fffe 0%, #ffffff 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #3ebeb4 0%, #3ebeb4 100%);    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
    width: 0%;
}

.form-container {
    padding: 40px;
}

.form-page {
    display: none;
}

.form-page.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    color: #333;
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.required {
    color: #f44336;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #f44336;
}

.error-msg {
    display: block;
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

.notes-box {
    min-height: 120px;
    resize: vertical;
}

.iti {
    width: 100%;
}

.iti__input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    user-select: none;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Product Cards */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.product-card.selected {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.product-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.product-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-price {
    font-size: 20px;
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quantity-control label {
    margin: 0;
    font-size: 13px;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.qty-btn:hover {
    background: #5568d3;
}

.btn-add-product {
    width: 100%;
    padding: 10px;
    border: none;
    background: #4CAF50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-add-product:hover {
    background: #45a049;
}

/* Signature Pad */
.signature-container {
    margin-top: 30px;
}

.signature-pad-wrapper {
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    margin: 15px 0;
}

.signature-pad {
    width: 100%;
    height: 200px;
    cursor: crosshair;
}

.signature-actions {
    text-align: right;
    margin-top: 10px;
}

.btn-clear {
    padding: 8px 20px;
    border: 2px solid #f44336;
    background: white;
    color: #f44336;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #f44336;
    color: white;
}

.signature-label {
    text-align: center;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-prev {
    background: #6c757d;
    color: white;
}

.btn-prev:hover {
    background: #5a6268;
}

.btn-next {
    background: #3ebeb4;
    color: white;
    margin-left: auto;
}

.btn-next:hover {
    background: #3ebeb4;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 40px 20px;
}

.welcome-screen h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
}

.welcome-screen p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.welcome-screen ul {
    text-align: left;
    display: inline-block;
    margin: 20px 0;
}

.welcome-screen ul li {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
    }

    .form-container {
        padding: 20px;
    }

    header h1 {
        font-size: 22px;
    }

    .page-title {
        font-size: 20px;
    }

    .product-container {
        grid-template-columns: 1fr;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .btn-next {
        margin-left: 0;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
    }
}

/* Product Container - Vertical List */
.product-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Product Checkbox Item */
.product-checkbox-item {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background: white;
    transition: all 0.3s ease;
}

.product-checkbox-item:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.1);
}

.product-checkbox-item:has(input[type="checkbox"]:checked) {
    border-color: #4CAF50;
    background: #f1f8f4;
}

/* Product Checkbox Label */
.product-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.product-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    cursor: pointer;
    margin-top: 5px;
}

/* Product Checkbox Content */
.product-checkbox-content {
    flex: 1;
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-checkbox-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.product-checkbox-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-checkbox-info {
    flex: 1;
}

.product-checkbox-name {
    font-size: 18px;
    color: #333;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.product-checkbox-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-checkbox-price {
    font-size: 24px;
    color: #4CAF50;
    font-weight: bold;
}

/* Product Quantity Control */
.product-quantity-control {
    display: none;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.qty-label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.qty-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 38px;
    height: 38px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: #667eea;
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 60px;
    height: 38px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-checkbox-content {
        flex-direction: column;
        text-align: center;
    }

    .product-checkbox-image {
        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 1;
    }

    .product-checkbox-label {
        flex-direction: column;
    }

    .product-checkbox-label input[type="checkbox"] {
        align-self: flex-start;
    }

    .product-quantity-control {
        flex-direction: column;
        align-items: stretch;
    }

    .qty-buttons {
        justify-content: center;
    }
}