.input-field {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #111111;
  font-size: 13px;
  line-height: 1;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.input-field::placeholder {
  color: rgba(17, 17, 17, 0.4);
}

.input-field:hover {
  border-color: rgba(17, 17, 17, 0.22);
}

.input-field:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(198, 216, 255, 0.25);
  background: #ffffff;
}

.input-field--large {
  height: 48px;
  font-size: 14px;
  border-radius: 16px;
}

.input-field--small {
  height: 36px;
  font-size: 12px;
  border-radius: 12px;
}

.input-field--compact {
  height: 38px;
  padding: 0 10px;
  font-size: 12px;
}

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

.textarea-field {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1.5px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #111111;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.textarea-field::placeholder {
  color: rgba(17, 17, 17, 0.4);
}

.textarea-field:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(198, 216, 255, 0.25);
  background: #ffffff;
}

.select-field {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  padding-right: 36px;
  border: 1.5px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: #111111;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.select-field:hover {
  border-color: rgba(17, 17, 17, 0.22);
}

.select-field:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(198, 216, 255, 0.25);
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.toggle-switch:hover {
  border-color: rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.toggle-switch__track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(17, 17, 17, 0.15);
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.toggle-switch__track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.toggle-switch--active {
  border-color: rgba(17, 17, 17, 0.08);
  background: rgba(17, 17, 17, 0.04);
}

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

.toggle-switch--active .toggle-switch__track::before {
  transform: translateX(18px);
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.2);
}

.toggle-switch__label {
  font-size: 12px;
  color: rgba(17, 17, 17, 0.72);
  user-select: none;
}

.toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-checkbox:checked + .toggle-switch__track {
  background: var(--color-primary);
}

.toggle-checkbox:checked + .toggle-switch__track::before {
  transform: translateX(18px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.15);
}

.btn--primary:hover {
  background: #1f1f1f;
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.2);
}

.btn--secondary {
  background: rgba(17, 17, 17, 0.08);
  color: #111111;
}

.btn--secondary:hover {
  background: rgba(17, 17, 17, 0.12);
}

.btn--danger {
  background: #d14b63;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(209, 75, 99, 0.25);
}

.btn--danger:hover {
  background: #e05570;
  box-shadow: 0 4px 12px rgba(209, 75, 99, 0.3);
}

.btn--ghost {
  background: transparent;
  color: rgba(17, 17, 17, 0.7);
  border: 1.5px solid rgba(17, 17, 17, 0.15);
}

.btn--ghost:hover {
  background: rgba(17, 17, 17, 0.04);
  border-color: rgba(17, 17, 17, 0.22);
}

.btn--success {
  background: #2eab59;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(46, 171, 89, 0.25);
}

.btn--success:hover {
  background: #3bc066;
  box-shadow: 0 4px 12px rgba(46, 171, 89, 0.3);
}

.btn--rounded {
  border-radius: 16px;
}

.btn--small {
  height: 32px;
  min-width: 72px;
  padding: 0 14px;
  font-size: 12px;
}

.btn--large {
  height: 48px;
  min-width: 100px;
  padding: 0 22px;
  font-size: 14px;
}

.btn--compact {
  height: 36px;
  min-width: 72px;
  padding: 0 12px;
  font-size: 12px;
}

.btn--icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 12px;
}

.btn--icon.btn--small {
  width: 32px;
  min-width: 32px;
  border-radius: 10px;
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-group--compact {
  gap: 8px;
}

.btn-group--center {
  justify-content: center;
}

.btn-group--end {
  justify-content: flex-end;
}

.btn-group--fill {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field__label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(17, 17, 17, 0.72);
}

.form-field__hint {
  font-size: 11px;
  color: rgba(17, 17, 17, 0.48);
  margin-top: -2px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field--inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-field--inline .form-field__label {
  flex-shrink: 0;
}

.form-field--inline .input-field {
  flex: 1;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.checkbox-wrapper,
.radio-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-wrapper input,
.radio-wrapper input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #111111;
}

.checkbox-wrapper__label,
.radio-wrapper__label {
  font-size: 12px;
  color: rgba(17, 17, 17, 0.8);
  user-select: none;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  font-size: 12px;
  color: #111111;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.chip:hover {
  background: rgba(17, 17, 17, 0.1);
}

.chip--active {
  background: #111111;
  color: #ffffff;
}

.chip input {
  display: none;
}

@media (max-width: 420px) {
  .input-field {
    height: 40px;
    font-size: 13px;
  }

  .textarea-field {
    font-size: 13px;
    min-height: 72px;
  }

  .select-field {
    height: 40px;
    font-size: 13px;
  }

  .btn {
    height: 38px;
    min-width: 80px;
    font-size: 12px;
  }

  .btn--large {
    height: 44px;
  }

  .toggle-switch {
    min-height: 40px;
  }

  .form-grid--2col,
  .form-grid--3col {
    grid-template-columns: 1fr;
  }
}
