/* ==========================================================================
   Repair Form Styles (Upgraded with Search + Stepper)
   ========================================================================== */

.repair-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
}

/* Step Wizard */
.step-wizard {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    border: 3px solid #e5e7eb;
}

.step-item.active .step-circle {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: scale(1.1);
}

.step-item.completed .step-circle {
    background: #22c55e;
    border-color: #22c55e;
}

.step-label {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    text-align: center;
}

.step-item.active .step-label {
    color: #10b981;
    font-weight: 700;
}

.step-item.completed .step-label {
    color: #22c55e;
}

.step-line {
    flex: 1;
    height: 3px;
    background: #e5e7eb;
    margin: 0 1rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.step-line.completed {
    background: #22c55e;
}

/* Form Sections */
.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 0.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: white;
}

.form-input.has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    display: block;
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

/* Search Dropdown */
.search-wrapper {
    position: relative;
}

.search-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.search-loading.active {
    display: flex;
}

.search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
    background: #f0fdf4;
}

.search-dropdown-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}

.search-dropdown-details {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.search-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* PDPA Section */
.pdpa-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.pdpa-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.pdpa-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #10b981;
    flex-shrink: 0;
}

.pdpa-text {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.5;
}

/* Confirm Card */
.confirm-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

.confirm-card h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #111827;
}

.confirm-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.confirm-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
}

.confirm-label {
    color: #6b7280;
    min-width: 120px;
    flex-shrink: 0;
}

.confirm-value {
    font-weight: 600;
    color: #111827;
}

/* Form Action Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f3f4f6;
}

.form-submit-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-reset-btn {
    padding: 0.875rem 2rem;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-reset-btn:hover {
    background: #e5e7eb;
    color: #374151;
}