
.form-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 3px solid #007cba;
}

.patch-order-form h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 32px;
    font-weight: 700;
}

.form-subtitle {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.form-section {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: #007cba;
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.1);
}

.section-header {
    background: #26A2D6;
    color: white;
    padding: 15px 25px;
    margin: 0;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    font-size: 16px;
    color: white;
}

.form-content {
    padding: 25px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

/* New Measurement Controls */
.measurement-controls-new {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.measurement-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.measurement-section label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin: 0;
}

/* Unit Buttons - Black Design */
.unit-buttons {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
}

.unit-btn {
    padding: 8px 16px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.unit-btn.active {
    background: #26A2D6;
    color: #000;
    font-weight: 600;
}

.unit-btn:hover:not(.active) {
    background: #555;
}

/* Input Controls - Black Design */
.input-control {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: #555;
}

.measurement-input {
    flex: 1;
    border: 1px solid #ddd;
    outline: none;
    text-align: center;
    font-size: 14px;
    background: #fff;
    color: #333;
    padding: 0 8px;
    border-left: none;
    border-right: none;
    max-width: 70px !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Legacy styles - keeping for backward compatibility */
.unit-tabs {
    display: none;
}

.measurement-controls {
    display: none;
}

/* Patch Type Selection */
.patch-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.patch-type-option {
    position: relative;
    text-align: center;
    cursor: pointer;
    padding: 15px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fff;
}

.patch-type-option:hover {
    border-color: #007cba;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
}

.patch-type-option.selected {
    border-color: #007cba;
    background: #007cba;
    color: #fff;
}

.patch-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.patch-type-svg {
    width: 55px;
    height: 55px;
    margin: 0 auto 8px;
    display: block;
    object-fit: contain;
}

.patch-type-option.selected .patch-type-svg {
    filter: brightness(0) invert(1);
}

.patch-type-label {
    font-size: 13px;
    font-weight: 600;
}

/* Backing Options */
.backing-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.backing-option {
    position: relative;
    cursor: pointer;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    min-height: 100px;
}

.backing-option:hover {
    border-color: #007cba;
    background: #f0f8ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.15);
}

.backing-option.selected {
    border-color: #007cba;
    background: #007cba;
    color: #fff;
}

.backing-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.backing-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 124, 186, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.backing-option.selected .backing-icon {
    background: rgba(255, 255, 255, 0.2);
}

.backing-icon svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.backing-label strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.backing-label span {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

/* File Upload */
.file-upload-area {
    border: 3px dashed #007cba;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fdff;
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

#logo-upload {
    display: none !important;
}

.file-upload-area:hover {
    border-color: #007cba;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.file-upload-area.dragover {
    border-color: #007cba;
    background: #e3f2fd;
}

.file-upload-text {
    color: #666;
    font-size: 16px;
}

.file-upload-text i {
    font-size: 48px;
    color: #007cba;
    margin-bottom: 15px;
    display: block;
}

.file-upload-text span {
    display: block;
    margin-bottom: 10px;
}

.file-size-limit {
    color: #999;
    font-size: 12px;
}

.uploaded-file {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 8px;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
    padding: 30px 0;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a8b 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    margin-bottom: 15px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.delivery-note {
    color: #666;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Messages */
.form-message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .patch-order-form {
        padding: 20px;
        margin: 10px;
    }

    .form-content {
        padding: 20px;
    }

    .measurement-controls {
        flex-direction: column;
        gap: 12px;
    }

    .measurement-group {
        min-width: auto;
    }

    .patch-types {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 12px;
    }

    .backing-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .unit-tabs {
        margin-bottom: 20px;
    }

    .unit-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .patch-types {
        grid-template-columns: repeat(4, 1fr);
    }

    .patch-type-svg {
        width: 40px;
        height: 40px;
    }

    .patch-type-label {
        font-size: 11px;
    }

    .backing-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .backing-option {
        padding: 15px 12px;
        gap: 8px;
    }

    .backing-icon {
        width: 40px;
        height: 40px;
    }

    .backing-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* Admin Styles */
.patch-order-admin-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.patch-order-admin-details .form-group {
    margin-bottom: 15px;
}

.patch-order-admin-details label {
    font-weight: 600;
    color: #23282d;
    margin-bottom: 5px;
    display: block;
}

.patch-order-admin-details input[readonly],
.patch-order-admin-details textarea[readonly] {
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #666;
}

.uploaded-file-display {
    margin-top: 10px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #007cba;
}

.uploaded-file-display a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.uploaded-file-display a:hover {
    text-decoration: underline;
}