:root {
    /* Color palette */
    /* --primary-color: #4361ee;
    --primary-dark: #3a56d4; */
    --primary-color: #ee4343;
    --primary-dark: #c72424;
    --secondary-color: #ffffff;
    --accent-color: #ee4343;
    --text-color: #422b2b;
    --text-light: #8d99ae;
    --border-color: #edf2f4;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --success-color: #4bb543;
    --error-color: #ff3333;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Typography */
    --font-base: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Roboto Mono', monospace;
    --text-base: 1rem;
    --text-sm: 0.875rem;
    --text-lg: 1.125rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.45s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /*padding: var(--space-xl);*/
    min-height: 100vh;
}

/* Container */
.registration-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--secondary-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.registration-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    position: relative;
    counter-reset: step;
    padding: 0 var(--space-lg);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--border-color);
    z-index: 1;
    border-radius: var(--radius-full);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 0;
    height: 4px;
    background-color: #4bb543;
    z-index: 2;
    transition: width var(--transition-normal);
    transform: translateX(-50%);
}

.progress-step.active:not(:first-child)::after {
    width: 100%;
}

.progress-step.completed:not(:first-child)::after {
    width: 100%;
    background-color: var(--primary-color);
}

.progress-step span {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--border-color);
    color: var(--dark-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    position: relative;
    transition: all var(--transition-normal);
    border: 3px solid var(--border-color);
    z-index: 3;
}

.progress-step.completed span {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.progress-step.active span {
    background-color: #4bb543;
    color: var(--border-color);
    border-color: #4bb543;
    transform: scale(1.1);
}

.progress-step p {
    font-size: var(--text-sm);
    color: var(--dark-gray);
    text-align: center;
    max-width: 80px;
    transition: all var(--transition-normal);
}

.progress-step.active p,
.progress-step.completed p {
    color: var(--text-color);
    font-weight: 500;
}

.checkbox-group.lens-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.checkbox-label:hover {
    background: #e9e9e9;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h2 {
    color: var(--text-color);
    font-size: 1.75rem;
    position: relative;
    padding-bottom: var(--space-sm);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin-top: var(--space-lg);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-color);
    font-size: var(--text-sm);
}

.required::after {
    content: '*';
    color: var(--error-color);
    margin-left: 4px;
}

input:not([type="checkbox"], [type="radio"]),
select,
textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
    background-color: var(--light-gray);
    color: var(--text-color);
}

input:not([type="checkbox"], [type="radio"]):focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(238, 67, 67, 0.2);
    background-color: var(--secondary-color);
}

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

/* Checkbox and Radio */
.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    position: relative;
}

.checkbox-item input,
.radio-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-item label,
.radio-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    padding-left: 30px;
    position: relative;
    min-height: 24px;
}

.checkbox-item label::before,
.radio-item label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    background-color: var(--secondary-color);
    transition: all var(--transition-fast);
}

.checkbox-item label::before {
    border-radius: var(--radius-sm);
}

.radio-item label::before {
    border-radius: var(--radius-full);
}

.checkbox-item input:checked + label::before,
.radio-item input:checked + label::before {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.checkbox-item input:checked + label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 12px;
    border: solid var(--secondary-color);
    border-width: 0 2px 2px 0;
}

.radio-item input:checked + label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--secondary-color);
}

/* Form Layout */
.form-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Dynamic Fields */
.equipment-group {
    background-color: var(--light-gray);
    padding: var(--space-md);
    padding-bottom: 35px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.equipment-group:hover {
    box-shadow: var(--shadow-md);
}

.equipment-group:first-child .btn-remove {
    display: none;
}

/* Buttons */
.btn {
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: rgba(67, 97, 238, 0.1);
}

.btn-danger {
    background-color: var(--error-color);
    color: var(--secondary-color);
}

.btn-danger:hover:not(:disabled) {
    background-color: #e60000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-add {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    margin-bottom: var(--space-lg);
}

.btn-remove {
    position: absolute;
    right: var(--space-md);
    bottom: 5px;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: var(--text-sm);
}

.btn-remove img{
    width: 30px;
}

.btn-continue, .btn-back, .btn-submit{
    background-color: var(--primary-color);
    color: var(--border-color);
    border: none;
    cursor: pointer;
    border-radius: 7px;
    padding: 10px 15px;
    font-weight: bold;
}

.btn-back{
    background-color: #333;
}

.btn-submit{
    background-color: var(--success-color);
}

/* .btn-add{
    background-color: #d76666;
    padding: 10px 12px;
    border: none;
    border-radius: 7px;
} */


.btn-add-wrapper-exp{
    position: absolute;
    bottom: -70px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin-bottom: 10px;
}

.btn-add-wrapper{
    position: absolute;
    bottom: -70px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin-bottom: 10px;
}

.icon-add{
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 100%;
    margin-bottom: 0;
}

.icon-add img{
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    border-radius: 100%;
}

#camera-fields{
    position: relative;
    margin-bottom: 100px;
}


#operator-section{
    position: relative;
    margin-bottom: 100px;
}

#lens-fields{
    position: relative;
    margin-bottom: 40px;
}

/* Select2 Custom Styles */
.select2-container {
    z-index: 1000;
}

.select2-container--default .select2-selection--single {
    height: 46px;
    padding: 20px;
    padding-left: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--light-gray);
    transition: all var(--transition-fast);
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--primary-color);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    margin-top: -14px;
    padding-left: 15px;
    color: var(--text-color);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    margin-top: 8px;
    height: 44px;
    right: 10px;
    margin-right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-color) transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--text-color) transparent;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--error-color) !important;
    color: white !important;
}

.select2-container--default .select2-results__option:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary-dark) !important;
    color: white !important;
}

.select2-container--default .select2-selection--single:focus {
    border-color: var(--error-color) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 10px;
}

.select2-dropdown {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Fix for Select2 in Safari */
.select2-container *:focus {
    outline: none;
}

/* Ensure proper spacing with Select2 */
.form-group .select2-container {
    margin-bottom: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

/* Messages */
.message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.message svg {
    flex-shrink: 0;
}

.message-success {
    background-color: rgba(75, 181, 67, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(75, 181, 67, 0.3);
}

.message-error {
    background-color: rgba(255, 51, 51, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 51, 51, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-section {
    animation: fadeIn var(--transition-normal) forwards;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: var(--space-md);
    }
    
    .registration-container {
        padding: var(--space-lg);
    }
    
    .form-row {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .progress-step p {
        display: none;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: var(--space-sm);
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .checkbox-group,
    .radio-group {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-muted {
    color: var(--text-light);
    font-size: var(--text-sm);
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

/* Photo Upload Section Styles */
.photo-upload-container {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #f9f9f9;
}

.upload-hint {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.upload-area {
    border: 2px dashed #ef9f9f;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    margin-bottom: 15px;
}

.upload-area:hover {
    border-color: #999;
    background: #f5f5f5;
}

.upload-area.active {
    border-color: #4CAF50;
    background: #f0fff0;
}

.upload-prompt {
    color: #666;
}

.upload-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    /* opacity: 0.7; */
}

.small-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 150px;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.preview-item:hover .remove-btn {
    opacity: 1;
}

.upload-error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
    display: none;
}

.existing-photos {
    margin-top: 30px;
}

.existing-photos h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.existing-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.existing-photo-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 150px;
}

.existing-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    padding: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.existing-photo-item:hover .photo-actions {
    opacity: 1;
}

.photo-actions button {
    background: none;
    border: none;
    color: white;
    margin: 0 5px;
    cursor: pointer;
}

.photo-actions button img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}