* {
    box-sizing: border-box !important;
}

input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box !important;
    margin: 0;
}

html, body {
    background: #fff !important;
    margin: 0;
    padding: 0;
        font-family: 'Inter', sans-serif;
    overflow-x: hidden !important;
    width: 100% !important;
    min-width: 100% !important;
}

.wrapper {
    width: 100% !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    position: relative;
}

.form-container,
.form-section,
.field-group,
.year-row {
    flex-shrink: 0;
    min-width: 0;
}

.wrapper, .form-container {
    width: 100%;
}

:root {
    --313C60: #66BED7;
    --313C: #0092BC;
    --430С: #BEC3C7;
    --280c: #012169;
    --primary-color: #6DB4D6;
    --primary-hover: #5A9FBF;
    --primary-disabled: #C8D9E1;
    --error-color: #FF6B6B;
    --text-primary: #2C3E50;
    --text-title: #434343;
    --text-result: #6698B1;
    --text-secondary: #95A5A6;
    --text-grayscale: #595959;
    --text-grayscale-95:#262626;
    --text-disabled: #BDC3C7;
    --border-color: #CCE5F1;
    --background: #FFFFFF;
    --background-light: linear-gradient(114.38deg, #F4FDFF 0%, #DDF5FA 100%);


    /* Spacing */
    --border-radius: 8px;
    --border-radius-large: 12px;
    --transition: all 0.3s ease;
}

/* Input Fields */
.input-field {
    display: block !important;
    width: calc(100% - 34px);
    min-width: 0 !important;
    max-width: calc(100% - 34px) !important;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    flex-shrink: 0 !important;
    box-sizing: content-box !important;
    margin: 0 !important;
}

.input-field[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Критический фикс для Android WebView - убираем margin у спиннеров */
.input-field[type="number"]::-webkit-inner-spin-button,
.input-field[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(109, 180, 214, 0.1);
}

.input-field.error {
    border-color: var(--error-color);
}

.input-field::placeholder {
    color: var(--text-secondary);
}

/* Select / Dropdown */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-field {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 40px 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    flex-shrink: 0;
}

.select-field:focus {
    border-color: var(--primary-color);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-secondary);
    pointer-events: none;
}

.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    padding: 12px 40px 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-header.open {
    border-color: var(--primary-color);
}

.dropdown-list {
    margin-top: 10px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--background);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--background-light);
}

.dropdown-item.disabled {
    color: var(--text-disabled);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Rating Buttons */
.rating-group {
    display: flex;
    gap: 8px;
}

.rating-button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.rating-button:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.rating-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-handle {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-handle {
    transform: translateX(24px);
}

/* Range Slider */
.range-slider {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.range-track {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
}

.range-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translate(-50%, -50%);
    cursor: grab;
}

.range-thumb:active {
    cursor: grabbing;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

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

.btn-primary:disabled {
    background: var(--primary-disabled);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--background-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

/* Checkbox */
.checkbox-wrapper {
    padding-left: 4px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

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

.checkbox-custom {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: "";
    width: 16px;
    height: 16px;
    background: url("/css/icons/Check.svg") no-repeat center / contain;
    position: absolute;

}

.checkbox-label {
    font-size: 14px;
    color: var(--text-title);
    line-height: 1.5;
}

/* Error State */
.field-error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--error-color);
}

/* Field Group */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    overflow-x: hidden;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Badge/Hint */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--text-primary);
    color: white;
    border-radius: 16px;
    gap: 6px;
}

.badge-icon {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Scrollbar Styling */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.result-item {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 12px 0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    max-width: 100%;
    font-size: clamp(10px, calc(8.57vw - 17.43px), 16px);
    color: var(--text-primary);
    font-weight: 400;
}

.result-value {
    text-wrap: nowrap;
    font-size: clamp(10px, calc(8.57vw - 17.43px), 16px);
}

.refresh-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    transition: var(--transition);
}

/* Form Container */
.form-container {
    position: relative;
    padding: 20px 16px;
    line-height: 110%;
    width: 100%;
    border-radius: 24px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--background-light);
}

/* Form Section */
.form-section {
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.form-section-info {
    padding: 16px;
    color: var(--text-title);
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-section-info__title {
    text-align: center;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-title);
    line-height: 1.4;
}

.form-section-result-title {
    line-height: 110%;
    color: var(--text-result);
    font-size: 20px;
    font-weight: 700;
}

.form-section-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-grayscale);
    line-height: 1.4;
    padding-top: 8px;
}


/* Form Header */
.form-header {
    background: var(--background);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-header-image {
    align-self: flex-start;
}

.form-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
}

.form-title b {
    font-weight: 600;
}

/* Form Actions */
.form-actions {
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 24px;
}